From 992fdbeff296670e62078dd0c3d3b2b9bb2c95ec Mon Sep 17 00:00:00 2001 From: Amith Yamasani Date: Thu, 12 Jun 2014 13:37:43 -0700 Subject: [PATCH] Undo some API changes that affect third party launcher writers Remove hidden interface methods that were added temporarily for launcher compatibility. These cannot be implemented by third parties if they're hidden from the SDK. Bug: 15574383 Change-Id: I976256da4278b7077f8d357e971e8cadb4d2d686 --- api/current.txt | 10 +-- .../java/android/content/pm/LauncherApps.java | 69 ++----------------- 2 files changed, 10 insertions(+), 69 deletions(-) diff --git a/api/current.txt b/api/current.txt index cc57576849a86..c9c3a44a9cf1e 100644 --- a/api/current.txt +++ b/api/current.txt @@ -8197,11 +8197,11 @@ package android.content.pm { } public static abstract interface LauncherApps.OnAppsChangedListener { - method public abstract void onPackageAdded(java.lang.String, android.os.UserHandle); - method public abstract void onPackageChanged(java.lang.String, android.os.UserHandle); - method public abstract void onPackageRemoved(java.lang.String, android.os.UserHandle); - method public abstract void onPackagesAvailable(java.lang.String[], android.os.UserHandle, boolean); - method public abstract void onPackagesUnavailable(java.lang.String[], android.os.UserHandle, boolean); + method public abstract void onPackageAdded(android.os.UserHandle, java.lang.String); + method public abstract void onPackageChanged(android.os.UserHandle, java.lang.String); + method public abstract void onPackageRemoved(android.os.UserHandle, java.lang.String); + method public abstract void onPackagesAvailable(android.os.UserHandle, java.lang.String[], boolean); + method public abstract void onPackagesUnavailable(android.os.UserHandle, java.lang.String[], boolean); } public class PackageInfo implements android.os.Parcelable { diff --git a/core/java/android/content/pm/LauncherApps.java b/core/java/android/content/pm/LauncherApps.java index 04c0b9f261b8f..69fa408c5871d 100644 --- a/core/java/android/content/pm/LauncherApps.java +++ b/core/java/android/content/pm/LauncherApps.java @@ -67,7 +67,6 @@ public class LauncherApps { * * @param user The UserHandle of the profile that generated the change. * @param packageName The name of the package that was removed. - * @hide remove before ship */ void onPackageRemoved(UserHandle user, String packageName); @@ -76,7 +75,6 @@ public class LauncherApps { * * @param user The UserHandle of the profile that generated the change. * @param packageName The name of the package that was added. - * @hide remove before ship */ void onPackageAdded(UserHandle user, String packageName); @@ -85,7 +83,6 @@ public class LauncherApps { * * @param user The UserHandle of the profile that generated the change. * @param packageName The name of the package that has changed. - * @hide remove before ship */ void onPackageChanged(UserHandle user, String packageName); @@ -99,7 +96,6 @@ public class LauncherApps { * available. * @param replacing Indicates whether these packages are replacing * existing ones. - * @hide remove before ship */ void onPackagesAvailable(UserHandle user, String[] packageNames, boolean replacing); @@ -113,59 +109,9 @@ public class LauncherApps { * unavailable. * @param replacing Indicates whether the packages are about to be * replaced with new versions. - * @hide remove before ship */ void onPackagesUnavailable(UserHandle user, String[] packageNames, boolean replacing); - /** - * Indicates that a package was removed from the specified profile. - * - * @param packageName The name of the package that was removed. - * @param user The UserHandle of the profile that generated the change. - */ - void onPackageRemoved(String packageName, UserHandle user); - - /** - * Indicates that a package was added to the specified profile. - * - * @param packageName The name of the package that was added. - * @param user The UserHandle of the profile that generated the change. - */ - void onPackageAdded(String packageName, UserHandle user); - - /** - * Indicates that a package was modified in the specified profile. - * - * @param packageName The name of the package that has changed. - * @param user The UserHandle of the profile that generated the change. - */ - void onPackageChanged(String packageName, UserHandle user); - - /** - * Indicates that one or more packages have become available. For - * example, this can happen when a removable storage card has - * reappeared. - * - * @param packageNames The names of the packages that have become - * available. - * @param user The UserHandle of the profile that generated the change. - * @param replacing Indicates whether these packages are replacing - * existing ones. - */ - void onPackagesAvailable(String [] packageNames, UserHandle user, boolean replacing); - - /** - * Indicates that one or more packages have become unavailable. For - * example, this can happen when a removable storage card has been - * removed. - * - * @param packageNames The names of the packages that have become - * unavailable. - * @param user The UserHandle of the profile that generated the change. - * @param replacing Indicates whether the packages are about to be - * replaced with new versions. - */ - void onPackagesUnavailable(String[] packageNames, UserHandle user, boolean replacing); } /** @hide */ @@ -361,8 +307,7 @@ public class LauncherApps { } synchronized (LauncherApps.this) { for (OnAppsChangedListener listener : mListeners) { - listener.onPackageRemoved(user, packageName); // TODO: Remove before ship - listener.onPackageRemoved(packageName, user); + listener.onPackageRemoved(user, packageName); } } } @@ -374,8 +319,7 @@ public class LauncherApps { } synchronized (LauncherApps.this) { for (OnAppsChangedListener listener : mListeners) { - listener.onPackageChanged(user, packageName); // TODO: Remove before ship - listener.onPackageChanged(packageName, user); + listener.onPackageChanged(user, packageName); } } } @@ -387,8 +331,7 @@ public class LauncherApps { } synchronized (LauncherApps.this) { for (OnAppsChangedListener listener : mListeners) { - listener.onPackageAdded(user, packageName); // TODO: Remove before ship - listener.onPackageAdded(packageName, user); + listener.onPackageAdded(user, packageName); } } } @@ -401,8 +344,7 @@ public class LauncherApps { } synchronized (LauncherApps.this) { for (OnAppsChangedListener listener : mListeners) { - listener.onPackagesAvailable(user, packageNames, replacing); // TODO: Remove - listener.onPackagesAvailable(packageNames, user, replacing); + listener.onPackagesAvailable(user, packageNames, replacing); } } } @@ -415,8 +357,7 @@ public class LauncherApps { } synchronized (LauncherApps.this) { for (OnAppsChangedListener listener : mListeners) { - listener.onPackagesUnavailable(user, packageNames, replacing); // TODO: Remove - listener.onPackagesUnavailable(packageNames, user, replacing); + listener.onPackagesUnavailable(user, packageNames, replacing); } } }