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

Commit 9bc7e5fe authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 9321341 from a01a1857 to tm-qpr2-release

Change-Id: Idc95bb35d2281c36e4102a967b811b49e6f5ace0
parents 666f91e0 a01a1857
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -118,6 +118,7 @@
    <uses-permission android:name="android.permission.READ_SAFETY_CENTER_STATUS" />
    <uses-permission android:name="android.permission.SEND_SAFETY_CENTER_UPDATE" />
    <uses-permission android:name="android.permission.START_VIEW_APP_FEATURES" />
    <uses-permission android:name="android.permission.ACCESS_KEYGUARD_QUICK_AFFORDANCES" />

    <application
            android:name=".SettingsApplication"
+8 −0
Original line number Diff line number Diff line
@@ -13744,6 +13744,14 @@
    <string name="lockscreen_double_line_clock_summary">Show double-line clock when available</string>
    <!-- Lockscreen double-line clock toggle [CHAR LIMIT=60] -->
    <string name="lockscreen_double_line_clock_setting_toggle">Double-line clock</string>
    <!-- Lock screen buttons preference [CHAR LIMIT=60] -->
    <string name="lockscreen_quick_affordances_title">Buttons</string>
    <!-- Summary for the lock screen button preference [CHAR LIMIT=60] -->
    <plurals name="lockscreen_quick_affordances_summary">
        <item quantity="zero">None</item>
        <item quantity="one"><xliff:g id="first">%1$s</xliff:g></item>
        <item quantity="other"><xliff:g id="first">%1$s</xliff:g>, <xliff:g id="second">%2$s</xliff:g></item>
    </plurals>
    <!-- Title for RTT setting. [CHAR LIMIT=NONE] -->
    <string name="rtt_settings_title"></string>
+5 −0
Original line number Diff line number Diff line
@@ -69,6 +69,11 @@
            android:summary="@string/lockscreen_trivial_controls_summary"
            settings:controller="com.android.settings.display.ControlsTrivialPrivacyPreferenceController"/>

        <Preference
            android:key="customizable_lock_screen_quick_affordances"
            android:title="@string/lockscreen_quick_affordances_title"
            settings:controller="com.android.settings.display.CustomizableLockScreenQuickAffordancesPreferenceController" />

        <SwitchPreference
            android:key="lockscreen_double_line_clock_switch"
            android:title="@string/lockscreen_double_line_clock_setting_toggle"
+2 −13
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ import android.content.Intent;
import android.hardware.SensorPrivacyManager;
import android.hardware.biometrics.BiometricAuthenticator;
import android.hardware.face.FaceManager;
import android.hardware.face.FaceSensorPropertiesInternal;
import android.os.Bundle;
import android.text.Html;
import android.text.method.LinkMovementMethod;
@@ -54,8 +53,6 @@ import com.google.android.setupcompat.template.FooterButton;
import com.google.android.setupcompat.util.WizardManagerHelper;
import com.google.android.setupdesign.span.LinkSpan;

import java.util.List;

/**
 * Provides introductory info about face unlock and prompts the user to agree before starting face
 * enrollment.
@@ -289,20 +286,12 @@ public class FaceEnrollIntroduction extends BiometricEnrollIntroduction {
    }

    private boolean maxFacesEnrolled() {
        final boolean isSetupWizard = WizardManagerHelper.isAnySetupWizard(getIntent());
        if (mFaceManager != null) {
            final List<FaceSensorPropertiesInternal> props =
                    mFaceManager.getSensorPropertiesInternal();
            // This will need to be updated for devices with multiple face sensors.
            final int max = props.get(0).maxEnrollmentsPerUser;
            final int numEnrolledFaces = mFaceManager.getEnrolledFaces(mUserId).size();
            final int maxFacesEnrollableIfSUW = getApplicationContext().getResources()
            final int maxFacesEnrollable = getApplicationContext().getResources()
                    .getInteger(R.integer.suw_max_faces_enrollable);
            if (isSetupWizard) {
                return numEnrolledFaces >= maxFacesEnrollableIfSUW;
            } else {
                return numEnrolledFaces >= max;
            }
            return numEnrolledFaces >= maxFacesEnrollable;
        } else {
            return false;
        }
+5 −0
Original line number Diff line number Diff line
@@ -62,6 +62,11 @@ public class ControlsPrivacyPreferenceController extends TogglePreferenceControl

    @Override
    public int getAvailabilityStatus() {
        // hide if we should use customizable lock screen quick affordances
        if (CustomizableLockScreenUtils.isFeatureEnabled(mContext)) {
            return UNSUPPORTED_ON_DEVICE;
        }

        // hide if lockscreen isn't secure for this user
        return isEnabled() && isSecure() ? AVAILABLE : DISABLED_DEPENDENT_SETTING;
    }
Loading