Merge "Avoid UnsupportedOperationException from getDefaultSmsSubscriptionId()" into qt-dev
am: be063ffb59
Change-Id: I221da0882cec481f4f0e892d8eb19c196889db1a
This commit is contained in:
@@ -1975,9 +1975,11 @@ public final class SmsManager {
|
|||||||
*/
|
*/
|
||||||
public static int getDefaultSmsSubscriptionId() {
|
public static int getDefaultSmsSubscriptionId() {
|
||||||
try {
|
try {
|
||||||
return getISmsServiceOrThrow().getPreferredSmsSubscription();
|
return getISmsService().getPreferredSmsSubscription();
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
return SubscriptionManager.INVALID_SUBSCRIPTION_ID;
|
return SubscriptionManager.INVALID_SUBSCRIPTION_ID;
|
||||||
|
} catch (NullPointerException e) {
|
||||||
|
return SubscriptionManager.INVALID_SUBSCRIPTION_ID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user