Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d11436e authored by Amith Yamasani's avatar Amith Yamasani Committed by Android (Google) Code Review
Browse files

Merge "Undo some API changes that affect third party launcher writers" into lmp-preview-dev

parents 55e33b03 992fdbef
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -8197,11 +8197,11 @@ package android.content.pm {
  }
  }
  public static abstract interface LauncherApps.OnAppsChangedListener {
  public static abstract interface LauncherApps.OnAppsChangedListener {
    method public abstract void onPackageAdded(java.lang.String, android.os.UserHandle);
    method public abstract void onPackageAdded(android.os.UserHandle, java.lang.String);
    method public abstract void onPackageChanged(java.lang.String, android.os.UserHandle);
    method public abstract void onPackageChanged(android.os.UserHandle, java.lang.String);
    method public abstract void onPackageRemoved(java.lang.String, android.os.UserHandle);
    method public abstract void onPackageRemoved(android.os.UserHandle, java.lang.String);
    method public abstract void onPackagesAvailable(java.lang.String[], android.os.UserHandle, boolean);
    method public abstract void onPackagesAvailable(android.os.UserHandle, java.lang.String[], boolean);
    method public abstract void onPackagesUnavailable(java.lang.String[], android.os.UserHandle, boolean);
    method public abstract void onPackagesUnavailable(android.os.UserHandle, java.lang.String[], boolean);
  }
  }
  public class PackageInfo implements android.os.Parcelable {
  public class PackageInfo implements android.os.Parcelable {
+5 −64
Original line number Original line Diff line number Diff line
@@ -67,7 +67,6 @@ public class LauncherApps {
         *
         *
         * @param user The UserHandle of the profile that generated the change.
         * @param user The UserHandle of the profile that generated the change.
         * @param packageName The name of the package that was removed.
         * @param packageName The name of the package that was removed.
         * @hide remove before ship
         */
         */
        void onPackageRemoved(UserHandle user, String packageName);
        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 user The UserHandle of the profile that generated the change.
         * @param packageName The name of the package that was added.
         * @param packageName The name of the package that was added.
         * @hide remove before ship
         */
         */
        void onPackageAdded(UserHandle user, String packageName);
        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 user The UserHandle of the profile that generated the change.
         * @param packageName The name of the package that has changed.
         * @param packageName The name of the package that has changed.
         * @hide remove before ship
         */
         */
        void onPackageChanged(UserHandle user, String packageName);
        void onPackageChanged(UserHandle user, String packageName);


@@ -99,7 +96,6 @@ public class LauncherApps {
         *            available.
         *            available.
         * @param replacing Indicates whether these packages are replacing
         * @param replacing Indicates whether these packages are replacing
         *            existing ones.
         *            existing ones.
         * @hide remove before ship
         */
         */
        void onPackagesAvailable(UserHandle user, String[] packageNames, boolean replacing);
        void onPackagesAvailable(UserHandle user, String[] packageNames, boolean replacing);


@@ -113,59 +109,9 @@ public class LauncherApps {
         *            unavailable.
         *            unavailable.
         * @param replacing Indicates whether the packages are about to be
         * @param replacing Indicates whether the packages are about to be
         *            replaced with new versions.
         *            replaced with new versions.
         * @hide remove before ship
         */
         */
        void onPackagesUnavailable(UserHandle user, String[] packageNames, boolean replacing);
        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 */
    /** @hide */
@@ -361,8 +307,7 @@ public class LauncherApps {
            }
            }
            synchronized (LauncherApps.this) {
            synchronized (LauncherApps.this) {
                for (OnAppsChangedListener listener : mListeners) {
                for (OnAppsChangedListener listener : mListeners) {
                    listener.onPackageRemoved(user, packageName); // TODO: Remove before ship
                    listener.onPackageRemoved(user, packageName);
                    listener.onPackageRemoved(packageName, user);
                }
                }
            }
            }
        }
        }
@@ -374,8 +319,7 @@ public class LauncherApps {
            }
            }
            synchronized (LauncherApps.this) {
            synchronized (LauncherApps.this) {
                for (OnAppsChangedListener listener : mListeners) {
                for (OnAppsChangedListener listener : mListeners) {
                    listener.onPackageChanged(user, packageName); // TODO: Remove before ship
                    listener.onPackageChanged(user, packageName);
                    listener.onPackageChanged(packageName, user);
                }
                }
            }
            }
        }
        }
@@ -387,8 +331,7 @@ public class LauncherApps {
            }
            }
            synchronized (LauncherApps.this) {
            synchronized (LauncherApps.this) {
                for (OnAppsChangedListener listener : mListeners) {
                for (OnAppsChangedListener listener : mListeners) {
                    listener.onPackageAdded(user, packageName); // TODO: Remove before ship
                    listener.onPackageAdded(user, packageName);
                    listener.onPackageAdded(packageName, user);
                }
                }
            }
            }
        }
        }
@@ -401,8 +344,7 @@ public class LauncherApps {
            }
            }
            synchronized (LauncherApps.this) {
            synchronized (LauncherApps.this) {
                for (OnAppsChangedListener listener : mListeners) {
                for (OnAppsChangedListener listener : mListeners) {
                    listener.onPackagesAvailable(user, packageNames, replacing); // TODO: Remove
                    listener.onPackagesAvailable(user, packageNames, replacing);
                    listener.onPackagesAvailable(packageNames, user, replacing);
                }
                }
            }
            }
        }
        }
@@ -415,8 +357,7 @@ public class LauncherApps {
            }
            }
            synchronized (LauncherApps.this) {
            synchronized (LauncherApps.this) {
                for (OnAppsChangedListener listener : mListeners) {
                for (OnAppsChangedListener listener : mListeners) {
                    listener.onPackagesUnavailable(user, packageNames, replacing); // TODO: Remove
                    listener.onPackagesUnavailable(user, packageNames, replacing);
                    listener.onPackagesUnavailable(packageNames, user, replacing);
                }
                }
            }
            }
        }
        }