Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java +7 −4 Original line number Diff line number Diff line Loading @@ -190,6 +190,12 @@ public class StatusBarWindowView extends FrameLayout { @Override public boolean dispatchKeyEvent(KeyEvent event) { if (mService.interceptMediaKey(event)) { return true; } if (super.dispatchKeyEvent(event)) { return true; } boolean down = event.getAction() == KeyEvent.ACTION_DOWN; switch (event.getKeyCode()) { case KeyEvent.KEYCODE_BACK: Loading @@ -214,10 +220,7 @@ public class StatusBarWindowView extends FrameLayout { } break; } if (mService.interceptMediaKey(event)) { return true; } return super.dispatchKeyEvent(event); return false; } @Override Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java +12 −6 Original line number Diff line number Diff line Loading @@ -366,7 +366,6 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene * @return true if a matching action was found, false otherwise */ public boolean updatePendingIntentFromActions(Notification.Action[] actions) { boolean found = false; if (mPendingIntent == null || actions == null) { return false; } Loading Loading @@ -473,14 +472,21 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene } @Override public boolean onKeyPreIme(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_UP) { public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { // Eat the DOWN event here to prevent any default behavior. return true; } return super.onKeyDown(keyCode, event); } @Override public boolean onKeyUp(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { defocusIfNeeded(true /* animate */); final InputMethodManager imm = InputMethodManager.getInstance(); imm.hideSoftInputFromWindow(getWindowToken(), 0); return true; } return super.onKeyPreIme(keyCode, event); return super.onKeyUp(keyCode, event); } @Override Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java +7 −4 Original line number Diff line number Diff line Loading @@ -190,6 +190,12 @@ public class StatusBarWindowView extends FrameLayout { @Override public boolean dispatchKeyEvent(KeyEvent event) { if (mService.interceptMediaKey(event)) { return true; } if (super.dispatchKeyEvent(event)) { return true; } boolean down = event.getAction() == KeyEvent.ACTION_DOWN; switch (event.getKeyCode()) { case KeyEvent.KEYCODE_BACK: Loading @@ -214,10 +220,7 @@ public class StatusBarWindowView extends FrameLayout { } break; } if (mService.interceptMediaKey(event)) { return true; } return super.dispatchKeyEvent(event); return false; } @Override Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java +12 −6 Original line number Diff line number Diff line Loading @@ -366,7 +366,6 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene * @return true if a matching action was found, false otherwise */ public boolean updatePendingIntentFromActions(Notification.Action[] actions) { boolean found = false; if (mPendingIntent == null || actions == null) { return false; } Loading Loading @@ -473,14 +472,21 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene } @Override public boolean onKeyPreIme(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_UP) { public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { // Eat the DOWN event here to prevent any default behavior. return true; } return super.onKeyDown(keyCode, event); } @Override public boolean onKeyUp(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { defocusIfNeeded(true /* animate */); final InputMethodManager imm = InputMethodManager.getInstance(); imm.hideSoftInputFromWindow(getWindowToken(), 0); return true; } return super.onKeyPreIme(keyCode, event); return super.onKeyUp(keyCode, event); } @Override Loading