Move lockscreen bypass setting to Settings > Security > Face unlock
Fixes: 134700640 Test: atest FaceSettingsLockscreenBypassPreferenceControllerTest Test: enabling/disabling setting through Settings > Security > Face unlock works as expected Test: preference controller no longer seen in Settings > Display > Lock screen display Change-Id: I54807ad92fac62398a2b9dab93dd638775a09c8d
This commit is contained in:
@@ -62,14 +62,6 @@
|
||||
android:summary="@string/summary_placeholder"
|
||||
settings:searchable="false"/>
|
||||
|
||||
<!-- Bypass lock screen -->
|
||||
<SwitchPreference
|
||||
android:key="privacy_lockscreen_bypass"
|
||||
android:title="@string/lockscreen_bypass_title"
|
||||
android:summary="@string/lockscreen_bypass_summary"
|
||||
settings:keywords="@string/keywords_lockscreen_bypass"
|
||||
settings:controller="com.android.settings.security.LockscreenBypassPreferenceController" />
|
||||
|
||||
<!-- Privacy Service -->
|
||||
<PreferenceCategory
|
||||
android:key="privacy_services"
|
||||
|
@@ -30,13 +30,6 @@
|
||||
android:summary="@string/summary_placeholder"
|
||||
settings:keywords="@string/keywords_lock_screen_notif"/>
|
||||
|
||||
<SwitchPreference
|
||||
android:key="security_lockscreen_bypass"
|
||||
android:title="@string/lockscreen_bypass_title"
|
||||
android:summary="@string/lockscreen_bypass_summary"
|
||||
settings:searchable="false"
|
||||
settings:controller="com.android.settings.security.LockscreenBypassPreferenceController" />
|
||||
|
||||
<com.android.settingslib.RestrictedSwitchPreference
|
||||
android:key="security_lockscreen_add_users_when_locked"
|
||||
android:title="@string/user_add_on_lockscreen_menu"
|
||||
|
@@ -17,6 +17,7 @@
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
android:key="security_settings_face_settings_page"
|
||||
android:title="@string/security_settings_face_preference_title">
|
||||
|
||||
@@ -39,6 +40,12 @@
|
||||
android:title="@string/security_settings_face_settings_use_face_for_apps"
|
||||
app:keywords="@string/keywords_face_unlock"
|
||||
app:controller="com.android.settings.biometrics.face.FaceSettingsAppPreferenceController"/>
|
||||
<SwitchPreference
|
||||
android:key="security_lockscreen_bypass"
|
||||
android:title="@string/lockscreen_bypass_title"
|
||||
android:summary="@string/lockscreen_bypass_summary"
|
||||
settings:searchable="false"
|
||||
settings:controller="com.android.settings.biometrics.face.FaceSettingsLockscreenBypassPreferenceController" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
|
@@ -11,10 +11,10 @@
|
||||
* 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.
|
||||
* limitations under the License
|
||||
*/
|
||||
|
||||
package com.android.settings.security;
|
||||
package com.android.settings.biometrics.face;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
@@ -24,12 +24,12 @@ import android.provider.Settings;
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
import com.android.settings.core.TogglePreferenceController;
|
||||
|
||||
public class LockscreenBypassPreferenceController extends TogglePreferenceController {
|
||||
public class FaceSettingsLockscreenBypassPreferenceController extends TogglePreferenceController {
|
||||
|
||||
@VisibleForTesting
|
||||
protected FaceManager mFaceManager;
|
||||
|
||||
public LockscreenBypassPreferenceController(Context context, String preferenceKey) {
|
||||
public FaceSettingsLockscreenBypassPreferenceController(Context context, String preferenceKey) {
|
||||
super(context, preferenceKey);
|
||||
if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_FACE)) {
|
||||
mFaceManager = context.getSystemService(FaceManager.class);
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License
|
||||
*/
|
||||
|
||||
package com.android.settings.security;
|
||||
package com.android.settings.biometrics.face;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
@@ -36,14 +36,14 @@ import org.robolectric.RuntimeEnvironment;
|
||||
import org.robolectric.util.ReflectionHelpers;
|
||||
|
||||
@RunWith(RobolectricTestRunner.class)
|
||||
public class LockscreenBypassPreferenceControllerTest {
|
||||
public class FaceSettingsLockscreenBypassPreferenceControllerTest {
|
||||
|
||||
@Mock
|
||||
private FaceManager mFaceManager;
|
||||
private SwitchPreference mPreference;
|
||||
|
||||
private Context mContext;
|
||||
private LockscreenBypassPreferenceController mController;
|
||||
private FaceSettingsLockscreenBypassPreferenceController mController;
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
@@ -51,7 +51,7 @@ public class LockscreenBypassPreferenceControllerTest {
|
||||
mContext = RuntimeEnvironment.application;
|
||||
mPreference = new SwitchPreference(mContext);
|
||||
|
||||
mController = new LockscreenBypassPreferenceController(mContext, "TestKey");
|
||||
mController = new FaceSettingsLockscreenBypassPreferenceController(mContext, "TestKey");
|
||||
ReflectionHelpers.setField(mController, "mFaceManager", mFaceManager);
|
||||
}
|
||||
|
Reference in New Issue
Block a user