Merge "Update string Lock private space automatically" into main
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 6e24863..57c577d 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1704,6 +1704,12 @@
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
+ <intent-filter android:priority="1">
+ <action android:name="android.settings.BACKGROUND_RESTRICTIONS_SETTINGS" />
+ <category android:name="android.intent.category.BROWSABLE" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <data android:scheme="package" />
+ </intent-filter>
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.applications.manageapplications.ManageApplications" />
<meta-data android:name="com.android.settings.HIGHLIGHT_MENU_KEY"
diff --git a/aconfig/Android.bp b/aconfig/Android.bp
index b2ffa22..d511d04 100644
--- a/aconfig/Android.bp
+++ b/aconfig/Android.bp
@@ -1,4 +1,5 @@
package {
+ default_team: "trendy_team_android_settings_app",
default_applicable_licenses: ["packages_apps_Settings_license"],
}
diff --git a/res/values/strings.xml b/res/values/strings.xml
index f90a14a..45305ec 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -10872,6 +10872,12 @@
<!-- Title of the warning dialog for enabling the credential provider. [CHAR_LIMIT=NONE] -->
<string name="credman_enable_confirmation_message_title">Use %1$s\?</string>
+ <!-- Positive button text for disabling credential manager. [CHAR_LIMIT=30] -->
+ <string name="credman_confirmation_turn_off_positive_button">Turn off</string>
+
+ <!-- Positive button text for changing credential manager provider. [CHAR_LIMIT=30] -->
+ <string name="credman_confirmation_change_provider_positive_button">Change</string>
+
<!-- Title of the error dialog when too many credential providers are selected (new strings for 24Q3). [CHAR_LIMIT=NONE] -->
<string name="credman_limit_error_msg_title">You can only have 5 services on</string>
diff --git a/src/com/android/settings/applications/credentials/DefaultCombinedPicker.java b/src/com/android/settings/applications/credentials/DefaultCombinedPicker.java
index 0bffee9..d6f5289 100644
--- a/src/com/android/settings/applications/credentials/DefaultCombinedPicker.java
+++ b/src/com/android/settings/applications/credentials/DefaultCombinedPicker.java
@@ -114,6 +114,18 @@
setCancelListener(target.mCancelListener);
super.onCreate(savedInstanceState);
}
+
+ @Override
+ protected CharSequence getPositiveButtonText() {
+ final Bundle bundle = getArguments();
+ if (TextUtils.isEmpty(bundle.getString(EXTRA_KEY))) {
+ return getContext().getString(
+ R.string.credman_confirmation_turn_off_positive_button);
+ }
+
+ return getContext().getString(
+ R.string.credman_confirmation_change_provider_positive_button);
+ }
}
@Override
diff --git a/src/com/android/settings/applications/defaultapps/DefaultAppPickerFragment.java b/src/com/android/settings/applications/defaultapps/DefaultAppPickerFragment.java
index b089dd8..fda6b28 100644
--- a/src/com/android/settings/applications/defaultapps/DefaultAppPickerFragment.java
+++ b/src/com/android/settings/applications/defaultapps/DefaultAppPickerFragment.java
@@ -138,11 +138,15 @@
final Bundle bundle = getArguments();
final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity())
.setMessage(bundle.getCharSequence(EXTRA_MESSAGE))
- .setPositiveButton(android.R.string.ok, this)
+ .setPositiveButton(getPositiveButtonText(), this)
.setNegativeButton(android.R.string.cancel, mCancelListener);
return builder.create();
}
+ protected CharSequence getPositiveButtonText() {
+ return getContext().getString(android.R.string.ok);
+ }
+
@Override
public void onClick(DialogInterface dialog, int which) {
final Fragment fragment = getTargetFragment();
diff --git a/src/com/android/settings/biometrics/fingerprint2/lib/Android.bp b/src/com/android/settings/biometrics/fingerprint2/lib/Android.bp
index 145f3d6..9f753b2 100644
--- a/src/com/android/settings/biometrics/fingerprint2/lib/Android.bp
+++ b/src/com/android/settings/biometrics/fingerprint2/lib/Android.bp
@@ -2,13 +2,17 @@
// unit/robo/screenshot etc.
//
// This library shouldn't have many dependencies.
+package {
+ default_team: "trendy_team_android_settings_app",
+}
+
android_library {
name: "FingerprintManagerInteractor",
srcs: [
- "**/*.kt"
+ "**/*.kt",
],
static_libs: [
- "BiometricsSharedLib",
- "kotlinx-coroutines-android",
+ "BiometricsSharedLib",
+ "kotlinx-coroutines-android",
],
-}
\ No newline at end of file
+}
diff --git a/src/com/android/settings/development/SensitiveContentProtectionPreferenceController.kt b/src/com/android/settings/development/SensitiveContentProtectionPreferenceController.kt
index 6fe56c8..e627f81 100644
--- a/src/com/android/settings/development/SensitiveContentProtectionPreferenceController.kt
+++ b/src/com/android/settings/development/SensitiveContentProtectionPreferenceController.kt
@@ -16,11 +16,11 @@
package com.android.settings.development
import android.content.Context
+import android.permission.flags.Flags.sensitiveNotificationAppProtection
import android.provider.Settings
import androidx.annotation.VisibleForTesting
import androidx.preference.Preference
import androidx.preference.TwoStatePreference
-import com.android.server.notification.Flags.sensitiveNotificationAppProtection
import com.android.server.notification.Flags.screenshareNotificationHiding
import com.android.settings.core.PreferenceControllerMixin
import com.android.settingslib.development.DeveloperOptionsPreferenceController
diff --git a/tests/robotests/src/com/android/settings/connecteddevice/stylus/StylusDevicesControllerTest.java b/tests/robotests/src/com/android/settings/connecteddevice/stylus/StylusDevicesControllerTest.java
index 135be4b..6c96f85 100644
--- a/tests/robotests/src/com/android/settings/connecteddevice/stylus/StylusDevicesControllerTest.java
+++ b/tests/robotests/src/com/android/settings/connecteddevice/stylus/StylusDevicesControllerTest.java
@@ -108,6 +108,9 @@
MockitoAnnotations.initMocks(this);
mContext = spy(ApplicationProvider.getApplicationContext());
+ final var spiedResources = spy(mContext.getResources());
+ when(mContext.getResources()).thenReturn(spiedResources);
+
PreferenceManager preferenceManager = new PreferenceManager(mContext);
mScreen = preferenceManager.createPreferenceScreen(mContext);
mPreferenceContainer = new PreferenceCategory(mContext);
@@ -144,6 +147,9 @@
when(mInputDevice.hasKeys(KEYCODE_STYLUS_BUTTON_TAIL)).thenReturn(
new boolean[]{true});
+ when(spiedResources.getBoolean(
+ com.android.internal.R.bool.config_enableStylusPointerIcon)).thenReturn(true);
+
mController = new StylusDevicesController(mContext, mInputDevice, null, mLifecycle);
}
@@ -237,7 +243,7 @@
Preference handwritingPref = mPreferenceContainer.getPreference(0);
Preference buttonPref = mPreferenceContainer.getPreference(1);
- assertThat(mPreferenceContainer.getPreferenceCount()).isEqualTo(2);
+ assertThat(mPreferenceContainer.getPreferenceCount()).isEqualTo(3);
assertThat(handwritingPref.getTitle().toString()).isEqualTo(
mContext.getString(R.string.stylus_textfield_handwriting));
assertThat(handwritingPref.isVisible()).isTrue();
diff --git a/tests/screenshot/Android.bp b/tests/screenshot/Android.bp
index 5989381..5130fe5 100644
--- a/tests/screenshot/Android.bp
+++ b/tests/screenshot/Android.bp
@@ -13,6 +13,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+package {
+ default_team: "trendy_team_android_settings_app",
+}
+
android_app {
name: "ScreenshotTestStub",
defaults: [
diff --git a/tests/shared/Android.bp b/tests/shared/Android.bp
index 27573e8..6fd9f64 100644
--- a/tests/shared/Android.bp
+++ b/tests/shared/Android.bp
@@ -1,7 +1,11 @@
+package {
+ default_team: "trendy_team_android_settings_app",
+}
+
android_library {
name: "Settings-testutils2",
srcs: [
- "src/**/*.kt"
+ "src/**/*.kt",
],
libs: [
"BiometricsSharedLib",
diff --git a/tests/spa_unit/src/com/android/settings/development/SensitiveContentProtectionPreferenceControllerTest.kt b/tests/spa_unit/src/com/android/settings/development/SensitiveContentProtectionPreferenceControllerTest.kt
index bb30619..18acbba 100644
--- a/tests/spa_unit/src/com/android/settings/development/SensitiveContentProtectionPreferenceControllerTest.kt
+++ b/tests/spa_unit/src/com/android/settings/development/SensitiveContentProtectionPreferenceControllerTest.kt
@@ -16,6 +16,7 @@
package com.android.settings.development
import android.content.Context
+import android.permission.flags.Flags.FLAG_SENSITIVE_NOTIFICATION_APP_PROTECTION
import android.platform.test.annotations.RequiresFlagsDisabled
import android.platform.test.annotations.RequiresFlagsEnabled
import android.platform.test.flag.junit.DeviceFlagsValueProvider
@@ -27,7 +28,6 @@
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import com.android.server.notification.Flags.FLAG_SCREENSHARE_NOTIFICATION_HIDING
-import com.android.server.notification.Flags.FLAG_SENSITIVE_NOTIFICATION_APP_PROTECTION
import com.android.settings.development.SensitiveContentProtectionPreferenceController.Companion.SETTING_VALUE_OFF
import com.android.settings.development.SensitiveContentProtectionPreferenceController.Companion.SETTING_VALUE_ON
import org.junit.Assert.assertEquals