Loading telephony/java/android/telephony/SmsManager.java +25 −0 Original line number Original line Diff line number Diff line Loading @@ -2978,4 +2978,29 @@ public final class SmsManager { Log.e(TAG, "setPremiumSmsPermission() RemoteException", e); Log.e(TAG, "setPremiumSmsPermission() RemoteException", e); } } } } /** * Reset all cell broadcast ranges. Previously enabled ranges will become invalid after this. * * @return {@code true} if succeeded, otherwise {@code false}. * * // TODO: Unhide the API in S. * @hide */ public boolean resetAllCellBroadcastRanges() { boolean success = false; try { ISms iSms = getISmsService(); if (iSms != null) { // If getSubscriptionId() returns INVALID or an inactive subscription, we will use // the default phone internally. success = iSms.resetAllCellBroadcastRanges(getSubscriptionId()); } } catch (RemoteException ex) { // ignore it } return success; } } } telephony/java/com/android/internal/telephony/ISms.aidl +10 −0 Original line number Original line Diff line number Diff line Loading @@ -563,4 +563,14 @@ interface ISms { * @return capacity of ICC * @return capacity of ICC */ */ int getSmsCapacityOnIccForSubscriber(int subId); 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); } } telephony/java/com/android/internal/telephony/ISmsImplBase.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -212,4 +212,9 @@ public class ISmsImplBase extends ISms.Stub { public int getSmsCapacityOnIccForSubscriber(int subId) { public int getSmsCapacityOnIccForSubscriber(int subId) { throw new UnsupportedOperationException(); throw new UnsupportedOperationException(); } } @Override public boolean resetAllCellBroadcastRanges(int subId) { throw new UnsupportedOperationException(); } } } Loading
telephony/java/android/telephony/SmsManager.java +25 −0 Original line number Original line Diff line number Diff line Loading @@ -2978,4 +2978,29 @@ public final class SmsManager { Log.e(TAG, "setPremiumSmsPermission() RemoteException", e); Log.e(TAG, "setPremiumSmsPermission() RemoteException", e); } } } } /** * Reset all cell broadcast ranges. Previously enabled ranges will become invalid after this. * * @return {@code true} if succeeded, otherwise {@code false}. * * // TODO: Unhide the API in S. * @hide */ public boolean resetAllCellBroadcastRanges() { boolean success = false; try { ISms iSms = getISmsService(); if (iSms != null) { // If getSubscriptionId() returns INVALID or an inactive subscription, we will use // the default phone internally. success = iSms.resetAllCellBroadcastRanges(getSubscriptionId()); } } catch (RemoteException ex) { // ignore it } return success; } } }
telephony/java/com/android/internal/telephony/ISms.aidl +10 −0 Original line number Original line Diff line number Diff line Loading @@ -563,4 +563,14 @@ interface ISms { * @return capacity of ICC * @return capacity of ICC */ */ int getSmsCapacityOnIccForSubscriber(int subId); 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); } }
telephony/java/com/android/internal/telephony/ISmsImplBase.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -212,4 +212,9 @@ public class ISmsImplBase extends ISms.Stub { public int getSmsCapacityOnIccForSubscriber(int subId) { public int getSmsCapacityOnIccForSubscriber(int subId) { throw new UnsupportedOperationException(); throw new UnsupportedOperationException(); } } @Override public boolean resetAllCellBroadcastRanges(int subId) { throw new UnsupportedOperationException(); } } }