Merge "Changing setPreferredData so that it takes subId."
This commit is contained in:
@@ -2207,24 +2207,25 @@ public class SubscriptionManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set preferred default data.
|
* Set which subscription is preferred for cellular data.
|
||||||
* Set on which slot most cellular data will be on.
|
* It's also usually the subscription we set up internet connection on.
|
||||||
* It's also usually what we set up internet connection on.
|
|
||||||
*
|
*
|
||||||
* PreferredData overwrites user setting of default data subscription. And it's used
|
* PreferredData overwrites user setting of default data subscription. And it's used
|
||||||
* by AlternativeNetworkAccessService or carrier apps to switch primary and CBRS
|
* by AlternativeNetworkService or carrier apps to switch primary and CBRS
|
||||||
* subscription dynamically in multi-SIM devices.
|
* subscription dynamically in multi-SIM devices.
|
||||||
*
|
*
|
||||||
* @param slotId which slot is preferred to for cellular data. If it's INVALID, it means
|
* @param subId which subscription is preferred to for cellular data. If it's
|
||||||
* it's unset and defaultDataSubId is used to determine which modem is preferred.
|
* {@link SubscriptionManager#INVALID_SUBSCRIPTION_ID}, it means
|
||||||
|
* it's unset and {@link SubscriptionManager#getDefaultDataSubscriptionId()}
|
||||||
|
* is used to determine which modem is preferred.
|
||||||
* @hide
|
* @hide
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
|
@RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
|
||||||
public void setPreferredData(int slotId) {
|
public void setPreferredData(int subId) {
|
||||||
if (VDBG) logd("[setPreferredData]+ slotId:" + slotId);
|
if (VDBG) logd("[setPreferredData]+ subId:" + subId);
|
||||||
setSubscriptionPropertyHelper(SubscriptionManager.DEFAULT_SUBSCRIPTION_ID,
|
setSubscriptionPropertyHelper(SubscriptionManager.DEFAULT_SUBSCRIPTION_ID,
|
||||||
"setPreferredData", (iSub)-> iSub.setPreferredData(slotId));
|
"setPreferredData", (iSub)-> iSub.setPreferredData(subId));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
package com.android.internal.telephony;
|
package com.android.internal.telephony;
|
||||||
|
|
||||||
import android.app.PendingIntent;
|
|
||||||
import android.telephony.SubscriptionInfo;
|
import android.telephony.SubscriptionInfo;
|
||||||
|
|
||||||
interface ISub {
|
interface ISub {
|
||||||
@@ -175,14 +174,14 @@ interface ISub {
|
|||||||
int setParentSubId(int parentSubId, int subId);
|
int setParentSubId(int parentSubId, int subId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set preferred default data.
|
* Set which subscription is preferred for cellular data. It's
|
||||||
* Set on which slot default data will be on.
|
* designed to overwrite default data subscription temporarily.
|
||||||
*
|
*
|
||||||
* @param slotId which slot is preferred to for cellular data.
|
* @param subId which subscription is preferred to for cellular data.
|
||||||
* @hide
|
* @hide
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
int setPreferredData(int slotId);
|
int setPreferredData(int subId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get User downloaded Profiles.
|
* Get User downloaded Profiles.
|
||||||
|
|||||||
Reference in New Issue
Block a user