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

Commit d7a922e4 authored by Howard Chen's avatar Howard Chen Committed by android-build-merger
Browse files

Merge "DynamicSystemService: Use IGsid which reference-counts the gsid...

Merge "DynamicSystemService: Use IGsid which reference-counts the gsid service." am: 5d8d5f9a am: 0f290938
am: 9b4c37be

Change-Id: Ib5e5556d8c7f12439f139ca25a73aa7e81162c6a
parents 1fbe02f1 9b4c37be
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.content.pm.PackageManager;
import android.gsi.GsiInstallParams;
import android.gsi.GsiProgress;
import android.gsi.IGsiService;
import android.gsi.IGsid;
import android.os.Environment;
import android.os.IBinder;
import android.os.IBinder.DeathRecipient;
@@ -61,7 +62,9 @@ public class DynamicSystemService extends IDynamicSystemService.Stub implements
         * re-initialized in this case.
         */
        binder.linkToDeath(recipient, 0);
        return IGsiService.Stub.asInterface(binder);

        IGsid gsid = IGsid.Stub.asInterface(binder);
        return gsid.getClient();
    }

    /** implements DeathRecipient */
@@ -159,7 +162,7 @@ public class DynamicSystemService extends IDynamicSystemService.Stub implements
            isInUse = getGsiService().isGsiRunning();
        } finally {
            if (!gsidWasRunning && !isInUse) {
                SystemProperties.set("ctl.stop", "gsid");
                mGsiService = null;
            }
        }