Loading packages/SystemUI/src/com/android/systemui/qs/external/TileLifecycleManager.java +7 −2 Original line number Original line Diff line number Diff line Loading @@ -81,6 +81,8 @@ public class TileLifecycleManager extends BroadcastReceiver implements private IQSService mService; private IQSService mService; private boolean mUnbindImmediate; private boolean mUnbindImmediate; private TileChangeListener mChangeListener; private TileChangeListener mChangeListener; // Return value from bindServiceAsUser, determines whether safe to call unbind. private boolean mIsBound; public TileLifecycleManager(Handler handler, Context context, Intent intent, UserHandle user) { public TileLifecycleManager(Handler handler, Context context, Intent intent, UserHandle user) { mContext = context; mContext = context; Loading Loading @@ -132,7 +134,7 @@ public class TileLifecycleManager extends BroadcastReceiver implements } } if (DEBUG) Log.d(TAG, "Binding service " + mIntent + " " + mUser); if (DEBUG) Log.d(TAG, "Binding service " + mIntent + " " + mUser); mBindTryCount++; mBindTryCount++; mContext.bindServiceAsUser(mIntent, this, mIsBound = mContext.bindServiceAsUser(mIntent, this, Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE_WHILE_AWAKE, Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE_WHILE_AWAKE, mUser); mUser); } else { } else { Loading @@ -140,7 +142,10 @@ public class TileLifecycleManager extends BroadcastReceiver implements // Give it another chance next time it needs to be bound, out of kindness. // Give it another chance next time it needs to be bound, out of kindness. mBindTryCount = 0; mBindTryCount = 0; mWrapper = null; mWrapper = null; if (mIsBound) { mContext.unbindService(this); mContext.unbindService(this); mIsBound = false; } } } } } Loading Loading
packages/SystemUI/src/com/android/systemui/qs/external/TileLifecycleManager.java +7 −2 Original line number Original line Diff line number Diff line Loading @@ -81,6 +81,8 @@ public class TileLifecycleManager extends BroadcastReceiver implements private IQSService mService; private IQSService mService; private boolean mUnbindImmediate; private boolean mUnbindImmediate; private TileChangeListener mChangeListener; private TileChangeListener mChangeListener; // Return value from bindServiceAsUser, determines whether safe to call unbind. private boolean mIsBound; public TileLifecycleManager(Handler handler, Context context, Intent intent, UserHandle user) { public TileLifecycleManager(Handler handler, Context context, Intent intent, UserHandle user) { mContext = context; mContext = context; Loading Loading @@ -132,7 +134,7 @@ public class TileLifecycleManager extends BroadcastReceiver implements } } if (DEBUG) Log.d(TAG, "Binding service " + mIntent + " " + mUser); if (DEBUG) Log.d(TAG, "Binding service " + mIntent + " " + mUser); mBindTryCount++; mBindTryCount++; mContext.bindServiceAsUser(mIntent, this, mIsBound = mContext.bindServiceAsUser(mIntent, this, Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE_WHILE_AWAKE, Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE_WHILE_AWAKE, mUser); mUser); } else { } else { Loading @@ -140,7 +142,10 @@ public class TileLifecycleManager extends BroadcastReceiver implements // Give it another chance next time it needs to be bound, out of kindness. // Give it another chance next time it needs to be bound, out of kindness. mBindTryCount = 0; mBindTryCount = 0; mWrapper = null; mWrapper = null; if (mIsBound) { mContext.unbindService(this); mContext.unbindService(this); mIsBound = false; } } } } } Loading