Commit Graph

620 Commits

Author SHA1 Message Date
Treehugger Robot
339367886d Merge "Settings: Start search result deep link in same task" into main 2025-03-19 01:02:31 -07:00
Yuanru Qian
0a4000d723 Merge "Update the audio sharing QR code logic to enable OEMs providing customized QR code image" into main 2025-03-19 00:24:22 -07:00
Wes Okuhara
cf2bcd7f1a Settings: Start search result deep link in same task
This fixes a bug where the deep link initiated from a search result
would open the results page in a separate window. The root cause was the
inclusion of the FLAG_ACTIVITY_NEW_TASK intent flag.

Bug: 381127948
Test: atest SettingsSpaUnitTests:com.android.settings.activityembedding
Test: atest CtsSettingsTestCases:SettingsMultiPaneDeepLinkTest
Test: Manually verify UI
Flag: com.android.settings.flags.settings_search_result_deep_link_in_same_task
Change-Id: I91f9e5096ad02bd87e43bae03a2b3e69256be651
2025-03-18 21:12:08 -07:00
Adrian Roos
3ab16de602 Merge "packages/apps/Settings: remove usages of deprecated Mockito matchers" into main 2025-03-13 13:31:54 -07:00
Adrian Roos
693035ab86 packages/apps/Settings: remove usages of deprecated Mockito matchers
Upstream Mockito has deleted the deprecated matchers
in the latest version. Migrate usage to replacements
to unblock upgrade.

Test: m checkbuild
Flag: TEST_ONLY
Bug: 310268946
Change-Id: I18160e93912d136f3962e3379a68ba2be82c1c78
2025-03-13 09:54:49 +01:00
Graciela Putri
90cd7eb98c Add LSE App Compat OWNERS for Settings
Flag: EXEMPT adding OWNERS
Fix: 402735141
Test: m
Change-Id: I459bf13bf9ccd067c0ddf067b56ce0e6ecaf4d7d
2025-03-12 07:54:16 -07:00
yqian
d4774b37aa Update the audio sharing QR code logic to enable OEMs providing customized QR code image
Test: atest AudioSharingFeatureProviderImplTest
Bug: b/397137711
Flag: EXEMPT no-op

Change-Id: I124d6ded50faf9fa0ca06bd5b34d72e9399f3e59
2025-03-12 18:00:42 +08:00
Graciela Putri
6ed930462b Remove (experimental) from app aspect ratio settings title
Flag: EXEMPT string change
Fix: 305215544
Test: m
Change-Id: Idbb01ec99014efc40c285212e5e6ef8c91fa8333
2025-03-06 03:36:22 -08:00
Wes Okuhara
f2767a794b Merge "Settings: Do not show install info for Play Store app" into main 2025-03-05 09:10:11 -08:00
Menghan Li
86fa16ba52 Merge changes from topics "A11yFeedback1P", "A11yFeedbackTopLevelPage", "AccessibilityPageIdFeatureProvider" into main
* changes:
  refactor(A11yFeedback): Rename AccessibilityMetricsFeatureProvider
  feat(A11yFeedback): Add feedback entry for downloaded Accessibility
  chore(A11yFeedback): Removing Legacy Android M Menu Behavior
  feat(A11yFeedback): Implements page ID to feedback bucket ID mapping
2025-03-05 00:06:01 -08:00
Menghan Li
b511fe690b refactor(A11yFeedback): Rename AccessibilityMetricsFeatureProvider
The AccessibilityMetricsFeatureProvider currently provides page IDs
derived from component names, primarily for metrics purposes.
However, its functionality should be expanded to also support
feedback needs, not just metrics collection, by returning
appropriate settings enum values.

Bug: 393980229
Test: atest AccessibilityMetricsFeatureProviderGoogleImplTest
Flag: com.android.server.accessibility.enable_low_vision_generic_feedback
Change-Id: I2d64db866010ae5e3c6a9738f92860df3d0b86aa
2025-03-05 05:25:05 +00:00
Wes Okuhara
79563030fb Settings: Do not show install info for Play Store app
Clicking the "App details" row in the info subpage for the Play Store
app results in a crash. It appears that this app is not considered a
mainline module and has an installer label, but this app is a special
case. Hide the row for the Play Store app.

Bug: 302093631
Test: atest com.android.settings.spa.app.appinfo.AppInstallerInfoPreferenceTest
Flag: EXEMPT bugfix
Change-Id: I291ee3e5dec2075381cb52d041982583cdd04323
2025-03-04 19:05:23 -08:00
Azhara Assanova
db59b0e729 Update ActionDisabledByAdvancedProtectionDialog
For UI, the dialog was migrated to SpaDialogWindowTypeActivity, which
has a Material3 theme and can support rendering over QuickSettings.

This change also adds logic around which message to show depending on
the received extras for feature ID and the dialog type.

Finally, the dialog will display the support button if the help Intent
URI exists and resolves to an activity. Tests around the support button
will be added in a follow up CL.

Bug: 389080341
Test: Visual test
Test: atest ActionDisabledByAdvancedProtectionDialogTest
Flag: EXEMPT bug fix
Change-Id: I0ed23cd44666a40ad54d755f628cd36ef06cc145
2025-03-04 12:00:50 +00:00
tom hsu
2a91e80acc Fix mobile data in Settings is not disable under satellite session
Flag: EXEMPT bug fix
Bug: b/386424636
Test: atest pass
Change-Id: I8d28419f295b172c2929acca5f5896aa4deeb09c
2025-02-21 02:48:55 +00:00
Aleksander Morgado
4a2abf7705 Early check for SIM EID availability based on telephony or user admin
The SIM EID field was already not being shown if the
PackageManger.FEATURE_TELEPHONY_DATA feature flag was not set, per the
check in getIsAvailableAndUpdateEid().

The async availability update was introduced in the context of bug
304560734, because the UI could block until the EID value was ready.
The config_show_sim_info check was left in getAvailabilityStatus() as
that cannot block.

This change moves to getAvailabilityStatus() the availability check
based on the PackageManager feature flags (which are set on system
boot and not changed during runtime) and also based on whether the
user is admin or not, as with any other telephony related setting.
None of these two checks would lead to ANR state.

Bug: 395714454
Flag: EXEMPT bugfix
Test: atest SimEidPreferenceControllerTest

Change-Id: I3447091670345285132a2acaf45cd129c2b84c00
2025-02-19 00:50:05 -08:00
Aleksander Morgado
64fb695d9b Return DISABLED_FOR_USER in IMEI availability if not admin user
The correct return when checking for the IMEI field availability
for non-admin users is DISABLED_FOR_USER.

UNSUPPORTED_ON_DEVICE should only be used when the setting is
unconditionally hidden as the device does not support the feature.

Bug: 395714454
Flag: EXEMPT bugfix
Test: atest ImeiInfoPreferenceControllerTest
Test: atest MobileNetworkImeiPreferenceControllerTest

Change-Id: I4ee89a84953993daad539d33d3a2e576540c580f
2025-02-17 00:44:30 -08:00
Aleksander Morgado
2a0ad1efdf Return UNSUPPORTED_ON_DEVICE in network/imei when no telephony
If the device does not have any telephony support (either via the
build-time config_show_sim_info=false boolean flag, or when not
declaring the PackageManager.FEATURE_TELEPHONY_DATA feature flag),
returning UNSUPPORTED_ON_DEVICE makes more sense than
CONDITIONALLY_UNAVAILABLE, as there is no runtime change that would
make it available.

This change also aligns the behavior with the deviceinfo/imei
entry.

Bug: 395714454
Flag: EXEMPT bugfix
Test: atest MobileNetworkImeiPreferenceControllerTest
Change-Id: Ia01cf3812f8343eabd8ea6970b691ac71432e8bd
2025-02-17 00:44:30 -08:00
Aleksander Morgado
dc86669298 Added unit test for MobileNetworkImeiPreferenceController visibility
The new test checks whether the item is available when the
SubscriptionUtil.isSimHardwareVisible() method returns true, i.e. if
the config_show_sim_info boolean flag is true on non-test runtime.

The default visibility status for all tests is defined in the test
setup() method.

Bug: 395714454
Flag: EXEMPT test only
Test: atest MobileNetworkImeiPreferenceControllerTest

Change-Id: Iaa8be041f0299ac36d532ed68fdc9c30e5690b11
2025-02-17 00:44:30 -08:00
Aleksander Morgado
a66d27c488 Return UNSUPPORTED_ON_DEVICE in network/phonenumber when no telephony
If the device does not have any telephony support (either via the
build-time config_show_sim_info=false boolean flag, or when not
declaring the PackageManager.FEATURE_TELEPHONY_DATA feature flag),
returning UNSUPPORTED_ON_DEVICE makes more sense than
CONDITIONALLY_UNAVAILABLE, as there is no runtime change that would
make it available.

This change also aligns the behavior with the deviceinfo/phonenumber
entry.

Bug: 395714454
Flag: EXEMPT bugfix
Test: atest MobileNetworkPhoneNumberPreferenceControllerTest

Change-Id: I5f2392969fad1884a89de3870ad37be5601fbe37
2025-02-17 00:44:30 -08:00
Menghan Li
972e7a320c Merge changes from topics "A11yFeedback", "AccessibilityFeedbackFeatureProvider" into main
* changes:
  feat(A11yFeedback): Pixel overlay to expose the feedback bucket ID
  feat(A11yFeedback): Add feedback entry for Accessibility page
  feat(A11yFeedback): Add FeedbackManager for Accessibility page
2025-02-16 19:45:09 -08:00
Menghan Li
6b916e6f29 feat(A11yFeedback): Pixel overlay to expose the feedback bucket ID
This change introduces a feature provider for Pixel overlays, allowing
customization of the feedback bucket ID on Android.

Bug: 393980229
Test: Manual testing for Pixel and non-Pixel overlay in real device
Test: atest AccessibilitySettingsTest
            FeedbackManagerTest
Flag: com.android.server.accessibility.enable_low_vision_generic_feedback
Change-Id: Ieeb1dba4de5c13a275e66781621cbfcca7219a5e
2025-02-14 03:01:41 +00:00
SongFerng Wang
b7d640ef36 Merge "Check if ECBMode when activate SIM card" into main 2025-02-13 18:41:42 -08:00
songferngwang
538fb34027 Check if ECBMode when activate SIM card
If in ECBMode, start ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS to show a
dialog instead.

This align with the deactivate sim case

Bug: 393298086
Test: atest SubscriptionActivationRepositoryTest
Test: adb shell cmd phone emergency-callback-mode
Flag: EXEMPT bugfix
Change-Id: Id40d087b7d2d3ca99504ec75bac1c5e29c67258d
2025-02-13 12:04:07 +00:00
Aleksander Morgado
bd56a0efd3 Merge changes from topic "hide-phone-number" into main
* changes:
  Phone number only available if telephony capable
  Phone number only available for admin users
  Added unit test for MobileNetworkPhoneNumberPreferenceController visibility
  Added unit tests for PhoneNumberPreferenceController visibility
2025-02-13 00:06:32 -08:00
Aleksander Morgado
731df0fa98 Phone number only available if telephony capable
The Phone Number field in either the about or network details pages
should not be shown if the device does not have telephony
capabilities.

Bug: 392808943
Flag: EXEMPT bugfix
Test: atest PhoneNumberPreferenceControllerTest
Test: atest MobileNetworkPhoneNumberPreferenceControllerTest

Change-Id: I04f682cc829d5dc7879e6cdacdaebc55a3b6fd2c
2025-02-11 18:43:40 +00:00
Aleksander Morgado
571103b891 Phone number only available for admin users
The phone number is hidden to non-admin users, following the same
reasoning that exists for other telephony-specific fields like the
baseband IMEI.

Bug: 392808943
Flag: EXEMPT bugfix
Test: atest PhoneNumberPreferenceControllerTest
Test: atest MobileNetworkPhoneNumberPreferenceControllerTest

Change-Id: I4e612219d0c7439930e91b3e1d6e368a0dfd073e
2025-02-11 18:30:42 +00:00
Aleksander Morgado
035a15ac37 Added unit test for MobileNetworkPhoneNumberPreferenceController visibility
The new test checks whether the item is available when the
SubscriptionUtil.isSimHardwareVisible() method returns true, i.e. if
the config_show_sim_info boolean flag is true on non-test runtime.

The default visibility status for all tests is defined in the test
setup() method, as this will also simplify the addition of new checks
later on.

Bug: 392808943
Flag: EXEMPT test only
Test: atest MobileNetworkPhoneNumberPreferenceControllerTest

Change-Id: Icedef190a8140fd8164dd8035ae93735a666b9f0
2025-02-07 14:53:25 +00:00
Aleksander Morgado
616fbc4f93 Added unit tests for PhoneNumberPreferenceController visibility
The tests check whether the item is available based on the result of
the SubscriptionUtil.isSimHardwareVisible() method, which is the one
allowing to check the value of the config_show_sim_info boolean flag
on non-test runtime.

Bug: 392808943
Flag: EXEMPT test only
Test: atest PhoneNumberPreferenceControllerTest

Change-Id: I2d1361ecef8a9c1083b4fd6fd4462c7815574827
2025-02-07 14:53:16 +00:00
Hakjun Choi
be6525024d Merge "Clean up aconfig flag oem_enabled_satellite_flag" into main 2025-02-04 19:31:29 -08:00
Hakjun Choi
3f5cf60cc7 Clean up aconfig flag oem_enabled_satellite_flag
Bug: 374994012
Test: atest SubscriptionInfoListViewModelTest
Test: manual test in live network
FLAG: EXEMPT flag clean up
Change-Id: Ib9f9f692658df13aad45f2e889a48f2bffed9ed4
2025-02-03 09:16:48 +00:00
Shawn Lin
7c3559d37f Provide a way to customize biometric SafetySourceIssue
Add a new FeatureProvider for biometrics in FeatureFactory to provide a way to customize biometric SafetySourceIssue

Bug: 370940762
Test: m Settings
Test: m SettingsGoogle
Test: m SettingsSpaUnitTests
Test: m SettingsRoboTests
Flag: com.android.settings.flags.biometrics_onboarding_education
Change-Id: I4d11f3d3522ce5ac2f975cca7c041339f3ea6031
2025-02-02 18:46:25 -08:00
Chaohui Wang
7e8e683e60 Migrate to AppStorageRepository
Bug: 321861088
Flag: EXEMPT bug fix
Test: manual - on All apps and App info
Test: atest AppStorageSizesControllerTest
Test: atest AppStoragePreferenceTest
Change-Id: I3143de720493cb09854621b115d07e76bebf6699
2025-01-09 16:56:42 +08:00
Chaohui Wang
3380884efc Merge changes from topic "BytesFormatter" into main
* changes:
  Migrate all data usage format use case
  Clean up unused DataUsageSummary.formatUsage
  Use BytesFormatter for data usage
2025-01-06 19:06:34 -08:00
Hani Kazmi
57e649ae4e Merge "Revert "Revert "[AAPM] Add advanced protection dialog according ..."" into main 2025-01-03 09:25:46 -08:00
Chaohui Wang
d3448f3a91 Migrate all data usage format use case
Now they are all aligned.

Bug: 321861088
Flag: EXEMPT bug fix
Test: unit test
Change-Id: I1981fd32fd24de7c9eff93e0cd638e862f01b9b9
2025-01-02 18:14:10 -08:00
Chaohui Wang
611c62294a Use BytesFormatter for data usage
Change "480 B" to "480 byte".

And no longer use FormattedDataUsage.

Bug: 321861088
Flag: EXEMPT bug fix
Test: manual - App data usage
Test: unit test
Change-Id: I9ed220e2d5b8fc512d7d28f6fa7faebb37beab83
2025-01-02 18:14:10 -08:00
Adam Bookatz
2a828c6bde Merge "Expand uninstallForAll to Admins" into main 2025-01-02 11:01:50 -08:00
Hani Kazmi
8e28132ba2 Revert "Revert "[AAPM] Add advanced protection dialog according ..."
Revert submission 31078830-revert-30767017-aapm-dialog-api-feedback-TBLFTCNTUN

Reason for revert: Addressed failing test

Reverted changes: /q/submissionid:31078830-revert-30767017-aapm-dialog-api-feedback-TBLFTCNTUN

Change-Id: I3321b4f5baaca9dd270350b9201998ffe0d40473
2025-01-02 05:07:50 -08:00
Chaohui Wang
440c3c2779 Reduce Mobile data switch flaky
Set initial value to null, so no animation when the actual value true
is emitted.

Bug: 329584989
Flag: EXEMPT bug fix
Test: manual - on SIMs
Test: unit test
Change-Id: I3eea55115f02e65dcdcc44ccf917f9083622b723
2024-12-31 14:54:54 +08:00
Priyanka Advani (xWF)
47d59ab974 Merge "Revert "[AAPM] Add advanced protection dialog according to API f..."" into main 2024-12-27 14:25:58 -08:00
Chaohui Wang
8c0b1ef270 Merge "Send initial status for wifiStateFlow" into main 2024-12-23 19:02:54 -08:00
Priyanka Advani (xWF)
2574343b43 Revert "[AAPM] Add advanced protection dialog according to API f..."
Revert submission 30767017-aapm-dialog-api-feedback

Reason for revert: Droidmonitor created revert due to b/384828570. Will be verifying through ABTD before submission.

Reverted changes: /q/submissionid:30767017-aapm-dialog-api-feedback

Change-Id: Ibf26aca2453f2007370974290f5c16d6b091341e
2024-12-23 13:41:43 -08:00
zhibinliu
b2ee5ccf5b Check package name format before using it for SPA nav
Bug: b/372895305
Test: unit test
Flag: EXEMPT bug fix
Change-Id: Ife615c78c48a2d6f5b938c880c9c2128c5551644
2024-12-23 06:41:40 -08:00
Chaohui Wang
d830acf625 Send initial status for wifiStateFlow
To make sure this flow is never empty, use unknown as default.

Fix: 383050153
Flag: EXEMPT bug fix
Test: manual - on Network & internet
Test: unit test
Change-Id: Iaa421749ab917ebc651a95ccdf1a4ab1cb9ba112
2024-12-23 11:50:51 +08:00
Treehugger Robot
75cae48694 Merge "[HSUM] Fix BatteryOptimizationModeAppListPageProviderTest" into main 2024-12-19 21:06:29 -08:00
mxyyiyi
56c4bd723a [HSUM] Fix BatteryOptimizationModeAppListPageProviderTest
Headless System User Mode will use startActivityAsUser() instead of startActivity().

Bug: 383541859
Flag: EXEMPT bug fix
Test: atest BatteryOptimizationModeAppListPageProviderTest
Change-Id: Ic4a0fca1a5835c0dab292b8665551cb2ca9f6640
2024-12-20 11:52:04 +08:00
Azhara Assanova
f2f9874122 Merge "[AAPM] Add advanced protection dialog according to API feedback" into main 2024-12-19 09:41:27 -08:00
Adam Bookatz
49d3e34810 Expand uninstallForAll to Admins
Currently, user 0 can uninstall other users' apps. It really has that
ability by virtue of it being an Admin user. But non-user-0 Admins don't
currently have this ability, so we expand that here. This also allows
this ability on HSUM, where human Admin users aren't user 0.

Bug: 384514936
Test: manual confirmation that overflow appears on HSUM device
Test: atest SettingsSpaUnitTests:com.android.settings.spa.app.appinfo.AppInfoSettingsMoreOptionsTest
Flag: EXEMPT bugfix
Change-Id: I976bb63ecced3c128f8109c63c85067f4a0cdf9b
2024-12-17 13:47:19 -08:00
Azhara Assanova
e2248f1c4f [AAPM] Add advanced protection dialog according to API feedback
This change also updates ActionDisabledByAdminDialog because the
AdvancedProtectionManager#createSupportIntent method is now static.

Bug: 378968840
Bug: 352420507
Test: ActionDisabledByAdminDialogTest
Test: WepNetworksPreferenceControllerTest
Test: manual
Flag: android.security.aapm_api
Change-Id: I8443742aadead45091fee757cbdf715d28eee495
2024-12-13 13:25:38 +00:00
Weng Su
e5d19b38cb Skip authentication if device was unlocked recently
- Sync the same behavior from SystemUI to Settings

Bug: 365611488
Flag: EXEMPT bugfix
Test: Manual testing
atest -c WifiNetworkDetailsFragmentTest \
         WifiDetailPreferenceController2Test \
         WifiTetherSSIDPreferenceControllerTest \
         com.android.settings.wifi.dpp.WifiDppUtilsTest
atest -c com.android.settings.spa.wifi.dpp.WifiDppUtilsTest

Change-Id: Ie3e8374b1fdbbc61e9e5bbf0f5162b18ba1452f3
2024-12-13 18:10:44 +08:00