Commit Graph

15801 Commits

Author SHA1 Message Date
Jason Chiu
ddc11bc03a Replace getCallingActivity() with getLaunchedFromPackage()
getLaunchedFromPackage() reports who launched this Activity or built
PendingIntent used to launch it, whereas getCallingActivity() reports
who will get result of Activity.

Bug: 316891059
Test: robotest, manual
Change-Id: If97018c2741caef622f0596bbfeaa42ef1788b78
Merged-In: If97018c2741caef622f0596bbfeaa42ef1788b78
(cherry picked from commit 901880a1d2)
2024-02-22 03:43:50 +00:00
Weng Su
a0409e582c [RESTRICT AUTOMERGE] Restrict WifiDialogActivity
- Don't show WifiDialogActivity if user has DISALLOW_ADD_WIFI_CONFIG

Bug: 299931761
Flag: None
Test: manual test with TestDPC
atest -c SettingsRoboTests:WifiDialogActivityTest

Merged-In: Icbb8f45922ded163208976be9c2816060dcf09f1
Change-Id: Icbb8f45922ded163208976be9c2816060dcf09f1
(cherry picked from commit 51fa3d798a)
2024-01-30 21:23:08 +00:00
Weng Su
5a17d39db7 Restrict ApnEditor settings
- Finish ApnEditor settings if user is not an admin

- Finish ApnEditor settings if user has DISALLOW_CONFIG_MOBILE_NETWORKS restriction

Bug: 279902472
Test: manual test
atest -c ApnEditorTest
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:4e18e7414c674a1c5bc69961c03499849b4aefd2)
Merged-In: Iecdbbff7e21dfb11e3ba385858747a220cfd3e04
Change-Id: Iecdbbff7e21dfb11e3ba385858747a220cfd3e04
2023-07-07 12:11:33 +00:00
Michael Mikhail
83c13d6563 Merge changes I4bd65bdb,Ibe80b4b1 into udc-dev
* changes:
  Trigger talkback for notification volume change
  Add content description to volume title in settings.
2023-07-05 15:11:09 +00:00
Michael Mikhail
499f965c1c Add content description to volume title in settings.
Adds content description that is announced by talkback when a11y focus
is on volume preference. This improves talkback announcement when view changes.

Fixes: 285529113
Bug: 285455826
Fixes: 285487766
Test: atest VolumeSeekBarPreferenceControllerTest
Test: atest VolumeSeekBarPreferenceTest
Change-Id: Ibe80b4b1d489dc058df1cc79c96b034d5ddc6e56
2023-06-26 23:35:39 +00:00
Matías Hernández
027f0a46ae Settings: don't try to allow NLSes with too-long component names
* NotificationAccessConfirmationActivity (triggered through CompanionDeviceManager) -> Don't show the dialog, bail out early similarly to other invalid inputs.
* NotificationAccessSettings (from Special App Access) -> No changes, but use the canonical constant now.
* ApprovalPreferenceController (used in NotificationAccessDetails) -> Disable the toggle, unless the NLS was previously approved (in which case it can still be removed).

Fixes: 260570119
Fixes: 286043036
Test: atest + manually
Change-Id: Ifc048311746c027e3683cdcf65f1079d04cf7c56
2023-06-21 17:02:32 +02:00
Treehugger Robot
08366227b5 Merge "[Settings] Fix roboletric test fail and add new test case." into udc-dev 2023-06-15 11:18:51 +00:00
Matías Hernández
dcbe38baa9 Don't hide approved NLSes in Settings am: ff255c6eda am: 50df60c93c am: a49e14f8ff am: 0aa241be99 am: 2b1faa0aea
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23563580

Change-Id: I69d2ef43afb54ce3b9d141d4f676b688dd1c5c59
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 15:52:58 +00:00
Matías Hernández
2b1faa0aea Don't hide approved NLSes in Settings am: ff255c6eda am: 50df60c93c am: a49e14f8ff am: 0aa241be99
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23563580

Change-Id: I715da9406bd9d3fe88ff7b5353db1780109880e0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 15:09:53 +00:00
Matías Hernández
0aa241be99 Don't hide approved NLSes in Settings am: ff255c6eda am: 50df60c93c am: a49e14f8ff
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23563580

Change-Id: I8cd7cc9605b3728f9f96c3479d17aa1b362d9cda
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 14:22:10 +00:00
Matías Hernández
a49e14f8ff Don't hide approved NLSes in Settings am: ff255c6eda am: 50df60c93c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23563580

Change-Id: I840d7836ae899bcd40eafc772b96c9460c3f8a02
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 13:42:07 +00:00
Matías Hernández
50df60c93c Don't hide approved NLSes in Settings am: ff255c6eda
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23563580

Change-Id: I42099e38ef7b479b9339b545fe8d12d3bbe95112
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 12:57:15 +00:00
tom hsu
bcd6bf1f8f [Settings] Fix roboletric test fail and add new test case.
Bug: 287177689
Test: atest passed
Change-Id: If927f4e4bf7ee9702e865e77f350164a93729940
2023-06-14 10:13:55 +00:00
Han Xu
b452bc9f9d Add manufactured year into hardware info page
Bug: 285471557
Test: manual visually
Change-Id: Iaab254ac6ee77217e29d89524d782577f44119cb
2023-06-12 17:43:55 +08:00
Matías Hernández
ff255c6eda Don't hide approved NLSes in Settings
Note that an NLS that shouldn't be approvable (because its name is too long) but was already approved (either before the max length check was introduced, or through other means) will disappear from the list if the user revokes its access. This might be somewhat confusing, but since this is a very-edge case already it's fine.

Bug: 282932362
Test: manual
Change-Id: I4c9faea68e6d16b1a4ec7f472b5433cac1704c06
2023-06-06 19:07:58 +02:00
Alejandro Nijamkin
6f9f3a4594 Fixes nav stack issue.
By marking the Intent that's being sent to WPP as "launched from
settings", the code in CustomizationPickerActivity can correctly
conclude that the multi-pane wrapper does not need to be applied to the
intent, preventing the odd "disordering" of the back stack in the bug.

Fix: 284809020
Test: manually verified, on a large screen device with a multi-pane
settings configuration, that going to Display > Lock screen > Shortcuts
and then swiping back off the left edge of the display correctly exits
settings instead of revealing an incorrect screen like it did in the
bug.
Test: also manually verified that the long-press on the home screena and
on the lock screen paths both open the right tab in WPP in settings
correctly.

Change-Id: Iac2b4e9fa5bab91b6a5251f1c51b4d21a0824f00
2023-06-05 16:02:17 -07:00
Treehugger Robot
47d3cfe635 Merge "Skip Wi-Fi hotspot in Settings Widgets" into udc-dev 2023-06-02 04:19:22 +00:00
YK Hung
bfc4637d09 Merge "Update incompatible charger checking rule" into udc-dev 2023-06-02 00:50:17 +00:00
Weng Su
ef81179538 Skip Wi-Fi hotspot in Settings Widgets
- Do not show Wi-Fi hotspots in Settings Widgets if the config is not set to show

Bug: 275268676
Test: Manual test
atest -c CreateShortcutPreferenceControllerTest

Change-Id: I5d86a78c9d48c9b63faff50d46f1254dbefd94cf
2023-06-02 04:54:59 +08:00
Pavel Grafov
8e13abebc0 Merge "Avoid double quiet mode requests" into udc-dev 2023-06-01 15:31:13 +00:00
ykhung
e2f19b7de9 Update incompatible charger checking rule
Bug: 278316711
Test: make test RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge
Change-Id: I8f720bcdf7c0efabc8278913ccf1c0427c857fac
2023-06-01 12:50:47 +08:00
Pavel Grafov
8112fb3828 Avoid double quiet mode requests
Currently when "Work apps" the toggle is tapped in Settings it leads to
UM.requestQuietMode() being called twice via different routes.

Bug: 284915370
Test: atest WorkModePreferenceControllerTest
Change-Id: I5eeb7ecdb10245a32d947ae2430a865bd7a5a60a
2023-05-31 13:56:42 +01:00
Weng Su
086d062cb2 Fix TetherSettings crash issue
- When the user is a guest user, the UI will remove all preferences to restrict setting changes. If the ViewModel updates the UI in this situation, it will cause Settings to crash.
  - Avoid to setup ViewModel when UI is restricted

Bug: 284435378
Test: Manual test
atest -c TetherSettingsTest

Change-Id: I52d4ea717c34eacc9cc2321e3950dc89408049f8
2023-05-31 20:38:36 +08:00
TreeHugger Robot
52d2daf3b3 Merge "Fixed unable to enable hotspot with Security None" into udc-dev 2023-05-26 05:43:02 +00:00
Weng Su
f7d8f0481d Fixed unable to enable hotspot with Security None
- Due to the design adjustment, the default value of SoftApConfiguration is not Security None, so the update of Security None cannot be omitted.

Bug: 283762826
Test: Manual test
atest -c WifiTetherSettingsTest

Change-Id: I07d18b8f73ab8190152332c01814a4bd72cf28d6
2023-05-26 12:26:31 +08:00
Yuxin Hu
67c72c01cb Merge "Fix "Enable ANGLE" switch behavior when Developer Option Switch is off" into udc-dev 2023-05-25 18:08:10 +00:00
SongFerngWang
1872151b4f The BluetoothDevicePreference register the MetadataChanged
The bluetooth device preference needs to refresh UI after MetadataChanged
Fix: 282877247
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDevicePreferenceTest

Change-Id: I02cb07a6b255242e4877089ce2f3b7559ce02362
2023-05-24 04:49:41 +00:00
Yuxin Hu
0183cfd816 Fix "Enable ANGLE" switch behavior when Developer Option Switch is off
Fix below bugs:
1) When developer option switch is turned off,
"Enable ANGLE" switch is not disabled. Fixed it in
GraphicsDriverEnableAngleAsSystemDriverController::update().

2) When user turns off developer option switch,
a restart is not always mandatory. However, we should ask
user to restart the device is "Enable ANGLE" is forced to
change due to developer option switch turning off.
Fixed it in DevelopmentSettingsDashboardFragment::onSwitchChanged().

3) When user turns off developer option switch and
the reboot dialog pops up, user can dismiss the dialog by
not clicking either POSITIVE_BUTTON or NEGATIVE_BUTTON.
We should enforce user to click the button and disallow the
option to dimiss the dialog by touching screen areas
outside the window's bounds.
Fixed it in DisableDevSettingsDialogFragment.java.

Did a few clean-up and in
GraphicsDriverEnableAngleAsSystemDriverController.java, and updated
unit test to reflect new code behavior.

Bug: b/270994705
Test: m; flash and device can boot.
Test: atest -c GraphicsDriverEnableAngleAsSystemDriverControllerJUnitTest
Test: atest GraphicsDriverEnableAngleAsSystemDriverControllerTest
Test: atest SettingsRoboTests:FreeformWindowsPreferenceControllerTest
Test: atest SettingsRoboTests:DesktopModePreferenceControllerTest

Change-Id: I199b2fe59b6ad948b753793254c822a293d8b40d
2023-05-24 01:37:35 +00:00
Lucas Silva
5bce93eb17 Merge "Disable dreams home controls button when disabled on lockscreen." into udc-dev 2023-05-22 20:35:16 +00:00
Behnam Heydarshahi
7aa8424cc0 Merge "Remove volume_separate_notification flag" into udc-dev 2023-05-22 14:09:22 +00:00
Lucas Silva
9872f4322b Disable dreams home controls button when disabled on lockscreen.
When home controls are disable on lockscreen, we should also disable
them on dreams.

Bug: 282680621
Test: flashed device, disabled/enabled home controls on lockscreen and
verified that dreams home controls button was hidden/shown correctly
Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.dream.DreamHomeControlsPreferenceControllerTest"

Change-Id: I535b079cabc2838e77f3afc74bb8f8730b850653
2023-05-19 11:46:39 -04:00
Julia Tuttle
28edfb8df9 Merge "Add FSI toggle to per-app notification settings" into udc-dev 2023-05-17 14:48:50 +00:00
Julia Tuttle
6630c852d9 Add FSI toggle to per-app notification settings
Bug: 277938609
Test: atest FullScreenIntentPermissionPreferenceControllerTest
Test: # manual, verifying against "Special app access" screen
Change-Id: I9cb0d9bc99ce59a7b0ff6bcd2cab7a3c2d63f45f
2023-05-17 14:30:49 +00:00
Yanli Wan
f5ce620937 Merge "Start activity from Device Lock APEX if device is provisioned by Device Lock" into udc-dev 2023-05-16 23:47:46 +00:00
Yanli Wan
ad151bf1e7 Start activity from Device Lock APEX if device is provisioned by Device
Lock

Bug: 279616148
Test: atest DeviceLockPreferenceControllerTest
Test: Build & test locally
Change-Id: Ieb2ea691136749d034bceb9412744af874d6abb9
2023-05-16 17:03:45 +00:00
ykhung
24cbb2c0aa Limit the optimization mode restore mechanism for specific conditions
Limit the app optimization mode restore mechanism is enabled by checking
the isValidToRestoreOptimizationMode() method (default false)

Bug: 280192659
Test: make test RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.BatteryBackupHelperTest
Change-Id: I90a438a15905578336bc46ec7cd92d3bbe2858b7
2023-05-16 18:40:11 +08:00
ykhung
cad41681d6 Add device build information in the backup stage
Insert the device build information in the battery optimization mode
backup stage, such that we can use it to decide whether we should
restore the data in the targeted device or not

Bug: 192523697
Test: make test RunSettingsRoboTests
ROBOTEST_FILTER=com.android.settings.fuelgauge.*

Change-Id: I3ab76e013ea9aca4d336a62e0c7cb6882c5b5085
2023-05-16 11:07:31 +08:00
Behnam Heydarshahi
f07e023302 Remove volume_separate_notification flag
Fully enable the feature

Bug: b/255363741, b/38477228

Test: make DEBUG_ROBOLECTRIC=1 ROBOTEST_FILTER="NotificationVolumePreferenceControllerTest|SeparateRingVolumePreferenceControllerTest|RingerModeAffectedPreferenceControllerTest|SoundSettingsTest" RunSettingsRoboTests -j40
Change-Id: Iec490fc254f71b6461dbf9f9beb4a11645a4a497
2023-05-15 21:19:26 +00:00
ykhung
2c125d29a3 Remove useless optimization mode backup for FULL_POWER_LIST
Remove the useless backup for the FULL_POWER_LIST, since we will not use
it to restore data, only backup the optimization_mode_list is enough

Test: presubmit
Bug: 192523697
Change-Id: I95f1f41732b8aff090e8b722896d153f6181a6ac
2023-05-15 23:45:16 +08:00
ykhung
5cd3a7298e Disable the optimization mode preference if the app is not settable
https://screenshot.googleplex.com/BbQyEv6YCjPVwUF (allowlist)
https://screenshot.googleplex.com/3hTb8TQwGMQqcwS
https://screenshot.googleplex.com/6hdTAT2yNFucD9N (system app)
https://screenshot.googleplex.com/77T5JyAD5nZJpDT (normal app)

Fix: 281566984
Test: make test RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.*
Change-Id: If7aa4b61bc806daa570187da24b7f454cd069dec
2023-05-15 09:32:09 +00:00
Treehugger Robot
2b91f1a4cb Merge "Add allowlist mechanism for battery optimization mode" into udc-dev 2023-05-15 07:43:05 +00:00
ykhung
0cd24adec5 Add allowlist mechanism for battery optimization mode
Add a mechanism to add package name into the allowlist to avoid users
change the battery optimization modes for specific apps in the list

https://screenshot.googleplex.com/8hrHCcTh5bNYXqp

Bug: 281566984
Test: make test RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.*
Change-Id: I8efa6a55646d761f5bee3667a59b38ab68c74bc1
2023-05-15 14:28:49 +08:00
YK Hung
83de631175 Merge "Update battery health state intent (2/3)" into udc-dev 2023-05-15 03:27:44 +00:00
Jason Hsu
181cfa3aa5 Merge "Move 'Audio Output' to Accessibility hearing device page" into udc-dev 2023-05-12 14:20:23 +00:00
Treehugger Robot
e99f757f60 Merge "Update battery settings remaining time format" into udc-dev 2023-05-12 12:29:14 +00:00
Oli Thompson
787a054c93 Merge "Update Work profile settings" into udc-dev 2023-05-12 11:05:57 +00:00
Wesley Wang
77deb463a0 Update battery settings remaining time format
- Update the remaining time format to align with status bar
 - Remove unused test case since no more less than 7 or 15 remaining time
   case for battery settings
 screenshots:
   https://screenshot.googleplex.com/8jPYPj7yznGFU4b.png
   https://screenshot.googleplex.com/5GYXA2tusSUVmVQ.png
   https://screenshot.googleplex.com/3EnB3ejAxAzP28q.png
   https://screenshot.googleplex.com/5jeUxwBEyHotf9d.png

Bug: 281685505
Test: make SettingsLibRoboTests
Change-Id: If33e1828582845f78d8ef666c2b74ab5bba22357
2023-05-12 11:05:05 +00:00
jasonwshsu
212470d0a6 Move 'Audio Output' to Accessibility hearing device page
* Extract the common part into HearingAidHelper.
* Remove abstract getHearingDevice(). Change to get the hearing device when needed.
* Move several classes from Bluetooth into Accessibility

Bug: 281783079
Test: make RunSettingsRoboTests ROBOTEST_FILTER="(HearingDeviceAudioRoutingBasePreferenceControllerTest|AccessibilityHearingAidPreferenceControllerTest|HearingAidHelperTest|HearingAidAudioRoutingPreferenceControllerTest|HearingDeviceCallRoutingPreferenceControllerTest)"
Change-Id: I79049107409b7086c6dcc8d48a6323e171ed1535
2023-05-12 13:46:53 +08:00
Tom Hsu
0af8c60342 Merge "[Settings] Avoid to unregister wrong observer" into udc-dev 2023-05-12 05:16:28 +00:00
Zoey Chen
4d917d990f Merge "[Panlingual] Do not show dialog in recycle. Set LocaleEditor as the parent fragment and control the dialog." into udc-dev 2023-05-12 03:37:37 +00:00