Merge "Use Intent.EXTRA_REBROADCAST_ON_UNLOCK instead of hidden API" am: 9222283997 am: 7961f0d579
Change-Id: I8c55ab818a9b1f3593b3b027fb426db418c0044e
This commit is contained in:
@@ -1061,7 +1061,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
|
||||
// keep compatibility with apps that aren't direct boot aware.
|
||||
// SysUI should just ignore this broadcast because it was already received
|
||||
// and processed previously.
|
||||
if (intent.getBooleanExtra(TelephonyIntents.EXTRA_REBROADCAST_ON_UNLOCK, false)) {
|
||||
if (intent.getBooleanExtra(Intent.EXTRA_REBROADCAST_ON_UNLOCK, false)) {
|
||||
// Guarantee mTelephonyCapable state after SysUI crash and restart
|
||||
if (args.simState == State.ABSENT) {
|
||||
mHandler.obtainMessage(MSG_TELEPHONY_CAPABLE, true).sendToTarget();
|
||||
|
||||
@@ -608,8 +608,7 @@ public class PhoneStatusBarPolicy
|
||||
break;
|
||||
case TelephonyIntents.ACTION_SIM_STATE_CHANGED:
|
||||
// Avoid rebroadcast because SysUI is direct boot aware.
|
||||
if (intent.getBooleanExtra(TelephonyIntents.EXTRA_REBROADCAST_ON_UNLOCK,
|
||||
false)) {
|
||||
if (intent.getBooleanExtra(Intent.EXTRA_REBROADCAST_ON_UNLOCK, false)) {
|
||||
break;
|
||||
}
|
||||
updateSimState(intent);
|
||||
|
||||
@@ -517,7 +517,7 @@ public class NetworkControllerImpl extends BroadcastReceiver
|
||||
break;
|
||||
case TelephonyIntents.ACTION_SIM_STATE_CHANGED:
|
||||
// Avoid rebroadcast because SysUI is direct boot aware.
|
||||
if (intent.getBooleanExtra(TelephonyIntents.EXTRA_REBROADCAST_ON_UNLOCK, false)) {
|
||||
if (intent.getBooleanExtra(Intent.EXTRA_REBROADCAST_ON_UNLOCK, false)) {
|
||||
break;
|
||||
}
|
||||
// Might have different subscriptions now.
|
||||
|
||||
@@ -133,7 +133,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase {
|
||||
Assert.assertTrue("onSimStateChanged not called",
|
||||
mKeyguardUpdateMonitor.hasSimStateJustChanged());
|
||||
|
||||
intent.putExtra(TelephonyIntents.EXTRA_REBROADCAST_ON_UNLOCK, true);
|
||||
intent.putExtra(Intent.EXTRA_REBROADCAST_ON_UNLOCK, true);
|
||||
mKeyguardUpdateMonitor.mBroadcastReceiver.onReceive(getContext(), intent);
|
||||
mTestableLooper.processAllMessages();
|
||||
Assert.assertFalse("onSimStateChanged should have been skipped",
|
||||
|
||||
@@ -205,8 +205,6 @@ public class TelephonyIntents {
|
||||
public static final String ACTION_SIM_STATE_CHANGED
|
||||
= Intent.ACTION_SIM_STATE_CHANGED;
|
||||
|
||||
public static final String EXTRA_REBROADCAST_ON_UNLOCK= "rebroadcastOnUnlock";
|
||||
|
||||
/**
|
||||
* <p>Broadcast Action: It indicates the Emergency callback mode blocks datacall/sms
|
||||
* <p class="note">.
|
||||
|
||||
Reference in New Issue
Block a user