Commit Graph

20835 Commits

Author SHA1 Message Date
Chaohui Wang
0bcf5b79f8 Merge "Create AppDataUsageAppSettingsController" into main 2023-10-08 11:46:37 +00:00
Charlotte Lu
93fb316f01 Add ApnDataInit.
Fix: 298906796
Test: Unit Test
Change-Id: Ibf9e12e4f9c4ee033ad6dc2ca1f2267bf1f21912
2023-10-08 17:54:40 +08:00
Chaohui Wang
08e24272e4 Create AppDataUsageAppSettingsController
For better organization and testings.

Bug: 240931350
Test: manual - on AppDataUsage
Test: unit test
Change-Id: Ie3d35f5d112cf06cca585c9859624d705fbe2655
2023-10-08 17:03:48 +08:00
Zaiyue Xue
834e19b188 Use empty BatteryDiffData instead of null to avoid NullPointerException
This is one action post P0 bug b/301362376.

Bug: 304067689
Bug: 303838369
Fix: 304067689
Fix: 303838369
Test: manual
Change-Id: I8bb6bfe9c3fca78ab19dfbfd2a184b0f92f4ef09
2023-10-08 16:38:29 +08:00
Chaohui Wang
4188a571aa Use network type enum for APN
Instead of hardcoded names and values.

Bug: 303971237
Test: unit test
Change-Id: I099a408df7ee35abc886ed5c1d2d09fd31fda7d3
2023-10-08 14:23:37 +08:00
Treehugger Robot
9f49e038a0 Merge "Telephony.Carriers.BEARER is deprecated." into main 2023-10-08 03:33:27 +00:00
Charlotte Lu
11737b956e Telephony.Carriers.BEARER is deprecated.
Fix: 303971237
Test: Unit Test
Change-Id: Id3257b279421eb9f3544430667dc8ae536476e5c
2023-10-07 17:52:16 +08:00
Chaohui Wang
8e2e9e5d3e Prevent unnecessary reconnection for wifi privacy
Before fix, privacy toggle in the Network details page causes a
disconnection + reconnection even when selecting the same setting.

Check current setting first to prevent unnecessary reconnection.

Fix: 303093138
Test: manual - select same privacy setting
Test: unit test
Change-Id: I71208e3cd256fdc0dd5e895fa1a68fdab47aed9a
2023-10-07 15:42:35 +08:00
Chaohui Wang
b19eb9a4c2 Create AppDataUsageListController
For better organization and testings.

Bug: 240931350
Test: manual - on AppDataUsage
Test: unit test
Change-Id: I77ceeccc7055fcd948fe40d5dfb9cc4a9b9ad2ee
2023-10-07 15:03:27 +08:00
Eric Biggers
3a11c3b0de ShadowLockPatternUtils: remove patternEverChosen methods
These methods are being removed from LockPatternUtils because they are
no longer used, so remove them from ShadowLockPatternUtils too.

Bug: 270013005
Change-Id: If196bbef4755c644b3188043ed47e99817bf1856
Merged-In: If196bbef4755c644b3188043ed47e99817bf1856
(cherry picked from commit 795a02c92a)
2023-10-06 17:16:55 +00:00
Eric Biggers
b2ea672670 ChooseLockPassword: convert to use PasswordMetrics#validateCredential()
Fix the check for invalid characters in new passwords by switching from
PasswordMetrics#validatePassword() to
PasswordMetrics#validateCredential().  For more information, see
frameworks/base change I5c3c55367c3a294578cd0f97ac0e315a11ed517e.

Bug: 219511761
Bug: 232900169
Bug: 243881358
Test: Verified no regressions in 'atest ChooseLockPasswordTest'.  Note,
      this test is currently @Ignored and has 2 failures.  I didn't
      attempt to address that.
Test: Set a password containing non-ASCII characters on a device running
      an older build.  Upgraded and verified unlocking still works.
      Tested that setting a new non-ASCII password is not allowed.
Change-Id: I5f1822a34688473cb103eb64dca56e4c19d4dd08
Merged-In: I5f1822a34688473cb103eb64dca56e4c19d4dd08
(cherry picked from commit b547094366)
2023-10-06 17:16:55 +00:00
Valentin Iftime
323fbda20e Validate ringtone URIs before setting
Add checks URIs for content from other users.
 Fail for users that are not profiles of the current user.

Test: atest DefaultRingtonePreferenceTest
Bug: 299614635
Change-Id: Ib266b285a3a1c6c5265ae2321159e61e08e349f6
2023-10-06 15:44:17 +02:00
Gil Cukierman
18403f2adc Merge changes from topic "cukie-300248708-hide2gremoval" into main
* changes:
  Stop honoring CarrierConfigManager.KEY_HIDE_ENABLE_2G
  Add feature flag for removal of KEY_HIDE_ENABLE_2G
2023-10-04 20:12:53 +00:00
Matt Pietal
9695477373 Merge "Add support to configure double line clock in lockscreen [2/2]" into main am: 3be411d513 am: 705507d68f am: 8d4d73f152 am: 9e233f3284 am: 84076896f6
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2539870

Change-Id: I361b6926ca06f22211048ad5738b58d3bf21c473
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-04 16:57:42 +00:00
Matt Pietal
84076896f6 Merge "Add support to configure double line clock in lockscreen [2/2]" into main am: 3be411d513 am: 705507d68f am: 8d4d73f152 am: 9e233f3284
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2539870

Change-Id: I91198eb53fda60d1f5801e5fa8512be2800304e8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-04 16:26:27 +00:00
Matt Pietal
9e233f3284 Merge "Add support to configure double line clock in lockscreen [2/2]" into main am: 3be411d513 am: 705507d68f am: 8d4d73f152
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2539870

Change-Id: I9a436c40d689ad4db65a9ff9def5ea04c8115894
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-04 15:55:50 +00:00
Matt Pietal
705507d68f Merge "Add support to configure double line clock in lockscreen [2/2]" into main am: 3be411d513
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2539870

Change-Id: Ia1bfae20044369b8a8e463e21a2393cf9b6e9250
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-04 14:54:22 +00:00
Matt Pietal
3be411d513 Merge "Add support to configure double line clock in lockscreen [2/2]" into main 2023-10-04 14:25:38 +00:00
Graciela Putri
f861f64769 Merge "Update aspect ratio summary strings" into udc-qpr-dev am: 242bde10c8 am: fafb4bf5ba
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24867213

Change-Id: I169898d72e09964a762726782acfe57906468608
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-04 14:03:45 +00:00
Gil Cukierman
761fd612c4 Stop honoring CarrierConfigManager.KEY_HIDE_ENABLE_2G
KEY_HIDE_ENABLE_2G is soft removed in Android API level 35
because it hides a security feature. This patch
introduces simplified logic that ignores the
carrier config value. The new behavior is behind a feature flag.

This patch also includes some cleanup.
1. It removes an unneeded check for null carrier config
2. It removes test logic that set the value of KEY_HIDE_ENABLE_2G
   in places where it had no impact on the test.

Bug: 300248708
Test: atest Enable2gPreferenceControllerTest
Change-Id: I892d115d1ae173d2f3cd69e8f8b97bc5bfa7c67b
2023-10-04 13:59:55 +00:00
Graciela Putri
fafb4bf5ba Merge "Update aspect ratio summary strings" into udc-qpr-dev am: 242bde10c8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24867213

Change-Id: I4e6ef486029a3f70cf7c267320c200c19384787a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-04 13:32:50 +00:00
Graciela Putri
242bde10c8 Merge "Update aspect ratio summary strings" into udc-qpr-dev 2023-10-04 13:04:36 +00:00
Treehugger Robot
3772065d38 Merge "Fix code inspection test for slice controllers" into main 2023-10-03 17:44:42 +00:00
Jason Chiu
1926318cdc Merge "Enable the suggesiton test on disabled components" into main 2023-10-03 09:29:43 +00:00
Treehugger Robot
4cc92858f4 Merge "Config battery info page(1/2)" into main 2023-10-03 08:53:01 +00:00
Mill Chen
6cbbc3bf3f Fix code inspection test for slice controllers
Bug: 269156923
Test: atest CodeInspectionTest
Change-Id: I8937c8b3e39c475c630e8d4bbd45439c2234e7ea
2023-10-03 08:23:36 +00:00
Treehugger Robot
094a73867c Merge "Fix missing declared accessibility PreferenceControllers." into main 2023-10-03 08:22:02 +00:00
Jason Chiu
45583d449f Enable the suggesiton test on disabled components
The activity to test suggestions might be disabled by configuration. To
avoid no component found for testing, just query activities including
the disabled components.

Fix: 300160935
Test: atest SettingsRoboTests:com.android.settings.suggestions
Change-Id: I37718ea79480d16a90c67635666b8cdfa8be4dae
2023-10-03 07:56:31 +00:00
Zoey Chen
6a3352e7a0 Merge "[ToA] Terms of Address UI, fragment in LocaleListPicker" into main 2023-10-03 07:46:49 +00:00
Wesley Wang
bace563189 Config battery info page(1/2)
- Make battery information page configurable

Bug: 301817717
Test: make SettingsRoboTests
Change-Id: I51bf00fe3d9993ecd4e8481cd7c15d70b3c09ec4
2023-10-03 07:36:52 +00:00
YK Hung
3be5135a01 Merge "Refactor Power Usage Time Page." into main 2023-10-03 06:55:07 +00:00
Zoey Chen
c2522b8f9d [ToA] Terms of Address UI, fragment in LocaleListPicker
Test: atest TermsOfAddressCategoryControllerTest
Test: adb shell device_config put settings_globalintl com.android.settings.flags.terms_of_address_enabled true
Bug: 295826542
Bug: 297798866
Change-Id: I2b9af7cbe7cab0bb7b2168bc99f0fa7bc0903ac2
2023-10-03 06:36:05 +00:00
Allen Su
1c2440aab0 Merge "Fix notificaiton not working in work profile" into main 2023-10-03 02:11:34 +00:00
Joshua McCloskey
b7021c8e0b Added UI tests for FingerprintEnrollIntro
Test: m -j40 RunSettingsRoboTests ROBOTEST_FILTER=FingerprintEnrollmentIntroFragmentTest
Bug: 295206367
Change-Id: I70f6b50dd2604e01805df04ffb1c07a9134ba065
2023-10-02 22:05:16 +00:00
Daniel Norman
35265e838f Fix missing declared accessibility PreferenceControllers.
This includes 3 fixes:

Adds missing settings:controller attribute for bold & high-contrast
text preferences.

Separates VibrationSettings into two fragments, one per fragment XML resource.
  Instead of using a conditional to choose the XML resource ID,
  we now use the conditional to choose which fragment to launch.
  This allows both fragment's preference controllers to be inspected
  by CodeInspectionTest#runSliceControllerInXmlInspection.
  Also updates the preference keys which must be unique per XML in order
  to appear in Settings Search.

Adds Magnification preference controllers to exempt-not-in-XML list.
  These controllers are for fragments that are not declared in an XML.
  See ToggleScreenMagnificationPreferenceFragment
        #getPreferenceScreenResId.

Bug: 289967175
Test: atest SettingsRoboTests:com.android.settings.accessibility
Test: atest CodeInspectionTest#runSliceControllerInXmlInspection;
      Observe no errors in the accessibility package.
Test: Open Settings > Accessibility > Vibration & haptics;
      observe vibration intensity page is shown (behavior unchanged).
      Hardcode config_vibration_supported_intensity_levels=1;
      observe vibration page with toggles is shown (behavior unchanged).
Change-Id: I257b5ad390371bedb1623af6289016b06d478707
2023-10-02 18:00:30 +00:00
Shivangi Dubey
097a9e736c Merge "Disable Fold lock behavior setting by default" into main 2023-10-02 10:00:10 +00:00
Allen Su
7b31a7a612 Fix notificaiton not working in work profile
Bug: 298592379
Test: atest SettingsRoboTests:com.android.settings.localepicker
Change-Id: I1da93e0dd2a7f98c2e635a1d7a520c88ba8258e0
2023-10-02 09:34:40 +00:00
mxyyiyi
1b9eb170dd Refactor Power Usage Time Page.
- Show use time category

Screenshot:
[Screen time with hint] https://screenshot.googleplex.com/3cRLrwevzw4iytb
[Background time with hint] https://screenshot.googleplex.com/zEf8PcWopCVCRZR
[without hint] https://screenshot.googleplex.com/9bao9sVd8s7VRwM
[enter from app info (without category)] https://screenshot.googleplex.com/8sozxMrq8ojadiF

Bug: 302063050
Test: Manual
Change-Id: Ic967d05a173afa76c2a958e1332dedd9f83cd687
2023-10-02 02:34:35 +08:00
Hao Dong
d11b9d1647 Merge "Use shared lib for settings v2." into main 2023-09-30 17:25:52 +00:00
Eghosa Ewansiha-Vlachavas
2c50be71c5 Fix testGetUserMinAspectRatioEntry for both tablets and foldables am: 136bd906da am: 933b2431fb
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24879571

Change-Id: I1a08e894582e04583bb2f1e26945cae85f1b4fc4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-29 21:51:22 +00:00
Eghosa Ewansiha-Vlachavas
933b2431fb Fix testGetUserMinAspectRatioEntry for both tablets and foldables am: 136bd906da
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24879571

Change-Id: If37a415cc6f53f1f9df7731129dd9fa42341c4d4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-29 20:45:20 +00:00
Valentin Iftime
68916a9bbf Check for NameNotFoundException when querying for PackageInfo
PackageManager.getPackageInfo will throw NameNotFoundException if package was/is being removed.

Test: atest FullScreenIntentPermissionPreferenceControllerTest
Bug: 296163845
Change-Id: I3242ac7e68fa7ed99fe99c7de7cd97aaf87948ee
2023-09-29 11:17:00 +02:00
Anna Bauza
e43590b092 Merge "Declare GuestTelephonyPreferenceController xml exempt" into main 2023-09-28 22:32:01 +00:00
Sudheer Shanka
8af457e732 Merge "Provide SuspendDialogInfo when quarantining an app." into main 2023-09-28 20:20:46 +00:00
Hao Dong
ae40494ee6 Use shared lib for settings v2.
Test: settingsv2 tests passed
Bug: 302372183

Change-Id: I6d1b20853b26662c538e804b1191bb720f1d7b8f
2023-09-28 19:16:11 +00:00
Anna Bauza
c0c206920b Declare GuestTelephonyPreferenceController xml exempt
The GuestTelephonyPreferenceController is related to conditional toggle appearance. Depends if Telephony is supprted by the device, therefore it is not statically defined in xml.

Also order list alphabetically.

Bug: b/289967472
Test:
1. Remove @Ignore tag from `CodeInspectionTest#runSliceControllerInXmlInspection`
2. atest CodeInspectionTest

Change-Id: I5fb95bdd5ca8cb2a5aa1096f57a425a2efa74cf9
2023-09-28 19:08:49 +00:00
Behnam Heydarshahi
3a130e2baa Merge "Declare RingVolumePreferenceController xml exempt" into main 2023-09-28 17:26:08 +00:00
Zoey Chen
60d3f7b7d2 Merge "[ToA] Terms of Address UI, fragment and the list: - Feminine, Masculine, Neutral, Not Specified" into main 2023-09-28 17:00:49 +00:00
Sudheer Shanka
b5441bf782 Provide SuspendDialogInfo when quarantining an app.
Customize the dialog to include a button to allow
users to take an app out of the quarantine state.

Bug: 297934650
Test: atest tests/robotests/src/com/android/settings/development/quarantine/QuarantinedAppsScreenControllerTest.java
Change-Id: I1b6e9f057fed91ae131602fd6d6ddf5e23958a65
2023-09-28 14:48:15 +00:00
Behnam Heydarshahi
fcd370f094 Declare RingVolumePreferenceController xml exempt
The controller is no longer in use in SoundSettings and should not
affect code inspection.

Bug: b/289967737
Test: 1. Remove @Ignore tag from `CodeInspectionTest#runSliceControllerInXmlInspection`
      2. atest CodeInspectionTest
Change-Id: I07cea3c5e2f5282950a63945181cc4711b937bc5
2023-09-28 13:50:26 +00:00