Avoid UnsupportedOperationException from getDefaultSmsSubscriptionId()
This is basically reverting to earlier behavior. Test: basic sanity Bug: 134375393 Change-Id: I44dc66f9f3d5d4dfcab95220d7a6a6be0ed5a825
This commit is contained in:
@@ -1975,9 +1975,11 @@ public final class SmsManager {
|
||||
*/
|
||||
public static int getDefaultSmsSubscriptionId() {
|
||||
try {
|
||||
return getISmsServiceOrThrow().getPreferredSmsSubscription();
|
||||
return getISmsService().getPreferredSmsSubscription();
|
||||
} catch (RemoteException e) {
|
||||
return SubscriptionManager.INVALID_SUBSCRIPTION_ID;
|
||||
} catch (NullPointerException e) {
|
||||
return SubscriptionManager.INVALID_SUBSCRIPTION_ID;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user