summaryrefslogtreecommitdiff
path: root/telephony/java/com
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2020-08-31 21:21:38 -0700
committerXin Li <delphij@google.com>2020-08-31 21:21:38 -0700
commit628590d7ec80e10a3fc24b1c18a1afb55cca10a8 (patch)
tree4b1c3f52d86d7fb53afbe9e9438468588fa489f8 /telephony/java/com
parentb11b8ec3aec8bb42f2c07e1c5ac7942da293baa8 (diff)
parentd2d3a20624d968199353ccf6ddbae6f3ac39c9af (diff)
Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507 Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27 Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
Diffstat (limited to 'telephony/java/com')
-rw-r--r--telephony/java/com/android/internal/telephony/ISms.aidl20
-rw-r--r--telephony/java/com/android/internal/telephony/ISmsImplBase.java11
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl20
-rw-r--r--telephony/java/com/android/internal/telephony/PhoneConstants.java9
-rw-r--r--telephony/java/com/android/internal/telephony/SmsMessageBase.java9
-rw-r--r--telephony/java/com/android/internal/telephony/TelephonyIntents.java84
-rw-r--r--telephony/java/com/android/internal/telephony/cdma/UserData.java8
-rw-r--r--telephony/java/com/android/internal/telephony/cdma/sms/BearerData.java8
-rw-r--r--telephony/java/com/android/internal/telephony/cdma/sms/CdmaSmsAddress.java1
-rw-r--r--telephony/java/com/android/internal/telephony/cdma/sms/SmsEnvelope.java1
-rw-r--r--telephony/java/com/android/internal/telephony/gsm/GsmSmsAddress.java1
-rw-r--r--telephony/java/com/android/internal/telephony/gsm/SmsCbHeader.java10
-rw-r--r--telephony/java/com/android/internal/telephony/gsm/SmsMessage.java11
13 files changed, 83 insertions, 110 deletions
diff --git a/telephony/java/com/android/internal/telephony/ISms.aidl b/telephony/java/com/android/internal/telephony/ISms.aidl
index 88da3c94748b..9ec3c6716a29 100644
--- a/telephony/java/com/android/internal/telephony/ISms.aidl
+++ b/telephony/java/com/android/internal/telephony/ISms.aidl
@@ -117,10 +117,13 @@ interface ISms {
* be automatically persisted in the SMS db. It only affects messages sent
* by a non-default SMS app. Currently only the carrier app can set this
* parameter to false to skip auto message persistence.
+ * @param messageId An id that uniquely identifies the message requested to be sent.
+ * Used for logging and diagnostics purposes. The id may be 0.
*/
void sendTextForSubscriber(in int subId, String callingPkg, String callingAttributionTag,
in String destAddr, in String scAddr, in String text, in PendingIntent sentIntent,
- in PendingIntent deliveryIntent, in boolean persistMessageForNonDefaultSmsApp);
+ in PendingIntent deliveryIntent, in boolean persistMessageForNonDefaultSmsApp,
+ in long messageId);
/**
* Send an SMS with options using Subscription Id.
@@ -215,11 +218,14 @@ interface ISms {
* be automatically persisted in the SMS db. It only affects messages sent
* by a non-default SMS app. Currently only the carrier app can set this
* parameter to false to skip auto message persistence.
+ * @param messageId An id that uniquely identifies the message requested to be sent.
+ * Used for logging and diagnostics purposes. The id may be 0.
*/
void sendMultipartTextForSubscriber(in int subId, String callingPkg,
String callingAttributionTag, in String destinationAddress, in String scAddress,
in List<String> parts, in List<PendingIntent> sentIntents,
- in List<PendingIntent> deliveryIntents, in boolean persistMessageForNonDefaultSmsApp);
+ in List<PendingIntent> deliveryIntents, in boolean persistMessageForNonDefaultSmsApp,
+ in long messageId);
/**
* Send a multi-part text based SMS with options using Subscription Id.
@@ -557,4 +563,14 @@ interface ISms {
* @return capacity of ICC
*/
int getSmsCapacityOnIccForSubscriber(int subId);
+
+ /**
+ * Reset all cell broadcast ranges. Previously enabled ranges will become invalid after this.
+ *
+ * @param subId Subscription index
+ * @return {@code true} if succeeded, otherwise {@code false}.
+ *
+ * @hide
+ */
+ boolean resetAllCellBroadcastRanges(int subId);
}
diff --git a/telephony/java/com/android/internal/telephony/ISmsImplBase.java b/telephony/java/com/android/internal/telephony/ISmsImplBase.java
index 51af6de78627..c361d5bec097 100644
--- a/telephony/java/com/android/internal/telephony/ISmsImplBase.java
+++ b/telephony/java/com/android/internal/telephony/ISmsImplBase.java
@@ -54,7 +54,8 @@ public class ISmsImplBase extends ISms.Stub {
@Override
public void sendTextForSubscriber(int subId, String callingPkg, String callingAttributionTag,
String destAddr, String scAddr, String text, PendingIntent sentIntent,
- PendingIntent deliveryIntent, boolean persistMessageForNonDefaultSmsApp) {
+ PendingIntent deliveryIntent, boolean persistMessageForNonDefaultSmsApp,
+ long messageId) {
throw new UnsupportedOperationException();
}
@@ -77,7 +78,8 @@ public class ISmsImplBase extends ISms.Stub {
public void sendMultipartTextForSubscriber(int subId, String callingPkg,
String callingAttributionTag, String destinationAddress, String scAddress,
List<String> parts, List<PendingIntent> sentIntents,
- List<PendingIntent> deliveryIntents, boolean persistMessageForNonDefaultSmsApp) {
+ List<PendingIntent> deliveryIntents, boolean persistMessageForNonDefaultSmsApp,
+ long messageId) {
throw new UnsupportedOperationException();
}
@@ -210,4 +212,9 @@ public class ISmsImplBase extends ISms.Stub {
public int getSmsCapacityOnIccForSubscriber(int subId) {
throw new UnsupportedOperationException();
}
+
+ @Override
+ public boolean resetAllCellBroadcastRanges(int subId) {
+ throw new UnsupportedOperationException();
+ }
}
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index 99144ca8cb5b..ae1b5c1b50bd 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -2274,6 +2274,26 @@ interface ITelephony {
int changeIccLockPassword(int subId, String oldPassword, String newPassword);
/**
+ * Request for receiving user activity notification
+ */
+ oneway void requestUserActivityNotification();
+
+ /**
+ * Called when userActivity is signalled in the power manager.
+ * This is safe to call from any thread, with any window manager locks held or not.
+ */
+ oneway void userActivity();
+
+ /**
+ * Get the user manual network selection.
+ * Return empty string if in automatic selection.
+ *
+ * @param subId the id of the subscription
+ * @return operatorinfo on success
+ */
+ String getManualNetworkSelectionPlmn(int subId);
+
+ /**
* Whether device can connect to 5G network when two SIMs are active.
*/
boolean canConnectTo5GInDsdsMode();
diff --git a/telephony/java/com/android/internal/telephony/PhoneConstants.java b/telephony/java/com/android/internal/telephony/PhoneConstants.java
index db9fdf54852d..151187c5071f 100644
--- a/telephony/java/com/android/internal/telephony/PhoneConstants.java
+++ b/telephony/java/com/android/internal/telephony/PhoneConstants.java
@@ -37,12 +37,9 @@ public class PhoneConstants {
@UnsupportedAppUsage(implicitMember =
"values()[Lcom/android/internal/telephony/PhoneConstants$State;")
public enum State {
- @UnsupportedAppUsage
- IDLE,
- @UnsupportedAppUsage
- RINGING,
- @UnsupportedAppUsage
- OFFHOOK;
+ @UnsupportedAppUsage IDLE,
+ @UnsupportedAppUsage RINGING,
+ @UnsupportedAppUsage OFFHOOK;
};
/**
diff --git a/telephony/java/com/android/internal/telephony/SmsMessageBase.java b/telephony/java/com/android/internal/telephony/SmsMessageBase.java
index f21f8889fedb..084882b10c9b 100644
--- a/telephony/java/com/android/internal/telephony/SmsMessageBase.java
+++ b/telephony/java/com/android/internal/telephony/SmsMessageBase.java
@@ -34,15 +34,10 @@ import java.util.regex.Pattern;
* {@hide}
*/
public abstract class SmsMessageBase {
-
// Copied from Telephony.Mms.NAME_ADDR_EMAIL_PATTERN
public static final Pattern NAME_ADDR_EMAIL_PATTERN =
Pattern.compile("\\s*(\"[^\"]*\"|[^<>\"]+)\\s*<([^<>]+)>\\s*");
- @UnsupportedAppUsage
- public SmsMessageBase() {
- }
-
/** {@hide} The address of the SMSC. May be null */
@UnsupportedAppUsage
protected String mScAddress;
@@ -112,6 +107,10 @@ public abstract class SmsMessageBase {
@UnsupportedAppUsage
public int mMessageRef;
+ @UnsupportedAppUsage
+ public SmsMessageBase() {
+ }
+
// TODO(): This class is duplicated in SmsMessage.java. Refactor accordingly.
public static abstract class SubmitPduBase {
@UnsupportedAppUsage
diff --git a/telephony/java/com/android/internal/telephony/TelephonyIntents.java b/telephony/java/com/android/internal/telephony/TelephonyIntents.java
index 4dda066b4d18..d41a6c889afb 100644
--- a/telephony/java/com/android/internal/telephony/TelephonyIntents.java
+++ b/telephony/java/com/android/internal/telephony/TelephonyIntents.java
@@ -18,6 +18,7 @@ package com.android.internal.telephony;
import android.content.Intent;
import android.telephony.SubscriptionManager;
+import android.telephony.TelephonyManager;
import android.telephony.ims.ImsManager;
/**
@@ -100,7 +101,7 @@ public class TelephonyIntents {
* by the system.
*/
public static final String ACTION_EMERGENCY_CALLBACK_MODE_CHANGED
- = "android.intent.action.EMERGENCY_CALLBACK_MODE_CHANGED";
+ = TelephonyManager.ACTION_EMERGENCY_CALLBACK_MODE_CHANGED;
/**
* <p>Broadcast Action: The emergency call state is changed.
@@ -121,33 +122,7 @@ public class TelephonyIntents {
* by the system.
*/
public static final String ACTION_EMERGENCY_CALL_STATE_CHANGED
- = "android.intent.action.EMERGENCY_CALL_STATE_CHANGED";
-
- /**
- * Broadcast Action: The phone's signal strength has changed. The intent will have the
- * following extra values:</p>
- * <ul>
- * <li><em>phoneName</em> - A string version of the phone name.</li>
- * <li><em>asu</em> - 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:
- * <ul><li>0 means "-113 dBm or less".</li><li>31 means "-51 dBm or greater".</li></ul>
- * </li>
- * </ul>
- *
- * <p class="note">
- * You can <em>not</em> 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()}.
- *
- * <p class="note">
- * Requires the READ_PHONE_STATE permission.
- *
- * <p class="note">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";
+ = TelephonyManager.ACTION_EMERGENCY_CALL_STATE_CHANGED;
/**
@@ -215,7 +190,7 @@ public class TelephonyIntents {
* by the system.
*/
public static final String ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS
- = "com.android.internal.intent.action.ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS";
+ = TelephonyManager.ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS;
/**
* <p>Broadcast Action: Indicates that the action is forbidden by network.
@@ -237,37 +212,6 @@ public class TelephonyIntents {
public static final String SECRET_CODE_ACTION = "android.provider.Telephony.SECRET_CODE";
/**
- * Broadcast Action: The Service Provider string(s) have been updated. Activities or
- * services that use these strings should update their display.
- * The intent will have the following extra values:</p>
- *
- * <dl>
- * <dt>showPlmn</dt><dd>Boolean that indicates whether the PLMN should be shown.</dd>
- * <dt>plmn</dt><dd>The operator name of the registered network, as a string.</dd>
- * <dt>showSpn</dt><dd>Boolean that indicates whether the SPN should be shown.</dd>
- * <dt>spn</dt><dd>The service provider name, as a string.</dd>
- * </dl>
- *
- * Note that <em>showPlmn</em> may indicate that <em>plmn</em> should be displayed, even
- * though the value for <em>plmn</em> is null. This can happen, for example, if the phone
- * has not registered to a network yet. In this case the receiver may substitute an
- * appropriate placeholder string (eg, "No service").
- *
- * It is recommended to display <em>plmn</em> before / above <em>spn</em> if
- * both are displayed.
- *
- * <p>Note: this is a protected intent that can only be sent by the system.
- */
- public static final String SPN_STRINGS_UPDATED_ACTION =
- "android.provider.Telephony.SPN_STRINGS_UPDATED";
-
- public static final String EXTRA_SHOW_PLMN = "showPlmn";
- public static final String EXTRA_PLMN = "plmn";
- public static final String EXTRA_SHOW_SPN = "showSpn";
- public static final String EXTRA_SPN = "spn";
- public static final String EXTRA_DATA_SPN = "spnData";
-
- /**
* <p>Broadcast Action: It indicates one column of a subinfo record has been changed
* <p class="note">This is a protected intent that can only be sent
* by the system.
@@ -304,7 +248,7 @@ public class TelephonyIntents {
* </ul>
*/
public static final String ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED
- = "android.intent.action.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED";
+ = TelephonyManager.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED;
/**
* Broadcast Action: The default voice subscription has changed. This has the following
@@ -314,7 +258,7 @@ public class TelephonyIntents {
* </ul>
*/
public static final String ACTION_DEFAULT_VOICE_SUBSCRIPTION_CHANGED
- = "android.intent.action.ACTION_DEFAULT_VOICE_SUBSCRIPTION_CHANGED";
+ = TelephonyManager.ACTION_DEFAULT_VOICE_SUBSCRIPTION_CHANGED;
/**
* Broadcast Action: The default sms subscription has changed. This has the following
@@ -354,7 +298,7 @@ public class TelephonyIntents {
* Broadcast action to trigger CI OMA-DM Session.
*/
public static final String ACTION_REQUEST_OMADM_CONFIGURATION_UPDATE =
- "com.android.omadm.service.CONFIGURATION_UPDATE";
+ TelephonyManager.ACTION_REQUEST_OMADM_CONFIGURATION_UPDATE;
/**
* Broadcast action to trigger the Carrier Certificate download.
@@ -373,16 +317,8 @@ public class TelephonyIntents {
"com.android.internal.telephony.ACTION_LINE1_NUMBER_ERROR_DETECTED";
/**
- * Broadcast action to notify radio bug.
- *
- * Requires the READ_PRIVILEGED_PHONE_STATE permission.
- *
- * @hide
+ * Broadcast sent when a user activity is detected.
*/
- public static final String ACTION_REPORT_RADIO_BUG =
- "com.android.internal.telephony.ACTION_REPORT_RADIO_BUG";
-
- // ACTION_REPORT_RADIO_BUG extra keys
- public static final String EXTRA_SLOT_ID = "slotId";
- public static final String EXTRA_RADIO_BUG_TYPE = "radioBugType";
+ public static final String ACTION_USER_ACTIVITY_NOTIFICATION =
+ "android.intent.action.USER_ACTIVITY_NOTIFICATION";
}
diff --git a/telephony/java/com/android/internal/telephony/cdma/UserData.java b/telephony/java/com/android/internal/telephony/cdma/UserData.java
index d7e296800a62..524cb0ceadd2 100644
--- a/telephony/java/com/android/internal/telephony/cdma/UserData.java
+++ b/telephony/java/com/android/internal/telephony/cdma/UserData.java
@@ -24,10 +24,6 @@ import com.android.internal.util.HexDump;
public class UserData {
- @UnsupportedAppUsage
- public UserData() {
- }
-
/**
* User data encoding types.
* (See 3GPP2 C.R1001-F, v1.0, table 9.1-1)
@@ -107,6 +103,10 @@ public class UserData {
charToAscii.put('\r', ASCII_CR_INDEX);
}
+ @UnsupportedAppUsage
+ public UserData() {
+ }
+
/*
* TODO(cleanup): Move this very generic functionality somewhere
* more general.
diff --git a/telephony/java/com/android/internal/telephony/cdma/sms/BearerData.java b/telephony/java/com/android/internal/telephony/cdma/sms/BearerData.java
index 109dd3b30827..d186fcf63cfe 100644
--- a/telephony/java/com/android/internal/telephony/cdma/sms/BearerData.java
+++ b/telephony/java/com/android/internal/telephony/cdma/sms/BearerData.java
@@ -47,10 +47,6 @@ import java.util.ArrayList;
public final class BearerData {
private final static String LOG_TAG = "BearerData";
- @UnsupportedAppUsage
- public BearerData() {
- }
-
/**
* Bearer Data Subparameter Identifiers
* (See 3GPP2 C.S0015-B, v2.0, table 4.5-1)
@@ -241,6 +237,10 @@ public final class BearerData {
public boolean userResponseCodeSet = false;
public int userResponseCode;
+ @UnsupportedAppUsage
+ public BearerData() {
+ }
+
/**
* 6-byte-field, see 3GPP2 C.S0015-B, v2, 4.5.4
*/
diff --git a/telephony/java/com/android/internal/telephony/cdma/sms/CdmaSmsAddress.java b/telephony/java/com/android/internal/telephony/cdma/sms/CdmaSmsAddress.java
index 039b1769b487..6f0de340d2b8 100644
--- a/telephony/java/com/android/internal/telephony/cdma/sms/CdmaSmsAddress.java
+++ b/telephony/java/com/android/internal/telephony/cdma/sms/CdmaSmsAddress.java
@@ -94,6 +94,7 @@ public class CdmaSmsAddress extends SmsAddress {
* are stored in the parent class address and origBytes fields,
* respectively.
*/
+
@UnsupportedAppUsage
public CdmaSmsAddress(){
}
diff --git a/telephony/java/com/android/internal/telephony/cdma/sms/SmsEnvelope.java b/telephony/java/com/android/internal/telephony/cdma/sms/SmsEnvelope.java
index 964e2fb32689..9e2d29cd12e9 100644
--- a/telephony/java/com/android/internal/telephony/cdma/sms/SmsEnvelope.java
+++ b/telephony/java/com/android/internal/telephony/cdma/sms/SmsEnvelope.java
@@ -16,7 +16,6 @@
package com.android.internal.telephony.cdma.sms;
-
import android.compat.annotation.UnsupportedAppUsage;
import android.telephony.cdma.CdmaSmsCbProgramData;
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmSmsAddress.java b/telephony/java/com/android/internal/telephony/gsm/GsmSmsAddress.java
index c2adbc214a79..5409c094c80f 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmSmsAddress.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmSmsAddress.java
@@ -40,7 +40,6 @@ public class GsmSmsAddress extends SmsAddress {
* (addressLength + 1) / 2"
* @throws ParseException
*/
-
@UnsupportedAppUsage
public GsmSmsAddress(byte[] data, int offset, int length) throws ParseException {
origBytes = new byte[length];
diff --git a/telephony/java/com/android/internal/telephony/gsm/SmsCbHeader.java b/telephony/java/com/android/internal/telephony/gsm/SmsCbHeader.java
index f29410d9fca3..d1903450261b 100644
--- a/telephony/java/com/android/internal/telephony/gsm/SmsCbHeader.java
+++ b/telephony/java/com/android/internal/telephony/gsm/SmsCbHeader.java
@@ -229,17 +229,17 @@ public class SmsCbHeader {
}
@UnsupportedAppUsage
- int getGeographicalScope() {
+ public int getGeographicalScope() {
return mGeographicalScope;
}
@UnsupportedAppUsage
- int getSerialNumber() {
+ public int getSerialNumber() {
return mSerialNumber;
}
@UnsupportedAppUsage
- int getServiceCategory() {
+ public int getServiceCategory() {
return mMessageIdentifier;
}
@@ -252,12 +252,12 @@ public class SmsCbHeader {
}
@UnsupportedAppUsage
- int getPageIndex() {
+ public int getPageIndex() {
return mPageIndex;
}
@UnsupportedAppUsage
- int getNumberOfPages() {
+ public int getNumberOfPages() {
return mNrOfPages;
}
diff --git a/telephony/java/com/android/internal/telephony/gsm/SmsMessage.java b/telephony/java/com/android/internal/telephony/gsm/SmsMessage.java
index 7dd2f6dd8e32..e3df903b7f4f 100644
--- a/telephony/java/com/android/internal/telephony/gsm/SmsMessage.java
+++ b/telephony/java/com/android/internal/telephony/gsm/SmsMessage.java
@@ -105,14 +105,13 @@ public class SmsMessage extends SmsMessageBase {
private static final int INVALID_VALIDITY_PERIOD = -1;
- @UnsupportedAppUsage
- public SmsMessage() {
- }
-
public static class SubmitPdu extends SubmitPduBase {
@UnsupportedAppUsage
- public SubmitPdu() {
- }
+ public SubmitPdu() {}
+ }
+
+ @UnsupportedAppUsage
+ public SmsMessage() {
}
/**