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

Commit 319faca3 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

release-request-68cc9b2a-98ae-4fbf-8b56-3e535855f399-for-git_oc-mr1-release-42...

release-request-68cc9b2a-98ae-4fbf-8b56-3e535855f399-for-git_oc-mr1-release-4269864 snap-temp-L25700000092502312

Change-Id: Id7a8855ca2b61f2779121ff3eddc9a425b53ab48
parents 32479063 8944eb96
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -33,11 +33,11 @@
        android:orientation="vertical">
        android:orientation="vertical">


        <TextView
        <TextView
            android:id="@+id/fingerprint_backup_message"
            android:id="@+id/message"
            style="@style/SuwDescription.Glif"
            style="@style/SuwDescription.Glif"
            android:layout_width="match_parent"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_height="wrap_content"
            android:visibility="gone" />
            android:minLines="2"/>


        <LinearLayout
        <LinearLayout
            android:id="@+id/password_container"
            android:id="@+id/password_container"
+1 −1
Original line number Original line Diff line number Diff line
@@ -23,4 +23,4 @@
    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
    android:paddingTop="@dimen/suw_description_glif_margin_top"
    android:paddingTop="@dimen/suw_description_glif_margin_top"
    android:paddingBottom="@dimen/suw_description_glif_margin_bottom_lists"
    android:paddingBottom="@dimen/suw_description_glif_margin_bottom_lists"
    android:text="@string/setup_lock_settings_picker_fingerprint_message" />
    android:text="@string/lock_settings_picker_fingerprint_added_security_message" />
+15 −13
Original line number Original line Diff line number Diff line
@@ -835,9 +835,9 @@
    <!-- Button text to continue to the next screen from the introduction (this string variant is used while in setup wizard) [CHAR LIMIT=22] -->
    <!-- Button text to continue to the next screen from the introduction (this string variant is used while in setup wizard) [CHAR LIMIT=22] -->
    <string name="security_settings_fingerprint_enroll_introduction_continue_setup">Next</string>
    <string name="security_settings_fingerprint_enroll_introduction_continue_setup">Next</string>
    <!-- Title of dialog shown when the user tries to skip setting up fingerprint after adding lock screen during initial setup. [CHAR LIMIT=30] -->
    <!-- Title of dialog shown when the user tries to skip setting up fingerprint after adding lock screen during initial setup. [CHAR LIMIT=30] -->
    <string name="fingerprint_enroll_skip_after_adding_lock_title">Skip fingerprint setup?</string>
    <string name="setup_fingerprint_enroll_skip_title">Skip fingerprint?</string>
    <!-- Body text of dialog shown when the user tries to skip setting up fingerprint after adding lock screen during initial setup [CHAR LIMIT=NONE] -->
    <!-- Body text of dialog shown when the user tries to skip setting up fingerprint after adding lock screen during initial setup [CHAR LIMIT=NONE] -->
    <string name="fingerprint_enroll_skip_after_adding_lock_text">You\u2019ve chosen to use your fingerprint as one way to unlock your phone. If you skip now, you\u2019ll need to set this up later. Setup takes only a minute or so.</string>
    <string name="setup_fingerprint_enroll_skip_after_adding_lock_text">Fingerprint setup only takes a minute or two. If you skip this, you can add your fingerprint later in settings.</string>
    <!-- Title of dialog shown when the user tries to skip setting up a screen lock, warning them of potential consequences of not doing so [CHAR LIMIT=30]-->
    <!-- Title of dialog shown when the user tries to skip setting up a screen lock, warning them of potential consequences of not doing so [CHAR LIMIT=30]-->
    <string name="lock_screen_intro_skip_title">Skip screen lock?</string>
    <string name="lock_screen_intro_skip_title">Skip screen lock?</string>
    <!-- Dialog text shown when the user tries to skip setting up a screen lock, warning them of potential consequences of not doing so, including loss of factory reset protection. (tablet) [CHAR LIMIT=NONE] -->
    <!-- Dialog text shown when the user tries to skip setting up a screen lock, warning them of potential consequences of not doing so, including loss of factory reset protection. (tablet) [CHAR LIMIT=NONE] -->
@@ -1105,8 +1105,8 @@
    <!--  Title for security picker in setup wizard to choose the unlock method: None/Pattern/PIN/Password (phone) [CHAR LIMIT=22] -->
    <!--  Title for security picker in setup wizard to choose the unlock method: None/Pattern/PIN/Password (phone) [CHAR LIMIT=22] -->
    <string name="setup_lock_settings_picker_title" product="default">Protect your phone</string>
    <string name="setup_lock_settings_picker_title" product="default">Protect your phone</string>
    <!-- Title for screen in setup wizard, prompting user to choose the their backup screen lock method [CHAR LIMIT=NONE] -->
    <!-- Message shown when setting up screen lock, prompting user to choose the their backup screen lock method [CHAR LIMIT=NONE] -->
    <string name="setup_lock_settings_picker_fingerprint_message">For added security, set up a backup screen lock.</string>
    <string name="lock_settings_picker_fingerprint_added_security_message">For added security, set up a backup screen lock.</string>
    <!-- Description text for screen in setup wizard asking user to set up screen lock, explaining to the user how setting up a screen lock protect them from losing data. (tablet) [CHAR LIMIT=NONE] -->
    <!-- Description text for screen in setup wizard asking user to set up screen lock, explaining to the user how setting up a screen lock protect them from losing data. (tablet) [CHAR LIMIT=NONE] -->
    <string name="setup_lock_settings_picker_message" product="tablet">Prevent others from using this tablet without your permission by activating device protection features. Choose the screen lock you want to use.</string>
    <string name="setup_lock_settings_picker_message" product="tablet">Prevent others from using this tablet without your permission by activating device protection features. Choose the screen lock you want to use.</string>
@@ -1381,7 +1381,7 @@
    <!-- Label for ChoosePassword/PIN OK button -->
    <!-- Label for ChoosePassword/PIN OK button -->
    <string name="lockpassword_cancel_label">Cancel</string>
    <string name="lockpassword_cancel_label">Cancel</string>
    <!-- Label for ChoosePassword/PIN OK button -->
    <!-- Label for ChoosePassword/PIN Clear button that clears all text entered by the user so far. -->
    <string name="lockpassword_clear_label">Clear</string>
    <string name="lockpassword_clear_label">Clear</string>
    <!-- Label for LockPatternTutorial Cancel button -->
    <!-- Label for LockPatternTutorial Cancel button -->
@@ -3427,24 +3427,26 @@
    <string name="settings_safetylegal_activity_loading">Loading\u2026</string>
    <string name="settings_safetylegal_activity_loading">Loading\u2026</string>
    <!-- Lock Pattern settings -->
    <!-- Lock Pattern settings -->
    <!-- Header on first screen of choose password/PIN flow [CHAR LIMIT=30] -->
    <!-- Header on first screen of choose password/PIN flow [CHAR LIMIT=40] -->
    <string name="lockpassword_choose_your_password_header">Choose your password</string>
    <string name="lockpassword_choose_your_screen_lock_header">Set a screen lock</string>
    <!-- Message on first screen of choose password flow [CHAR LIMIT=NONE] -->
    <string name="lockpassword_choose_your_password_message">For security, set a password</string>
    <!-- Header on first screen of choose password/PIN as backup for fingerprint flow [CHAR LIMIT=30] -->
    <!-- Header on first screen of choose password/PIN as backup for fingerprint flow [CHAR LIMIT=30] -->
    <string name="lockpassword_choose_your_password_header_for_fingerprint">To use fingerprint, set password</string>
    <string name="lockpassword_choose_your_password_header_for_fingerprint">To use fingerprint, set password</string>
    <!-- Header on first screen of choose pattern flow [CHAR LIMIT=30] -->
    <!-- Header on first screen of choose pattern flow [CHAR LIMIT=30] -->
    <string name="lockpassword_choose_your_pattern_header">Choose your pattern</string>
    <string name="lockpassword_choose_your_pattern_header">Choose your pattern</string>
    <!-- Header on first screen of choose pattern as backup for fingerprint flow [CHAR LIMIT=30] -->
    <!-- Header on first screen of choose pattern as backup for fingerprint flow [CHAR LIMIT=30] -->
    <string name="lockpassword_choose_your_pattern_header_for_fingerprint">To use fingerprint, set pattern</string>
    <string name="lockpassword_choose_your_pattern_header_for_fingerprint">To use fingerprint, set pattern</string>
    <!-- Header on first screen of choose password/PIN flow [CHAR LIMIT=30] -->
    <!-- Message on first screen of choose PIN flow [CHAR LIMIT=NONE] -->
    <string name="lockpassword_choose_your_pin_header">Choose your PIN</string>
    <string name="lockpassword_choose_your_pin_message">For security, set a PIN</string>
    <!-- Header on first screen of choose password/PIN as backup for fingerprint flow [CHAR LIMIT=30] -->
    <!-- Header on first screen of choose password/PIN as backup for fingerprint flow [CHAR LIMIT=30] -->
    <string name="lockpassword_choose_your_pin_header_for_fingerprint">To use fingerprint, set PIN</string>
    <string name="lockpassword_choose_your_pin_header_for_fingerprint">To use fingerprint, set PIN</string>
    <!-- Header on password confirm screen [CHAR LIMIT=30] -->
    <!-- Header on password confirm screen [CHAR LIMIT=40] -->
    <string name="lockpassword_confirm_your_password_header">Confirm your password</string>
    <string name="lockpassword_confirm_your_password_header">Re-enter your password</string>
    <!-- Header on pattern confirm screen [CHAR LIMIT=30] -->
    <!-- Header on pattern confirm screen [CHAR LIMIT=30] -->
    <string name="lockpassword_confirm_your_pattern_header">Confirm your pattern</string>
    <string name="lockpassword_confirm_your_pattern_header">Confirm your pattern</string>
    <!-- Header on password confirm screen [CHAR LIMIT=30] -->
    <!-- Header on password confirm screen [CHAR LIMIT=40] -->
    <string name="lockpassword_confirm_your_pin_header">Confirm your PIN</string>
    <string name="lockpassword_confirm_your_pin_header">Re-enter your PIN</string>
    <!-- Header on password confirm screen if second password doesn't match the first. [CHAR LIMIT=30] -->
    <!-- Header on password confirm screen if second password doesn't match the first. [CHAR LIMIT=30] -->
    <string name="lockpassword_confirm_passwords_dont_match">Passwords don\u2019t match</string>
    <string name="lockpassword_confirm_passwords_dont_match">Passwords don\u2019t match</string>
    <!-- Header on pin confirm screen if second pin doesn't match the first. [CHAR LIMIT=30]-->
    <!-- Header on pin confirm screen if second pin doesn't match the first. [CHAR LIMIT=30]-->
+3 −3
Original line number Original line Diff line number Diff line
@@ -22,7 +22,7 @@ import android.provider.SearchIndexableResource;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.settings.R;
import com.android.settings.R;
import com.android.settings.dashboard.DashboardFragment;
import com.android.settings.dashboard.DashboardFragment;
import com.android.settings.gestures.AssistGesturePreferenceController;
import com.android.settings.gestures.AssistGestureSettingsPreferenceController;
import com.android.settings.search.BaseSearchIndexProvider;
import com.android.settings.search.BaseSearchIndexProvider;
import com.android.settings.search.Indexable;
import com.android.settings.search.Indexable;
import com.android.settingslib.core.AbstractPreferenceController;
import com.android.settingslib.core.AbstractPreferenceController;
@@ -73,8 +73,8 @@ public class ManageAssist extends DashboardFragment {
        final List<AbstractPreferenceController> controllers = new ArrayList<>();
        final List<AbstractPreferenceController> controllers = new ArrayList<>();
        controllers.add(new DefaultAssistPreferenceController(context, "default_assist",
        controllers.add(new DefaultAssistPreferenceController(context, "default_assist",
                true /* showSetting */));
                true /* showSetting */));
        controllers.add(new AssistGesturePreferenceController(context, lifecycle, KEY_ASSIST,
        controllers.add(new AssistGestureSettingsPreferenceController(context, lifecycle,
                true /* assistOnly */));
                KEY_ASSIST, true /* assistOnly */));
        controllers.add(new AssistContextPreferenceController(context, lifecycle));
        controllers.add(new AssistContextPreferenceController(context, lifecycle));
        controllers.add(new AssistScreenshotPreferenceController(context, lifecycle));
        controllers.add(new AssistScreenshotPreferenceController(context, lifecycle));
        controllers.add(new AssistFlashScreenPreferenceController(context, lifecycle));
        controllers.add(new AssistFlashScreenPreferenceController(context, lifecycle));
+87 −0
Original line number Original line Diff line number Diff line
/*
 * 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 com.android.settings.bluetooth;

import android.bluetooth.BluetoothAdapter;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Handler;
import android.support.annotation.VisibleForTesting;
import android.util.Log;

import com.android.settingslib.bluetooth.LocalBluetoothAdapter;

import java.util.Timer;
import java.util.TimerTask;

/** Helper class, intended to be used by an Activity, to keep the local Bluetooth adapter in
 *  discoverable mode indefinitely. By default setting the scan mode to
 *  BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE will time out after some time, but some
 *  Bluetooth settings pages would like to keep the device discoverable as long as the page is
 *  visible. */
public class AlwaysDiscoverable extends BroadcastReceiver {
    private static final String TAG = "AlwaysDiscoverable";

    private Context mContext;
    private LocalBluetoothAdapter mLocalAdapter;
    private IntentFilter mIntentFilter;

    @VisibleForTesting
    boolean mStarted;

    public AlwaysDiscoverable(Context context, LocalBluetoothAdapter localAdapter) {
        mContext = context;
        mLocalAdapter = localAdapter;
        mIntentFilter = new IntentFilter();
        mIntentFilter.addAction(BluetoothAdapter.ACTION_SCAN_MODE_CHANGED);
    }

    /** After calling start(), consumers should make a matching call to stop() when they no longer
     * wish to enforce discoverable mode. */
    public void start() {
        if (mStarted) {
            return;
        }
        mContext.registerReceiver(this, mIntentFilter);
        mStarted = true;
        if (mLocalAdapter.getScanMode() != BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) {
            mLocalAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE);
        }
    }

    public void stop() {
        if (!mStarted) {
            return;
        }
        mContext.unregisterReceiver(this);
        mStarted = false;
        mLocalAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE);
    }

    @Override
    public void onReceive(Context context, Intent intent) {
        String action = intent.getAction();
        if (action != BluetoothAdapter.ACTION_SCAN_MODE_CHANGED) {
            return;
        }
        if (mLocalAdapter.getScanMode() != BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) {
            mLocalAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE);
        }
    }
}
Loading