Loading packages/SystemUI/src/com/android/keyguard/CarrierTextManager.java +8 −4 Original line number Diff line number Diff line Loading @@ -261,8 +261,10 @@ public class CarrierTextManager { mCarrierTextCallback = callback; if (mNetworkSupported.get()) { // Keyguard update monitor expects callbacks from main thread mMainExecutor.execute(() -> mKeyguardUpdateMonitor.registerCallback(mCallback)); mMainExecutor.execute(() -> { mKeyguardUpdateMonitor.registerCallback(mCallback); mWakefulnessLifecycle.addObserver(mWakefulnessObserver); }); mTelephonyListenerManager.addActiveDataSubscriptionIdListener(mPhoneStateListener); } else { // Don't listen and clear out the text when the device isn't a phone. Loading @@ -272,8 +274,10 @@ public class CarrierTextManager { } } else { mCarrierTextCallback = null; mMainExecutor.execute(() -> mKeyguardUpdateMonitor.removeCallback(mCallback)); mMainExecutor.execute(() -> { mKeyguardUpdateMonitor.removeCallback(mCallback); mWakefulnessLifecycle.removeObserver(mWakefulnessObserver); }); mTelephonyListenerManager.removeActiveDataSubscriptionIdListener(mPhoneStateListener); } } Loading Loading
packages/SystemUI/src/com/android/keyguard/CarrierTextManager.java +8 −4 Original line number Diff line number Diff line Loading @@ -261,8 +261,10 @@ public class CarrierTextManager { mCarrierTextCallback = callback; if (mNetworkSupported.get()) { // Keyguard update monitor expects callbacks from main thread mMainExecutor.execute(() -> mKeyguardUpdateMonitor.registerCallback(mCallback)); mMainExecutor.execute(() -> { mKeyguardUpdateMonitor.registerCallback(mCallback); mWakefulnessLifecycle.addObserver(mWakefulnessObserver); }); mTelephonyListenerManager.addActiveDataSubscriptionIdListener(mPhoneStateListener); } else { // Don't listen and clear out the text when the device isn't a phone. Loading @@ -272,8 +274,10 @@ public class CarrierTextManager { } } else { mCarrierTextCallback = null; mMainExecutor.execute(() -> mKeyguardUpdateMonitor.removeCallback(mCallback)); mMainExecutor.execute(() -> { mKeyguardUpdateMonitor.removeCallback(mCallback); mWakefulnessLifecycle.removeObserver(mWakefulnessObserver); }); mTelephonyListenerManager.removeActiveDataSubscriptionIdListener(mPhoneStateListener); } } Loading