Update compat layer for API review changes to LauncherApps

Bug:17390765
Change-Id: I15a927402a05387b14a2a6899fd513fc59a2ee41
This commit is contained in:
Kenny Guy 2014-09-11 11:28:02 +01:00
parent 8e894faadf
commit 577e7dc7db
1 changed files with 10 additions and 2 deletions

View File

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