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

Commit f81c6bd9 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Merge tag 'android-security-16.0.0_r4' of...

Merge tag 'android-security-16.0.0_r4' of https://android.googlesource.com/platform/frameworks/base into 4141-a16-march

Android Security 16.0.0 Release 4 (14733871)
parents 122b16b3 1077fb35
Loading
Loading
Loading
Loading
+18 −3
Original line number Diff line number Diff line
@@ -3533,9 +3533,24 @@ public class ActivityManager {
            Manifest.permission.ACCESS_INSTANT_APPS})
    @UnsupportedAppUsage
    public boolean clearApplicationUserData(String packageName, IPackageDataObserver observer) {
        return clearApplicationUserData(packageName, observer, true);
    }

    /**
     * @hide
     */
    @RequiresPermission(anyOf = {Manifest.permission.CLEAR_APP_USER_DATA,
            Manifest.permission.ACCESS_INSTANT_APPS})
    private boolean clearApplicationUserData(String packageName, IPackageDataObserver observer,
            boolean restorePregrantedPermissions) {
        try {
            if (restorePregrantedPermissions) {
                return getService().clearApplicationUserData(packageName, false,
                        observer, mContext.getUserId());
            } else {
                return getService().clearApplicationUserDataWithoutPermissionReset(packageName,
                        false, observer, mContext.getUserId());
            }
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
@@ -3553,7 +3568,7 @@ public class ActivityManager {
     *     data be erased; {@code false} otherwise.
     */
    public boolean clearApplicationUserData() {
        return clearApplicationUserData(mContext.getPackageName(), null);
        return clearApplicationUserData(mContext.getPackageName(), null, false);
    }

    /**
+2 −1
Original line number Diff line number Diff line
@@ -2959,7 +2959,8 @@ public class ApplicationPackageManager extends PackageManager {
    public void clearApplicationUserData(String packageName,
                                         IPackageDataObserver observer) {
        try {
            mPM.clearApplicationUserData(packageName, observer, getUserId());
            mPM.clearApplicationUserData(packageName, observer, getUserId(),
                    /* restorePregrantedPermissions */ true);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
+2 −0
Original line number Diff line number Diff line
@@ -334,6 +334,8 @@ interface IActivityManager {
    List<ActivityManager.ProcessErrorStateInfo> getProcessesInErrorState();
    boolean clearApplicationUserData(in String packageName, boolean keepState,
            in IPackageDataObserver observer, int userId);
    boolean clearApplicationUserDataWithoutPermissionReset(in String packageName, boolean keepState,
            in IPackageDataObserver observer, int userId);
    void stopAppForUser(in String packageName, int userId);
    /** Returns {@code false} if the callback could not be registered, {@true} otherwise. */
    boolean registerForegroundServiceObserver(in IForegroundServiceObserver callback);
+1 −0
Original line number Diff line number Diff line
@@ -179,6 +179,7 @@ interface IActivityTaskManager {
    List<IBinder> getAppTasks(in String callingPackage);
    void startSystemLockTaskMode(int taskId);
    void stopSystemLockTaskMode();
    void rebuildSystemLockTaskPinnedMode();
    void finishVoiceTask(in IVoiceInteractionSession session);
    int addAppTask(in IBinder activityToken, in Intent intent,
            in ActivityManager.TaskDescription description, in Bitmap thumbnail);
+9 −9
Original line number Diff line number Diff line
@@ -3152,8 +3152,8 @@ public class Notification implements Parcelable
                person.visitUris(visitor);
            }
            final Parcelable[] messages = extras.getParcelableArray(EXTRA_MESSAGES,
                    Parcelable.class);
            final Bundle[] messages =
                    getParcelableArrayFromBundle(extras, EXTRA_MESSAGES, Bundle.class);
            if (!ArrayUtils.isEmpty(messages)) {
                for (MessagingStyle.Message message : MessagingStyle.Message
                        .getMessagesFromBundleArray(messages)) {
@@ -3161,8 +3161,8 @@ public class Notification implements Parcelable
                }
            }
            final Parcelable[] historic = extras.getParcelableArray(EXTRA_HISTORIC_MESSAGES,
                    Parcelable.class);
            final Parcelable[] historic =
                    getParcelableArrayFromBundle(extras, EXTRA_HISTORIC_MESSAGES, Bundle.class);
            if (!ArrayUtils.isEmpty(historic)) {
                for (MessagingStyle.Message message : MessagingStyle.Message
                        .getMessagesFromBundleArray(historic)) {
@@ -8203,8 +8203,8 @@ public class Notification implements Parcelable
     */
    public boolean hasImage() {
        if (isStyle(MessagingStyle.class) && extras != null) {
            final Parcelable[] messages = extras.getParcelableArray(EXTRA_MESSAGES,
                    Parcelable.class);
            final Bundle[] messages =
                    getParcelableArrayFromBundle(extras, EXTRA_MESSAGES, Bundle.class);
            if (!ArrayUtils.isEmpty(messages)) {
                for (MessagingStyle.Message m : MessagingStyle.Message
                        .getMessagesFromBundleArray(messages)) {
@@ -9485,10 +9485,10 @@ public class Notification implements Parcelable
                mUser = user;
            }
            mConversationTitle = extras.getCharSequence(EXTRA_CONVERSATION_TITLE);
            Parcelable[] messages = extras.getParcelableArray(EXTRA_MESSAGES, Parcelable.class);
            Bundle[] messages = getParcelableArrayFromBundle(extras, EXTRA_MESSAGES, Bundle.class);
            mMessages = Message.getMessagesFromBundleArray(messages);
            Parcelable[] histMessages = extras.getParcelableArray(EXTRA_HISTORIC_MESSAGES,
                    Parcelable.class);
            Bundle[] histMessages = getParcelableArrayFromBundle(
                    extras, EXTRA_HISTORIC_MESSAGES, Bundle.class);
            mHistoricMessages = Message.getMessagesFromBundleArray(histMessages);
            mIsGroupConversation = extras.getBoolean(EXTRA_IS_GROUP_CONVERSATION);
            mUnreadMessageCount = extras.getInt(EXTRA_CONVERSATION_UNREAD_MESSAGE_COUNT);
Loading