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

Commit 732b2b0b authored by Arc Wang's avatar Arc Wang Committed by Automerger Merge Worker
Browse files

Merge "Fix crashes when clearing storage for a protected package" into sc-dev am: 79ee0ea9

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15081391

Change-Id: If61ab834c034bbb50d846f3de550140fb2a98dd5
parents d50fe51f 79ee0ea9
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -368,7 +368,12 @@ public class AppStorageSettings extends AppInfoWithHeader
        }
        ActivityManager am = (ActivityManager)
                getActivity().getSystemService(Context.ACTIVITY_SERVICE);
        boolean res = am.clearApplicationUserData(packageName, mClearDataObserver);
        boolean res = false;
        try {
            res = am.clearApplicationUserData(packageName, mClearDataObserver);
        } catch (SecurityException e) {
            Log.i(TAG, "Failed to clear application user data: " + e);
        }
        if (!res) {
            // Clearing data failed for some obscure reason. Just log error for now
            Log.i(TAG, "Couldn't clear application user data for package:" + packageName);