Repoint TelephonyIntents to alternatives
Bug: 148160428 Test: make, flash Change-Id: Ia0a3066d73b38d6442d482a170723379c167391c
This commit is contained in:
@@ -92,7 +92,6 @@ import android.util.Log;
|
||||
import android.util.SparseBooleanArray;
|
||||
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
import com.android.internal.telephony.TelephonyIntents;
|
||||
import com.android.internal.widget.LockPatternUtils;
|
||||
import com.android.settingslib.WirelessUtils;
|
||||
import com.android.systemui.DejankUtils;
|
||||
@@ -1083,7 +1082,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
|
||||
MSG_BATTERY_UPDATE, new BatteryStatus(status, level, plugged, health,
|
||||
maxChargingMicroWatt));
|
||||
mHandler.sendMessage(msg);
|
||||
} else if (TelephonyIntents.ACTION_SIM_STATE_CHANGED.equals(action)) {
|
||||
} else if (Intent.ACTION_SIM_STATE_CHANGED.equals(action)) {
|
||||
SimData args = SimData.fromIntent(intent);
|
||||
// ACTION_SIM_STATE_CHANGED is rebroadcast after unlocking the device to
|
||||
// keep compatibility with apps that aren't direct boot aware.
|
||||
@@ -1122,7 +1121,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
|
||||
}
|
||||
mHandler.sendMessage(
|
||||
mHandler.obtainMessage(MSG_SERVICE_STATE_CHANGE, subId, 0, serviceState));
|
||||
} else if (TelephonyIntents.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED.equals(action)) {
|
||||
} else if (TelephonyManager.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED.equals(action)) {
|
||||
mHandler.sendEmptyMessage(MSG_SIM_SUBSCRIPTION_INFO_CHANGED);
|
||||
} else if (DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED.equals(
|
||||
action)) {
|
||||
@@ -1273,7 +1272,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
|
||||
|
||||
static SimData fromIntent(Intent intent) {
|
||||
int state;
|
||||
if (!TelephonyIntents.ACTION_SIM_STATE_CHANGED.equals(intent.getAction())) {
|
||||
if (!Intent.ACTION_SIM_STATE_CHANGED.equals(intent.getAction())) {
|
||||
throw new IllegalArgumentException("only handles intent ACTION_SIM_STATE_CHANGED");
|
||||
}
|
||||
String stateExtra = intent.getStringExtra(Intent.EXTRA_SIM_STATE);
|
||||
@@ -1673,7 +1672,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
|
||||
filter.addAction(Intent.ACTION_BATTERY_CHANGED);
|
||||
filter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
|
||||
filter.addAction(Intent.ACTION_AIRPLANE_MODE_CHANGED);
|
||||
filter.addAction(TelephonyIntents.ACTION_SIM_STATE_CHANGED);
|
||||
filter.addAction(Intent.ACTION_SIM_STATE_CHANGED);
|
||||
filter.addAction(Intent.ACTION_SERVICE_STATE);
|
||||
filter.addAction(TelephonyManager.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED);
|
||||
filter.addAction(TelephonyManager.ACTION_PHONE_STATE_CHANGED);
|
||||
|
||||
@@ -37,7 +37,6 @@ import android.telephony.TelephonyManager;
|
||||
import android.text.format.DateFormat;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.internal.telephony.TelephonyIntents;
|
||||
import com.android.systemui.Dependency;
|
||||
import com.android.systemui.R;
|
||||
import com.android.systemui.broadcast.BroadcastDispatcher;
|
||||
@@ -174,7 +173,7 @@ public class PhoneStatusBarPolicy
|
||||
filter.addAction(AudioManager.RINGER_MODE_CHANGED_ACTION);
|
||||
filter.addAction(AudioManager.INTERNAL_RINGER_MODE_CHANGED_ACTION);
|
||||
filter.addAction(AudioManager.ACTION_HEADSET_PLUG);
|
||||
filter.addAction(TelephonyIntents.ACTION_SIM_STATE_CHANGED);
|
||||
filter.addAction(Intent.ACTION_SIM_STATE_CHANGED);
|
||||
filter.addAction(TelecomManager.ACTION_CURRENT_TTY_MODE_CHANGED);
|
||||
filter.addAction(Intent.ACTION_MANAGED_PROFILE_AVAILABLE);
|
||||
filter.addAction(Intent.ACTION_MANAGED_PROFILE_UNAVAILABLE);
|
||||
@@ -614,7 +613,7 @@ public class PhoneStatusBarPolicy
|
||||
case AudioManager.INTERNAL_RINGER_MODE_CHANGED_ACTION:
|
||||
updateVolumeZen();
|
||||
break;
|
||||
case TelephonyIntents.ACTION_SIM_STATE_CHANGED:
|
||||
case Intent.ACTION_SIM_STATE_CHANGED:
|
||||
// Avoid rebroadcast because SysUI is direct boot aware.
|
||||
if (intent.getBooleanExtra(Intent.EXTRA_REBROADCAST_ON_UNLOCK, false)) {
|
||||
break;
|
||||
|
||||
@@ -315,7 +315,7 @@ public class NetworkControllerImpl extends BroadcastReceiver
|
||||
filter.addAction(WifiManager.RSSI_CHANGED_ACTION);
|
||||
filter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION);
|
||||
filter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION);
|
||||
filter.addAction(TelephonyIntents.ACTION_SIM_STATE_CHANGED);
|
||||
filter.addAction(Intent.ACTION_SIM_STATE_CHANGED);
|
||||
filter.addAction(TelephonyManager.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED);
|
||||
filter.addAction(TelephonyManager.ACTION_DEFAULT_VOICE_SUBSCRIPTION_CHANGED);
|
||||
filter.addAction(Intent.ACTION_SERVICE_STATE);
|
||||
@@ -524,7 +524,7 @@ public class NetworkControllerImpl extends BroadcastReceiver
|
||||
mConfig = Config.readConfig(mContext);
|
||||
mReceiverHandler.post(this::handleConfigurationChanged);
|
||||
break;
|
||||
case TelephonyIntents.ACTION_SIM_STATE_CHANGED:
|
||||
case Intent.ACTION_SIM_STATE_CHANGED:
|
||||
// Avoid rebroadcast because SysUI is direct boot aware.
|
||||
if (intent.getBooleanExtra(Intent.EXTRA_REBROADCAST_ON_UNLOCK, false)) {
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user