Snap for 7263361 from 75020d834a to sc-v2-release

Change-Id: Ib94f1238865494fbf4946095ee7224f812063ade
This commit is contained in:
android-build-team Robot
2021-04-07 01:08:54 +00:00
14 changed files with 86 additions and 43 deletions

View File

@@ -1236,6 +1236,8 @@
android:label="@string/application_info_label"
android:exported="true">
<intent-filter android:priority="1">
<action android:name="android.settings.APP_OPEN_BY_DEFAULT_SETTINGS" />
<!-- Also catch legacy "com." prefixed action. -->
<action android:name="com.android.settings.APP_OPEN_BY_DEFAULT_SETTINGS" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="package" />

View File

@@ -0,0 +1,35 @@
<!--
~ Copyright (C) 2021 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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="?android:attr/colorControlNormal"
android:viewportHeight="48"
android:viewportWidth="48">
<path
android:fillColor="#000000"
android:fillType="evenOdd"
android:pathData="M4,34L5,30H12V26H8C5.79,26 4,24.21 4,22V18C4,15.79 5.79,14 8,14H16L15,18H8V22H12C14.21,22 16,23.79 16,26V30C16,32.21 14.21,34 12,34H4Z" />
<path
android:fillColor="#000000"
android:fillType="evenOdd"
android:pathData="M32,34L33,30H40V26H36C33.79,26 32,24.21 32,22V18C32,15.79 33.79,14 36,14H44L43,18H36V22H40C42.21,22 44,23.79 44,26V30C44,32.21 42.21,34 40,34H32Z" />
<path
android:fillColor="#000000"
android:fillType="evenOdd"
android:pathData="M22,30H26V18H22V30ZM18,30C18,32.21 19.79,34 22,34H26C28.21,34 30,32.21 30,30V18C30,15.79 28.21,14 26,14H22C19.79,14 18,15.79 18,18V30Z" />
</vector>

View File

@@ -14,22 +14,20 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<LinearLayout
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:layout_height="wrap_content">
<Button
android:id="@+id/button"
style="@style/ActionPrimaryButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="20dip"
android:layout_marginBottom="20dip"
style="@style/ActionPrimaryButton"
settings:allowDividerBelow="true"
android:gravity="center" />
android:layout_marginVertical="8dp"
android:layout_marginHorizontal="16dp"
android:theme="@style/RoundedCornerThemeOverlay"
settings:allowDividerBelow="true"/>
</LinearLayout>
</FrameLayout>

View File

@@ -18,6 +18,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:contentDescription="@string/app_launch_verified_links_info_description"
android:orientation="horizontal">
<include layout="@layout/preference_widget_info"

View File

@@ -5467,7 +5467,7 @@
<!-- Summary shown for tritanomaly (blue-yellow color blindness) [CHAR LIMIT=45] -->
<string name="daltonizer_mode_tritanomaly_summary">Blue-yellow</string>
<!-- Title for the accessibility preference of the Reduce Brightness feature. [CHAR LIMIT=NONE] -->
<!-- Title for the accessibility preference of the Extra Dim/Reduce Brightness feature that dims your screen. [CHAR LIMIT=NONE] -->
<string name="reduce_bright_colors_preference_title">Extra dim</string>
<!-- Title for the activation switch of the Reduce Brightness feature. [CHAR LIMIT=NONE] -->
<string name="reduce_bright_colors_switch_title">Make screen extra dim</string>
@@ -8053,6 +8053,9 @@
<!-- List of synonyms for the font size, used to match in settings search [CHAR LIMIT=NONE] -->
<string name="keywords_font_size">text size</string>
<!-- List of synonyms used in the settings search bar to find the “Extra Dim” setting, which dims your screen. Title name is located at strings/reduce_bright_colors_preference_title. [CHAR LIMIT=NONE] -->
<string name="keywords_reduce_bright_colors">light sensitivity, photophobia, dark theme, migraine, headache, reading mode, night mode, reduce brightness, white point</string>
<!-- Option title for the default sound, context based on screen -->
<string name="default_sound">Default sound</string>
@@ -9874,6 +9877,8 @@
</plurals>
<!-- OK button for verified links dialog. [CHAR LIMIT=20] -->
<string name="app_launch_dialog_ok">OK</string>
<!-- Info icon description of the verified links. [CHAR LIMIT=NONE] -->
<string name="app_launch_verified_links_info_description">Show verified links list</string>
<!-- Title for Checking other supported links dialog. [CHAR LIMIT=50] -->
<string name="app_launch_checking_links_title">Checking for other supported links\u2026</string>

View File

@@ -421,6 +421,10 @@
<style name="ActionPrimaryButton" parent="android:Widget.DeviceDefault.Button.Colored"/>
<style name="ActionSecondaryButton" parent="android:Widget.DeviceDefault.Button"/>
<style name="RoundedCornerThemeOverlay">
<item name="android:buttonCornerRadius">24dp</item>
</style>
<style name="LockPatternContainerStyle">
<item name="android:maxHeight">400dp</item>
<item name="android:maxWidth">420dp</item>

View File

@@ -20,29 +20,25 @@
xmlns:settings="http://schemas.android.com/apk/res-auto"
android:key="safety_and_emergency_screen"
android:title="@string/emergency_settings_preference_title">
<Preference
android:key="emergency_info"
android:title="@string/emergency_info_title"
android:summary="@string/summary_placeholder"
android:order="0"
settings:controller="com.android.settings.accounts.EmergencyInfoPreferenceController"/>
<Preference
android:key="gesture_emergency_summary"
android:title="@string/emergency_gesture_screen_title"
android:order="100"
android:fragment="com.android.settings.emergency.EmergencyGestureSettings"
settings:controller="com.android.settings.emergency.EmergencyGestureEntrypointPreferenceController" />
<com.android.settingslib.widget.LayoutPreference
android:key="more_settings"
android:key="more_emergency_settings"
android:layout="@layout/more_settings_button"
android:order="180"
android:order="0"
android:selectable="false"
settings:allowDividerBelow="true"
settings:controller="com.android.settings.emergency.MoreSettingsPreferenceController" />
<Preference
android:key="gesture_emergency_summary"
android:title="@string/emergency_gesture_screen_title"
android:icon="@drawable/ic_emergency_gesture_24dp"
android:order="100"
android:fragment="com.android.settings.emergency.EmergencyGestureSettings"
settings:controller="com.android.settings.emergency.EmergencyGestureEntrypointPreferenceController" />
<com.android.settingslib.RestrictedPreference
android:key="app_and_notif_cell_broadcast_settings"
android:title="@string/cell_broadcast_settings"
android:order="200"
settings:iconSpaceReserved="true"
settings:useAdminDisabledSummary="true">
<intent
android:action="android.intent.action.MAIN"

View File

@@ -16,8 +16,6 @@
package com.android.settings;
import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
@@ -74,8 +72,6 @@ public class ActivityPicker extends AlertActivity implements
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().addPrivateFlags(SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
final Intent intent = getIntent();
// Read base intent from extras, otherwise assume default

View File

@@ -20,6 +20,8 @@ import android.app.settings.SettingsEnums;
import android.hardware.fingerprint.FingerprintManager;
import android.os.Bundle;
import androidx.fragment.app.FragmentManager;
import com.android.settings.R;
import com.android.settings.biometrics.BiometricEnrollBase;
import com.android.settings.biometrics.BiometricErrorDialog;
@@ -31,7 +33,10 @@ public class FingerprintErrorDialog extends BiometricErrorDialog {
public static void showErrorDialog(BiometricEnrollBase host, int errMsgId) {
final CharSequence errMsg = host.getText(getErrorMessage(errMsgId));
final FingerprintErrorDialog dialog = newInstance(errMsg, errMsgId);
dialog.show(host.getSupportFragmentManager(), FingerprintErrorDialog.class.getName());
final FragmentManager fragmentManager = host.getSupportFragmentManager();
if (!fragmentManager.isDestroyed()) {
dialog.show(fragmentManager, FingerprintErrorDialog.class.getName());
}
}
private static int getErrorMessage(int errMsgId) {

View File

@@ -248,10 +248,8 @@ public class ChooseLockGeneric extends SettingsActivity {
if (savedInstanceState != null) {
mPasswordConfirmed = savedInstanceState.getBoolean(PASSWORD_CONFIRMED);
mWaitingForConfirmation = savedInstanceState.getBoolean(WAITING_FOR_CONFIRMATION);
if (mUserPassword == null) {
mUserPassword = savedInstanceState.getParcelable(
ChooseLockSettingsHelper.EXTRA_KEY_PASSWORD);
}
mUserPassword = savedInstanceState.getParcelable(
ChooseLockSettingsHelper.EXTRA_KEY_PASSWORD);
}
// a) If this is started from other user, use that user id.
@@ -512,7 +510,8 @@ public class ChooseLockGeneric extends SettingsActivity {
outState.putBoolean(PASSWORD_CONFIRMED, mPasswordConfirmed);
outState.putBoolean(WAITING_FOR_CONFIRMATION, mWaitingForConfirmation);
if (mUserPassword != null) {
outState.putParcelable(ChooseLockSettingsHelper.EXTRA_KEY_PASSWORD, mUserPassword);
outState.putParcelable(ChooseLockSettingsHelper.EXTRA_KEY_PASSWORD,
mUserPassword.duplicate());
}
}

View File

@@ -567,9 +567,7 @@ public class ChooseLockPassword extends SettingsActivity {
updateStage(mUiStage);
}
if (mCurrentCredential == null) {
mCurrentCredential = savedInstanceState.getParcelable(KEY_CURRENT_CREDENTIAL);
}
mCurrentCredential = savedInstanceState.getParcelable(KEY_CURRENT_CREDENTIAL);
// Re-attach to the exiting worker if there is one.
mSaveAndFinishWorker = (SaveAndFinishWorker) getFragmentManager().findFragmentByTag(
@@ -646,7 +644,9 @@ public class ChooseLockPassword extends SettingsActivity {
super.onSaveInstanceState(outState);
outState.putString(KEY_UI_STAGE, mUiStage.name());
outState.putParcelable(KEY_FIRST_PASSWORD, mFirstPassword);
outState.putParcelable(KEY_CURRENT_CREDENTIAL, mCurrentCredential);
if (mCurrentCredential != null) {
outState.putParcelable(KEY_CURRENT_CREDENTIAL, mCurrentCredential.duplicate());
}
}
@Override

View File

@@ -611,10 +611,8 @@ public class ChooseLockPattern extends SettingsActivity {
} else {
// restore from previous state
mChosenPattern = savedInstanceState.getParcelable(KEY_PATTERN_CHOICE);
mCurrentCredential = savedInstanceState.getParcelable(KEY_CURRENT_PATTERN);
if (mCurrentCredential == null) {
mCurrentCredential = savedInstanceState.getParcelable(KEY_CURRENT_PATTERN);
}
updateStage(Stage.values()[savedInstanceState.getInt(KEY_UI_STAGE)]);
// Re-attach to the exiting worker if there is one.
@@ -729,7 +727,7 @@ public class ChooseLockPattern extends SettingsActivity {
}
if (mCurrentCredential != null) {
outState.putParcelable(KEY_CURRENT_PATTERN, mCurrentCredential);
outState.putParcelable(KEY_CURRENT_PATTERN, mCurrentCredential.duplicate());
}
}

View File

@@ -149,6 +149,8 @@ public class HighlightablePreferenceGroupAdapter extends PreferenceGroupAdapter
root.postDelayed(() -> {
mHighlightRequested = true;
// Remove the animator to avoid a RecyclerView crash.
recyclerView.setItemAnimator(null);
recyclerView.smoothScrollToPosition(position);
mHighlightPosition = position;
notifyItemChanged(position);

View File

@@ -34,6 +34,7 @@ import com.android.settings.R;
import com.google.common.collect.ImmutableList;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
@@ -79,6 +80,7 @@ public class InteractAcrossProfilesDetailsTest {
}
@Test
@Ignore
public void getPreferenceSummary_appOpNotAllowed_returnsNotAllowed() {
shadowOf(mUserManager).addUser(
PERSONAL_PROFILE_ID, "personal-profile"/* name */, 0/* flags */);