Snap for 11789350 from 4e139f091b to 24Q3-release
Change-Id: Ic28558f547c33957820464eaf11116928eca44ed
This commit is contained in:
@@ -6,7 +6,7 @@ package {
|
||||
aconfig_declarations {
|
||||
name: "aconfig_settings_flags",
|
||||
package: "com.android.settings.flags",
|
||||
container: "system",
|
||||
container: "system_ext",
|
||||
srcs: [
|
||||
"*.aconfig",
|
||||
],
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package: "com.android.settings.flags"
|
||||
container: "system"
|
||||
container: "system_ext"
|
||||
|
||||
# NOTE: Don't add new accessibility flags here, since the package name doesn't follow
|
||||
# the best practice for setting's feature flag go/settings-trunk-stable
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package: "com.android.settings.flags"
|
||||
container: "system"
|
||||
container: "system_ext"
|
||||
|
||||
flag {
|
||||
name: "biometric_settings_provider"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package: "com.android.settings.flags"
|
||||
container: "system"
|
||||
container: "system_ext"
|
||||
|
||||
flag {
|
||||
name: "sfps_enroll_refinement"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package: "com.android.settings.flags"
|
||||
container: "system"
|
||||
container: "system_ext"
|
||||
|
||||
flag {
|
||||
name: "enable_offload_bluetooth_operations_to_background_thread"
|
||||
@@ -23,4 +23,4 @@ flag {
|
||||
metadata {
|
||||
purpose: PURPOSE_BUGFIX
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package: "com.android.settings.flags"
|
||||
container: "system"
|
||||
container: "system_ext"
|
||||
|
||||
flag {
|
||||
name: "enable_subsequent_pair_settings_integration"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package: "com.android.settings.flags"
|
||||
container: "system"
|
||||
container: "system_ext"
|
||||
|
||||
flag {
|
||||
name: "datetime_feedback"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package: "com.android.settings.flags"
|
||||
container: "system"
|
||||
container: "system_ext"
|
||||
|
||||
# NOTE: Keep alphabetized to help limit merge conflicts from multiple simultaneous editors.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package: "com.android.settings.flags"
|
||||
container: "system"
|
||||
container: "system_ext"
|
||||
|
||||
flag {
|
||||
name: "protect_screen_timeout_with_auth"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package: "com.android.settings.flags"
|
||||
container: "system"
|
||||
container: "system_ext"
|
||||
|
||||
flag {
|
||||
name: "new_apn_page_enabled"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package: "com.android.settings.flags"
|
||||
container: "system"
|
||||
container: "system_ext"
|
||||
|
||||
flag {
|
||||
name: "show_factory_reset_cancel_button"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package: "com.android.settings.flags"
|
||||
container: "system"
|
||||
container: "system_ext"
|
||||
|
||||
flag {
|
||||
name: "terms_of_address_enabled"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package: "com.android.settings.flags"
|
||||
container: "system"
|
||||
container: "system_ext"
|
||||
|
||||
flag {
|
||||
name: "dedupe_dnd_settings_channels"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package: "com.android.settings.flags"
|
||||
container: "system"
|
||||
container: "system_ext"
|
||||
|
||||
flag {
|
||||
name: "enable_sound_backup"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package: "com.android.settings.flags"
|
||||
container: "system"
|
||||
container: "system_ext"
|
||||
|
||||
flag {
|
||||
name: "enable_perform_backup_tasks_in_settings"
|
||||
namespace: "backstage_power"
|
||||
description: "Enable the Perform Backup Tasks screen in Settings"
|
||||
bug: "320563660"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package: "com.android.settings.flags"
|
||||
container: "system"
|
||||
container: "system_ext"
|
||||
|
||||
flag {
|
||||
name: "protect_lock_after_timeout_with_auth"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package: "com.android.settings.flags"
|
||||
container: "system"
|
||||
container: "system_ext"
|
||||
|
||||
flag {
|
||||
name: "remove_key_hide_enable_2g"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package: "com.android.settings.flags"
|
||||
container: "system"
|
||||
container: "system_ext"
|
||||
|
||||
flag {
|
||||
name: "thread_settings_enabled"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package: "com.android.settings.flags"
|
||||
container: "system"
|
||||
container: "system_ext"
|
||||
|
||||
flag {
|
||||
name: "enable_voice_activation_apps_in_settings"
|
||||
namespace: "permissions"
|
||||
description: "Enable voice activation apps in Settings"
|
||||
bug: "303727896"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6937,7 +6937,7 @@
|
||||
}</string>
|
||||
|
||||
<!-- User settings screen title [CHAR LIMIT=40] -->
|
||||
<string name="user_settings_title">Multiple users</string>
|
||||
<string name="user_settings_title">Users</string>
|
||||
|
||||
<!-- User settings header for list of users and profiles [CHAR LIMIT=40] -->
|
||||
<string name="user_list_title">Users & profiles</string>
|
||||
@@ -12440,6 +12440,8 @@
|
||||
<string name="multiple_users_main_switch_title">Allow multiple users</string>
|
||||
<!-- Search keywords for the "Allow Multiple Users" section in Multiple Users Screen. [CHAR LIMIT=NONE] -->
|
||||
<string name="multiple_users_main_switch_keywords">allow, multiple, user, permit, many</string>
|
||||
<!-- Search keywords for the Users Screen. [CHAR LIMIT=NONE] -->
|
||||
<string name="multiple_users_title_keywords">multiple, users, profiles, people, accounts, switch, many</string>
|
||||
|
||||
<!-- Title for wireless debugging main switch. [CHAR LIMIT=50] -->
|
||||
<string name="wireless_debugging_main_switch_title">Use wireless debugging</string>
|
||||
|
||||
@@ -352,11 +352,6 @@ public class FingerprintSettings extends SubSettings {
|
||||
*/
|
||||
protected void handleError(int errMsgId, CharSequence msg) {
|
||||
switch (errMsgId) {
|
||||
case FingerprintManager.FINGERPRINT_ERROR_CANCELED:
|
||||
case FingerprintManager.FINGERPRINT_ERROR_USER_CANCELED:
|
||||
// Only happens if we get preempted by another activity, or canceled by the
|
||||
// user (e.g. swipe up to home). Ignored.
|
||||
return;
|
||||
case FingerprintManager.FINGERPRINT_ERROR_LOCKOUT:
|
||||
mInFingerprintLockout = true;
|
||||
// We've been locked out. Reset after 30s.
|
||||
|
||||
@@ -99,8 +99,6 @@ import java.util.Optional;
|
||||
|
||||
/**
|
||||
* UI for Mobile network and Wi-Fi network settings.
|
||||
*
|
||||
* TODO(b/167474581): Define the intent android.settings.NETWORK_PROVIDER_SETTINGS in Settings.java.
|
||||
*/
|
||||
@SearchIndexable
|
||||
public class NetworkProviderSettings extends RestrictedSettingsFragment
|
||||
@@ -108,9 +106,6 @@ public class NetworkProviderSettings extends RestrictedSettingsFragment
|
||||
WifiDialog2.WifiDialog2Listener, DialogInterface.OnDismissListener,
|
||||
AirplaneModeEnabler.OnAirplaneModeChangedListener, InternetUpdater.InternetChangeListener {
|
||||
|
||||
public static final String ACTION_NETWORK_PROVIDER_SETTINGS =
|
||||
"android.settings.NETWORK_PROVIDER_SETTINGS";
|
||||
|
||||
private static final String TAG = "NetworkProviderSettings";
|
||||
// IDs of context menu
|
||||
static final int MENU_ID_CONNECT = Menu.FIRST + 1;
|
||||
|
||||
@@ -37,6 +37,7 @@ import com.android.settings.R
|
||||
import com.android.settings.Utils
|
||||
import com.android.settings.network.SubscriptionUtil
|
||||
import com.android.settings.network.telephony.MobileNetworkUtils
|
||||
import com.android.settings.network.telephony.SubscriptionActivationRepository
|
||||
import com.android.settings.network.telephony.isSubscriptionEnabledFlow
|
||||
import com.android.settings.network.telephony.phoneNumberFlow
|
||||
import com.android.settingslib.spa.widget.preference.PreferenceModel
|
||||
@@ -70,6 +71,9 @@ private fun SimPreference(subInfo: SubscriptionInfo) {
|
||||
emit(SubscriptionUtil.isConvertedPsimSubscription(subInfo))
|
||||
}
|
||||
}.collectAsStateWithLifecycle(initialValue = false)
|
||||
val isActivationChangeable by remember {
|
||||
SubscriptionActivationRepository(context).isActivationChangeableFlow()
|
||||
}.collectAsStateWithLifecycle(initialValue = false)
|
||||
RestrictedTwoTargetSwitchPreference(
|
||||
model = object : SwitchPreferenceModel {
|
||||
override val title = subInfo.displayName.toString()
|
||||
@@ -81,7 +85,7 @@ private fun SimPreference(subInfo: SubscriptionInfo) {
|
||||
}
|
||||
}
|
||||
override val icon = @Composable { SimIcon(subInfo.isEmbedded) }
|
||||
override val changeable = { !isConvertedPsim }
|
||||
override val changeable = { isActivationChangeable && !isConvertedPsim }
|
||||
override val checked = { checked.value }
|
||||
override val onCheckedChange = { newChecked: Boolean ->
|
||||
SubscriptionUtil.startToggleSubscriptionDialogActivity(
|
||||
|
||||
@@ -138,6 +138,7 @@ public class UserSettings extends SettingsPreferenceFragment
|
||||
private static final String KEY_REMOVE_GUEST_ON_EXIT = "remove_guest_on_exit";
|
||||
private static final String KEY_GUEST_USER_CATEGORY = "guest_user_category";
|
||||
private static final String KEY_ALLOW_MULTIPLE_USERS = "allow_multiple_users";
|
||||
private static final String KEY_USER_SETTINGS_SCREEN = "user_settings_screen";
|
||||
|
||||
private static final String SETTING_GUEST_HAS_LOGGED_IN = "systemui.guest_has_logged_in";
|
||||
|
||||
@@ -1740,6 +1741,16 @@ public class UserSettings extends SettingsPreferenceFragment
|
||||
return rawData;
|
||||
}
|
||||
|
||||
SearchIndexableRaw multipleUsersData = new SearchIndexableRaw(context);
|
||||
multipleUsersData.key = KEY_USER_SETTINGS_SCREEN;
|
||||
multipleUsersData.title =
|
||||
context.getString(R.string.user_settings_title);
|
||||
multipleUsersData.keywords =
|
||||
context.getString(R.string.multiple_users_title_keywords);
|
||||
multipleUsersData.screenTitle =
|
||||
context.getString(R.string.user_settings_title);
|
||||
rawData.add(multipleUsersData);
|
||||
|
||||
SearchIndexableRaw allowMultipleUsersResult = new SearchIndexableRaw(context);
|
||||
|
||||
allowMultipleUsersResult.key = KEY_ALLOW_MULTIPLE_USERS;
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package com.android.settings.biometrics.fingerprint;
|
||||
|
||||
import static android.hardware.fingerprint.FingerprintSensorProperties.TYPE_POWER_BUTTON;
|
||||
import static android.hardware.fingerprint.FingerprintSensorProperties.TYPE_REAR;
|
||||
import static android.hardware.fingerprint.FingerprintSensorProperties.TYPE_UDFPS_OPTICAL;
|
||||
|
||||
import static com.android.settings.biometrics.fingerprint.FingerprintSettings.FingerprintSettingsFragment;
|
||||
@@ -33,13 +34,16 @@ import static org.mockito.Mockito.doNothing;
|
||||
import static org.mockito.Mockito.doReturn;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.spy;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.UserInfo;
|
||||
import android.hardware.biometrics.ComponentInfoInternal;
|
||||
import android.hardware.biometrics.SensorProperties;
|
||||
import android.hardware.fingerprint.Fingerprint;
|
||||
import android.hardware.fingerprint.FingerprintManager;
|
||||
import android.hardware.fingerprint.FingerprintSensorProperties;
|
||||
import android.hardware.fingerprint.FingerprintSensorPropertiesInternal;
|
||||
@@ -80,6 +84,7 @@ import org.robolectric.RobolectricTestRunner;
|
||||
import org.robolectric.annotation.Config;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@RunWith(RobolectricTestRunner.class)
|
||||
@Config(shadows = {ShadowSettingsPreferenceFragment.class, ShadowUtils.class, ShadowFragment.class,
|
||||
@@ -147,7 +152,6 @@ public class FingerprintSettingsFragmentTest {
|
||||
public void testCancellationSignalLifeCycle() {
|
||||
setUpFragment(false);
|
||||
|
||||
mFingerprintAuthenticateSidecar.setFingerprintManager(mFingerprintManager);
|
||||
|
||||
doNothing().when(mFingerprintManager).authenticate(any(),
|
||||
mCancellationSignalArgumentCaptor.capture(),
|
||||
@@ -213,6 +217,7 @@ public class FingerprintSettingsFragmentTest {
|
||||
doReturn(fragmentManager).when(mActivity).getSupportFragmentManager();
|
||||
|
||||
mFingerprintAuthenticateSidecar = new FingerprintAuthenticateSidecar();
|
||||
mFingerprintAuthenticateSidecar.setFingerprintManager(mFingerprintManager);
|
||||
doReturn(mFingerprintAuthenticateSidecar).when(fragmentManager).findFragmentByTag(
|
||||
"authenticate_sidecar");
|
||||
|
||||
@@ -246,4 +251,27 @@ public class FingerprintSettingsFragmentTest {
|
||||
true /* resetLockoutRequiresHardwareAuthToken */));
|
||||
doReturn(props).when(mFingerprintManager).getSensorPropertiesInternal();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAuthOnFragmentSetup() {
|
||||
doReturn(List.of(new Fingerprint("Finger 1", 1, 2, 3)))
|
||||
.when(mFingerprintManager).getEnrolledFingerprints(anyInt());
|
||||
setUpFragment(false, 1, TYPE_REAR);
|
||||
|
||||
verify(mFingerprintManager).authenticate(any(), any(),
|
||||
any(), any(), anyInt());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testErrorCancelledRestartsAuth() {
|
||||
doReturn(List.of(new Fingerprint("Finger 1", 1, 2, 3)))
|
||||
.when(mFingerprintManager).getEnrolledFingerprints(anyInt());
|
||||
setUpFragment(false, 1, TYPE_REAR);
|
||||
|
||||
// When we receive a cancel, we should restart auth.
|
||||
mFragment.handleError(FingerprintManager.FINGERPRINT_ERROR_CANCELED, "blah");
|
||||
|
||||
verify(mFingerprintManager, times(2)).authenticate(any(), any(),
|
||||
any(), any(), anyInt());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,6 +104,7 @@ public class UserSettingsTest {
|
||||
|
||||
private static final String KEY_USER_GUEST = "user_guest";
|
||||
private static final String KEY_ALLOW_MULTIPLE_USERS = "allow_multiple_users";
|
||||
private static final String KEY_USER_SETTINGS_SCREEN = "user_settings_screen";
|
||||
private static final int ACTIVE_USER_ID = 0;
|
||||
private static final int INACTIVE_ADMIN_USER_ID = 1;
|
||||
private static final int INACTIVE_SECONDARY_USER_ID = 14;
|
||||
@@ -211,7 +212,7 @@ public class UserSettingsTest {
|
||||
|
||||
@Test
|
||||
public void testGetRawDataToIndex_returnAllIndexablePreferences() {
|
||||
String[] expectedKeys = {KEY_ALLOW_MULTIPLE_USERS};
|
||||
String[] expectedKeys = {KEY_ALLOW_MULTIPLE_USERS, KEY_USER_SETTINGS_SCREEN};
|
||||
List<String> keysResultList = new ArrayList<>();
|
||||
ShadowUserManager.getShadow().setSupportsMultipleUsers(true);
|
||||
List<SearchIndexableRaw> rawData =
|
||||
|
||||
@@ -43,6 +43,7 @@ import android.net.ConnectivityManager;
|
||||
import android.net.Uri;
|
||||
import android.net.wifi.WifiManager;
|
||||
import android.os.UserManager;
|
||||
import android.provider.Settings;
|
||||
import android.telephony.SubscriptionManager;
|
||||
import android.telephony.TelephonyManager;
|
||||
|
||||
@@ -390,7 +391,7 @@ public class ProviderModelSliceTest {
|
||||
}
|
||||
|
||||
private PendingIntent getPrimaryAction() {
|
||||
final Intent intent = new Intent("android.settings.NETWORK_PROVIDER_SETTINGS")
|
||||
final Intent intent = new Intent(Settings.ACTION_NETWORK_PROVIDER_SETTINGS)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
return PendingIntent.getActivity(mContext, 0 /* requestCode */,
|
||||
intent, PendingIntent.FLAG_IMMUTABLE /* flags */);
|
||||
|
||||
Reference in New Issue
Block a user