Merge "Use Intent.EXTRA_REBROADCAST_ON_UNLOCK instead of hidden API"

am: 9222283997

Change-Id: I2df7a271747582d519e6fade06e3e8ee599dc764
This commit is contained in:
Meng Wang
2020-01-22 10:12:31 -08:00
committed by android-build-merger
5 changed files with 4 additions and 7 deletions

View File

@@ -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();

View File

@@ -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);

View File

@@ -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.

View File

@@ -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",

View File

@@ -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">.