Files
app_Settings/tests/robotests/src/android/service/oemlock/OemLockManager.java
Andrew Scull 0aa45bed65 Policy transparency when DISALLOW_FACTORY_RESET prevents OEM unlock.
If an admin has set the DISALLOW_FACTORY_RESET user restriction, OEM
unlock is also restricted. If this is the case, it should be explained
to the user that the admin is preventing the OEM unlock.

DISALLOW_OEM_UNLOCK is deprecated and now managed by OemLockManager.
This restriction is also one set by the carrier, not an admin.

Test: RunSettingsRoboTests
Test: CTS verifier test from the bug
Bug: 65124732
Change-Id: I8bde87a522742a7cbda006eee17c2a19797b1835
2017-09-08 12:40:25 +01:00

43 lines
1.2 KiB
Java

/*
* Copyright (C) 2017 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 android.service.oemlock;
/**
* Make OemLockManager available to Robolectric.
*/
public class OemLockManager {
public void setOemUnlockAllowedByCarrier(boolean allowed, byte[] signature) {}
public boolean isOemUnlockAllowedByCarrier() {
return true;
}
public void setOemUnlockAllowedByUser(boolean allowed) {}
public boolean isOemUnlockAllowedByUser() {
return false;
}
public boolean isOemUnlockAllowed() {
return false;
}
public boolean isDeviceOemUnlocked() {
return false;
}
}