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

Commit c6cf3a4d authored by Zimuzo Ezeozue's avatar Zimuzo Ezeozue Committed by Android (Google) Code Review
Browse files

Merge "Reboot only userspace to kick FUSE flag change into place"

parents 5ff476a9 41cd8dec
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -1701,8 +1701,15 @@ class StorageManagerService extends IStorageManager.Stub
        if (mIsFuseEnabled != settingsFuseFlag) {
            Slog.i(TAG, "Toggling persist.sys.fuse to " + settingsFuseFlag);
            SystemProperties.set(PROP_FUSE, Boolean.toString(settingsFuseFlag));

            PowerManager powerManager = mContext.getSystemService(PowerManager.class);
            if (powerManager.isRebootingUserspaceSupported()) {
                // Perform userspace reboot to kick policy into place
                powerManager.reboot(PowerManager.REBOOT_USERSPACE);
            } else {
                // Perform hard reboot to kick policy into place
            mContext.getSystemService(PowerManager.class).reboot("fuse_prop");
                powerManager.reboot("fuse_prop");
            }
        }
    }