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

Commit 1176e51b authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Need to clear identity when rebooting for FBE.

Bug: 27412530
Change-Id: I6d5b925a16daefd1b6906ce036faeb6244d503fb
parent 50d1c044
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -1945,11 +1945,16 @@ class MountService extends IMountService.Stub
                        "Emulation not available on device with native FBE");
            }

            final long token = Binder.clearCallingIdentity();
            try {
                final boolean emulateFbe = (flags & StorageManager.DEBUG_EMULATE_FBE) != 0;
                SystemProperties.set(StorageManager.PROP_EMULATE_FBE, Boolean.toString(emulateFbe));

                // Perform hard reboot to kick policy into place
                mContext.getSystemService(PowerManager.class).reboot(null);
            } finally {
                Binder.restoreCallingIdentity(token);
            }
        }

        if ((mask & StorageManager.DEBUG_FORCE_ADOPTABLE) != 0) {