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

Commit 49f38bb4 authored by Julia Reynolds's avatar Julia Reynolds Committed by Android (Google) Code Review
Browse files

Merge "Don't let apps permanently delete channels."

parents 7c810edb 5355e859
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ interface INotificationManager
{
    void cancelAllNotifications(String pkg, int userId);

    void clearData(String pkg, int uid);
    void clearData(String pkg, int uid, boolean fromApp);
    void enqueueToast(String pkg, ITransientNotification callback, int duration);
    void cancelToast(String pkg, ITransientNotification callback);
    void enqueueNotificationWithTag(String pkg, String opPkg, String tag, int id,
+1 −1
Original line number Diff line number Diff line
@@ -5563,7 +5563,7 @@ public class ActivityManagerService extends IActivityManager.Stub
                // Reset notification settings.
                INotificationManager inm = NotificationManager.getService();
                inm.clearData(packageName, pkgUidF);
                inm.clearData(packageName, pkgUidF, uid == pkgUidF);
            } catch (RemoteException e) {
            }
        } finally {
+5 −3
Original line number Diff line number Diff line
@@ -1698,7 +1698,7 @@ public class NotificationManagerService extends SystemService {


        @Override
        public void clearData(String packageName, int uid) throws RemoteException {
        public void clearData(String packageName, int uid, boolean fromApp) throws RemoteException {
            checkCallerIsSystem();

            // Cancel posted notifications
@@ -1713,8 +1713,10 @@ public class NotificationManagerService extends SystemService {
            mConditionProviders.onPackagesChanged(true, new String[] {packageName});

            // Reset notification preferences
            if (!fromApp) {
                mRankingHelper.onPackagesChanged(true, UserHandle.getCallingUserId(),
                        new String[]{packageName}, new int[]{uid});
            }

            savePolicyFile();
        }