Commit Graph

320 Commits

Author SHA1 Message Date
Edgar Wang
47fbf1d333 Merge "Set key for the SwitchPreferences of Connected devices > USB" 2023-01-11 04:07:05 +00:00
Vania Januar
ce93c656aa Show None default app in stylus preference if no Notes holder.
This also fixes the role holder not updating when the
default role holder has changed.

Test: StylusDevicesControllerTest
Bug: 254834764
Change-Id: Iec7ed7698f18279da9a04918dcdf3e20e73609d1
2023-01-06 11:25:35 +00:00
Edgar Wang
f7a6d073f0 Set key for the SwitchPreferences of Connected devices > USB
Change-Id: Ib2fce60bf6843c8db2d45ebdd6bd576657aedeb8
Test: manual
2023-01-06 11:25:20 +00:00
Vania Januar
e5651cd86e Replace placeholder ROLE_ASSISTANT with ROLE_NOTES.
Bug: 254834764
Test: StylusDevicesController
Change-Id: I2303034180f9609db8f1a6d663c389a55dd04600
2023-01-04 16:22:38 +00:00
Vania Januar
57822a67a8 Pass CachedBluetoothDevice into StylusDevicesController.
Styluses can now be identified using the newly added DEVICE_TYPE_STYLUS
metadata.

Bug: 251200056
Test: StylusDevicesControllerTest
Change-Id: Ie89f6419cd16ed97299944b35497c6b2ee764dab
2022-12-29 12:31:31 +00:00
Vania Januar
dc2980d220 Stylus updater in ConnectedDevicesGroupController.
This updater is responsible for listening to USI stylus
battery usage, and bluetooth stylus connection, to determine
whether to show the USI stylus preference on the Connected devices
page.

Adds an entrypoint to the StylusUsiDetailsFragment that shows
details for USI styluses.

Bug: 250909304
Test: StylusDeviceUpdaterTest
Change-Id: I6ae6b6ef880b3b3cd7430d4d35d471b14283369f
2022-12-21 09:20:07 +00:00
Vania Januar
5a5dc81fd3 Merge "USI Stylus settings Fragment." 2022-12-16 13:32:48 +00:00
Vania Januar
44cb400f95 USI Stylus settings Fragment.
The USI stylus settings fragment shows specific preferences
for USI stylus devices only.

There is currently no way to access this fragment from the UI.

Bug: 251201006
DD: go/stylus-connected-devices-doc
Test: StylusUsiHeaderControllerTest
Change-Id: I18223abc8113dce977f57f930ba701da0a34cc18
2022-12-16 10:11:42 +00:00
Treehugger Robot
2f96743835 Merge "Align SETTINGS_PACKAGE_NAME reference to a single place" am: d03411f0ee am: 24835ea2f9 am: 8a26d010d0
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2340884

Change-Id: I6b4edd0be16e090b56b628af51a0558c87822ef6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-15 13:41:13 +00:00
Treehugger Robot
8a26d010d0 Merge "Align SETTINGS_PACKAGE_NAME reference to a single place" am: d03411f0ee am: 24835ea2f9
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2340884

Change-Id: Ie89e48f670b7e3cc8d8d607149d35c678b67ae8f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-15 12:59:37 +00:00
Shen Lin
f677ee600a Align SETTINGS_PACKAGE_NAME reference to a single place
This CL migrated some fragmented declarations of Settings packageName.
When we want to referece package name of Settings, we prefer using
Utils#SETTINGS_PACKAGE_NAME.

Bug: 262123382
Test: make Settings -j64
Change-Id: Ice6afd993d5991bb3c50f676c637b9a5487261f7
2022-12-12 04:56:28 +00:00
Vania Januar
259dec18b2 Toggle for disabling stylus buttons.
This change enables users to disable stylus button
pressed from the Stylus Connected Device details Settings page.

Bug: b/251199452
Test: StylusDevicesControllerTest
Change-Id: I807ef8d5a56c2177037dcb527630d8bfb8f86f7c
2022-11-30 16:08:20 +00:00
Vania Januar
2df165a58a Add a stylus controller to Bluetooth Device Details.
Feature is currently flagged behing SETTINGS_SHOW_STYLUS_PREFERENCES.

Bug: 251201006
Test: SettingsRoboTests StylusDevicesControllerTest
DD: go/stylus-connected-devices-doc
Change-Id: I438b7fe5ca1c94f9dfb506c8918d0e6cb005ca33
2022-11-30 16:06:14 +00:00
Betty Chang
ba3405bd37 Merge "Make bluetooth switch not discoverable via SliceDeepLinkTrampoline" into tm-qpr-dev am: c8f6bba271 am: f200134fc4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20410007

Change-Id: If5d07a5a3ae099d1cb765a2fbb3069ab0ac00285
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-16 19:57:13 +00:00
Betty Chang
f200134fc4 Merge "Make bluetooth switch not discoverable via SliceDeepLinkTrampoline" into tm-qpr-dev am: c8f6bba271
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20410007

Change-Id: I5195b9513c575bc28f0b6930a6c40c570048f6d4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-16 03:10:44 +00:00
changbetty
c706aa6108 Make bluetooth switch not discoverable via SliceDeepLinkTrampoline
Bug: 244423101
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothSwitchPreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDashboardFragmentTest
Test: manual test by test apk

Change-Id: I13562d227e06627fac33239a9d21fd405a18d012
2022-11-08 08:50:29 +00:00
Bill Yi
042554a0e4 Merge TP1A.220905.004 to aosp-master - DO NOT MERGE
Merged-In: Id0c4e3c68ee40e5d0d57449b531228b31f2246ac
Merged-In: Ib71b6904b5c85b3d9f96563bd38bbf2d0305127d
Change-Id: I186ff56c007d17ad650b64facfbd4862cc06bf9a
2022-09-08 14:23:20 -07:00
Treehugger Robot
dba6ba52e3 Merge "Fix NPE crash in UwbPreferenceController and optimize the lifecycle observer adding condition in page" am: b2a466d92f am: a9c6040eb8 am: d24f4a3f54 am: 41fc3efd4c am: 4b4795676e
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2206258

Change-Id: I800ac3cd490776b7c24c50b8d782a0937671f31a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-07 02:19:04 +00:00
Treehugger Robot
d24f4a3f54 Merge "Fix NPE crash in UwbPreferenceController and optimize the lifecycle observer adding condition in page" am: b2a466d92f am: a9c6040eb8
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2206258

Change-Id: I3048482c0e9c74bc4488fb76e7166b4e94bf1e98
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-07 00:41:43 +00:00
Shen Lin
0b9a6304aa Fix NPE crash in UwbPreferenceController and optimize the lifecycle observer adding condition in page
This patch contains two fixes:

- Make sure mUwbManager is non-null by calling isUwbSupportedOnDevice to avoid a NPE.
- Modify AdvancedConnectedDeviceDashboardFragment, add lifecycle observer only if device supports UWB.

Bug: 244871579

Test: manual test and Robotest.
Change-Id: I78f97794a66f3fb487f067c4570899e21c254acf
2022-09-06 14:55:08 +08:00
SongFerngWang
76870250e8 Add owner for job handover
CP from the AOSP aosp/2200280.

Bug: 244524317
Test: NA
Change-Id: I9259596811cba08a21b78eebbe2f847e1aa6818c
Merged-In: I9259596811cba08a21b78eebbe2f847e1aa6818c
2022-09-02 07:01:25 +00:00
SongFerng Wang
b46e4b0755 Merge "Add owner for job handover" am: 89418428f6 am: 55f71f5496 am: 545db0361f am: ea2cff12f8 am: 954b9bafd0
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2200280

Change-Id: I04b81ad2487b069d3ee9c9a009fbc824d87ce5a0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-01 14:21:35 +00:00
SongFerng Wang
545db0361f Merge "Add owner for job handover" am: 89418428f6 am: 55f71f5496
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2200280

Change-Id: Ibeb10dbb48e3b2332f9056674a0a237ff28d5f93
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-01 12:37:38 +00:00
SongFerngWang
2d59130485 Add owner for job handover
Will CP it into AOSP later.

Bug: 244524317
Test: NA
Change-Id: I9259596811cba08a21b78eebbe2f847e1aa6818c
2022-09-01 16:09:35 +08:00
Kweku Adams
5949fccc7a Remove duplicate strings.
"Yes" and "no" were redefined many times with no clear benefit, so this
consolidates them into one definition.

Bug: 243843096
Test: Build, install, and open the Settings app
Test: atest SettingsRoboTests
Change-Id: I5f84d09f223efd478461ded93aeac82bf7b128d8
2022-08-26 00:07:08 +00:00
Jason Chiu
8cef068117 Make bluetooth not discoverable via large screen deep link flow
Deep links on large screen devices starts a homepage activity on the
left pane, and then starts the target activity on the right pane. This
flow overrides the calling package, and the target activity can't know
who initially calls it.

Thus, we store the initial calling package in the intent, so the
Connected devices page is able to make bluetooth not discoverable when
it's called from unintended apps on large screen devices.

Bug: 234440688
Test: robotest, manual
Change-Id: I4ddcd4e083c002ece9d10aabdb4af4a41de55ce7
Merged-In: I4ddcd4e083c002ece9d10aabdb4af4a41de55ce7
(cherry picked from commit 5df14831b8)
Merged-In: I4ddcd4e083c002ece9d10aabdb4af4a41de55ce7
2022-07-29 22:35:44 +00:00
Jason Chiu
5df14831b8 Make bluetooth not discoverable via large screen deep link flow
Deep links on large screen devices starts a homepage activity on the
left pane, and then starts the target activity on the right pane. This
flow overrides the calling package, and the target activity can't know
who initially calls it.

Thus, we store the initial calling package in the intent, so the
Connected devices page is able to make bluetooth not discoverable when
it's called from unintended apps on large screen devices.

Bug: 234440688
Test: robotest, manual
Change-Id: I4ddcd4e083c002ece9d10aabdb4af4a41de55ce7
Merged-In: I4ddcd4e083c002ece9d10aabdb4af4a41de55ce7
2022-06-24 08:16:41 +00:00
Jason Chiu
6dcbb25fa5 Make bluetooth not discoverable via large screen deep link flow
Deep links on large screen devices starts a homepage activity on the
left pane, and then starts the target activity on the right pane. This
flow overrides the calling package, and the target activity can't know
who initially calls it.

Thus, we store the initial calling package in the intent, so the
Connected devices page is able to make bluetooth not discoverable when
it's called from unintended apps on large screen devices.

Bug: 234440688
Test: robotest, manual
Change-Id: I4ddcd4e083c002ece9d10aabdb4af4a41de55ce7
2022-06-24 08:15:22 +00:00
jasonwshsu
acd3f94fde Pop up pairing another ear dialog when detecting hearing aid is a set
* Pop up dialog in 'Connected deivce' page and 'Accessibility -> Hearing
  aids' page

Bug: 225117454
Bug: 226511985
Test: make RunSettingsRoboTests ROBOTEST_FILTER=HearingAidPairingDialogFragmentTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AvailableMediaDeviceGroupControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityHearingAidPreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=HearingAidUtils

Change-Id: I34a1e3ac680a7efe97dc501bfbe93f840ad16364
2022-05-14 22:16:22 +00:00
Hugh Chen
205752dcf2 Make bluetooth not discoverable via SliceDeepLinkTrampoline
- Don't let device be discovered when the user launch "Connected Devices
  settings" through SliceDeepLinkTrampoline.

Bug: 228450811
Test: make -j42 RunSettingsRoboTests and use test apk to manually test
to verify the device is not discoversable when open "Connected settings"
through test apk.

Change-Id: I5490b58675b1fd9fc36305766867f65caa6ccb6c
2022-05-10 09:47:19 +00:00
Hugh Chen
ec0c171735 Fix can't select the [USB Tethering] item in [Developer Options]
- This CL is using 'USB_CONFIGURED' to check whether the USB enumeration
  is completed from the intent. If 'USB_CONFIGURED' is true then update
  the UI.

Bug: 229200265
Test: make -j65 RunSettingsRoboTests
Change-Id: Icab05e37ae3fcc9f1bf404a610fc97c368c453f5
2022-05-03 08:00:58 +00:00
Hugh Chen
aadc44ae26 Fix default usb settings will set wrong function when onPause()
Bug: 229200265
Test: make -j64 RunSettingsRoboTests
Change-Id: Ibee2d39af8b341d03117d96029446ddcd45921fe
2022-04-18 12:16:57 +00:00
Treehugger Robot
c78c5e1129 Merge "Restart the MTP connection when changing transcode enabled" am: 8109ad8033 am: df16e4b74c am: f5246d8a8c
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1882150

Change-Id: I4d0f5d3bb5d11b1217de60f6b22e5544c8d00bfa
2022-02-16 13:52:02 +00:00
Treehugger Robot
f5246d8a8c Merge "Restart the MTP connection when changing transcode enabled" am: 8109ad8033 am: df16e4b74c
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1882150

Change-Id: Ib92a9c70e554ff53f452cae5cf45d6be511da39b
2022-02-16 13:33:21 +00:00
Treehugger Robot
df16e4b74c Merge "Restart the MTP connection when changing transcode enabled" am: 8109ad8033
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1882150

Change-Id: I180666f8edc9fdb69fcdec20b9ae2730240ff923
2022-02-16 13:08:35 +00:00
Treehugger Robot
8109ad8033 Merge "Restart the MTP connection when changing transcode enabled" 2022-02-16 09:58:58 +00:00
Jack Yu
29e46bd01e Do not let guest user disable secure nfc am: a579ca7554 am: 1009054124 am: b85416796d am: 05dfb08c80 am: 147f4bc01d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16691815

Change-Id: Ibb578e5efdfffa772c785cb482de853a19faf0b7
2022-01-28 23:29:42 +00:00
Jack Yu
147f4bc01d Do not let guest user disable secure nfc am: a579ca7554 am: 1009054124 am: b85416796d am: 05dfb08c80
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16691815

Change-Id: Ib69851dd1d88fcba84af0cf940b6f949aab15355
2022-01-28 23:14:00 +00:00
Jack Yu
05dfb08c80 Do not let guest user disable secure nfc am: a579ca7554 am: 1009054124 am: b85416796d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16691815

Change-Id: I72ccad504b36bd1112660cc180be93c210ae66c4
2022-01-28 22:53:00 +00:00
Jack Yu
b85416796d Do not let guest user disable secure nfc am: a579ca7554 am: 1009054124
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16691815

Change-Id: I9879ba034ae2b8d7a964a4d6c9d700bad55b636e
2022-01-28 22:31:38 +00:00
Jack Yu
1009054124 Do not let guest user disable secure nfc am: a579ca7554
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16691815

Change-Id: Ic68c6849bb65875aea6286d415c66ae8a9f57dfa
2022-01-28 22:19:10 +00:00
Jack Yu
a579ca7554 Do not let guest user disable secure nfc
Bug: 209446496
Test: manual
Merged-In: I7253f7f08fde04e30400a30d9a0d24f1ceff04b0
Change-Id: I7253f7f08fde04e30400a30d9a0d24f1ceff04b0
(cherry picked from commit d9e3e6e4b1)
2022-01-22 07:56:25 +00:00
Jack Yu
d9e3e6e4b1 Do not let guest user disable secure nfc
Bug: 209446496
Test: manual
Change-Id: I7253f7f08fde04e30400a30d9a0d24f1ceff04b0
2022-01-19 10:43:10 +00:00
Bill Yi
39df254c94 Merge sc-qpr1 to aosp-master - DO NOT MERGE
Merged-In: Id5612dfa82e11037cd95b0ef0f5a507d9c86dd48
Merged-In: I4f51c80cf4e32c384afad849c04c7c6afa065767
Change-Id: Ie466180309fcfe540492967e8bf3587b34928ded
2022-01-06 18:39:02 -08:00
Michael Groover
d1f76eea72 Merge "Add unaudited exported flag to exposed runtime receivers" 2022-01-03 17:35:02 +00:00
Treehugger Robot
a86e838b02 Merge "Settings: Extend the data role swap timeout value" am: bb994f627f am: df2a22f104 am: 26bf610fd9 am: 16a3f98b71
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1912875

Change-Id: Icb00bc53ba6d7fb2e3fbf85a4c7a42b1dec99880
2021-12-15 07:47:41 +00:00
Treehugger Robot
16a3f98b71 Merge "Settings: Extend the data role swap timeout value" am: bb994f627f am: df2a22f104 am: 26bf610fd9
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1912875

Change-Id: I86be84ebc20266fb0b6af1b2faa196def582da55
2021-12-15 07:35:30 +00:00
Treehugger Robot
26bf610fd9 Merge "Settings: Extend the data role swap timeout value" am: bb994f627f am: df2a22f104
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1912875

Change-Id: I0d456509b02715b141a6110ef89a476995ce5d67
2021-12-15 07:23:26 +00:00
Treehugger Robot
bb994f627f Merge "Settings: Extend the data role swap timeout value" 2021-12-15 06:49:44 +00:00
Michael Groover
911f7e7aa9 Add unaudited exported flag to exposed runtime receivers
Android T allows apps to declare a runtime receiver as not exported
by invoking registerReceiver with a new RECEIVER_NOT_EXPORTED flag;
receivers registered with this flag will only receive broadcasts from
the platform and the app itself. However to ensure developers can
properly protect their receivers, all apps targeting T or later
registering a receiver for non-system broadcasts must specify either
the exported or not exported flag when invoking #registerReceiver;
if one of these flags is not provided, the platform will throw a
SecurityException. This commit updates all the exposed receivers
with a new RECEIVER_EXPORTED_UNAUDITED flag to maintain the existing
behavior of exporting the receiver while also flagging the receiver
for audit before the T release.

Bug: 161145287
Test: Build
Change-Id: Ie97372efebd8258d9a4c503771d55109a85e6ae9
2021-12-09 20:34:02 -08:00