From 4eda57e04766310779b359c3942ee1b5207ac33c Mon Sep 17 00:00:00 2001
From: Jayachandran C
Date: Tue, 7 Jan 2020 16:20:33 -0800
Subject: [PATCH] Move ACTION_SIGNAL_STRENGTH_CHANGED to local
Also remove the reference to PhoneStateIntentReceiver as its being
removed as part of this CL
Bug: 147314715
Test: Build and basic sanity
Change-Id: I04d766ddae7958f0d2f35b50154e5e6d2f8dce7e
---
config/boot-image-profile.txt | 3 ---
config/preloaded-classes | 1 -
.../com/android/server/TelephonyRegistry.java | 13 +++++++++-
.../java/android/telephony/CellLocation.java | 3 +--
.../android/telephony/SignalStrength.java | 3 +--
.../android/telephony/VoLteServiceState.java | 3 +--
.../internal/telephony/TelephonyIntents.java | 26 -------------------
7 files changed, 15 insertions(+), 37 deletions(-)
diff --git a/config/boot-image-profile.txt b/config/boot-image-profile.txt
index 4d0acb3c23308..4aaf72728cbfb 100644
--- a/config/boot-image-profile.txt
+++ b/config/boot-image-profile.txt
@@ -22519,8 +22519,6 @@ HSPLcom/android/internal/telephony/PhoneFactory;->makeDefaultPhone(Landroid/cont
HSPLcom/android/internal/telephony/PhoneFactory;->makeDefaultPhones(Landroid/content/Context;)V
HSPLcom/android/internal/telephony/PhoneInternalInterface$DataActivityState;->(Ljava/lang/String;I)V
HSPLcom/android/internal/telephony/PhoneInternalInterface$DataActivityState;->values()[Lcom/android/internal/telephony/PhoneInternalInterface$DataActivityState;
-HSPLcom/android/internal/telephony/PhoneStateIntentReceiver;->(Landroid/content/Context;Landroid/os/Handler;)V
-HSPLcom/android/internal/telephony/PhoneStateIntentReceiver;->notifyServiceState(I)V
HSPLcom/android/internal/telephony/PhoneSubInfoController;->callPhoneMethodWithPermissionCheck(ILjava/lang/String;Ljava/lang/String;Lcom/android/internal/telephony/PhoneSubInfoController$CallPhoneMethodHelper;Lcom/android/internal/telephony/PhoneSubInfoController$PermissionCheckHelper;)Ljava/lang/Object;
HSPLcom/android/internal/telephony/PhoneSubInfoController;->getCarrierInfoForImsiEncryption(IILjava/lang/String;)Landroid/telephony/ImsiEncryptionInfo;
HSPLcom/android/internal/telephony/PhoneSubInfoController;->getGroupIdLevel1ForSubscriber(ILjava/lang/String;)Ljava/lang/String;
@@ -37729,7 +37727,6 @@ Lcom/android/internal/telephony/PhoneFactory;
Lcom/android/internal/telephony/PhoneInternalInterface$DataActivityState;
Lcom/android/internal/telephony/PhoneInternalInterface;
Lcom/android/internal/telephony/PhoneNotifier;
-Lcom/android/internal/telephony/PhoneStateIntentReceiver;
Lcom/android/internal/telephony/PhoneSubInfoController$CallPhoneMethodHelper;
Lcom/android/internal/telephony/PhoneSubInfoController$PermissionCheckHelper;
Lcom/android/internal/telephony/PhoneSubInfoController;
diff --git a/config/preloaded-classes b/config/preloaded-classes
index 97f009c092170..e53c74bdfc4b7 100644
--- a/config/preloaded-classes
+++ b/config/preloaded-classes
@@ -4841,7 +4841,6 @@ com.android.internal.telephony.PhoneConstants$State
com.android.internal.telephony.PhoneFactory
com.android.internal.telephony.PhoneInternalInterface
com.android.internal.telephony.PhoneNotifier
-com.android.internal.telephony.PhoneStateIntentReceiver
com.android.internal.telephony.PhoneSubInfoController$CallPhoneMethodHelper
com.android.internal.telephony.PhoneSubInfoController$PermissionCheckHelper
com.android.internal.telephony.PhoneSubInfoController
diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java
index 8f99c1c2e5650..e2b016902ed0e 100644
--- a/services/core/java/com/android/server/TelephonyRegistry.java
+++ b/services/core/java/com/android/server/TelephonyRegistry.java
@@ -2147,6 +2147,17 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
private static final String PHONE_CONSTANTS_SLOT_KEY = "slot";
private static final String PHONE_CONSTANTS_SUBSCRIPTION_KEY = "subscription";
+ /**
+ * Broadcast Action: The phone's signal strength has changed. The intent will have the
+ * following extra values:
+ * phoneName - A string version of the phone name.
+ * asu - A numeric value for the signal strength.
+ * An ASU is 0-31 or -1 if unknown (for GSM, dBm = -113 - 2 * asu).
+ * The following special values are defined:
+ * 0 means "-113 dBm or less".31 means "-51 dBm or greater".
+ */
+ public static final String ACTION_SIGNAL_STRENGTH_CHANGED = "android.intent.action.SIG_STR";
+
private void broadcastServiceStateChanged(ServiceState state, int phoneId, int subId) {
long ident = Binder.clearCallingIdentity();
try {
@@ -2181,7 +2192,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
Binder.restoreCallingIdentity(ident);
}
- Intent intent = new Intent(TelephonyIntents.ACTION_SIGNAL_STRENGTH_CHANGED);
+ Intent intent = new Intent(ACTION_SIGNAL_STRENGTH_CHANGED);
Bundle data = new Bundle();
fillInSignalStrengthNotifierBundle(signalStrength, data);
intent.putExtras(data);
diff --git a/telephony/java/android/telephony/CellLocation.java b/telephony/java/android/telephony/CellLocation.java
index 64776e377fa41..b3c2fe1fc6b40 100644
--- a/telephony/java/android/telephony/CellLocation.java
+++ b/telephony/java/android/telephony/CellLocation.java
@@ -50,8 +50,7 @@ public abstract class CellLocation {
/**
* Create a new CellLocation from a intent notifier Bundle
*
- * This method is used by PhoneStateIntentReceiver and maybe by
- * external applications.
+ * This method maybe used by external applications.
*
* @param bundle Bundle from intent notifier
* @return newly created CellLocation
diff --git a/telephony/java/android/telephony/SignalStrength.java b/telephony/java/android/telephony/SignalStrength.java
index 3350a33715046..4bdfc5108aa08 100644
--- a/telephony/java/android/telephony/SignalStrength.java
+++ b/telephony/java/android/telephony/SignalStrength.java
@@ -85,8 +85,7 @@ public class SignalStrength implements Parcelable {
/**
* Create a new SignalStrength from a intent notifier Bundle
*
- * This method is used by PhoneStateIntentReceiver and maybe by
- * external applications.
+ * This method may be used by external applications.
*
* @param m Bundle from intent notifier
* @return newly created SignalStrength
diff --git a/telephony/java/android/telephony/VoLteServiceState.java b/telephony/java/android/telephony/VoLteServiceState.java
index 414b9995fd585..ad4d742d66b5c 100644
--- a/telephony/java/android/telephony/VoLteServiceState.java
+++ b/telephony/java/android/telephony/VoLteServiceState.java
@@ -51,8 +51,7 @@ public final class VoLteServiceState implements Parcelable {
/**
* Create a new VoLteServiceState from a intent notifier Bundle
*
- * This method is used by PhoneStateIntentReceiver and maybe by
- * external applications.
+ * This method is maybe used by external applications.
*
* @param m Bundle from intent notifier
* @return newly created VoLteServiceState
diff --git a/telephony/java/com/android/internal/telephony/TelephonyIntents.java b/telephony/java/com/android/internal/telephony/TelephonyIntents.java
index f78c65ffb3aab..54c07cfd3428e 100644
--- a/telephony/java/com/android/internal/telephony/TelephonyIntents.java
+++ b/telephony/java/com/android/internal/telephony/TelephonyIntents.java
@@ -123,32 +123,6 @@ public class TelephonyIntents {
public static final String ACTION_EMERGENCY_CALL_STATE_CHANGED
= TelephonyManager.ACTION_EMERGENCY_CALL_STATE_CHANGED;
- /**
- * Broadcast Action: The phone's signal strength has changed. The intent will have the
- * following extra values:
- *
- * - phoneName - A string version of the phone name.
- * - asu - A numeric value for the signal strength.
- * An ASU is 0-31 or -1 if unknown (for GSM, dBm = -113 - 2 * asu).
- * The following special values are defined:
- *
- 0 means "-113 dBm or less".
- 31 means "-51 dBm or greater".
- *
- *
- *
- *
- * You can not receive this through components declared
- * in manifests, only by exlicitly registering for it with
- * {@link android.content.Context#registerReceiver(android.content.BroadcastReceiver,
- * android.content.IntentFilter) Context.registerReceiver()}.
- *
- *
- * Requires the READ_PHONE_STATE permission.
- *
- *
This is a protected intent that can only be sent
- * by the system.
- */
- public static final String ACTION_SIGNAL_STRENGTH_CHANGED = "android.intent.action.SIG_STR";
-
/**
* Broadcast Action: The data connection state has changed for any one of the