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

Commit dc2a1e18 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix FRP setting write failure due to calling identity" into main

parents 772be0cc fecc98e2
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -291,9 +291,15 @@ public class PersistentDataBlockService extends SystemService {

    private void setOldSettingForBackworkCompatibility(boolean isActive) {
        // Set the SECURE_FRP_MODE flag, for backward compatibility with clients who use it.
        // They should switch to calling #isFrpActive().
        // They should switch to calling #isFrpActive().  Clear calling ID since this can happen
        // during an app call.
        final long callingId = Binder.clearCallingIdentity();
        try {
            Settings.Global.putInt(mContext.getContentResolver(),
                    Settings.Global.SECURE_FRP_MODE, isActive ? 1 : 0);
        } finally {
            Binder.restoreCallingIdentity(callingId);
        }
    }

    private void setOemUnlockEnabledProperty(boolean oemUnlockEnabled) {