[Settings] Fix unable to accessing Fi

1. Get subscription ID from intent
2. Application context for proxy SubscriptionManager (since this is singleton)

Bug: 144172733
Test: Manual
Change-Id: I2f49d55da3380adeb40e8ff9414057113cb4ac35
This commit is contained in:
Bonian Chen
2019-11-19 19:36:19 +08:00
parent 345dc2bf3a
commit 6317a112ea
3 changed files with 25 additions and 11 deletions

View File

@@ -35,8 +35,7 @@ import java.util.List;
/**
* A proxy to the subscription manager
*/
public class ProxySubscriptionManager extends SubscriptionManager.OnSubscriptionsChangedListener
implements LifecycleObserver {
public class ProxySubscriptionManager implements LifecycleObserver {
/**
* Interface for monitor active subscriptions list changing
@@ -65,7 +64,7 @@ public class ProxySubscriptionManager extends SubscriptionManager.OnSubscription
if (sSingleton != null) {
return sSingleton;
}
sSingleton = new ProxySubscriptionManager(context);
sSingleton = new ProxySubscriptionManager(context.getApplicationContext());
return sSingleton;
}
@@ -110,12 +109,6 @@ public class ProxySubscriptionManager extends SubscriptionManager.OnSubscription
}
}
@Override
public void onSubscriptionsChanged() {
clearCache();
notifyAllListeners();
}
/**
* Lifecycle for data within proxy
*