Merge "Telephony: Get SIM card capacity count of SMS"
This commit is contained in:
@@ -8808,6 +8808,7 @@ package android.telephony {
|
||||
public final class SmsManager {
|
||||
method public boolean disableCellBroadcastRange(int, int, int);
|
||||
method public boolean enableCellBroadcastRange(int, int, int);
|
||||
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getSmsCapacityOnIcc();
|
||||
method public void sendMultipartTextMessage(@NonNull String, @NonNull String, @NonNull java.util.List<java.lang.String>, @Nullable java.util.List<android.app.PendingIntent>, @Nullable java.util.List<android.app.PendingIntent>, @NonNull String);
|
||||
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void sendMultipartTextMessageWithoutPersisting(String, String, java.util.List<java.lang.String>, java.util.List<android.app.PendingIntent>, java.util.List<android.app.PendingIntent>);
|
||||
}
|
||||
|
||||
@@ -2000,6 +2000,27 @@ public final class SmsManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the total capacity of SMS storage on RUIM and SIM cards
|
||||
*
|
||||
* @return the total capacity count of SMS on RUIM and SIM cards
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
|
||||
public int getSmsCapacityOnIcc() {
|
||||
int ret = 0;
|
||||
try {
|
||||
ISms iccISms = getISmsService();
|
||||
if (iccISms != null) {
|
||||
ret = iccISms.getSmsCapacityOnIccForSubscriber(getSubscriptionId());
|
||||
}
|
||||
} catch (RemoteException ex) {
|
||||
//ignore it
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
// see SmsMessage.getStatusOnIcc
|
||||
|
||||
/** Free space (TS 51.011 10.5.3 / 3GPP2 C.S0023 3.4.27). */
|
||||
|
||||
@@ -593,4 +593,12 @@ interface ISms {
|
||||
* @return true for success, false otherwise.
|
||||
*/
|
||||
boolean setSmscAddressOnIccEfForSubscriber(String smsc, int subId, String callingPackage);
|
||||
|
||||
/**
|
||||
* Get the capacity count of sms on Icc card.
|
||||
*
|
||||
* @param subId for subId which getSmsCapacityOnIcc is queried.
|
||||
* @return capacity of ICC
|
||||
*/
|
||||
int getSmsCapacityOnIccForSubscriber(int subId);
|
||||
}
|
||||
|
||||
@@ -212,4 +212,9 @@ public class ISmsImplBase extends ISms.Stub {
|
||||
String smsc, int subId, String callingPackage) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSmsCapacityOnIccForSubscriber(int subId) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user