Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eea1710c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add a feature flag for secure lock screen."

parents d133e9f4 66c492a8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -11653,6 +11653,7 @@ package android.content.pm {
    field public static final String FEATURE_SCREEN_LANDSCAPE = "android.hardware.screen.landscape";
    field public static final String FEATURE_SCREEN_PORTRAIT = "android.hardware.screen.portrait";
    field public static final String FEATURE_SECURELY_REMOVES_USERS = "android.software.securely_removes_users";
    field public static final String FEATURE_SECURE_LOCK_SCREEN = "android.software.secure_lock_screen";
    field public static final String FEATURE_SENSOR_ACCELEROMETER = "android.hardware.sensor.accelerometer";
    field public static final String FEATURE_SENSOR_AMBIENT_TEMPERATURE = "android.hardware.sensor.ambient_temperature";
    field public static final String FEATURE_SENSOR_BAROMETER = "android.hardware.sensor.barometer";
+5 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package android.app;
import android.Manifest;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.RequiresFeature;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.SystemService;
@@ -124,6 +125,7 @@ public class KeyguardManager {
     *
     * @return the intent for launching the activity or null if no password is required.
     **/
    @RequiresFeature(PackageManager.FEATURE_SECURE_LOCK_SCREEN)
    public Intent createConfirmDeviceCredentialIntent(CharSequence title, CharSequence description) {
        if (!isDeviceSecure()) return null;
        Intent intent = new Intent(ACTION_CONFIRM_DEVICE_CREDENTIAL);
@@ -176,6 +178,7 @@ public class KeyguardManager {
     * @throws IllegalStateException if the device has already been provisioned
     * @hide
     */
    @RequiresFeature(PackageManager.FEATURE_SECURE_LOCK_SCREEN)
    @SystemApi
    public Intent createConfirmFactoryResetCredentialIntent(
            CharSequence title, CharSequence description, CharSequence alternateButtonLabel) {
@@ -231,6 +234,7 @@ public class KeyguardManager {
     * secure notifications cannot be shown if {@code false}
     * @hide
     */
    @RequiresFeature(PackageManager.FEATURE_SECURE_LOCK_SCREEN)
    @RequiresPermission(Manifest.permission.CONTROL_KEYGUARD_SECURE_NOTIFICATIONS)
    @SystemApi
    public void setPrivateNotificationsAllowed(boolean allow) {
@@ -249,6 +253,7 @@ public class KeyguardManager {
     * By default, private notifications are allowed.
     * @hide
     */
    @RequiresFeature(PackageManager.FEATURE_SECURE_LOCK_SCREEN)
    @RequiresPermission(Manifest.permission.CONTROL_KEYGUARD_SECURE_NOTIFICATIONS)
    @SystemApi
    public boolean getPrivateNotificationsAllowed() {
+91 −1

File changed.

Preview size limit exceeded, changes collapsed.

+8 −0
Original line number Diff line number Diff line
@@ -2058,6 +2058,14 @@ public abstract class PackageManager {
    @SdkConstant(SdkConstantType.FEATURE)
    public static final String FEATURE_BROADCAST_RADIO = "android.hardware.broadcastradio";

    /**
     * Feature for {@link #getSystemAvailableFeatures} and
     * {@link #hasSystemFeature}: The device has a secure implementation of keyguard, meaning the
     * device supports PIN, pattern and password as defined in Android CDD
     */
    @SdkConstant(SdkConstantType.FEATURE)
    public static final String FEATURE_SECURE_LOCK_SCREEN = "android.software.secure_lock_screen";

    /**
     * Feature for {@link #getSystemAvailableFeatures} and
     * {@link #hasSystemFeature}: The device includes an accelerometer.
+29 −0

File changed.

Preview size limit exceeded, changes collapsed.

Loading