Loading src/com/android/settings/biometrics/face/FaceSettingsAttentionPreferenceController.java +5 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,6 @@ import androidx.preference.PreferenceScreen; import androidx.preference.SwitchPreference; import com.android.settings.Utils; import com.android.settings.core.TogglePreferenceController; /** * Preference controller that manages the ability to use face authentication with/without Loading Loading @@ -117,6 +116,11 @@ public class FaceSettingsAttentionPreferenceController extends FaceSettingsPrefe return true; } @Override public boolean isSliceable() { return false; } @Override public int getAvailabilityStatus() { return AVAILABLE; Loading tests/robotests/src/com/android/settings/biometrics/face/FaceSettingsAttentionPreferenceControllerTest.java 0 → 100644 +45 −0 Original line number Diff line number Diff line /* * 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.biometrics.face; 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.robolectric.RobolectricTestRunner; import org.robolectric.RuntimeEnvironment; @RunWith(RobolectricTestRunner.class) public class FaceSettingsAttentionPreferenceControllerTest { private Context mContext; private FaceSettingsAttentionPreferenceController mController; @Before public void setUp() { mContext = RuntimeEnvironment.application; mController = new FaceSettingsAttentionPreferenceController(mContext); } @Test public void isSliceable_returnFalse() { assertThat(mController.isSliceable()).isFalse(); } } Loading
src/com/android/settings/biometrics/face/FaceSettingsAttentionPreferenceController.java +5 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,6 @@ import androidx.preference.PreferenceScreen; import androidx.preference.SwitchPreference; import com.android.settings.Utils; import com.android.settings.core.TogglePreferenceController; /** * Preference controller that manages the ability to use face authentication with/without Loading Loading @@ -117,6 +116,11 @@ public class FaceSettingsAttentionPreferenceController extends FaceSettingsPrefe return true; } @Override public boolean isSliceable() { return false; } @Override public int getAvailabilityStatus() { return AVAILABLE; Loading
tests/robotests/src/com/android/settings/biometrics/face/FaceSettingsAttentionPreferenceControllerTest.java 0 → 100644 +45 −0 Original line number Diff line number Diff line /* * 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.biometrics.face; 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.robolectric.RobolectricTestRunner; import org.robolectric.RuntimeEnvironment; @RunWith(RobolectricTestRunner.class) public class FaceSettingsAttentionPreferenceControllerTest { private Context mContext; private FaceSettingsAttentionPreferenceController mController; @Before public void setUp() { mContext = RuntimeEnvironment.application; mController = new FaceSettingsAttentionPreferenceController(mContext); } @Test public void isSliceable_returnFalse() { assertThat(mController.isSliceable()).isFalse(); } }