Merge "Update compat layer for API review changes to LauncherApps" into ub-now-porkchop

This commit is contained in:
Kenny Guy 2014-09-12 12:20:00 +00:00 committed by Android (Google) Code Review
commit cb213ba78e
1 changed files with 10 additions and 2 deletions

View File

@ -82,7 +82,11 @@ public class LauncherAppsCompatVL extends LauncherAppsCompat {
synchronized (mCallbacks) {
mCallbacks.put(callback, wrappedCallback);
}
mLauncherApps.addCallback(wrappedCallback);
try {
mLauncherApps.registerCallback(wrappedCallback);
} catch (Throwable e) {
// STOPSHIP(kennyguy): Remove when LRW71 hits googlefood
}
}
public void removeOnAppsChangedCallback(
@ -92,7 +96,11 @@ public class LauncherAppsCompatVL extends LauncherAppsCompat {
wrappedCallback = mCallbacks.remove(callback);
}
if (wrappedCallback != null) {
mLauncherApps.removeCallback(wrappedCallback);
try {
mLauncherApps.unregisterCallback(wrappedCallback);
} catch (Throwable e) {
// STOPSHIP(kennyguy): Remove when LRW71 hits googlefood
}
}
}