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

Commit 2387932b authored by Amith Yamasani's avatar Amith Yamasani
Browse files

Fix a deadlock due to wtf in BaseBundle

Use Slog.wtf instead of Log.wtf, so that it is
asynchronously reported.

Mark incoming application restrictions as defusable
since they are being unparceled.

Bug: 27811728
Change-Id: I166de69a74417e439ec5ef9159fbbfbfe711dde6
parent 0b880795
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.annotation.Nullable;
import android.util.ArrayMap;
import android.util.Log;
import android.util.MathUtils;
import android.util.Slog;

import java.io.Serializable;
import java.util.ArrayList;
@@ -229,7 +230,7 @@ public class BaseBundle {
        }

        if (sShouldDefuse && (mFlags & FLAG_DEFUSABLE) == 0) {
            Log.wtf(TAG, "Attempting to unparcel a Bundle while in transit; this may "
            Slog.wtf(TAG, "Attempting to unparcel a Bundle while in transit; this may "
                    + "clobber all data inside!", new Throwable());
        }

+1 −0
Original line number Diff line number Diff line
@@ -2281,6 +2281,7 @@ public class UserManagerService extends IUserManager.Stub {
            if (restrictions == null || restrictions.isEmpty()) {
                cleanAppRestrictionsForPackage(packageName, userId);
            } else {
                restrictions.setDefusable(true);
                // Write the restrictions to XML
                writeApplicationRestrictionsLP(packageName, restrictions, userId);
            }