Commit Graph

3062 Commits

Author SHA1 Message Date
Treehugger Robot
a93e78f781 Merge "Fix array-related errorprone warnings" 2022-08-17 18:37:46 +00:00
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
Weng Su
dc4ad09291 Show default data SIM in Wi-Fi details when dual SIMs have the same carrier ID
- Because the wifiConfiguration is only save the carrier ID for EAP-SIM authentication

- If multiple SIMs have the same carrier ID, the Wi-Fi framework will use the default data SIM for EAP-SIM authentication

- Show default data SIM in Wi-Fi details settings, when dual SIMs have the same carrier ID

Bug: 233765468
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiDetailPreferenceController2Test

Change-Id: I350fe637f506134770ccf316e47c0e225661bb6a
Merged-In: I350fe637f506134770ccf316e47c0e225661bb6a
2022-08-17 07:07:17 +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
Cole Faust
a21ac03acb Fix array-related errorprone warnings
The ArrayEquals, ArrayHashCode, ArrayToString, and
ArraysAsListPrimitiveArray errorprone findings were
demoted from errors to warnings. Fix existing
occurrences of them so they can be made errors again.

Bug: 242630963
Test: RUN_ERROR_PRONE=true m javac-check
Change-Id: Ida6513002f8fd845a385924be290b720f06c4748
2022-08-15 18:52:37 -07:00
Weng Su
911573f2e1 [RESTRICT AUTOMERGE] Show default data SIM in Wi-Fi details when dual SIMs have the same carrier ID
- Because the wifiConfiguration is only save the carrier ID for EAP-SIM authentication

- If multiple SIMs have the same carrier ID, the Wi-Fi framework will use the default data SIM for EAP-SIM authentication

- Show default data SIM in Wi-Fi details settings, when dual SIMs have the same carrier ID

Bug: 233765468
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiDetailPreferenceController2Test

Change-Id: I350fe637f506134770ccf316e47c0e225661bb6a
Merged-In: I350fe637f506134770ccf316e47c0e225661bb6a
(cherry picked from commit 2732be59e5)
2022-08-15 13:31:52 +00:00
Weng Su
028c8f3dbc Show one SIM only for EAP-SIM when dual SIMs have the same carrier ID
- Because the wifiConfiguration save the carrier ID only for EAP-SIM authentication

- If multiple SIMs have the same carrier ID, the Wi-Fi framework will use the default data SIM for EAP-SIM authentication

- To avoid user confusion, show one SIM only when dual SIMs have the same carrier ID

Bug: 233765468
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigController2Test

Change-Id: I56f956d20053d314f082ba185d661d8e0a0ef3cb
Merged-In: I56f956d20053d314f082ba185d661d8e0a0ef3cb
2022-08-15 13:25:47 +00:00
TreeHugger Robot
9178137457 Merge "Show default data SIM in Wi-Fi details when dual SIMs have the same carrier ID" 2022-08-12 05:31:38 +00:00
TreeHugger Robot
79bdae659c Merge "Wi-Fi panel doesn't need to check permission" into tm-qpr-dev am: 0077129094
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19590401

Change-Id: Ic53e1282db41bf8c8c66e8d750179189b3b1af1c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-12 02:46:52 +00:00
Tsung-Mao Fang
a71907e873 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 caller is set as 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 of list as our
calling package, then it could fail to pass
permission check since that package could not
a calling package.

In this cl, we skip permission check for those
packages running with system uid. So, it can resolve
this Wi-Fi Panel problem since Wi-Fi panel running
on settings process and also promise the security
issue at the same time.

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-11 12:21:08 +00:00
TreeHugger Robot
4ff741a059 Merge "Wi-Fi panel doesn't need to check permission" 2022-08-11 12:21:01 +00:00
Weng Su
2732be59e5 Show default data SIM in Wi-Fi details when dual SIMs have the same carrier ID
- Because the wifiConfiguration is only save the carrier ID for EAP-SIM authentication

- If multiple SIMs have the same carrier ID, the Wi-Fi framework will use the default data SIM for EAP-SIM authentication

- Show default data SIM in Wi-Fi details settings, when dual SIMs have the same carrier ID

Bug: 233765468
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiDetailPreferenceController2Test

Change-Id: I350fe637f506134770ccf316e47c0e225661bb6a
2022-08-11 17:51:51 +08:00
Tsung-Mao Fang
e1f72b7f3c 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 caller is set as 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 of list as our
calling package, then it could fail to pass
permission check since that package could not
a calling package.

In this cl, we skip permission check for those
packages running with system uid. So, it can resolve
this Wi-Fi Panel problem since Wi-Fi panel running
on settings process and also promise the security
issue at the same time.

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
2022-08-11 16:07:42 +08:00
Treehugger Robot
5e49a1ab34 Merge "Fix SIM name in Network Details to show the selected SIM." am: 3bd3f983bf am: 4967e754eb am: f6e91b15da am: 4cfe8b60be am: c00c4b0481
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2181975

Change-Id: Iee0132bdf56d518983c91ec9cf6d8d2727f7fe1f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-10 19:37:23 +00:00
Treehugger Robot
c00c4b0481 Merge "Fix SIM name in Network Details to show the selected SIM." am: 3bd3f983bf am: 4967e754eb am: f6e91b15da am: 4cfe8b60be
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2181975

Change-Id: I4882e86eb80eece523b22a0eb1fcccbd922a51e6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-10 19:04:41 +00:00
Treehugger Robot
4967e754eb Merge "Fix SIM name in Network Details to show the selected SIM." am: 3bd3f983bf
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2181975

Change-Id: Ie48078a7c33f40939b9d49140875ec7a02582ed3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-10 17:41:35 +00:00
Bruno Kremp
b204960ea4 Fix SIM name in Network Details to show the selected SIM.
When dual SIM cards with same Carrier Id inserted, authentication of
SIM base network is via default data SIM. However, SIM name shown in
Network Details is always the one inserted first.
Hence, make SIM name of default data SIM shown in Network Details
preferred to keep consistent with the one used for authentication.

Co-authored-by: Yibo Wang <yibo.x.wang@sony.com>

Test: manual test
Bug: 240732444
Change-Id: Ibd64189d6c25b5a64881a0ad9d40854df93481f4
2022-08-10 15:09:49 +02:00
Weng Su
66922f4870 Show one SIM only for EAP-SIM when dual SIMs have the same carrier ID
- Because the wifiConfiguration save the carrier ID only for EAP-SIM authentication

- If multiple SIMs have the same carrier ID, the Wi-Fi framework will use the default data SIM for EAP-SIM authentication

- To avoid user confusion, show one SIM only when dual SIMs have the same carrier ID

Bug: 233765468
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigController2Test

Change-Id: I56f956d20053d314f082ba185d661d8e0a0ef3cb
2022-08-03 03:33:00 +00:00
Weng Su
0553d8fbe5 Merge "Restrict WifiScanModeActivity for guest user" into tm-qpr-dev am: b4ad581fe7 am: 17070ee0c4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19394734

Change-Id: I505207cbd0ea7250583416c7fdfd898de6175948
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-27 04:53:46 +00:00
Weng Su
17070ee0c4 Merge "Restrict WifiScanModeActivity for guest user" into tm-qpr-dev am: b4ad581fe7
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19394734

Change-Id: If5fbf81277d74626b246338d0e9f3d010805262f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-27 04:42:53 +00:00
Weng Su
8b1e21f929 Restrict WifiScanModeActivity for guest user
- Don't show WifiScanModeActivity if the user is a guest.

Bug: 235601169
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiScanModeActivityTest

Change-Id: I8f1d162d9b15116c3deb3656b9af6851d4514947
2022-07-26 01:48:16 +08:00
TreeHugger Robot
42c02ad936 Merge "Prevent leaking Wi-Fi dialog on lock screen" into tm-qpr-dev am: bd41fe5a5b am: 3d6b632232
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19207636

Change-Id: I66292ce19a0616253ec8f23a185d34aa7a03a977
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 20:24:42 +00:00
TreeHugger Robot
3d6b632232 Merge "Prevent leaking Wi-Fi dialog on lock screen" into tm-qpr-dev am: bd41fe5a5b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19207636

Change-Id: I8ea19a4c48286a2185450116f06a3314087c5be8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 17:21:39 +00:00
TreeHugger Robot
bd41fe5a5b Merge "Prevent leaking Wi-Fi dialog on lock screen" into tm-qpr-dev 2022-07-19 17:02:10 +00:00
Weng Su
be23c28ff2 Prevent leaking Wi-Fi dialog on lock screen
- The Wi-Fi dialog is designed to be displayed on the system UI

- Dismiss Wi-Fi dialog to prevent leaking user data on lock screen

Bug: 231583603
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiDialogActivityTest

Change-Id: Ie67ff1138ffeddd3e358331d8cef61e0629173e2
2022-07-08 05:43:10 +08:00
TreeHugger Robot
98c4b64d1b Merge "Ignore CRLF strings in display SSIDs to avoid display errors" into tm-qpr-dev am: 9447ec6d81 am: 7bdfb34b7b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19168028

Change-Id: I7b9204f3ae765b442f8dbedaac102a4fd9bc2846
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-06 20:08:39 +00:00
TreeHugger Robot
7bdfb34b7b Merge "Ignore CRLF strings in display SSIDs to avoid display errors" into tm-qpr-dev am: 9447ec6d81
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19168028

Change-Id: I37125c165dbb9d48d672666512faec8248bce5d2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-06 19:49:52 +00:00
Weng Su
08adf4c2ed Ignore CRLF strings in display SSIDs to avoid display errors
- Keep user-entered SSIDs in Wi-Fi Configuration

- Ignore CRLF strings in display SSIDs only

Bug: 224545390
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=AddAppNetworksFragmentTest

Change-Id: Ifc081f9c5c02b2d70412f296688b88e44e893add
2022-07-05 03:18:26 +08:00
TreeHugger Robot
0aaeabdfc0 Merge "Restrict AddAppNetworksActivity for guest user" into tm-qpr-dev am: 2d0e1dc725 am: 3997ccc2ee
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18910990

Change-Id: I7d9d027fa54ba90b7a5c4a290a168de01496e063
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-21 17:26:16 +00:00
TreeHugger Robot
3997ccc2ee Merge "Restrict AddAppNetworksActivity for guest user" into tm-qpr-dev am: 2d0e1dc725
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18910990

Change-Id: Iac11c8a9834528d81cb757a85a5bcaed7c8b8035
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-21 17:06:42 +00:00
TreeHugger Robot
2d0e1dc725 Merge "Restrict AddAppNetworksActivity for guest user" into tm-qpr-dev 2022-06-21 17:04:33 +00:00
Xin Li
a258d7760f Merge "Merge Android 12 QPR 3" 2022-06-16 18:51:54 +00:00
Treehugger Robot
f2cbfafb57 Merge "Keep setting of "TurnOff hotspot automatically" when AP is changed" am: 79e1afbdfa am: bef728d2ff am: 3682ed9fca am: 5b27a4e24c am: 6d36425f67
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2123300

Change-Id: I9369175ae744f146b41454e9835007664eb5296c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-15 19:24:44 +00:00
Treehugger Robot
6d36425f67 Merge "Keep setting of "TurnOff hotspot automatically" when AP is changed" am: 79e1afbdfa am: bef728d2ff am: 3682ed9fca am: 5b27a4e24c
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2123300

Change-Id: I824b13f157033e6ede667010936cb607205fe7eb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-15 18:47:19 +00:00
Treehugger Robot
3682ed9fca Merge "Keep setting of "TurnOff hotspot automatically" when AP is changed" am: 79e1afbdfa am: bef728d2ff
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2123300

Change-Id: Iff5656052d729efb83a1947ecfd2393e87c9460a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-15 17:54:52 +00:00
Treehugger Robot
bef728d2ff Merge "Keep setting of "TurnOff hotspot automatically" when AP is changed" am: 79e1afbdfa
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2123300

Change-Id: Icf6b8698aa4f01e89076fc0566f5d71ef35c1742
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-15 17:35:36 +00:00
Weng Su
10aac24e9b Merge "Restrict WifiSlice functionality for guest user" into tm-qpr-dev am: 1c25ce1937 am: cf7d2ef87c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18802566

Change-Id: Idc60ceaab8bb124064b9c4dbb46c650a53d47990
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-15 16:54:32 +00:00
TreeHugger Robot
28fc41c411 Merge "Restrict guest user to configure WiFi by QR code" into tm-qpr-dev am: cc0754b416 am: 6da32e8c5c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18869535

Change-Id: I48c23041bbe828678b6f179312ace6d920bb03f7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-15 16:53:33 +00:00
Weng Su
1c25ce1937 Merge "Restrict WifiSlice functionality for guest user" into tm-qpr-dev 2022-06-15 16:40:03 +00:00
Weng Su
f53f3e6e41 Restrict AddAppNetworksActivity for guest user
- Don't show AddAppNetworksActivity if the user is a guest.

Bug: 224772678
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=AddAppNetworksActivityTest

Change-Id: I17571905f1c4a38db884e6d0523b7f8d668df607
2022-06-16 00:33:07 +08:00
Bruno Kremp
b16ac39ee1 Keep setting of "TurnOff hotspot automatically" when AP is changed
When AP config is changed, setting of "TurnOff hotspot automatically"
will be reset to default. Hence keep the setting when AP config changed.
Keep setting of whether auto shut down is enabled when AP
config changed.

Co-authored-by: Fangxiao Cao <fangxiao.x.cao@sony.com>

Test: manual test
Bug: 235370570
Change-Id: Ibd3d59b6a86edaf1253a2c9b035576e60a7beb96
2022-06-15 09:20:18 +02:00
Weng Su
a8ccc3456c Restrict guest user to configure WiFi by QR code
- Don't show WifiDppConfiguratorActivity if the user is a guest.

Bug: 224772890
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiDppConfiguratorActivityTest

Change-Id: I160761edfe2893475676421ba2b59205da8d0224
2022-06-14 01:20:54 +08:00
Weng Su
5f421125ab Restrict WifiSlice functionality for guest user
- Hide Wi-Fi toggle and show Wi-Fi status only if the user is a guest.

Bug: 232798363
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiSliceTest

Change-Id: I35418477808eb5082f4651f5689f018dbb8e42ac
2022-06-09 06:07:55 +08:00
TreeHugger Robot
193f799f88 Merge "Restrict guest user to configure WiFi access points" into tm-qpr-dev am: 909b62ffa4 am: 0b79b0831d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18740330

Change-Id: I241fe9546575df2d978a360f906116feffd50de7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-07 18:53:53 +00:00
TreeHugger Robot
909b62ffa4 Merge "Restrict guest user to configure WiFi access points" into tm-qpr-dev 2022-06-07 18:16:32 +00:00
TreeHugger Robot
11ee77a30e Merge "Restrict network preferences settings" into tm-qpr-dev am: 5afb322f3a am: 2f7607e362
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18702206

Change-Id: I07b1471f3b827fa18f8aa224386b72b1f55b1c3d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-06 22:45:02 +00:00
Weng Su
a09c33f49c Restrict guest user to configure WiFi access points
- If the user is not allowed to configure Wi-Fi access points, close WifiDialogActivity.

Bug: 226133034
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiDialogActivityTest

Change-Id: I32d0c5beceb8a140a98636a5a0af97790495620d
2022-06-07 03:30:01 +08:00
Weng Su
1f0689f73c Restrict network preferences settings
- Show a restriction message if the malware enforces the network preference settings

- Remove settings search index if the network preference settings is restricted

Bug: 231987122
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=ConfigureWifiSettingsTest

Change-Id: I998aa084d47d556d1eeddcec8c6bb5f1d9a8f6e7
2022-06-02 04:50:33 +08: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
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