Merge changes from topic "unused_sm_methods"
* changes: Removed unused methods Removed unused methods
This commit is contained in:
@@ -1890,30 +1890,6 @@ public class SubscriptionManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the count of all subscriptions in the database, this includes
|
|
||||||
* all subscriptions that have been seen.
|
|
||||||
* @hide
|
|
||||||
*/
|
|
||||||
@UnsupportedAppUsage
|
|
||||||
public int getAllSubscriptionInfoCount() {
|
|
||||||
if (VDBG) logd("[getAllSubscriptionInfoCount]+");
|
|
||||||
|
|
||||||
int result = 0;
|
|
||||||
|
|
||||||
try {
|
|
||||||
ISub iSub = TelephonyManager.getSubscriptionService();
|
|
||||||
if (iSub != null) {
|
|
||||||
result = iSub.getAllSubInfoCount(mContext.getOpPackageName(),
|
|
||||||
mContext.getAttributionTag());
|
|
||||||
}
|
|
||||||
} catch (RemoteException ex) {
|
|
||||||
// ignore it
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
* Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
||||||
@@ -2312,24 +2288,6 @@ public class SubscriptionManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the SubscriptionInfo for default voice subscription.
|
|
||||||
*
|
|
||||||
* Will return null on data only devices, or on error.
|
|
||||||
*
|
|
||||||
* @return the SubscriptionInfo for the default SMS subscription.
|
|
||||||
* @hide
|
|
||||||
*/
|
|
||||||
public SubscriptionInfo getDefaultSmsSubscriptionInfo() {
|
|
||||||
return getActiveSubscriptionInfo(getDefaultSmsSubscriptionId());
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @hide */
|
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
||||||
public int getDefaultSmsPhoneId() {
|
|
||||||
return getPhoneId(getDefaultSmsSubscriptionId());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the system's default data subscription id.
|
* Returns the system's default data subscription id.
|
||||||
*
|
*
|
||||||
@@ -2377,12 +2335,6 @@ public class SubscriptionManager {
|
|||||||
return getActiveSubscriptionInfo(getDefaultDataSubscriptionId());
|
return getActiveSubscriptionInfo(getDefaultDataSubscriptionId());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @hide */
|
|
||||||
@UnsupportedAppUsage
|
|
||||||
public int getDefaultDataPhoneId() {
|
|
||||||
return getPhoneId(getDefaultDataSubscriptionId());
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
public void clearSubscriptionInfo() {
|
public void clearSubscriptionInfo() {
|
||||||
try {
|
try {
|
||||||
@@ -2397,21 +2349,6 @@ public class SubscriptionManager {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//FIXME this is vulnerable to race conditions
|
|
||||||
/** @hide */
|
|
||||||
public boolean allDefaultsSelected() {
|
|
||||||
if (!isValidSubscriptionId(getDefaultDataSubscriptionId())) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!isValidSubscriptionId(getDefaultSmsSubscriptionId())) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!isValidSubscriptionId(getDefaultVoiceSubscriptionId())) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the supplied subscription ID is valid.
|
* Check if the supplied subscription ID is valid.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -30,14 +30,6 @@ interface ISub {
|
|||||||
*/
|
*/
|
||||||
List<SubscriptionInfo> getAllSubInfoList(String callingPackage, String callingFeatureId);
|
List<SubscriptionInfo> getAllSubInfoList(String callingPackage, String callingFeatureId);
|
||||||
|
|
||||||
/**
|
|
||||||
* @param callingPackage The package maing the call.
|
|
||||||
* @param callingFeatureId The feature in the package
|
|
||||||
* @return the count of all subscriptions in the database, this includes
|
|
||||||
* all subscriptions that have been seen.
|
|
||||||
*/
|
|
||||||
int getAllSubInfoCount(String callingPackage, String callingFeatureId);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the active SubscriptionInfo with the subId key
|
* Get the active SubscriptionInfo with the subId key
|
||||||
* @param subId The unique SubscriptionInfo key in database
|
* @param subId The unique SubscriptionInfo key in database
|
||||||
|
|||||||
Reference in New Issue
Block a user