Skip to content

Commit c40771a

Browse files
mikejurkaAndroid (Google) Code Review
authored andcommitted
Merge "Fix bug with preloading recent tasks" into jb-mr1-dev
2 parents 5050813 + 01de93d commit c40771a

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1717,15 +1717,17 @@ public long interceptKeyBeforeDispatching(WindowState win, KeyEvent event, int p
17171717
mHomePressed = false;
17181718
mHomeLongPressed = false;
17191719
if (!homeWasLongPressed) {
1720-
try {
1721-
IStatusBarService statusbar = getStatusBarService();
1722-
if (statusbar != null) {
1723-
statusbar.cancelPreloadRecentApps();
1720+
if (mLongPressOnHomeBehavior == LONG_PRESS_HOME_RECENT_SYSTEM_UI) {
1721+
try {
1722+
IStatusBarService statusbar = getStatusBarService();
1723+
if (statusbar != null) {
1724+
statusbar.cancelPreloadRecentApps();
1725+
}
1726+
} catch (RemoteException e) {
1727+
Slog.e(TAG, "RemoteException when showing recent apps", e);
1728+
// re-acquire status bar service next time it is needed.
1729+
mStatusBarService = null;
17241730
}
1725-
} catch (RemoteException e) {
1726-
Slog.e(TAG, "RemoteException when showing recent apps", e);
1727-
// re-acquire status bar service next time it is needed.
1728-
mStatusBarService = null;
17291731
}
17301732

17311733
mHomePressed = false;

0 commit comments

Comments
 (0)