Merge "[DO NOT MERGE] Add toggle for media resumption" into rvc-dev
diff --git a/res/values/strings.xml b/res/values/strings.xml
index c23abe9..9a56264 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -8806,6 +8806,9 @@
<!-- [CHAR LIMIT=NONE] App notification settings: link to app notification settings-->
<string name="app_settings_link">Additional settings in the app</string>
+ <!-- [CHAR LIMIT=NONE] Apps & notification settings: summary on the link to notification settings-->
+ <string name="notification_screen_summary">Notification history, bubbles, recently sent</string>
+
<!-- [CHAR LIMIT=45] App notification listing summary, blocked apps -->
<string name="app_notification_listing_summary_zero">On for all apps</string>
<!-- [CHAR LIMIT=45] App notification listing summary, blocked apps -->
@@ -11319,6 +11322,10 @@
<string name="platform_compat_default_disabled_title">Default disabled changes</string>
<!-- Title for target SDK gated app compat changes category (do not translate 'targetSdkVersion') [CHAR LIMIT=50] -->
<string name="platform_compat_target_sdk_title">Enabled for targetSdkVersion > <xliff:g id="number" example="29">%d</xliff:g></string>
+ <!-- Title for the dialog shown when no debuggable apps are available [CHAR LIMIT=20] -->
+ <string name="platform_compat_dialog_title_no_apps">No apps available</string>
+ <!-- Explanatory text shown when no debuggable apps are available [CHAR LIMIT=NONE] -->
+ <string name="platform_compat_dialog_text_no_apps">App compatibility changes can only be modified for debuggable apps. Install a debuggable app and try again.</string>
<!-- Slices Strings -->
diff --git a/res/xml/app_and_notification.xml b/res/xml/app_and_notification.xml
index 98b9844..bd2e85c 100644
--- a/res/xml/app_and_notification.xml
+++ b/res/xml/app_and_notification.xml
@@ -57,9 +57,9 @@
<Preference
android:key="configure_notification_settings"
android:title="@string/configure_notification_settings"
+ android:summary="@string/notification_screen_summary"
android:order="-440"
- android:fragment="com.android.settings.notification.ConfigureNotificationSettings"
- settings:controller="com.android.settings.notification.ConfigureNotificationPreferenceController"/>
+ android:fragment="com.android.settings.notification.ConfigureNotificationSettings"/>
<!-- Notifications (appears before manage_perms), default apps (appears after) -->
<PreferenceCategory
diff --git a/src/com/android/settings/accessibility/BalanceSeekBar.java b/src/com/android/settings/accessibility/BalanceSeekBar.java
index b108e18..ecc226b 100644
--- a/src/com/android/settings/accessibility/BalanceSeekBar.java
+++ b/src/com/android/settings/accessibility/BalanceSeekBar.java
@@ -16,6 +16,8 @@
package com.android.settings.accessibility;
+import static com.android.settings.Utils.isNightMode;
+
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.Resources;
@@ -113,8 +115,7 @@
res.getDimensionPixelSize(R.dimen.balance_seekbar_center_marker_width),
res.getDimensionPixelSize(R.dimen.balance_seekbar_center_marker_height));
mCenterMarkerPaint = new Paint();
- // TODO use a more suitable colour?
- mCenterMarkerPaint.setColor(Color.BLACK);
+ mCenterMarkerPaint.setColor(isNightMode(context) ? Color.WHITE : Color.BLACK);
mCenterMarkerPaint.setStyle(Paint.Style.FILL);
// Remove the progress colour
setProgressTintList(ColorStateList.valueOf(Color.TRANSPARENT));
diff --git a/src/com/android/settings/biometrics/face/FaceSettings.java b/src/com/android/settings/biometrics/face/FaceSettings.java
index c1ee545..a493ae0 100644
--- a/src/com/android/settings/biometrics/face/FaceSettings.java
+++ b/src/com/android/settings/biometrics/face/FaceSettings.java
@@ -323,16 +323,18 @@
@Override
protected boolean isPageSearchEnabled(Context context) {
- return isAvailable(context);
+ if (isAvailable(context)) {
+ return hasEnrolledBiometrics(context);
+ }
+
+ return false;
}
@Override
public List<String> getNonIndexableKeys(Context context) {
final List<String> keys = super.getNonIndexableKeys(context);
if (isAvailable(context)) {
- final FaceManager faceManager = context.getSystemService(FaceManager.class);
- final boolean hasEnrolled = faceManager.hasEnrolledTemplates(
- UserHandle.myUserId());
+ final boolean hasEnrolled = hasEnrolledBiometrics(context);
keys.add(hasEnrolled ? PREF_KEY_ENROLL_FACE_UNLOCK
: PREF_KEY_DELETE_FACE_DATA);
}
@@ -353,5 +355,13 @@
}
return isAttentionSupported;
}
+
+ private boolean hasEnrolledBiometrics(Context context) {
+ final FaceManager faceManager = Utils.getFaceManagerOrNull(context);
+ if (faceManager != null) {
+ return faceManager.hasEnrolledTemplates(UserHandle.myUserId());
+ }
+ return false;
+ }
};
}
diff --git a/src/com/android/settings/core/FeatureFlags.java b/src/com/android/settings/core/FeatureFlags.java
index 331e572..d2ad30d 100644
--- a/src/com/android/settings/core/FeatureFlags.java
+++ b/src/com/android/settings/core/FeatureFlags.java
@@ -29,5 +29,4 @@
public static final String CONTROLLER_ENHANCEMENT = "settings_controller_loading_enhancement";
public static final String CONDITIONAL_CARDS = "settings_conditionals";
public static final String TETHER_ALL_IN_ONE = "settings_tether_all_in_one";
- public static final String CONTEXTUAL_HOME2 = "settings_contextual_home2";
}
diff --git a/src/com/android/settings/development/AppPicker.java b/src/com/android/settings/development/AppPicker.java
index 8e927db..51215a1 100644
--- a/src/com/android/settings/development/AppPicker.java
+++ b/src/com/android/settings/development/AppPicker.java
@@ -47,10 +47,14 @@
= "com.android.settings.extra.REQUESTIING_PERMISSION";
public static final String EXTRA_DEBUGGABLE = "com.android.settings.extra.DEBUGGABLE";
public static final String EXTRA_NON_SYSTEM = "com.android.settings.extra.NON_SYSTEM";
+ public static final String EXTRA_INCLUDE_NOTHING = "com.android.settings.extra.INCLUDE_NOTHING";
+
+ public static final int RESULT_NO_MATCHING_APPS = -2;
private String mPermissionName;
private boolean mDebuggableOnly;
private boolean mNonSystemOnly;
+ private boolean mIncludeNothing;
@Override
protected void onCreate(Bundle icicle) {
@@ -60,9 +64,11 @@
mPermissionName = getIntent().getStringExtra(EXTRA_REQUESTIING_PERMISSION);
mDebuggableOnly = getIntent().getBooleanExtra(EXTRA_DEBUGGABLE, false);
mNonSystemOnly = getIntent().getBooleanExtra(EXTRA_NON_SYSTEM, false);
+ mIncludeNothing = getIntent().getBooleanExtra(EXTRA_INCLUDE_NOTHING, true);
mAdapter = new AppListAdapter(this);
if (mAdapter.getCount() <= 0) {
+ setResult(RESULT_NO_MATCHING_APPS);
finish();
} else {
setListAdapter(mAdapter);
@@ -160,9 +166,11 @@
mPackageInfoList.add(info);
}
Collections.sort(mPackageInfoList, sDisplayNameComparator);
- MyApplicationInfo info = new MyApplicationInfo();
- info.label = context.getText(R.string.no_application);
- mPackageInfoList.add(0, info);
+ if (mIncludeNothing) {
+ MyApplicationInfo info = new MyApplicationInfo();
+ info.label = context.getText(R.string.no_application);
+ mPackageInfoList.add(0, info);
+ }
addAll(mPackageInfoList);
}
diff --git a/src/com/android/settings/development/compat/PlatformCompatDashboard.java b/src/com/android/settings/development/compat/PlatformCompatDashboard.java
index 2f2c750..fe64948 100644
--- a/src/com/android/settings/development/compat/PlatformCompatDashboard.java
+++ b/src/com/android/settings/development/compat/PlatformCompatDashboard.java
@@ -20,6 +20,7 @@
import static com.android.settings.development.DevelopmentOptionsActivityRequestCodes.REQUEST_COMPAT_CHANGE_APP;
import android.app.Activity;
+import android.app.AlertDialog;
import android.app.settings.SettingsEnums;
import android.compat.Compatibility.ChangeConfig;
import android.content.Context;
@@ -124,6 +125,14 @@
} catch (PackageManager.NameNotFoundException e) {
startAppPicker();
}
+ } else if (resultCode == AppPicker.RESULT_NO_MATCHING_APPS) {
+ new AlertDialog.Builder(getContext())
+ .setTitle(R.string.platform_compat_dialog_title_no_apps)
+ .setMessage(R.string.platform_compat_dialog_text_no_apps)
+ .setPositiveButton(R.string.okay, (dialog, which) -> finish())
+ .setOnDismissListener(dialog -> finish())
+ .setCancelable(false)
+ .show();
}
return;
}
@@ -254,7 +263,8 @@
}
private void startAppPicker() {
- final Intent intent = new Intent(getContext(), AppPicker.class);
+ final Intent intent = new Intent(getContext(), AppPicker.class)
+ .putExtra(AppPicker.EXTRA_INCLUDE_NOTHING, false);
// If build is neither userdebug nor eng, only include debuggable apps
final boolean debuggableBuild = mAndroidBuildClassifier.isDebuggableBuild();
if (!debuggableBuild) {
diff --git a/src/com/android/settings/homepage/contextualcards/ContextualCardManager.java b/src/com/android/settings/homepage/contextualcards/ContextualCardManager.java
index fc666ec..ac35017 100644
--- a/src/com/android/settings/homepage/contextualcards/ContextualCardManager.java
+++ b/src/com/android/settings/homepage/contextualcards/ContextualCardManager.java
@@ -19,14 +19,11 @@
import static com.android.settings.homepage.contextualcards.ContextualCardLoader.CARD_CONTENT_LOADER_ID;
import static com.android.settings.intelligence.ContextualCardProto.ContextualCard.Category.STICKY_VALUE;
import static com.android.settings.intelligence.ContextualCardProto.ContextualCard.Category.SUGGESTION_VALUE;
-import static com.android.settings.slices.CustomSliceRegistry.BLUETOOTH_DEVICES_SLICE_URI;
-import static com.android.settings.slices.CustomSliceRegistry.CONTEXTUAL_WIFI_SLICE_URI;
import static java.util.stream.Collectors.groupingBy;
import android.app.settings.SettingsEnums;
import android.content.Context;
-import android.net.Uri;
import android.os.Bundle;
import android.provider.Settings;
import android.text.format.DateUtils;
@@ -55,7 +52,6 @@
import com.android.settingslib.core.lifecycle.events.OnStop;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -85,8 +81,6 @@
static final String KEY_CONTEXTUAL_CARDS = "key_contextual_cards";
private static final String TAG = "ContextualCardManager";
- private static final List<Uri> STICKY_CARDS =
- Arrays.asList(CONTEXTUAL_WIFI_SLICE_URI, BLUETOOTH_DEVICES_SLICE_URI);
private final Context mContext;
private final Lifecycle mLifecycle;
@@ -364,29 +358,11 @@
private List<ContextualCard> getCardsWithStickyViewType(List<ContextualCard> cards) {
final List<ContextualCard> result = new ArrayList<>(cards);
- int replaceCount = 0;
for (int index = 0; index < result.size(); index++) {
final ContextualCard card = cards.get(index);
- if (FeatureFlagUtils.isEnabled(mContext, FeatureFlags.CONTEXTUAL_HOME2)) {
- if (card.getCategory() == STICKY_VALUE) {
- result.set(index, card.mutate().setViewType(
- SliceContextualCardRenderer.VIEW_TYPE_STICKY).build());
- }
- continue;
- }
-
- if (replaceCount > STICKY_CARDS.size() - 1) {
- break;
- }
-
- if (card.getCardType() != ContextualCard.CardType.SLICE) {
- continue;
- }
-
- if (STICKY_CARDS.contains(card.getSliceUri())) {
+ if (card.getCategory() == STICKY_VALUE) {
result.set(index, card.mutate().setViewType(
SliceContextualCardRenderer.VIEW_TYPE_STICKY).build());
- replaceCount++;
}
}
return result;
diff --git a/src/com/android/settings/notification/ConfigureNotificationPreferenceController.java b/src/com/android/settings/notification/ConfigureNotificationPreferenceController.java
deleted file mode 100644
index 3aa1008..0000000
--- a/src/com/android/settings/notification/ConfigureNotificationPreferenceController.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License
- */
-
-package com.android.settings.notification;
-
-import android.content.Context;
-
-import com.android.settings.R;
-import com.android.settings.core.BasePreferenceController;
-
-public class ConfigureNotificationPreferenceController extends BasePreferenceController {
-
- private NotificationBackend mBackend;
-
- public ConfigureNotificationPreferenceController(Context context, String key) {
- super(context, key);
- mBackend = new NotificationBackend();
- }
-
- @Override
- public int getAvailabilityStatus() {
- return AVAILABLE;
- }
-
- @Override
- public CharSequence getSummary() {
- final int blockedAppCount = mBackend.getBlockedAppCount();
- if (blockedAppCount == 0) {
- return mContext.getText(R.string.app_notification_listing_summary_zero);
- }
- return mContext.getResources().getQuantityString(
- R.plurals.app_notification_listing_summary_others,
- blockedAppCount, blockedAppCount);
- }
-}
\ No newline at end of file
diff --git a/tests/robotests/src/com/android/settings/homepage/contextualcards/ContextualCardManagerTest.java b/tests/robotests/src/com/android/settings/homepage/contextualcards/ContextualCardManagerTest.java
index 127b9e2..69333d7 100644
--- a/tests/robotests/src/com/android/settings/homepage/contextualcards/ContextualCardManagerTest.java
+++ b/tests/robotests/src/com/android/settings/homepage/contextualcards/ContextualCardManagerTest.java
@@ -610,7 +610,6 @@
@Test
public void getCardsWithViewType_hasOneStickySlice_shouldHaveOneStickyCard() {
- FeatureFlagUtils.setEnabled(mContext, FeatureFlags.CONTEXTUAL_HOME2, true);
final List<ContextualCard> cards = new ArrayList<>();
cards.add(buildContextualCard(CustomSliceRegistry.CONTEXTUAL_WIFI_SLICE_URI.toString()));
cards.add(buildContextualCard(CustomSliceRegistry.LOW_STORAGE_SLICE_URI.toString()));
@@ -628,89 +627,6 @@
}
@Test
- public void getCardsWithViewType_hasWifiSlice_shouldHaveOneStickyCard() {
- FeatureFlagUtils.setEnabled(mContext, FeatureFlags.CONTEXTUAL_HOME2, false);
- final List<ContextualCard> cards = new ArrayList<>();
- cards.add(buildContextualCard(CustomSliceRegistry.CONTEXTUAL_WIFI_SLICE_URI.toString()));
- cards.add(buildContextualCard(CustomSliceRegistry.LOW_STORAGE_SLICE_URI.toString()));
- final List<Integer> categories = Arrays.asList(
- ContextualCardProto.ContextualCard.Category.IMPORTANT_VALUE,
- ContextualCardProto.ContextualCard.Category.SUGGESTION_VALUE
- );
- final List<ContextualCard> cardListWithWifi = buildCategoriedCards(cards, categories);
-
- final List<ContextualCard> result = mManager.getCardsWithViewType(cardListWithWifi);
-
- assertThat(result).hasSize(cards.size());
- assertThat(result.get(0).getViewType()).isEqualTo(VIEW_TYPE_STICKY);
- assertThat(result.get(1).getViewType()).isEqualTo(VIEW_TYPE_FULL_WIDTH);
- }
-
- @Test
- public void getCardsWithViewType_hasBluetoothDeviceSlice_shouldHaveOneStickyCard() {
- FeatureFlagUtils.setEnabled(mContext, FeatureFlags.CONTEXTUAL_HOME2, false);
- final List<ContextualCard> cards = new ArrayList<>();
- cards.add(buildContextualCard(CustomSliceRegistry.BLUETOOTH_DEVICES_SLICE_URI.toString()));
- cards.add(buildContextualCard(CustomSliceRegistry.LOW_STORAGE_SLICE_URI.toString()));
- final List<Integer> categories = Arrays.asList(
- ContextualCardProto.ContextualCard.Category.IMPORTANT_VALUE,
- ContextualCardProto.ContextualCard.Category.SUGGESTION_VALUE
- );
- final List<ContextualCard> cardListWithBT = buildCategoriedCards(cards, categories);
-
- final List<ContextualCard> result = mManager.getCardsWithViewType(cardListWithBT);
-
- assertThat(result).hasSize(cards.size());
- assertThat(result.get(0).getViewType()).isEqualTo(VIEW_TYPE_STICKY);
- assertThat(result.get(1).getViewType()).isEqualTo(VIEW_TYPE_FULL_WIDTH);
- }
-
- @Test
- public void getCardsWithViewType_hasWifiAndBtDeviceSlice_shouldHaveTwoStickyCards() {
- FeatureFlagUtils.setEnabled(mContext, FeatureFlags.CONTEXTUAL_HOME2, false);
- final List<ContextualCard> cards = new ArrayList<>();
- cards.add(buildContextualCard(CustomSliceRegistry.CONTEXTUAL_WIFI_SLICE_URI.toString()));
- cards.add(buildContextualCard(CustomSliceRegistry.BLUETOOTH_DEVICES_SLICE_URI.toString()));
- cards.add(buildContextualCard(CustomSliceRegistry.LOW_STORAGE_SLICE_URI.toString()));
- final List<Integer> categories = Arrays.asList(
- ContextualCardProto.ContextualCard.Category.IMPORTANT_VALUE,
- ContextualCardProto.ContextualCard.Category.IMPORTANT_VALUE,
- ContextualCardProto.ContextualCard.Category.SUGGESTION_VALUE
- );
- final List<ContextualCard> cardListWithWifiBT = buildCategoriedCards(cards, categories);
-
- final List<ContextualCard> result = mManager.getCardsWithViewType(cardListWithWifiBT);
-
- assertThat(result).hasSize(cards.size());
- assertThat(result.stream()
- .filter(card -> card.getViewType() == VIEW_TYPE_STICKY)
- .count())
- .isEqualTo(2);
- }
-
- @Test
- public void getCardsWithViewType_noWifiOrBtDeviceSlice_shouldNotHaveStickyCard() {
- FeatureFlagUtils.setEnabled(mContext, FeatureFlags.CONTEXTUAL_HOME2, false);
- final List<Integer> categories = Arrays.asList(
- ContextualCardProto.ContextualCard.Category.IMPORTANT_VALUE,
- ContextualCardProto.ContextualCard.Category.IMPORTANT_VALUE,
- ContextualCardProto.ContextualCard.Category.SUGGESTION_VALUE,
- ContextualCardProto.ContextualCard.Category.SUGGESTION_VALUE,
- ContextualCardProto.ContextualCard.Category.SUGGESTION_VALUE
- );
- final List<ContextualCard> cardListWithoutWifiBT =
- buildCategoriedCards(getContextualCardList(), categories);
-
- final List<ContextualCard> result = mManager.getCardsWithViewType(cardListWithoutWifiBT);
-
- assertThat(result).hasSize(cardListWithoutWifiBT.size());
- assertThat(result.stream()
- .filter(card -> card.getViewType() == VIEW_TYPE_STICKY)
- .count())
- .isEqualTo(0);
- }
-
- @Test
public void getCardsToKeep_hasSavedCard_shouldResetSavedCards() {
final List<String> savedCardNames = new ArrayList<>();
savedCardNames.add(TEST_SLICE_NAME);
diff --git a/tests/robotests/src/com/android/settings/notification/ConfigureNotificationPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/notification/ConfigureNotificationPreferenceControllerTest.java
deleted file mode 100644
index 83fe07a..0000000
--- a/tests/robotests/src/com/android/settings/notification/ConfigureNotificationPreferenceControllerTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.settings.notification;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import android.content.Context;
-
-import com.android.settings.testutils.shadow.ShadowNotificationBackend;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.robolectric.RobolectricTestRunner;
-import org.robolectric.RuntimeEnvironment;
-import org.robolectric.annotation.Config;
-
-@RunWith(RobolectricTestRunner.class)
-@Config(shadows = ShadowNotificationBackend.class)
-public class ConfigureNotificationPreferenceControllerTest {
-
- private ConfigureNotificationPreferenceController mController;
- private Context mContext;
-
- @Before
- public void setUp() {
- mContext = RuntimeEnvironment.application;
- mController = new ConfigureNotificationPreferenceController(mContext, "key");
- }
-
- @Test
- public void getSummary_noBlockedApps() {
- ShadowNotificationBackend.setBlockedAppCount(0);
-
- assertThat(mController.getSummary().toString()).contains("On");
- }
-
- @Test
- public void getSummary_someBlockedApps() {
- ShadowNotificationBackend.setBlockedAppCount(5);
-
- assertThat(mController.getSummary().toString()).contains("Off");
- assertThat(mController.getSummary().toString()).contains("5");
- }
-}
diff --git a/tests/unit/src/com/android/settings/wifi/tether/TetherServiceTest.java b/tests/unit/src/com/android/settings/wifi/tether/TetherServiceTest.java
index be030bf..9d9cc34 100644
--- a/tests/unit/src/com/android/settings/wifi/tether/TetherServiceTest.java
+++ b/tests/unit/src/com/android/settings/wifi/tether/TetherServiceTest.java
@@ -50,7 +50,6 @@
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
-import android.content.res.Resources;
import android.net.TetheringManager;
import android.net.wifi.WifiManager;
import android.os.Bundle;
@@ -78,13 +77,11 @@
private static final String TEST_RESPONSE_ACTION = "testProvisioningResponseAction";
private static final String TEST_NO_UI_ACTION = "testNoUiProvisioningRequestAction";
private static final int BOGUS_RECEIVER_RESULT = -5;
- private static final int TEST_CHECK_PERIOD = 100;
private static final int MS_PER_HOUR = 60 * 60 * 1000;
private static final int SHORT_TIMEOUT = 100;
private static final int PROVISION_TIMEOUT = 1000;
private TetherService mService;
- private MockResources mResources;
private MockTetherServiceWrapper mWrapper;
int mLastReceiverResultCode = BOGUS_RECEIVER_RESULT;
private int mLastTetherRequestType = TETHERING_INVALID;
@@ -109,7 +106,6 @@
super.setUp();
MockitoAnnotations.initMocks(this);
- mResources = new MockResources();
mContext = new TestContextWrapper(getContext());
setContext(mContext);
@@ -302,30 +298,6 @@
}
}
- private static class MockResources extends android.test.mock.MockResources {
- @Override
- public int getInteger(int id) {
- switch(id) {
- case com.android.internal.R.integer.config_mobile_hotspot_provision_check_period:
- return TEST_CHECK_PERIOD;
- default:
- return 0;
- }
- }
-
- @Override
- public String getString(int id) {
- switch(id) {
- case com.android.internal.R.string.config_mobile_hotspot_provision_response:
- return TEST_RESPONSE_ACTION;
- case com.android.internal.R.string.config_mobile_hotspot_provision_app_no_ui:
- return TEST_NO_UI_ACTION;
- default:
- return null;
- }
- }
- }
-
private class TestContextWrapper extends ContextWrapper {
public TestContextWrapper(Context base) {
@@ -333,11 +305,6 @@
}
@Override
- public Resources getResources() {
- return mResources;
- }
-
- @Override
public SharedPreferences getSharedPreferences(String name, int mode) {
// Stub out prefs to control the persisted tether type list.
if (name == "tetherPrefs") {