[Provider Model] Implement Calls & SMS controller
Screenshot of Provider Model: Single SIM: https://screenshot.googleplex.com/4pGBU7XK55CwJ7o.png Dual SIM: https://screenshot.googleplex.com/bXaFjsfGkgyHoYF.png Screenshot of current: https://screenshot.googleplex.com/BtCgYmnpvT97SQs.png Doc: https://docs.google.com/presentation/d/1azrZVS54pxM2lt9LkZHtFh_6W3fyDw_kTTPVQ_mJCi4/edit#slide=id.g9c7123c172_0_448 New controller: NetworkProviderCallsSmsController Bug: 172053880 Test: manual Change-Id: I86e9fc71d2b8562d838c5b5c6bd9c443656e2624
This commit is contained in:
@@ -36,6 +36,7 @@ import androidx.preference.PreferenceScreen;
|
||||
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.Utils;
|
||||
import com.android.settings.network.SubscriptionUtil;
|
||||
import com.android.settings.network.SubscriptionsChangeListener;
|
||||
|
||||
@@ -90,7 +91,7 @@ public abstract class DefaultSubscriptionController extends TelephonyBasePrefere
|
||||
@Override
|
||||
public int getAvailabilityStatus(int subId) {
|
||||
final List<SubscriptionInfo> subs = SubscriptionUtil.getActiveSubscriptions(mManager);
|
||||
if (subs.size() > 1) {
|
||||
if (subs.size() > 1 || Utils.isProviderModelEnabled(mContext)) {
|
||||
return AVAILABLE;
|
||||
} else {
|
||||
return CONDITIONALLY_UNAVAILABLE;
|
||||
@@ -157,6 +158,12 @@ public abstract class DefaultSubscriptionController extends TelephonyBasePrefere
|
||||
final ArrayList<CharSequence> displayNames = new ArrayList<>();
|
||||
final ArrayList<CharSequence> subscriptionIds = new ArrayList<>();
|
||||
|
||||
if (Utils.isProviderModelEnabled(mContext) && subs.size() == 1) {
|
||||
mPreference.setEnabled(false);
|
||||
mPreference.setSummary(subs.get(0).getDisplayName());
|
||||
return;
|
||||
}
|
||||
|
||||
final int serviceDefaultSubId = getDefaultSubscriptionId();
|
||||
boolean subIsAvailable = false;
|
||||
|
||||
|
Reference in New Issue
Block a user