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

automerge: cb213ba

* commit 'cb213ba78ea66ea6576cbe46ec83ebb1e2f904e0':
  Update compat layer for API review changes to LauncherApps
This commit is contained in:
Kenny Guy
2014-09-12 12:21:06 +00:00
committed by android-build-merger
@@ -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
}
} }
} }