Revert "Remove "Backup Calling" button from Settings UI"
Revert submission 20541028-remove_backup_calling Reason for revert: Disables backup calling on master builds Reverted Changes: Iff2665829:Remove "Backup Calling" button from Settings UI I5523465a6:Remove "Backup Calling" button from Settings UI Change-Id: I415cfddfb365dc8911f2ded418892ceb3834ba24
This commit is contained in:
committed by
Android (Google) Code Review
parent
fa589ca6f1
commit
9adfa375ea
@@ -10510,15 +10510,12 @@
|
||||
<string name="wifi_calling_summary">Use Wi\u2011Fi for calls to improve quality</string>
|
||||
|
||||
<!-- Mobile network settings screen, title of Backup calling setting. [CHAR LIMIT=NONE] -->
|
||||
<!-- Deprecated ToDo: b/260059444 remove it next version-->
|
||||
<string name="backup_calling_settings_title">Backup calling</string>
|
||||
|
||||
<!-- Backup calling summary. [CHAR LIMIT=100] -->
|
||||
<!-- Deprecated ToDo: b/260059444 remove it next version-->
|
||||
<string name="backup_calling_setting_summary">If <xliff:g id="backup_calling_operator_text" example="Google Fi">%1$s</xliff:g> is unavailable or roaming, use your mobile data SIM for <xliff:g id="backup_calling_carrier_text" example="Google Fi">%1$s</xliff:g> calls.</string>
|
||||
|
||||
<!-- List of synonyms for the cross SIM calling titles, used to match in settings search [CHAR LIMIT=NONE] -->
|
||||
<!-- Deprecated ToDo: b/260059444 remove it next version-->
|
||||
<string name="keywords_backup_calling">backup calling</string>
|
||||
|
||||
<!-- Title for enable MMS notification when trying to receive MMS. [CHAR LIMIT=40] -->
|
||||
|
@@ -183,6 +183,14 @@
|
||||
android:persistent="true"
|
||||
settings:controller="com.android.settings.network.telephony.VideoCallingPreferenceController"/>
|
||||
|
||||
<SwitchPreference
|
||||
android:key="backup_calling_key"
|
||||
android:title="@string/backup_calling_settings_title"
|
||||
android:persistent="false"
|
||||
android:summary="@string/backup_calling_setting_summary"
|
||||
settings:keywords="@string/keywords_backup_calling"
|
||||
settings:controller="com.android.settings.network.telephony.BackupCallingPreferenceController"/>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<com.android.settings.network.telephony.cdma.CdmaListPreference
|
||||
|
@@ -43,4 +43,12 @@
|
||||
settings:controller="com.android.settings.network.telephony.NetworkProviderWifiCallingPreferenceController"
|
||||
settings:allowDividerAbove="true"
|
||||
/>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="provider_model_backup_calling_category"
|
||||
android:title="@string/backup_calling_settings_title"
|
||||
android:order="25"
|
||||
settings:controller="com.android.settings.network.telephony.NetworkProviderBackupCallingPreferenceController"
|
||||
settings:allowDividerAbove="true"
|
||||
/>
|
||||
</PreferenceScreen>
|
||||
|
@@ -26,6 +26,7 @@ import com.android.settings.R;
|
||||
import com.android.settings.Utils;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
import com.android.settings.network.telephony.CallsDefaultSubscriptionController;
|
||||
import com.android.settings.network.telephony.NetworkProviderBackupCallingPreferenceController;
|
||||
import com.android.settings.network.telephony.NetworkProviderWifiCallingPreferenceController;
|
||||
import com.android.settings.network.telephony.SmsDefaultSubscriptionController;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
@@ -41,6 +42,9 @@ public class NetworkProviderCallsSmsFragment extends DashboardFragment {
|
||||
static final String LOG_TAG = "NetworkProviderCallsSmsFragment";
|
||||
@VisibleForTesting
|
||||
static final String KEY_PREFERENCE_CATEGORY_CALLING = "provider_model_calling_category";
|
||||
@VisibleForTesting
|
||||
static final String KEY_PREFERENCE_CATEGORY_BACKUP_CALLING =
|
||||
"provider_model_backup_calling_category";
|
||||
|
||||
@VisibleForTesting
|
||||
static final String KEY_PREFERENCE_CALLS= "provider_model_calls_preference";
|
||||
@@ -63,6 +67,12 @@ public class NetworkProviderCallsSmsFragment extends DashboardFragment {
|
||||
mNetworkProviderWifiCallingPreferenceController.init(getSettingsLifecycle());
|
||||
controllers.add(mNetworkProviderWifiCallingPreferenceController);
|
||||
|
||||
NetworkProviderBackupCallingPreferenceController backupCallingPrefCtrl =
|
||||
new NetworkProviderBackupCallingPreferenceController(context,
|
||||
KEY_PREFERENCE_CATEGORY_BACKUP_CALLING);
|
||||
backupCallingPrefCtrl.init(getSettingsLifecycle());
|
||||
controllers.add(backupCallingPrefCtrl);
|
||||
|
||||
return controllers;
|
||||
}
|
||||
|
||||
|
@@ -38,7 +38,6 @@ import java.util.Objects;
|
||||
|
||||
/**
|
||||
* Preference controller for "Backup Calling"
|
||||
* Deprecated ToDo: b/260059444 remove it next version
|
||||
**/
|
||||
public class BackupCallingPreferenceController extends TelephonyTogglePreferenceController {
|
||||
|
||||
|
@@ -269,6 +269,11 @@ public class MobileNetworkSettings extends AbstractMobileNetworkSettings impleme
|
||||
|
||||
final VideoCallingPreferenceController videoCallingPreferenceController =
|
||||
use(VideoCallingPreferenceController.class).init(mSubId);
|
||||
final BackupCallingPreferenceController crossSimCallingPreferenceController =
|
||||
use(BackupCallingPreferenceController.class).init(mSubId);
|
||||
use(CallingPreferenceCategoryController.class).setChildren(
|
||||
Arrays.asList(wifiCallingPreferenceController, videoCallingPreferenceController,
|
||||
crossSimCallingPreferenceController));
|
||||
use(Enhanced4gLtePreferenceController.class).init(mSubId)
|
||||
.addListener(videoCallingPreferenceController);
|
||||
use(Enhanced4gCallingPreferenceController.class).init(mSubId)
|
||||
|
@@ -49,7 +49,6 @@ import java.util.Map;
|
||||
|
||||
/**
|
||||
* Preference controller for "Backup Calling"
|
||||
* Deprecated ToDo: b/260059444 remove it next version
|
||||
**/
|
||||
public class NetworkProviderBackupCallingGroup extends
|
||||
TelephonyTogglePreferenceController implements LifecycleObserver,
|
||||
|
@@ -32,7 +32,6 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* Preference controller for "Backup Calling" summary list
|
||||
* Deprecated ToDo: b/260059444 remove it next version
|
||||
*/
|
||||
public class NetworkProviderBackupCallingPreferenceController extends
|
||||
BasePreferenceController implements LifecycleObserver {
|
||||
|
@@ -28,13 +28,9 @@ import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import com.android.settings.core.BasePreferenceController;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
/**
|
||||
* Deprecated ToDo: b/260059444 remove it next version
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class BackupCallingPreferenceControllerTest {
|
||||
private static final int SUB_ID = 2;
|
||||
@@ -51,7 +47,6 @@ public class BackupCallingPreferenceControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void controller_isUnavailable() {
|
||||
assertThat(mController.getAvailabilityStatus())
|
||||
.isEqualTo(BasePreferenceController.CONDITIONALLY_UNAVAILABLE);
|
||||
|
@@ -40,7 +40,6 @@ import com.android.settings.network.CarrierConfigCache;
|
||||
import com.android.settingslib.core.lifecycle.Lifecycle;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
@@ -48,9 +47,6 @@ import org.mockito.MockitoAnnotations;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Deprecated ToDo: b/260059444 remove it next version
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class NetworkProviderBackupCallingGroupTest {
|
||||
|
||||
@@ -137,14 +133,12 @@ public class NetworkProviderBackupCallingGroupTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void shouldShowBackupCallingForSub_invalidSubId_returnFalse() {
|
||||
assertThat(mNetworkProviderBackupCallingGroup.hasBackupCallingFeature(
|
||||
SubscriptionManager.INVALID_SUBSCRIPTION_ID)).isEqualTo(false);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void shouldShowBackupCallingForSub_carrierConfigIsUnavailable_returnFalse() {
|
||||
mCarrierConfig.putBoolean(CarrierConfigManager.KEY_CARRIER_CROSS_SIM_IMS_AVAILABLE_BOOL,
|
||||
false);
|
||||
@@ -154,7 +148,6 @@ public class NetworkProviderBackupCallingGroupTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void
|
||||
shouldShowBackupCallingForSub_crossSimDisabled_returnFalse() {
|
||||
doReturn(false).when(mNetworkProviderBackupCallingGroup).isCrossSimEnabledByPlatform(
|
||||
@@ -165,7 +158,6 @@ public class NetworkProviderBackupCallingGroupTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void shouldBackupCallingForSub_crossSimEnabled_returnTrue() {
|
||||
doReturn(true).when(mNetworkProviderBackupCallingGroup).isCrossSimEnabledByPlatform(
|
||||
mContext, SUB_ID_1);
|
||||
|
Reference in New Issue
Block a user