Updated calls for LauncherApps renaming.

Bug: 17008230
Change-Id: Id851d0b40756973be48c5ce370dd64c1dd6a3c1d
This commit is contained in:
Kenny Guy
2014-08-26 16:18:58 +01:00
parent d750f8b3f7
commit 4da9efa518
2 changed files with 8 additions and 8 deletions
@@ -48,7 +48,7 @@ public abstract class LauncherAppsCompat {
public static LauncherAppsCompat getInstance(Context context) {
synchronized (sInstanceLock) {
// TODO change this to use api version once L gets an API number.
// STOPSHIP(kennyguy) change this to use api version once L gets an API number.
if (sInstance == null) {
if ("L".equals(Build.VERSION.CODENAME)) {
sInstance = new LauncherAppsCompatVL(context);
@@ -70,11 +70,11 @@ public class LauncherAppsCompatVL extends LauncherAppsCompat {
public void startActivityForProfile(ComponentName component, UserHandleCompat user,
Rect sourceBounds, Bundle opts) {
mLauncherApps.startActivityForProfile(component, user.getUser(), sourceBounds, opts);
mLauncherApps.startMainActivity(component, user.getUser(), sourceBounds, opts);
}
public void showAppDetailsForProfile(ComponentName component, UserHandleCompat user) {
mLauncherApps.showAppDetailsForProfile(component, user.getUser(), null, null);
mLauncherApps.startAppDetailsActivity(component, user.getUser(), null, null);
}
public void addOnAppsChangedCallback(LauncherAppsCompat.OnAppsChangedCallbackCompat callback) {
@@ -82,7 +82,7 @@ public class LauncherAppsCompatVL extends LauncherAppsCompat {
synchronized (mCallbacks) {
mCallbacks.put(callback, wrappedCallback);
}
mLauncherApps.addOnAppsChangedCallback(wrappedCallback);
mLauncherApps.addCallback(wrappedCallback);
}
public void removeOnAppsChangedCallback(
@@ -92,19 +92,19 @@ public class LauncherAppsCompatVL extends LauncherAppsCompat {
wrappedCallback = mCallbacks.remove(callback);
}
if (wrappedCallback != null) {
mLauncherApps.removeOnAppsChangedCallback(wrappedCallback);
mLauncherApps.removeCallback(wrappedCallback);
}
}
public boolean isPackageEnabledForProfile(String packageName, UserHandleCompat user) {
return mLauncherApps.isPackageEnabledForProfile(packageName, user.getUser());
return mLauncherApps.isPackageEnabled(packageName, user.getUser());
}
public boolean isActivityEnabledForProfile(ComponentName component, UserHandleCompat user) {
return mLauncherApps.isActivityEnabledForProfile(component, user.getUser());
return mLauncherApps.isActivityEnabled(component, user.getUser());
}
private static class WrappedCallback extends LauncherApps.OnAppsChangedCallback {
private static class WrappedCallback extends LauncherApps.Callback {
private LauncherAppsCompat.OnAppsChangedCallbackCompat mCallback;
public WrappedCallback(LauncherAppsCompat.OnAppsChangedCallbackCompat callback) {