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

Commit be53de3e authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6203188 from 776f2232 to qt-qpr3-release

Change-Id: Id5ae5f6a31491ef3b4a49ba1020009b7402d8c95
parents 369cf190 776f2232
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -63,6 +63,9 @@ public class CarrierServiceBindHelper {
    private String[] mLastSimState;
    private final PackageMonitor mPackageMonitor = new CarrierServicePackageMonitor();

    // whether we have successfully bound to the service
    private boolean mServiceBound = false;

    private BroadcastReceiver mUserUnlockedReceiver = new BroadcastReceiver() {
        @Override
        public void onReceive(Context context, Intent intent) {
@@ -235,6 +238,7 @@ public class CarrierServiceBindHelper {
                if (mContext.bindServiceAsUser(carrierService, connection,
                        Context.BIND_AUTO_CREATE |  Context.BIND_FOREGROUND_SERVICE,
                        mHandler, Process.myUserHandle())) {
                    mServiceBound = true;
                    return;
                }

@@ -289,8 +293,13 @@ public class CarrierServiceBindHelper {
            carrierServiceClass = null;

            // Actually unbind
            if (mServiceBound) {
                log("Unbinding from carrier app");
                mServiceBound = false;
                mContext.unbindService(connection);
            } else {
                log("Not bound, skipping unbindService call");
            }
            connection = null;
            mUnbindScheduledUptimeMillis = -1;
        }