diff options
| author | 2016-02-12 19:01:02 +0900 | |
|---|---|---|
| committer | 2016-02-16 09:09:18 -0800 | |
| commit | 76b7d0d5d7bfaf27d0039437a7ab08325014e99a (patch) | |
| tree | 51ed690fc9cc56b7b96e1285bcd7458169e34888 | |
| parent | 57bf8eb561f1013761b954313cc29cf78b11f4b3 (diff) | |
Revert "PIP: Use long press HOME for PIP on Android TV (2/2)"
Long press HOME will launch recents instead.
Bug: 27159966
Change-Id: I9a4fd847d716d7e4e4754c7a9c48628c46f82233
| -rw-r--r-- | core/res/res/values/config.xml | 1 | ||||
| -rw-r--r-- | services/core/java/com/android/server/policy/PhoneWindowManager.java | 12 |
2 files changed, 4 insertions, 9 deletions
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index 507925b70336..016ed60eeea3 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -998,7 +998,6 @@ 0 - Nothing 1 - Recent apps view in SystemUI 2 - Launch assist intent - 3 - Start picture-in-picture (PIP) or launch PIP UI This needs to match the constants in policy/src/com/android/internal/policy/impl/PhoneWindowManager.java --> diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java index 3a70e675acdb..6c2e4d437106 100644 --- a/services/core/java/com/android/server/policy/PhoneWindowManager.java +++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java @@ -190,8 +190,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { static final int LONG_PRESS_HOME_NOTHING = 0; static final int LONG_PRESS_HOME_RECENT_SYSTEM_UI = 1; static final int LONG_PRESS_HOME_ASSIST = 2; - static final int LONG_PRESS_HOME_PICTURE_IN_PICTURE = 3; - static final int LAST_LONG_PRESS_HOME_BEHAVIOR = LONG_PRESS_HOME_PICTURE_IN_PICTURE; + static final int LAST_LONG_PRESS_HOME_BEHAVIOR = LONG_PRESS_HOME_ASSIST; static final int DOUBLE_TAP_HOME_NOTHING = 0; static final int DOUBLE_TAP_HOME_RECENT_SYSTEM_UI = 1; @@ -1350,7 +1349,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } - private void handleLongPressOnHome(int deviceId, KeyEvent event) { + private void handleLongPressOnHome(int deviceId) { if (mLongPressOnHomeBehavior == LONG_PRESS_HOME_NOTHING) { return; } @@ -1364,11 +1363,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { case LONG_PRESS_HOME_ASSIST: launchAssistAction(null, deviceId); break; - case LONG_PRESS_HOME_PICTURE_IN_PICTURE: - requestTvPictureInPicture(event); - break; default: - Log.w(TAG, "Not defined home long press behavior: " + mLongPressOnHomeBehavior); + Log.w(TAG, "Undefined home long press behavior: " + mLongPressOnHomeBehavior); break; } } @@ -2940,7 +2936,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } else if ((event.getFlags() & KeyEvent.FLAG_LONG_PRESS) != 0) { if (!keyguardOn) { - handleLongPressOnHome(event.getDeviceId(), event); + handleLongPressOnHome(event.getDeviceId()); } } return -1; |