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

Commit a032a2b6 authored by David Anderson's avatar David Anderson
Browse files

Don't overwrite the host FRP when running a GSI.

Bug: 123777418
Test: manual test
Change-Id: Ia251dd939af71126a8236bc5c5cfed6622b2c946
parent ea57289d
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -277,6 +277,8 @@ public final class SystemServer {
    private static final String UNCRYPT_PACKAGE_FILE = "/cache/recovery/uncrypt_file";
    private static final String UNCRYPT_PACKAGE_FILE = "/cache/recovery/uncrypt_file";
    private static final String BLOCK_MAP_FILE = "/cache/recovery/block.map";
    private static final String BLOCK_MAP_FILE = "/cache/recovery/block.map";


    private static final String GSI_RUNNING_PROP = "ro.gsid.image_running";

    // maximum number of binder threads used for system_server
    // maximum number of binder threads used for system_server
    // will be higher than the system default
    // will be higher than the system default
    private static final int sMaxBinderThreads = 31;
    private static final int sMaxBinderThreads = 31;
@@ -1166,7 +1168,8 @@ public final class SystemServer {
            traceEnd();
            traceEnd();


            final boolean hasPdb = !SystemProperties.get(PERSISTENT_DATA_BLOCK_PROP).equals("");
            final boolean hasPdb = !SystemProperties.get(PERSISTENT_DATA_BLOCK_PROP).equals("");
            if (hasPdb) {
            final boolean hasGsi = SystemProperties.getInt(GSI_RUNNING_PROP, 0) > 0;
            if (hasPdb && !hasGsi) {
                traceBeginAndSlog("StartPersistentDataBlock");
                traceBeginAndSlog("StartPersistentDataBlock");
                mSystemServiceManager.startService(PersistentDataBlockService.class);
                mSystemServiceManager.startService(PersistentDataBlockService.class);
                traceEnd();
                traceEnd();