Skip to content
Snippets Groups Projects
Commit 343cab40 authored by Ling Ma's avatar Ling Ma
Browse files

Revert "Limited profiles to access only associated subscriptions"

Revert submission 24907577-split_subscriptionManager

Reason for revert: 308469709#comment8

Reverted changes: /q/submissionid:24907577-split_subscriptionManager

Change-Id: Ib4cfd1c4df6f0f34756e3c1d6453ae3333ea515a
parent 5c2d6223
No related branches found
No related tags found
No related merge requests found
......@@ -265,8 +265,8 @@ public class SubscriptionManager {
}
}
private static IntegerPropertyInvalidatedCache<Integer> sGetDefaultSubIdCacheAsUser =
new IntegerPropertyInvalidatedCache<>(ISub::getDefaultSubIdAsUser,
private static VoidPropertyInvalidatedCache<Integer> sGetDefaultSubIdCache =
new VoidPropertyInvalidatedCache<>(ISub::getDefaultSubId,
CACHE_KEY_SUBSCRIPTION_MANAGER_SERVICE_PROPERTY,
INVALID_SUBSCRIPTION_ID);
......@@ -275,8 +275,8 @@ public class SubscriptionManager {
CACHE_KEY_SUBSCRIPTION_MANAGER_SERVICE_PROPERTY,
INVALID_SUBSCRIPTION_ID);
private static IntegerPropertyInvalidatedCache<Integer> sGetDefaultSmsSubIdCacheAsUser =
new IntegerPropertyInvalidatedCache<>(ISub::getDefaultSmsSubIdAsUser,
private static VoidPropertyInvalidatedCache<Integer> sGetDefaultSmsSubIdCache =
new VoidPropertyInvalidatedCache<>(ISub::getDefaultSmsSubId,
CACHE_KEY_SUBSCRIPTION_MANAGER_SERVICE_PROPERTY,
INVALID_SUBSCRIPTION_ID);
......@@ -2309,7 +2309,7 @@ public class SubscriptionManager {
* @return the "system" default subscription id.
*/
public static int getDefaultSubscriptionId() {
return sGetDefaultSubIdCacheAsUser.query(Process.myUserHandle().getIdentifier());
return sGetDefaultSubIdCache.query(null);
}
/**
......@@ -2325,7 +2325,7 @@ public class SubscriptionManager {
try {
ISub iSub = TelephonyManager.getSubscriptionService();
if (iSub != null) {
subId = iSub.getDefaultVoiceSubIdAsUser(Process.myUserHandle().getIdentifier());
subId = iSub.getDefaultVoiceSubId();
}
} catch (RemoteException ex) {
// ignore it
......@@ -2397,7 +2397,7 @@ public class SubscriptionManager {
* @return the default SMS subscription Id.
*/
public static int getDefaultSmsSubscriptionId() {
return sGetDefaultSmsSubIdCacheAsUser.query(Process.myUserHandle().getIdentifier());
return sGetDefaultSmsSubIdCache.query(null);
}
/**
......@@ -3927,10 +3927,10 @@ public class SubscriptionManager {
* @hide
*/
public static void disableCaching() {
sGetDefaultSubIdCacheAsUser.disableLocal();
sGetDefaultSubIdCache.disableLocal();
sGetDefaultDataSubIdCache.disableLocal();
sGetActiveDataSubscriptionIdCache.disableLocal();
sGetDefaultSmsSubIdCacheAsUser.disableLocal();
sGetDefaultSmsSubIdCache.disableLocal();
sGetSlotIndexCache.disableLocal();
sGetSubIdCache.disableLocal();
sGetPhoneIdCache.disableLocal();
......@@ -3941,10 +3941,10 @@ public class SubscriptionManager {
*
* @hide */
public static void clearCaches() {
sGetDefaultSubIdCacheAsUser.clear();
sGetDefaultSubIdCache.clear();
sGetDefaultDataSubIdCache.clear();
sGetActiveDataSubscriptionIdCache.clear();
sGetDefaultSmsSubIdCacheAsUser.clear();
sGetDefaultSmsSubIdCache.clear();
sGetSlotIndexCache.clear();
sGetSubIdCache.clear();
sGetPhoneIdCache.clear();
......
......@@ -239,7 +239,6 @@ interface ISub {
int getSubId(int slotIndex);
int getDefaultSubId();
int getDefaultSubIdAsUser(int userId);
int getPhoneId(int subId);
......@@ -252,12 +251,10 @@ interface ISub {
void setDefaultDataSubId(int subId);
int getDefaultVoiceSubId();
int getDefaultVoiceSubIdAsUser(int userId);
void setDefaultVoiceSubId(int subId);
int getDefaultSmsSubId();
int getDefaultSmsSubIdAsUser(int userId);
void setDefaultSmsSubId(int subId);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment