Commit Graph

16210 Commits

Author SHA1 Message Date
Tsung-Mao Fang
56c191d288 Wi-Fi panel doesn't need to check permission am: 5e785a2d99
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19634561

Change-Id: I78c410c92c0d7f8d828fab92db97303814a09ccf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-17 18:03:31 +00:00
Tsung-Mao Fang
5e785a2d99 Wi-Fi panel doesn't need to check permission
Prior to this cl, we use #getPackagesForUid()
to get a list of calling package names and
pick up 1st package name in the list as target
calling package. And then go to check the
Wi-Fi permission.

This implementation is ok for most apps without
sharing system uid. However, this may not work
if the package is set with sharing system ui.
In this case, we get a list of packages
and we don't know which one is caller. So, if we
decide to choose the 1st package as our
calling package, then it could fail to pass
permission check since that package could be not
a correct calling package.

In this cl, we skip permission check for those
packages running with system uid. So, it can resolve
Wi-Fi Panel problem since Wi-Fi panel runs
on settings process(with system uid).

Test: 1. adb shell am start -a android.settings.panel.action.WIFI
2. Verify on assistant app and system ui launcher and search app.
Bug: 240531998

Change-Id: Ia825853dde2e966e3d390cecfbe1a99f6439d31e
Merged-In: Ia825853dde2e966e3d390cecfbe1a99f6439d31e
2022-08-17 02:43:03 +00:00
Treehugger Robot
e194aa42eb Merge "Fix permissions for internal links." am: 24f45fbd63
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2182455

Change-Id: I633c22a73b0d160c0fbf662768a92e4f0dfac85c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-12 03:03:53 +00:00
Bob Badour
11411e187b Fix permissions for internal links.
Test: m droid dist

Change-Id: If872d5e91a78d8f407e618a2c655c8cf4ac7d7fc
2022-08-10 14:21:47 -07:00
Sorin Basca
e2b0873f9c Use Mockito 4.6.1 API
Bug: 236636175
Test: m RunSettingsRoboTests
Change-Id: I2cfda684059520f6ddd1e72c55f1ab1ec9c99e8b
(cherry picked from commit c1c3a84fdc)
Merged-In: I2cfda684059520f6ddd1e72c55f1ab1ec9c99e8b
(cherry picked from commit 61e0bcd194)
Merged-In: I2cfda684059520f6ddd1e72c55f1ab1ec9c99e8b
2022-07-19 09:07:28 +00:00
Sorin Basca
b9503775c0 Use Mockito 4.6.1 API
Bug: 236636175
Test: m RunSettingsRoboTests
Change-Id: I2cfda684059520f6ddd1e72c55f1ab1ec9c99e8b
(cherry picked from commit 61e0bcd194)
Merged-In: I2cfda684059520f6ddd1e72c55f1ab1ec9c99e8b
2022-07-16 07:57:52 +01:00
Xin Li
b8d6e73355 Merge tm-dev-plus-aosp-without-vendor@8763363
Bug: 236760014
Merged-In: Ifcb9d4c564839199d998bd503f390f021c6bf3ad
Change-Id: I9d69bcbc6916176beece2616f152ebd3d74fc0f8
2022-06-28 21:23:28 +00:00
SongFerngWang
30a312975c Fix the testcase error
The BluetoothDeviceUdater added the checking whether the item is in the
list. It caused this testcase failed.
Add more mocks for this testcase.

Bug: 237223797
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDevicesSliceTest
Change-Id: Idb746e42480f99846efb5d1e4d4a411a5a9ca296
Merged-In: Idb746e42480f99846efb5d1e4d4a411a5a9ca296
2022-06-28 15:18:39 +08:00
SongFerngWang
7f6fcce1d5 The UI only shows the active LE device
At the media device, it only shows the active LE device which is
connected.

Bug: 232892046
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AvailableMediaBluetoothDeviceUpdaterTest
make RunSettingsRoboTests ROBOTEST_FILTER=ConnectedBluetoothDeviceUpdaterTest
make RunSettingsRoboTests ROBOTEST_FILTER=SavedBluetoothDeviceUpdaterTest

Change-Id: Iac661206def4d43bc40ab9bb1938f084926899c2
Merged-In: Iac661206def4d43bc40ab9bb1938f084926899c2
2022-06-28 15:03:07 +08:00
Bonian Chen
e9cdc176a6 Merge "[Settings] Adjusted the API of Settings app" into tm-dev am: 29a00dbc31
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18660040

Change-Id: I8391c6e89654e3595a496de6da4485f27834bfda
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-22 19:24:20 +00:00
Bonian Chen
29a00dbc31 Merge "[Settings] Adjusted the API of Settings app" into tm-dev 2022-06-22 18:59:54 +00:00
Oriol Prieto Gascó
10e5657a39 Merge "Use com.android.bluetooth as the BT stack APK" into tm-dev am: d6166e42a0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18981799

Change-Id: I7fcfd55573d121122867893a5624c297a1f18653
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-22 17:43:23 +00:00
Bonian Chen
d10618d489 [Settings] Adjusted the API of Settings app
The API of Settings app get changed in order to support large screen.
This is a fix to adopt the change related to this work.

A short brief:
1. Accept ACTION_MAIN for launching MobileNetworkActivity.
2. Support deep-link intent while MobileNetworkActivity in foreground.
3. Avoid from binding MobileNetworkActivity as a single instance.

Bug: 230047450
Bug: 234406562
Bug: 229371407
Test: local & unittest
Change-Id: Ifcb9d4c564839199d998bd503f390f021c6bf3ad
2022-06-22 07:51:47 +08:00
Oriol Prieto Gasco
f528e7de49 Use com.android.bluetooth as the BT stack APK
Test: TH
Bug: 236187653, 236192423
Change-Id: Ia86d195780a4994607b5533420cb72bd458d4f9a
2022-06-19 23:06:06 +00:00
SongFerng Wang
95f153642c Merge changes Idf0ce198,Ibd324b78,I6daa38f5,I242402e4 am: 8be3ebd163 am: a5a729f523
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2121199

Change-Id: I2ed62ef98c1e81d6549ba1eb0c271ef3bf61d168
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-14 07:27:08 +00:00
SongFerng Wang
a5a729f523 Merge changes Idf0ce198,Ibd324b78,I6daa38f5,I242402e4 am: 8be3ebd163
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2121199

Change-Id: Ie1e14a6b697af624854a9360a60383fac63bb02c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-14 06:59:22 +00:00
SongFerngWang
fbfaa331d2 Unable to enable the removable esim am: 56e1297abe
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2121195

Change-Id: I02f2599c790c90a0b602b84bc8b511f521a7e906
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-14 06:59:21 +00:00
SongFerngWang
e63dfcbd90 [MEP] Modify the comments
Bug: 235792308
Test: build pass
Change-Id: Idf0ce19814ce8b23bc1eea864b36815203069f87
2022-06-13 18:24:30 +08:00
SongFerngWang
56e1297abe Unable to enable the removable esim
When the user enable the removable esim, the settings select wrong
slot(esim slot). The slot shold be the removable + esim slot and the
UiccCardInfo's cardId is the same as the removable esim's cardId.

Bug: 233170453
Bug: 233338345
Test: atest UiccSlotUtilTest
Change-Id: Ibd324b781c84318c994e3742bb82e1d1393b94e4
Merged-In: Ibd324b781c84318c994e3742bb82e1d1393b94e4
2022-06-13 17:49:00 +08:00
Piotr Wilczyński
395861f79d Merge "Notify about brightness change when screen turns on" into tm-dev am: 7d634de3ea
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17898014

Change-Id: Ib7e8232d1f4dafa6418363e629ba228d1eb217e1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-09 07:58:03 +00:00
Piotr Wilczyński
7d634de3ea Merge "Notify about brightness change when screen turns on" into tm-dev 2022-06-09 07:39:07 +00:00
SongFerng Wang
40379dd9d4 Merge "Unable to enable the removable esim" into tm-dev am: be1b37ae2b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18714967

Change-Id: I6120361d42db676e02991dafd707dfa1b4188777
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-09 02:05:41 +00:00
SongFerngWang
64430ba2d2 Unable to enable the removable esim
When the user enable the removable esim, the settings select wrong
slot(esim slot). The slot shold be the removable + esim slot and the
UiccCardInfo's cardId is the same as the removable esim's cardId.

Bug: 233170453
Bug: 233338345
Test: atest UiccSlotUtilTest
Change-Id: Ibd324b781c84318c994e3742bb82e1d1393b94e4
2022-06-06 17:56:25 +08:00
Treehugger Robot
0570287625 Merge changes I0ea498d2,I2d650eb3,I8adcf27e am: 2bec16eda0 am: 4494e0fcfe
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2115174

Change-Id: I29df0438b0286cd08ecf714585d60bf234985321
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-06 07:38:18 +00:00
Treehugger Robot
4494e0fcfe Merge changes I0ea498d2,I2d650eb3,I8adcf27e am: 2bec16eda0
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2115174

Change-Id: Ia42f377f4688deb033a87d7ea47e9c4194980517
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-06 06:52:27 +00:00
Treehugger Robot
2bec16eda0 Merge changes I0ea498d2,I2d650eb3,I8adcf27e
* changes:
  Grey out LE audio offload switcher as LE audio isn't enabled/supported
  Unify the LE audio string and refine the layout to put LE audio switch together
  Add LE Audio feature switcher in the developer option menu
2022-06-06 06:37:11 +00:00
Chaohui Wang
c308cad5c4 Merge "Clean up DarkUIInfoDialogFragment" into tm-dev am: 9ada0accef
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18669107

Change-Id: I2b28f1f5052b553accc273ac356bd47ea832e805
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 12:37:45 +00:00
Chaohui Wang
9ada0accef Merge "Clean up DarkUIInfoDialogFragment" into tm-dev 2022-06-01 12:24:24 +00:00
Chaohui Wang
f1487a7661 Merge "Fix flicker in Dark theme" into tm-dev am: 71fe20ea8b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18659336

Change-Id: I649d3486aa2228af4d68dc1a80b414fe36510c80
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 02:50:22 +00:00
Chaohui Wang
71fe20ea8b Merge "Fix flicker in Dark theme" into tm-dev 2022-06-01 02:35:51 +00:00
Amith Yamasani
b9e7df683f Use Uri.toString() instead of Uri.toSafeString() am: 1b27c91a7b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18646683

Change-Id: I169d16a6dbb7cec8a82386ebd7f482845d2f0836
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-31 12:23:43 +00:00
Chaohui Wang
9f6eaf8624 Fix flicker in Dark theme
Currently, when schedule sets to "Turns on at bedtime", the footer will
show a slid up animation when entering the page, this is because the
"Start time" & "End time" preferences are hidden in onResume().

This is because these 2 preferences always return AVAILABLE in
getAvailabilityStatus(), and manually update visibility in
refreshSummary(), which is called each time updateState() is called.

Usually the controller not set the visibility explicitly, but return
CONDITIONALLY_UNAVAILABLE in getAvailabilityStatus() when they want to
hide the preference.

Because getAvailabilityStatus() is called in onCreate(), by using this,
we can fix the flicker.

Fix: 234399017
Test: visual & robo test
Change-Id: I4cb7dd95d2985bd1ca4c8cb30aaebdc21a5415f8
2022-05-31 19:03:54 +08:00
Alice Kuo
0d11fd07e7 Add LE Audio feature switcher in the developer option menu
Add a switcher to enable/disable LE audio feature. The switcher could be
enabled by setprop ro.bluetooth.leaudio_offload.supported=true

screenshot: https://screenshot.googleplex.com/6aGP664S9PX5EMS

Bug: 233018305
Bug: 233005340
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothLeAudioPreferenceControllerTest
Test: switch LE audio feature, and check LE audio functionality status
Change-Id: I8adcf27edd1438df445d32fca93f35ff5020a3b3
2022-05-31 18:11:58 +08:00
Chaohui Wang
75e4028b3e Clean up DarkUIInfoDialogFragment
The usage of this dialog is removed in
Change Ie2cf147de53385ae0c626c8472306f1b85317686

But this dialog is created (but not show) in DarkUIPreferenceController
each time dark mode toggle is turned on by user.

So clean this up.

Fix: 234419979
Test: make Settings
Change-Id: Icdc9d7a4fb77dc8b2a3f1a9d8e3f40fc0af4917d
2022-05-31 17:58:05 +08:00
Amith Yamasani
1b27c91a7b Use Uri.toString() instead of Uri.toSafeString()
Uri.toSafeString strips out paths and shouldn't be used
for situations other than logging.

Bug: 232694281
Test: PtsPowerTestCases
Change-Id: Iec835b738c3e928e922bd6a14573106f2ce4f526
2022-05-30 23:22:25 -07:00
Zoey Chen
bd8c589390 Merge "[LeAudio] Remove the QrCamera and decorateView in Settings" am: 31011d591f
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2107987

Change-Id: Iee27c40089c612cd2e9ac80a4fa218d707fffd0c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-31 03:57:00 +00:00
Zoey Chen
31011d591f Merge "[LeAudio] Remove the QrCamera and decorateView in Settings" 2022-05-31 03:27:51 +00:00
TreeHugger Robot
58cc75e217 Merge "Fix can't change notification sound for work profile." into tm-dev am: 07db5f4362
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18618750

Change-Id: I9da420078509e6aa2a8ec37f1929fcdd5f2b4ba6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 15:54:53 +00:00
TreeHugger Robot
07db5f4362 Merge "Fix can't change notification sound for work profile." into tm-dev 2022-05-27 15:36:13 +00:00
SongFerngWang
5de8fbc299 Changing the condition since the esim may be removable am: 82bf2a66b7
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2107795

Change-Id: If58f4e897785dd92ed6de2bd847bb5a7a9728294
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 15:18:28 +00:00
SongFerng Wang
d3a7c75487 Merge changes Ic2ac6a5c,I47dc068e
* changes:
  [MEP] The removale slot can read the esim card
  Changing the condition since the esim may be removable
2022-05-27 14:59:48 +00:00
Betty Chang
e300781fb8 Merge "Move the QrCodeGenerator from Settings to SettingsLib for Wifi and BT" am: e5a21d345d
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2107794

Change-Id: I9fedeeaf397e15e8c6a9421604a0cf6def4c743c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 14:47:51 +00:00
Zoey Chen
badca36723 [LeAudio] Remove the QrCamera and decorateView in Settings
Bug: 214340362
Test: Manual test
Change-Id: Ibc29f0e90af28e14a11164fa8940920745545c7e
Merged-In: Ibc29f0e90af28e14a11164fa8940920745545c7e
2022-05-27 22:39:58 +08:00
Tsung-Mao Fang
40fbcf333f Fix can't change notification sound for work profile.
Use correct user id context to query the type,
so we won't get empty result unexpectedly.

If we get the null result, then we won't set sound sucessfully.

Fix: 233580016
Test: Manual test and set work profile sound works.
Change-Id: I7f8fb737a7c6f77a380f3f075a5c89a1970e39ad
2022-05-27 21:13:33 +08:00
Chaohui Wang
c20f0cabf7 Merge "Fix flicker for AppDataUsage when zero usage" into tm-dev am: 98429fbe65
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18617746

Change-Id: Ie214b97a1019488909831453470f0d250c11913f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 10:33:25 +00:00
Chaohui Wang
98429fbe65 Merge "Fix flicker for AppDataUsage when zero usage" into tm-dev 2022-05-27 10:29:51 +00:00
SongFerngWang
82bf2a66b7 Changing the condition since the esim may be removable
The condition whether the slot is esim slot should use getIsEuicc
api since the esim may be removable.

Bug: 233338345
Test: atest UiccSlotUtilTest
Change-Id: I47dc068e57a0faa7f7ce85af7933a48caa2c93e4
Merged-In: I47dc068e57a0faa7f7ce85af7933a48caa2c93e4
2022-05-27 07:10:28 +00:00
SongFerng Wang
968da5c582 Merge "Changing the condition since the esim may be removable" into tm-dev am: fa5407c60f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18579901

Change-Id: Idbd1cd2b051e08b2a284c98f2343ce6acfe3a2ee
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 06:39:48 +00:00
changbetty
012527b81c Move the QrCodeGenerator from Settings to SettingsLib for Wifi and BT
Bug: 214338905
Test: Manual test
Test: make RunSettingsRoboTests ROBOTEST_FILTER=QrCameraTest
Change-Id: I1ca3e9e0b2cdc9fd3f32da8c5329c0e887ee3427
Merged-In: I1ca3e9e0b2cdc9fd3f32da8c5329c0e887ee3427
2022-05-27 04:05:44 +00:00
Chaohui Wang
c2dacf1b75 Fix flicker for AppDataUsage when zero usage
When the page is entered from the AppInfoDashboardFragment, there is no
way to know whether the cycle data is available before finished the
async loading. If it's zero usage, the cycle spinner will be removed,
which cause a flicker.

Temporarily disable the preference list's animator before initial
page updates can solve this issue.

This also fix another flicker on this page when the background data is
off.

Fix: 233963355
Test: manual visual test
Change-Id: I795ed95e15bb3216fa17adfd4f57faf5fd92fa00
2022-05-27 10:21:17 +08:00