Fix bug with preloading recent tasks

Don't send a "cancel preloading" event to recents
from PhoneWindowManager if we're not using
long-press on home to invoke recents (ie phones
with soft nav keys)
This commit is contained in:
Michael Jurka
2012-04-13 09:32:47 -07:00
parent 32e7bd9fe1
commit 01de93de1e

View File

@@ -1717,15 +1717,17 @@ public class PhoneWindowManager implements WindowManagerPolicy {
mHomePressed = false;
mHomeLongPressed = false;
if (!homeWasLongPressed) {
try {
IStatusBarService statusbar = getStatusBarService();
if (statusbar != null) {
statusbar.cancelPreloadRecentApps();
if (mLongPressOnHomeBehavior == LONG_PRESS_HOME_RECENT_SYSTEM_UI) {
try {
IStatusBarService statusbar = getStatusBarService();
if (statusbar != null) {
statusbar.cancelPreloadRecentApps();
}
} catch (RemoteException e) {
Slog.e(TAG, "RemoteException when showing recent apps", e);
// re-acquire status bar service next time it is needed.
mStatusBarService = null;
}
} catch (RemoteException e) {
Slog.e(TAG, "RemoteException when showing recent apps", e);
// re-acquire status bar service next time it is needed.
mStatusBarService = null;
}
mHomePressed = false;