From 2e4141e4ab6094c22a31bf8fedaef4cb4a5a690c Mon Sep 17 00:00:00 2001 From: Chaohui Wang Date: Mon, 19 Jun 2023 22:58:18 +0800 Subject: [PATCH] Clean up AwareFeatureProvider from Settings Bug: 287566056 Test: m Settings Change-Id: I7f7f57809c55bf8824b427f0d4a232cacdbe88a7 --- res/raw/gesture_ambient_wake_screen.mp4 | 0 .../settings/aware/AwareFeatureProvider.java | 36 --------------- .../aware/AwareFeatureProviderImpl.java | 43 ----------------- .../display/AlwaysOnDisplaySlice.java | 9 +--- .../GesturesSettingPreferenceController.java | 11 +---- .../settings/overlay/FeatureFactory.java | 3 -- .../settings/overlay/FeatureFactoryImpl.java | 11 ----- .../system/SystemDashboardFragment.java | 15 ------ .../aware/AwareFeatureProviderImplTest.java | 46 ------------------- .../display/AlwaysOnDisplaySliceTest.java | 38 +-------------- ...turesSettingsPreferenceControllerTest.java | 2 +- .../system/SystemDashboardFragmentTest.java | 29 ------------ .../testutils/FakeFeatureFactory.java | 8 ---- .../settings/testutils/FakeFeatureFactory.kt | 5 -- .../testutils/FakeFeatureFactory.java | 8 ---- 15 files changed, 5 insertions(+), 259 deletions(-) delete mode 100644 res/raw/gesture_ambient_wake_screen.mp4 delete mode 100644 src/com/android/settings/aware/AwareFeatureProvider.java delete mode 100644 src/com/android/settings/aware/AwareFeatureProviderImpl.java delete mode 100644 tests/robotests/src/com/android/settings/aware/AwareFeatureProviderImplTest.java diff --git a/res/raw/gesture_ambient_wake_screen.mp4 b/res/raw/gesture_ambient_wake_screen.mp4 deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/com/android/settings/aware/AwareFeatureProvider.java b/src/com/android/settings/aware/AwareFeatureProvider.java deleted file mode 100644 index a4e9c0cd31d..00000000000 --- a/src/com/android/settings/aware/AwareFeatureProvider.java +++ /dev/null @@ -1,36 +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.aware; - -import android.content.Context; - -import androidx.fragment.app.Fragment; - -public interface AwareFeatureProvider { - /** Returns true if the aware sensor is supported. */ - boolean isSupported(Context context); - - /** Returns true if the aware feature is enabled. */ - boolean isEnabled(Context context); - - /** Show information dialog. */ - void showRestrictionDialog(Fragment parent); - - /** Return Quick Gestures Summary. */ - CharSequence getGestureSummary(Context context, boolean sensorSupported, - boolean assistGestureEnabled, boolean assistGestureSilenceEnabled); -} diff --git a/src/com/android/settings/aware/AwareFeatureProviderImpl.java b/src/com/android/settings/aware/AwareFeatureProviderImpl.java deleted file mode 100644 index 6f80d8a7ae5..00000000000 --- a/src/com/android/settings/aware/AwareFeatureProviderImpl.java +++ /dev/null @@ -1,43 +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.aware; - -import android.content.Context; - -import androidx.fragment.app.Fragment; - -public class AwareFeatureProviderImpl implements AwareFeatureProvider { - @Override - public boolean isSupported(Context context) { - return false; - } - - @Override - public boolean isEnabled(Context context) { - return false; - } - - @Override - public void showRestrictionDialog(Fragment parent) { - } - - @Override - public CharSequence getGestureSummary(Context context, boolean sensorSupported, - boolean assistGestureEnabled, boolean assistGestureSilenceEnabled) { - return null; - } -} diff --git a/src/com/android/settings/display/AlwaysOnDisplaySlice.java b/src/com/android/settings/display/AlwaysOnDisplaySlice.java index 003c6039a22..7a9f2f9c0e2 100644 --- a/src/com/android/settings/display/AlwaysOnDisplaySlice.java +++ b/src/com/android/settings/display/AlwaysOnDisplaySlice.java @@ -36,8 +36,6 @@ import androidx.slice.builders.SliceAction; import com.android.settings.R; import com.android.settings.Utils; -import com.android.settings.aware.AwareFeatureProvider; -import com.android.settings.overlay.FeatureFactory; import com.android.settings.slices.CustomSliceRegistry; import com.android.settings.slices.CustomSliceable; @@ -59,12 +57,10 @@ public class AlwaysOnDisplaySlice implements CustomSliceable { private final Context mContext; private final AmbientDisplayConfiguration mConfig; - private final AwareFeatureProvider mFeatureProvider; public AlwaysOnDisplaySlice(Context context) { mContext = context; mConfig = new AmbientDisplayConfiguration(mContext); - mFeatureProvider = FeatureFactory.getFactory(context).getAwareFeatureProvider(); } @Override @@ -107,12 +103,9 @@ public class AlwaysOnDisplaySlice implements CustomSliceable { final boolean isChecked = intent.getBooleanExtra(android.app.slice.Slice.EXTRA_TOGGLE_STATE, false); final ContentResolver resolver = mContext.getContentResolver(); - final boolean isAwareSupported = mFeatureProvider.isSupported(mContext); - final boolean isAwareEnabled = mFeatureProvider.isEnabled(mContext); Settings.Secure.putInt(resolver, DOZE_ALWAYS_ON, isChecked ? 1 : 0); - Settings.Secure.putInt(resolver, DOZE_WAKE_DISPLAY_GESTURE, - (isAwareEnabled && isAwareSupported && isChecked) ? 1 : 0); + Settings.Secure.putInt(resolver, DOZE_WAKE_DISPLAY_GESTURE, 0); } @Override diff --git a/src/com/android/settings/gestures/GesturesSettingPreferenceController.java b/src/com/android/settings/gestures/GesturesSettingPreferenceController.java index ff069ab3581..5428eac3982 100644 --- a/src/com/android/settings/gestures/GesturesSettingPreferenceController.java +++ b/src/com/android/settings/gestures/GesturesSettingPreferenceController.java @@ -21,26 +21,19 @@ import android.hardware.display.AmbientDisplayConfiguration; import androidx.annotation.NonNull; -import com.android.settings.aware.AwareFeatureProvider; import com.android.settings.core.BasePreferenceController; -import com.android.settings.overlay.FeatureFactory; import com.android.settingslib.core.AbstractPreferenceController; import java.util.ArrayList; import java.util.List; public class GesturesSettingPreferenceController extends BasePreferenceController { - private final AssistGestureFeatureProvider mFeatureProvider; - private final AwareFeatureProvider mAwareFeatureProvider; private List mGestureControllers; - private static final String KEY_GESTURES_SETTINGS = "gesture_settings"; private static final String FAKE_PREF_KEY = "fake_key_only_for_get_available"; - public GesturesSettingPreferenceController(Context context) { - super(context, KEY_GESTURES_SETTINGS); - mFeatureProvider = FeatureFactory.getFactory(context).getAssistGestureFeatureProvider(); - mAwareFeatureProvider = FeatureFactory.getFactory(context).getAwareFeatureProvider(); + public GesturesSettingPreferenceController(Context context, String key) { + super(context, key); } @Override diff --git a/src/com/android/settings/overlay/FeatureFactory.java b/src/com/android/settings/overlay/FeatureFactory.java index 2191cd26622..92df1a88125 100644 --- a/src/com/android/settings/overlay/FeatureFactory.java +++ b/src/com/android/settings/overlay/FeatureFactory.java @@ -27,7 +27,6 @@ import com.android.settings.accessibility.AccessibilityMetricsFeatureProvider; import com.android.settings.accessibility.AccessibilitySearchFeatureProvider; import com.android.settings.accounts.AccountFeatureProvider; import com.android.settings.applications.ApplicationFeatureProvider; -import com.android.settings.aware.AwareFeatureProvider; import com.android.settings.biometrics.face.FaceFeatureProvider; import com.android.settings.biometrics2.factory.BiometricsRepositoryProvider; import com.android.settings.bluetooth.BluetoothFeatureProvider; @@ -176,8 +175,6 @@ public abstract class FeatureFactory { */ public abstract BluetoothFeatureProvider getBluetoothFeatureProvider(); - public abstract AwareFeatureProvider getAwareFeatureProvider(); - public abstract FaceFeatureProvider getFaceFeatureProvider(); /** diff --git a/src/com/android/settings/overlay/FeatureFactoryImpl.java b/src/com/android/settings/overlay/FeatureFactoryImpl.java index 60adf958545..e5b3402a7d0 100644 --- a/src/com/android/settings/overlay/FeatureFactoryImpl.java +++ b/src/com/android/settings/overlay/FeatureFactoryImpl.java @@ -33,8 +33,6 @@ import com.android.settings.accounts.AccountFeatureProvider; import com.android.settings.accounts.AccountFeatureProviderImpl; import com.android.settings.applications.ApplicationFeatureProvider; import com.android.settings.applications.ApplicationFeatureProviderImpl; -import com.android.settings.aware.AwareFeatureProvider; -import com.android.settings.aware.AwareFeatureProviderImpl; import com.android.settings.biometrics.face.FaceFeatureProvider; import com.android.settings.biometrics.face.FaceFeatureProviderImpl; import com.android.settings.biometrics2.factory.BiometricsRepositoryProvider; @@ -109,7 +107,6 @@ public class FeatureFactoryImpl extends FeatureFactory { private PanelFeatureProvider mPanelFeatureProvider; private ContextualCardFeatureProvider mContextualCardFeatureProvider; private BluetoothFeatureProvider mBluetoothFeatureProvider; - private AwareFeatureProvider mAwareFeatureProvider; private FaceFeatureProvider mFaceFeatureProvider; private BiometricsRepositoryProvider mBiometricsRepositoryProvider; private WifiTrackerLibProvider mWifiTrackerLibProvider; @@ -304,14 +301,6 @@ public class FeatureFactoryImpl extends FeatureFactory { return mBluetoothFeatureProvider; } - @Override - public AwareFeatureProvider getAwareFeatureProvider() { - if (mAwareFeatureProvider == null) { - mAwareFeatureProvider = new AwareFeatureProviderImpl(); - } - return mAwareFeatureProvider; - } - @Override public FaceFeatureProvider getFaceFeatureProvider() { if (mFaceFeatureProvider == null) { diff --git a/src/com/android/settings/system/SystemDashboardFragment.java b/src/com/android/settings/system/SystemDashboardFragment.java index eed9814c4ff..79c5b9f869d 100644 --- a/src/com/android/settings/system/SystemDashboardFragment.java +++ b/src/com/android/settings/system/SystemDashboardFragment.java @@ -20,14 +20,12 @@ import android.content.Context; import android.os.Bundle; import android.provider.SearchIndexableResource; -import androidx.annotation.VisibleForTesting; import androidx.preference.Preference; import androidx.preference.PreferenceGroup; import androidx.preference.PreferenceScreen; import com.android.settings.R; import com.android.settings.dashboard.DashboardFragment; -import com.android.settings.overlay.FeatureFactory; import com.android.settings.search.BaseSearchIndexProvider; import com.android.settingslib.search.SearchIndexable; @@ -39,8 +37,6 @@ public class SystemDashboardFragment extends DashboardFragment { private static final String TAG = "SystemDashboardFrag"; - public static final String EXTRA_SHOW_AWARE_DISABLED = "show_aware_dialog_disabled"; - @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); @@ -50,17 +46,6 @@ public class SystemDashboardFragment extends DashboardFragment { if (getVisiblePreferenceCount(screen) == screen.getInitialExpandedChildrenCount() + 1) { screen.setInitialExpandedChildrenCount(Integer.MAX_VALUE); } - - showRestrictionDialog(); - } - - @VisibleForTesting - public void showRestrictionDialog() { - final Bundle args = getArguments(); - if (args != null && args.getBoolean(EXTRA_SHOW_AWARE_DISABLED, false)) { - FeatureFactory.getFactory(getContext()).getAwareFeatureProvider() - .showRestrictionDialog(this); - } } @Override diff --git a/tests/robotests/src/com/android/settings/aware/AwareFeatureProviderImplTest.java b/tests/robotests/src/com/android/settings/aware/AwareFeatureProviderImplTest.java deleted file mode 100644 index 570f326e5b8..00000000000 --- a/tests/robotests/src/com/android/settings/aware/AwareFeatureProviderImplTest.java +++ /dev/null @@ -1,46 +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.aware; - -import static com.google.common.truth.Truth.assertThat; - -import android.content.Context; - -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.MockitoAnnotations; -import org.robolectric.RobolectricTestRunner; -import org.robolectric.RuntimeEnvironment; - -@RunWith(RobolectricTestRunner.class) -public class AwareFeatureProviderImplTest { - private Context mContext; - private AwareFeatureProviderImpl mImpl; - - @Before - public void setUp() { - MockitoAnnotations.initMocks(this); - mContext = RuntimeEnvironment.application; - mImpl = new AwareFeatureProviderImpl(); - } - - @Test - public void isSupported_shouldReturnFalse() { - assertThat(mImpl.isSupported(mContext)).isFalse(); - } -} diff --git a/tests/robotests/src/com/android/settings/display/AlwaysOnDisplaySliceTest.java b/tests/robotests/src/com/android/settings/display/AlwaysOnDisplaySliceTest.java index 217f92122a9..74e0d78d3a9 100644 --- a/tests/robotests/src/com/android/settings/display/AlwaysOnDisplaySliceTest.java +++ b/tests/robotests/src/com/android/settings/display/AlwaysOnDisplaySliceTest.java @@ -37,9 +37,7 @@ import androidx.slice.SliceProvider; import androidx.slice.widget.SliceLiveData; import com.android.settings.R; -import com.android.settings.aware.AwareFeatureProvider; import com.android.settings.slices.CustomSliceRegistry; -import com.android.settings.testutils.FakeFeatureFactory; import org.junit.Before; import org.junit.Test; @@ -55,8 +53,6 @@ public class AlwaysOnDisplaySliceTest { private Context mContext; private AlwaysOnDisplaySlice mSlice; - private FakeFeatureFactory mFeatureFactory; - private AwareFeatureProvider mFeatureProvider; @Mock private AmbientDisplayConfiguration mConfig; @@ -65,8 +61,6 @@ public class AlwaysOnDisplaySliceTest { public void setUp() { MockitoAnnotations.initMocks(this); mContext = RuntimeEnvironment.application; - mFeatureFactory = FakeFeatureFactory.setupForTest(); - mFeatureProvider = mFeatureFactory.getAwareFeatureProvider(); // Set-up specs for SliceMetadata. SliceProvider.setSpecs(SliceLiveData.SUPPORTED_SPECS); @@ -116,11 +110,9 @@ public class AlwaysOnDisplaySliceTest { } @Test - public void onNotifyChange_toggleOn_awareNotSupported_enableAoD() { + public void onNotifyChange_toggleOn_enableAoD() { final Intent intent = new Intent(); intent.putExtra(android.app.slice.Slice.EXTRA_TOGGLE_STATE, true); - when(mFeatureProvider.isEnabled(mContext)).thenReturn(false); - when(mFeatureProvider.isSupported(mContext)).thenReturn(false); mSlice.onNotifyChange(intent); @@ -128,32 +120,4 @@ public class AlwaysOnDisplaySliceTest { assertThat(Settings.Secure.getInt(resolver, DOZE_ALWAYS_ON, 0)).isEqualTo(1); assertThat(Settings.Secure.getInt(resolver, DOZE_WAKE_DISPLAY_GESTURE, 0)).isEqualTo(0); } - - @Test - public void onNotifyChange_toggleOn_awareDisabled_enableAoD() { - final Intent intent = new Intent(); - intent.putExtra(android.app.slice.Slice.EXTRA_TOGGLE_STATE, true); - when(mFeatureProvider.isEnabled(mContext)).thenReturn(false); - when(mFeatureProvider.isSupported(mContext)).thenReturn(true); - - mSlice.onNotifyChange(intent); - - final ContentResolver resolver = mContext.getContentResolver(); - assertThat(Settings.Secure.getInt(resolver, DOZE_ALWAYS_ON, 0)).isEqualTo(1); - assertThat(Settings.Secure.getInt(resolver, DOZE_WAKE_DISPLAY_GESTURE, 0)).isEqualTo(0); - } - - @Test - public void onNotifyChange_toggleOn_awareSupported_enableAoD() { - final Intent intent = new Intent(); - intent.putExtra(android.app.slice.Slice.EXTRA_TOGGLE_STATE, true); - when(mFeatureProvider.isEnabled(mContext)).thenReturn(true); - when(mFeatureProvider.isSupported(mContext)).thenReturn(true); - - mSlice.onNotifyChange(intent); - - final ContentResolver resolver = mContext.getContentResolver(); - assertThat(Settings.Secure.getInt(resolver, DOZE_ALWAYS_ON, 0)).isEqualTo(1); - assertThat(Settings.Secure.getInt(resolver, DOZE_WAKE_DISPLAY_GESTURE, 0)).isEqualTo(1); - } } diff --git a/tests/robotests/src/com/android/settings/gestures/GesturesSettingsPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/gestures/GesturesSettingsPreferenceControllerTest.java index fc0f45c16f7..32dd7afd40a 100644 --- a/tests/robotests/src/com/android/settings/gestures/GesturesSettingsPreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/gestures/GesturesSettingsPreferenceControllerTest.java @@ -57,7 +57,7 @@ public class GesturesSettingsPreferenceControllerTest { doReturn(mock(DevicePolicyManager.class)).when(mActivity) .getSystemService(Context.DEVICE_POLICY_SERVICE); FakeFeatureFactory.setupForTest(); - mController = new GesturesSettingPreferenceController(mActivity); + mController = new GesturesSettingPreferenceController(mActivity, "test_key"); } @Test diff --git a/tests/robotests/src/com/android/settings/system/SystemDashboardFragmentTest.java b/tests/robotests/src/com/android/settings/system/SystemDashboardFragmentTest.java index baa46906eb0..e504cd671ac 100644 --- a/tests/robotests/src/com/android/settings/system/SystemDashboardFragmentTest.java +++ b/tests/robotests/src/com/android/settings/system/SystemDashboardFragmentTest.java @@ -18,17 +18,11 @@ package com.android.settings.system; import static com.google.common.truth.Truth.assertThat; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.never; import static org.mockito.Mockito.spy; -import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import android.content.Context; -import android.os.Bundle; -import com.android.settings.aware.AwareFeatureProvider; -import com.android.settings.testutils.FakeFeatureFactory; import com.android.settings.testutils.XmlTestUtils; import com.android.settings.testutils.shadow.SettingsShadowResources; import com.android.settings.testutils.shadow.ShadowUserManager; @@ -75,27 +69,4 @@ public class SystemDashboardFragmentTest { assertThat(keys).containsAtLeastElementsIn(niks); } - - @Test - public void showRestrictionDialog_hasValidExtra_shouldShowDialog() { - final AwareFeatureProvider mProvider = - FakeFeatureFactory.setupForTest().mAwareFeatureProvider; - final Bundle bundle = new Bundle(); - bundle.putBoolean(SystemDashboardFragment.EXTRA_SHOW_AWARE_DISABLED, true); - when(mFragment.getArguments()).thenReturn(bundle); - - mFragment.showRestrictionDialog(); - - verify(mProvider).showRestrictionDialog(any()); - } - - @Test - public void showRestrictionDialog_hasInvalidExtra_shouldNotShowDialog() { - final AwareFeatureProvider mProvider = - FakeFeatureFactory.setupForTest().mAwareFeatureProvider; - - mFragment.showRestrictionDialog(); - - verify(mProvider, never()).showRestrictionDialog(any()); - } } diff --git a/tests/robotests/src/com/android/settings/testutils/FakeFeatureFactory.java b/tests/robotests/src/com/android/settings/testutils/FakeFeatureFactory.java index fcb01b4649e..e3af34b7d9d 100644 --- a/tests/robotests/src/com/android/settings/testutils/FakeFeatureFactory.java +++ b/tests/robotests/src/com/android/settings/testutils/FakeFeatureFactory.java @@ -25,7 +25,6 @@ import com.android.settings.accessibility.AccessibilityMetricsFeatureProvider; import com.android.settings.accessibility.AccessibilitySearchFeatureProvider; import com.android.settings.accounts.AccountFeatureProvider; import com.android.settings.applications.ApplicationFeatureProvider; -import com.android.settings.aware.AwareFeatureProvider; import com.android.settings.biometrics.face.FaceFeatureProvider; import com.android.settings.biometrics2.factory.BiometricsRepositoryProvider; import com.android.settings.bluetooth.BluetoothFeatureProvider; @@ -81,7 +80,6 @@ public class FakeFeatureFactory extends FeatureFactory { public final AssistGestureFeatureProvider assistGestureFeatureProvider; public final AccountFeatureProvider mAccountFeatureProvider; public final BluetoothFeatureProvider mBluetoothFeatureProvider; - public final AwareFeatureProvider mAwareFeatureProvider; public final FaceFeatureProvider mFaceFeatureProvider; public final BiometricsRepositoryProvider mBiometricsRepositoryProvider; @@ -140,7 +138,6 @@ public class FakeFeatureFactory extends FeatureFactory { mContextualCardFeatureProvider = mock(ContextualCardFeatureProvider.class); panelFeatureProvider = mock(PanelFeatureProvider.class); mBluetoothFeatureProvider = mock(BluetoothFeatureProvider.class); - mAwareFeatureProvider = mock(AwareFeatureProvider.class); mFaceFeatureProvider = mock(FaceFeatureProvider.class); mBiometricsRepositoryProvider = mock(BiometricsRepositoryProvider.class); wifiTrackerLibProvider = mock(WifiTrackerLibProvider.class); @@ -257,11 +254,6 @@ public class FakeFeatureFactory extends FeatureFactory { return mBluetoothFeatureProvider; } - @Override - public AwareFeatureProvider getAwareFeatureProvider() { - return mAwareFeatureProvider; - } - @Override public FaceFeatureProvider getFaceFeatureProvider() { return mFaceFeatureProvider; diff --git a/tests/spa_unit/src/com/android/settings/testutils/FakeFeatureFactory.kt b/tests/spa_unit/src/com/android/settings/testutils/FakeFeatureFactory.kt index 68078f8ba56..36013d2ecf9 100644 --- a/tests/spa_unit/src/com/android/settings/testutils/FakeFeatureFactory.kt +++ b/tests/spa_unit/src/com/android/settings/testutils/FakeFeatureFactory.kt @@ -21,7 +21,6 @@ import com.android.settings.accessibility.AccessibilityMetricsFeatureProvider import com.android.settings.accessibility.AccessibilitySearchFeatureProvider import com.android.settings.accounts.AccountFeatureProvider import com.android.settings.applications.ApplicationFeatureProvider -import com.android.settings.aware.AwareFeatureProvider import com.android.settings.biometrics.face.FaceFeatureProvider import com.android.settings.biometrics2.factory.BiometricsRepositoryProvider import com.android.settings.bluetooth.BluetoothFeatureProvider @@ -147,10 +146,6 @@ class FakeFeatureFactory : FeatureFactory() { TODO("Not yet implemented") } - override fun getAwareFeatureProvider(): AwareFeatureProvider { - TODO("Not yet implemented") - } - override fun getFaceFeatureProvider(): FaceFeatureProvider { TODO("Not yet implemented") } diff --git a/tests/unit/src/com/android/settings/testutils/FakeFeatureFactory.java b/tests/unit/src/com/android/settings/testutils/FakeFeatureFactory.java index 7a498652a5d..d52085d25a9 100644 --- a/tests/unit/src/com/android/settings/testutils/FakeFeatureFactory.java +++ b/tests/unit/src/com/android/settings/testutils/FakeFeatureFactory.java @@ -23,7 +23,6 @@ import com.android.settings.accessibility.AccessibilityMetricsFeatureProvider; import com.android.settings.accessibility.AccessibilitySearchFeatureProvider; import com.android.settings.accounts.AccountFeatureProvider; import com.android.settings.applications.ApplicationFeatureProvider; -import com.android.settings.aware.AwareFeatureProvider; import com.android.settings.biometrics.face.FaceFeatureProvider; import com.android.settings.biometrics2.factory.BiometricsRepositoryProvider; import com.android.settings.bluetooth.BluetoothFeatureProvider; @@ -76,7 +75,6 @@ public class FakeFeatureFactory extends FeatureFactory { public final AssistGestureFeatureProvider assistGestureFeatureProvider; public final AccountFeatureProvider mAccountFeatureProvider; public final BluetoothFeatureProvider mBluetoothFeatureProvider; - public final AwareFeatureProvider mAwareFeatureProvider; public final FaceFeatureProvider mFaceFeatureProvider; public final BiometricsRepositoryProvider mBiometricsRepositoryProvider; @@ -126,7 +124,6 @@ public class FakeFeatureFactory extends FeatureFactory { mContextualCardFeatureProvider = mock(ContextualCardFeatureProvider.class); panelFeatureProvider = mock(PanelFeatureProvider.class); mBluetoothFeatureProvider = mock(BluetoothFeatureProvider.class); - mAwareFeatureProvider = mock(AwareFeatureProvider.class); mFaceFeatureProvider = mock(FaceFeatureProvider.class); mBiometricsRepositoryProvider = mock(BiometricsRepositoryProvider.class); wifiTrackerLibProvider = mock(WifiTrackerLibProvider.class); @@ -243,11 +240,6 @@ public class FakeFeatureFactory extends FeatureFactory { return mBluetoothFeatureProvider; } - @Override - public AwareFeatureProvider getAwareFeatureProvider() { - return mAwareFeatureProvider; - } - @Override public FaceFeatureProvider getFaceFeatureProvider() { return mFaceFeatureProvider;