Commit Graph

2481 Commits

Author SHA1 Message Date
Zoey Chen
31a3bd2e03 [Settings] Change the way in MobileNetworkListFragment for getting the subscription info from room db part3
Bug: 254405469
Test: atest NetworkProviderDownloadedSimListControllerTest, atest NetworkProviderSimListControllerTest
Change-Id: Iec6e17688b260d2fef464a711f92e788fe76fbe7
2022-10-26 12:28:10 +00:00
Ling Ma
1cbf8c786a Merge "Convert dataDuringCall to autoDataSWitch" 2022-10-25 23:36:43 +00:00
Bonian Chen
71db4e8732 Merge "[Settings] configuration for hidding SIM remove UI" 2022-10-21 13:29:18 +00:00
Bonian Chen
210fba096f Merge "[Settings] configuration for hidding SIM provider UI" 2022-10-21 13:29:18 +00:00
Bonian Chen
d07157691e Merge "[Settings] configuration for hidding SIM settings UI" 2022-10-21 13:29:18 +00:00
Bonian Chen
a4aca19f8f Merge "[Settings] configuration for hidding SIM related UI" 2022-10-21 13:29:18 +00:00
Bonian Chen
5dae24208b [Settings] configuration for hidding SIM related UI
Add overriable configuration for hidding SIM related UI.

Bug: 240515161
Test: test cases and local testing
Change-Id: I8d7ddd18861a696830da39f040dfb14b9ed46726
2022-10-21 09:21:59 +00:00
Treehugger Robot
b267f66627 Merge "network: fix binder object leakage in settings" am: bdcd3a3975 am: 5408baabdd am: 00f25b5d5f
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2136792

Change-Id: I344cc9da6dfbb456c258ea96d9d9b47a5dac67d3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-21 05:07:24 +00:00
Treehugger Robot
00f25b5d5f Merge "network: fix binder object leakage in settings" am: bdcd3a3975 am: 5408baabdd
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2136792

Change-Id: Ic7d0893d3c7793f000db51183cbce0ad49765805
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-21 04:34:57 +00:00
Treehugger Robot
5408baabdd Merge "network: fix binder object leakage in settings" am: bdcd3a3975
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2136792

Change-Id: I141693097ed912ff223b3be3fa997a51b6713ecd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-21 03:52:48 +00:00
Bonian Chen
2f07595eb0 [Settings] configuration for hidding SIM provider UI
Hide SIM provider UI based on configuraion.

Bug: 240515161
Test: test cases and local testing
Change-Id: I1cb83787dc1ac1d61bb6bed6aa9c5e7a3ad6e69b
2022-10-20 11:35:28 +00:00
Bonian Chen
69f6e76f2c [Settings] configuration for hidding SIM remove UI
Hide SIM remove UI based on configuraion.

Bug: 240515161
Test: test cases and local testing
Change-Id: Iea40b89733cc75a41f960fecb2ac24177a4cbd3d
2022-10-20 09:59:01 +00:00
Bonian Chen
5bcfa284a9 [Settings] configuration for hidding SIM settings UI
Hide SIM settings UI based on configuraion.

Bug: 240515161
Test: test cases and local testing
Change-Id: If1df99a79e51125d03f534cdfc9408b01c61024f
2022-10-20 09:46:44 +00:00
Jason Huang
2bb35ff3fc network: fix binder object leakage in settings
Summary:
When BT ON and enter into NetworkDashboardFragment, and turning BT OFF and exiting the fragment, the `BluetoothAdapter.closeProfileProxy(BluetoothProfile.PAN)` will not be called.
This causes binder leakage on next time the NetworkDashboardFragment is entered, until killing Settings process.

Reproduce Steps:
1. Turn BT ON
2. Open Settings process
3. Enter "Network & internet" (NetworkDashboardFragment)
4. Turn BT OFF
5. Back to previous page (do not kill Settings process)
* Repeat Step 3-5

Solution:
Do not set value of `mBluetoothPan` to null when `onServiceDisconnected` raised, to ensure the binder object (profile proxy) be closed in lifecycle `onDestroy()`.

Bug: 243128377
Test: enter "Network & internet" page, turn off BT and leave the page
Change-Id: Ieca3e5401c23d1b0ffece1bbb0db96988044262d
2022-10-19 22:07:55 +08:00
Zoey Chen
ced43b33f2 Merge "[Settings] Change the way in NetworkProviderCallsSmsController for getting the subscription info from room db part2" 2022-10-19 04:29:21 +00:00
SongFerng Wang
0693ac7282 Merge "[MEP] the user can't enable the psim when revmovable esim is enabled" into tm-qpr-dev am: 2cd07f51ef am: bd476febf0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20116277

Change-Id: I932293c24499b93666686f47907244f8a472243c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-18 07:20:43 +00:00
SongFerng Wang
bd476febf0 Merge "[MEP] the user can't enable the psim when revmovable esim is enabled" into tm-qpr-dev am: 2cd07f51ef
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20116277

Change-Id: Ib62e9adf0e2bdac25821c9f70634c27b26515056
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-18 06:50:09 +00:00
SongFerng Wang
2cd07f51ef Merge "[MEP] the user can't enable the psim when revmovable esim is enabled" into tm-qpr-dev 2022-10-18 06:30:34 +00:00
Zoey Chen
605754eff3 [Settings] Change the way in NetworkProviderCallsSmsController for getting the subscription info from room db part2
Bug: 236919685
Test: atest NetworkProviderCallsSmsControllerTest
Change-Id: Ibbfa1fed15ea4fa38cff38d78855326e3d74fe0e
2022-10-18 06:14:54 +00:00
Ling Ma
4e7f783906 Convert dataDuringCall to autoDataSWitch
The feature is enabled via
TelephonyManager.MOBILE_DATA_POLICY_AUTO_DATA_SWITCH. The feature only
applies to non-DDS. If enabled, we automatically switch to the non-DDS for data traffic when it has better availability than the DDS.

The UI change are(as required by b/247880971):
1. data during call is replaced by auto data switch, and moved under
   mobile data toggle.
2. Network & internet and Internet page now show the currently active
   subscription, instead of the defalut subscription. If the currently
   active sub is not the default, it's reflected in summary as
   "temporarily".

Test: manual
Bug: 244064524
Change-Id: Ica1eba99cee0d4af528d58f1c7bd1439400bfa66
2022-10-14 13:23:08 -07:00
Zoey Chen
a87affdb82 [Settings] Change the way in MobileNetworkSummaryController for getting the subscription info from room db
Bug: 236919685
Test: make RunSettingsRoboTests ROBOTEST_FILTER=MobileNetworkSummaryControllerTest
Change-Id: If417b792224261ad1965196d3675f28f55448fd6
2022-10-14 12:19:16 +00:00
SongFerngWang
c27b674e38 [MEP] the user can't enable the psim when revmovable esim is enabled
The isRemovableSimEnabled method at ToggleSubscriptionDialogActivity
UI is for psim, not esim. It should skip the revmovable esim slot.

Bug: 251384644
Test: build pass. atest UiccSlotUtilTest
Change-Id: I11d0f9528961ec5e47cd8682cf9b6bb988a5700f
2022-10-11 18:48:36 +08:00
SongFerng Wang
bd131dafc2 Merge "[MEP] psim->esim, don't skip carrierConfigChanged with subId -1" into tm-qpr-dev am: da58404ea6 am: 97d375875a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20064005

Change-Id: Ie22a7f98e2c52bcf03acdc5910cbdd762f5bba84
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-07 14:42:32 +00:00
SongFerng Wang
97d375875a Merge "[MEP] psim->esim, don't skip carrierConfigChanged with subId -1" into tm-qpr-dev am: da58404ea6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20064005

Change-Id: Id8b05f8faaadee52922e785b6e15c40eb1dd12de
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-07 14:09:58 +00:00
SongFerng Wang
da58404ea6 Merge "[MEP] psim->esim, don't skip carrierConfigChanged with subId -1" into tm-qpr-dev 2022-10-07 11:04:22 +00:00
Zoey Chen
67ad5a31d7 [Settings] Add the repository for room database
Bug: 236919685
Test: manual
Change-Id: I7f32e4eb6a976091e285ef43abcd45a9d16a6ca9
2022-10-05 17:16:41 +00:00
Joonhun Shin
23f15f80e1 Merge "changed return value METRICS_CATEGORY_UNKNOWN to SETTINGS_CONTACT_DISCOVERY" 2022-09-30 05:14:41 +00:00
SongFerngWang
078ecbd765 [MEP] psim->esim, don't skip carrierConfigChanged with subId -1
After simSlotMapping from psim to esim, since the esim can not be
enabled by the modem, the UI start to enable the esim. Therefore,
when receiver receive the first carrier config changed, UI can
exit waiting state, and then start to enable esim.

Bug: 246556280
Test: Build pass. Verify by QA
Change-Id: I4b8b2f3d1dd014fc1ddb92ebffa614d6daf9d142
2022-09-29 17:46:24 +08:00
TreeHugger Robot
e7e1f37321 Merge "Restrict Wi-Fi configuration if settings UI is restricted" into tm-qpr-dev am: ee21072a5e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20063305

Change-Id: I3e4661df4a20415b44390eb6484811e3073e9f58
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-28 17:32:08 +00:00
Weng Su
6629b12a08 Restrict Wi-Fi configuration if settings UI is restricted
- Don't launch W-Fi configuration settings if the settings UI is restricted (including guest users).

Bug: 246301667
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=NetworkProviderSettingsTest

Merged-In: Id82498f41765f955e01bb311bb221d26f9574f31
Change-Id: Id82498f41765f955e01bb311bb221d26f9574f31
(cherry picked from commit aaa65fc6f0)
2022-09-27 14:31:09 +00:00
TreeHugger Robot
934dfd746d Merge "Restrict Wi-Fi configuration if settings UI is restricted" 2022-09-27 07:50:15 +00:00
TreeHugger Robot
ce71a7bba1 Merge "Separate Tether summary "Off" to dedicated string ID" 2022-09-27 07:44:19 +00:00
Weng Su
aaa65fc6f0 Restrict Wi-Fi configuration if settings UI is restricted
- Don't launch W-Fi configuration settings if the settings UI is restricted (including guest users).

Bug: 246301667
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=NetworkProviderSettingsTest

Change-Id: Id82498f41765f955e01bb311bb221d26f9574f31
2022-09-26 03:35:12 +08:00
Weng Su
d0cd5492e4 Separate Tether summary "Off" to dedicated string ID
- Separate Tether summary "Off" to dedicated string ID for special language translation

Bug: 228573128
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=TetherPreferenceControllerTest

Change-Id: I0615eb03d6329ef73b714af39e78836ae17ea408
2022-09-24 23:03:53 +08:00
Tom Hsu
f2a63608ba Merge "[Settings] Update UI when bluetooth connection is down." am: 8a9dc9ca90 am: 7e610abd3c am: 7c813dced4 am: 1a4f16cd70 am: db0ec844f2
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2225845

Change-Id: I399a80e1e609a14c2f6c821e8e3df36fa8983dc2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-23 17:12:22 +00:00
Tom Hsu
db0ec844f2 Merge "[Settings] Update UI when bluetooth connection is down." am: 8a9dc9ca90 am: 7e610abd3c am: 7c813dced4 am: 1a4f16cd70
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2225845

Change-Id: Idc4f0c59df19b6f0cc9a8a1db70ba546f12fafaf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-23 08:40:25 +00:00
Tom Hsu
1a4f16cd70 Merge "[Settings] Update UI when bluetooth connection is down." am: 8a9dc9ca90 am: 7e610abd3c am: 7c813dced4
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2225845

Change-Id: Iaccb8b8c54a5f84ed3ca6fec869ba0153f4eb623
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-23 07:59:37 +00:00
tom hsu
3d138b372b [Settings] Update UI when bluetooth connection is down.
- When Airplane mode on, all connection shall be disconnected. In
   current design, when bluebooth disconnected, network page in Settings
   does not udpate the UI.

Bug: b/246925011
Test: Maunal
Change-Id: I1bf56e96737157d8e76057028b22e94e0e8d76e4
2022-09-22 19:34:35 +08:00
joonhunshin
793f5d0a79 changed return value METRICS_CATEGORY_UNKNOWN to SETTINGS_CONTACT_DISCOVERY
return SETTINGS_CONTACT_DISCOVERY for getMetricsCategory() instead of METRICS_CATEGORY_UNKNOWN

Bug: 246514073
Test: atest ContactDiscoveryDialogFragmentTest
Change-Id: I2b1512543254641f598727ae9af2a5e989bb3df7
2022-09-21 00:46:34 +00:00
Bonian Chen
78d6c6596e [Settings] Remove unreferenced method
Remove unreferenced method.

Bug: 247783516
Change-Id: I96c04d6cda3478e843134f43119f1ad7d62877a2
Test: build pass
2022-09-20 15:02:34 +00:00
Chaohui Wang
7ef27fbe85 Clean up some UnusedResources detected by lint 4
Bug: 234570979
Test: Manual with Settings App
Change-Id: Icc21ef3bedc7a39e7841271f51b77e9b543f6f0f
2022-09-13 20:00:38 +08:00
Rambo Wang
145c954a33 Hide roaming option when carriers force all networks as HOME networks
This change will hide roaming option in carrier's network setting
if the carrier overrrides the carrier config force_home_network_bool
to true.

Some carriers, like google Fi, has no concept of roaming. The carrier
config force_home_network_bool is overridden to true to treat all
cellular networks as home networks. There is no actually impact when
user turn on/off the roaming option in network setting. Leaving an
unused option just confuse many end users.

Bug: 79424760
Test: make && make RunSettingsRoboTests
Test: activate Fi service and make sure no roaming option
Test: activate VZW service and make sure roaming option is present
Test: override the cc config with adb command to make sure the roaming
option is always correctly shown/hidden on the cc key values

Change-Id: If6d0f7e3a5edea368b3a725afd9a2b4d1ad686ed
2022-09-09 12:28:40 -05: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
Bonian Chen
6af2fb8578 Merge "[Settings] Not allow APN delete when adding is not an option" into tm-d1-dev am: 45051bb169
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19746893

Change-Id: If948deb5fc93c3654e474bd4d4d588859affbfa6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-27 04:12:07 +00:00
TreeHugger Robot
66a56fdd37 Merge "Remove duplicate strings." 2022-08-26 17:52:54 +00:00
Bonian Chen
06664b8c37 Merge "[Settings] Not allow APN delete when adding is not an option" into tm-qpr-dev am: d2644b4ea9 am: 90a36213bb
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19739248

Change-Id: Ibf866ba9ee70e2ada74c283f5e079d2136a61173
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-26 11:36:54 +00:00
Bonian Chen
90a36213bb Merge "[Settings] Not allow APN delete when adding is not an option" into tm-qpr-dev am: d2644b4ea9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19739248

Change-Id: Id550ed73ab4e6dd7c01504eaf315de23598aff01
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-26 11:17:02 +00:00
Bonian Chen
8c6c1ca236 [Settings] Not allow APN delete when adding is not an option
When not allowing APN to add, user may not be able to recover easily
when delete it.

Therefore, avoid from APN to be deleted when adding is not allowed.

Bug: 243664439
Bug: 200875858
Test: local, robolectric
Change-Id: I5cf984000244b4ad901c6a4977a1368279323e0a
2022-08-26 08:52:42 +00:00
Bonian Chen
9202260a42 [Settings] Not allow APN delete when adding is not an option
When not allowing APN to add, user may not be able to recover easily
when delete it.

Therefore, avoid from APN to be deleted when adding is not allowed.

Bug: 200875858
Test: local, robolectric
Change-Id: I5cf984000244b4ad901c6a4977a1368279323e0a
2022-08-26 08:50:51 +00: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