In CBRS DSDS mode, switching data to CBRS network will require
validation first. Adding a component of CellularNetworkValidator
to trigger the validation and pass the result back to PhoneSwitcher.
Bug:
118348832
Test: manual
Change-Id: I689aa494f031834b5cee76906922ebdafa9c77ed
Merged-In: I689aa494f031834b5cee76906922ebdafa9c77ed
@RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
public void setPreferredDataSubscriptionId(int subId) {
if (VDBG) logd("[setPreferredDataSubscriptionId]+ subId:" + subId);
- setSubscriptionPropertyHelper(DEFAULT_SUBSCRIPTION_ID, "setPreferredDataSubscriptionId",
- (iSub)-> iSub.setPreferredDataSubscriptionId(subId));
+ try {
+ ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
+ if (iSub != null) {
+ iSub.setPreferredDataSubscriptionId(subId);
+ }
+ } catch (RemoteException ex) {
+ // ignore it
+ }
}
/**
* @hide
*
*/
- int setPreferredDataSubscriptionId(int subId);
+ void setPreferredDataSubscriptionId(int subId);
/**
* Get which subscription is preferred for cellular data.