Commit Graph

1698 Commits

Author SHA1 Message Date
Jeremy Goldman
2fb7e1bbc4 Return mapping of subscription id to unique display name.
Fallback 1: if display names are the same, use the last 4 digits of a
phone number
Fallback 2: if the phone number cannot be displayed or the last 4 digits
are identical, fallback to use the subscription id

This function depends on DeviceInfoUtils for the phone number
formatting. Because DeviceInfoUtils is within SettingsLib, this function
(at least for now) is located within the Settings codebase itself.

go/unique-sub-display-names

Bug: 148303118
Bug: 150370656
Test: atest -c SubscriptionUtilTest
Change-Id: Id3e26254d4b193c13506df52fb59e97643df7a32
2021-01-13 16:18:00 +08:00
Jeremy Goldman
4efd9e6477 Merge "EuiccOperationSidecar PendingIntent includes Immutable flag." 2021-01-12 12:16:13 +00:00
Jeremy Goldman
ad83060bd9 MobileDataSlice PendingIntents include an immutable flag
Bug: 172209293
Test: atest SettingsUnitTests
Change-Id: Ie71e104ca9ff3dff1d347178381656046d6068d7
2021-01-12 16:52:24 +08:00
Jeremy Goldman
af60e537f4 EuiccOperationSidecar PendingIntent includes Immutable flag.
Bug: 172206956
Test: atest SettingsUnitTests
Change-Id: I8378746660777082d714ace21d9a459775fefc95
2021-01-12 16:45:26 +08:00
TreeHugger Robot
b63f537238 Merge changes from topic "settings_collapsing_toolbar"
* changes:
  Disable the title of mobile network
  Add CollapsingToolbarLayout for sub settings
2021-01-12 02:14:38 +00:00
Mill Chen
82df7e60a1 Disable the title of mobile network
After the collapsing toolbar layout is applied to subsetting pages, the
mobile network page has two title shown currently. One is the activity
title while the other is the collapsing toolbar title To make sure
there will be only one title shown on this page, the activity title will
be removed and we will keep the collapsing toolbar title.

Bug: 176899590
Test: manual test and visual verified
1) Navigate to Settings -> Network & internet -> Mobile network
2) Check if there's only one title in this page

Change-Id: I50e57468c640f1d176fd99dcaafc06ed3fc601dc
2021-01-11 18:31:26 +08:00
Ashwini Oruganti
2f349da025 Bulk apply PendingIntent.FLAG_MUTABLE_UNAUDITED.
We've been working hard to require PendingIntents explicitly declare
if they allow their contents to be mutated or not, and to finish
landing that work this change applies the new FLAG_MUTABLE_UNAUDITED
flag to all remaining code locations until they can be manually
inspected.

Bug: 160794467
Test: manual
Change-Id: I7b9ef5dcd35187facef1ec424589b81f834f23c0
2021-01-08 13:14:05 -08:00
TreeHugger Robot
b7076d5d5e Merge "[Provider Model] Implement the carrner network selection settings" 2021-01-06 14:25:46 +00:00
TreeHugger Robot
e0f2957e49 Merge "[Provider Model] Internet Panel UI update" 2021-01-06 06:55:24 +00:00
Weng Su
e9f4928ef1 [Provider Model] Internet Panel UI update
- Add gear icon to connected non-carrier network

- Update "View airplane mode networks" wording

- Update "Turn off airplane mode" wording

- Check WiFi disable to show airplane mode message

- Screenshot
  https://screenshot.googleplex.com/BRjcKyMaMS4ujYN

Bug: 173413889
Test:
- Manual Test
- adb shell am start -a
android.settings.panel.action.INTERNET_CONNECTIVITY

Change-Id: Icf7b77e514cffa68cf103dbc9e7df93d58f9f762
2021-01-06 02:11:46 +00:00
Weng Su
5e76c02d82 [Provider Model] Implement the carrner network selection settings
- Add WifiPickerTrackerHelper to reuse the library

- User taps on carrier network preference
  - Calls MergedCarrierEntry#connect()

- User toggles mobile data On/Off
  - Calls MergedCarrierEntry#setEnabled(true/false)

Bug: 175761096
Test:
- Manual Test
- atest NetworkMobileProviderControllerTest \
        SubscriptionsPreferenceControllerTest \
        WifiPickerTrackerHelperTest

Change-Id: Ia311b10ca7a44a536556c1889ee65743af379822
2021-01-05 15:05:24 +00:00
SongFerngWang
114b6c496e Change provider model slice's wording
Bug: 176457592
Test: Build pass and manual test(review UI wording)
Change-Id: I66361cc6830aea96c55cdef737a9c5c3b8bd1b47
2021-01-05 12:25:45 +08:00
Tom Hsu
36ecdd496c Merge "[Provider model] Internet picker Part II" 2020-12-29 14:23:14 +00:00
Weng Su
8b1989cdcc Merge "[Provider Model] Implement the carrner network selection" 2020-12-29 13:13:16 +00:00
tom hsu
65f8aa2f7b [Provider model] Internet picker Part II
- Add mobile internet preference with default data subscription.
 - Make prefrence to show dynamically when data subscription changed.

Video exhibition
 - http://rcll/gcmsphfhJ1UzfPSvjWOuXK/c1B2CtaFz27rlIQ2LSTJmo

Code difference
 - SubscriptionsPreferenceControllerTest.java between robolectric and junit.
  - https://diff.googleplex.com/#key=1Zm7JGPhoZwY

Bug: 172229552
Test: atest SubscriptionsPreferenceControllerTest

Change-Id: Ib50c2c51159f60f19631d1a02081eafde3436e94
2020-12-29 19:48:21 +08:00
Chiachang Wang
283136fb24 Merge "Update getMobileProvisioningUrl to telephony surface" am: 6aef579198 am: 85b853725d am: e3b7c01f9a
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1532063

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2430c5b1fb40bdf89461c535a0fef85eb911b7ea
2020-12-29 01:23:41 +00:00
Chiachang Wang
e3b7c01f9a Merge "Update getMobileProvisioningUrl to telephony surface" am: 6aef579198 am: 85b853725d
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1532063

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I530eff9d77629af47e4f8da2ad660aab7f3431f3
2020-12-29 01:01:04 +00:00
Chiachang Wang
6aef579198 Merge "Update getMobileProvisioningUrl to telephony surface" 2020-12-29 00:24:12 +00:00
Weng Su
74b18587fb [Provider Model] Implement the carrner network selection
- Add primaryAction for connecting carrier network

- User toggles carrier network On/Off
  - Calls MergedCarrierEntry#setEnabled(true/false)

- User taps on carrier network
  - Calls MergedCarrierEntry#connect()

Bug: 175761096
Test:
- Manual Test
- atest ProviderModelSliceTest
- atest ProviderModelSliceHelperTest
- make RunSettingsRoboTests ROBOTEST_FILTER=WifiScanWorkerTest

Change-Id: I07cb6c142a2f4e9cbdbab1f77afdc367728b4e3f
2020-12-28 13:23:24 +00:00
SongFerng Wang
a12003a9ac Merge changes from topic "Slice of Provider Model"
* changes:
  Slice of Provider Model: add slice structure
  The helper for slice of carrier and non-Carrier, used by ProviderModelSlice.
2020-12-23 18:47:15 +00:00
SongFerngWang
8cad0197bd Slice of Provider Model: add slice structure
Implement a slice which can show/update carrier networks.
Before and after: go/b173971144screenshot

Bug: 173971144
Test: atest NetworkProviderWorkerTest  (PASS)
atest ProviderModelSliceTest  (PASS)

Change-Id: I3f0dab364c88723ef3185a2ff040b1fbd1b099f4
2020-12-23 17:47:45 +08:00
Remi NGUYEN VAN
af1fbb77e3 Merge "Replace isWeaklyValidatedHostname with guava" am: 5cadac06b9 am: 1a57bfefb2 am: 82b5aac768
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1512667

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4ad565433a6a167d658cb92b3977e5700dac840b
2020-12-23 02:22:35 +00:00
Remi NGUYEN VAN
82b5aac768 Merge "Replace isWeaklyValidatedHostname with guava" am: 5cadac06b9 am: 1a57bfefb2
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1512667

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0d47ad22bfa3c226a6a61cb953aac104dabf4ccf
2020-12-23 02:07:04 +00:00
Chiachang Wang
195a75e47e Update getMobileProvisioningUrl to telephony surface
ConnectivityService is going to become mainline and can not
access hidden APIs. The mobile provisioning url is used by
telephony and it will use the hidden xml parsing APIs. It also
would make more sense to have the parsing inside telephony code.
Thus, move getMobileProvisioningUrl parsing to telephony surface
from ConnectivitySerivce and update the corresponding callers.

Bug: 175177794
Test: m and verify the url could be read successfully from the
      telephony surface
Change-Id: Ie8b46bc9b652f926277b10e36a86adba4dbd0121
2020-12-23 02:06:24 +00:00
Remi NGUYEN VAN
5cadac06b9 Merge "Replace isWeaklyValidatedHostname with guava" 2020-12-23 01:19:27 +00:00
SongFerngWang
a97b4faa67 The helper for slice of carrier and non-Carrier, used by ProviderModelSlice.
create a helper file.
create a res/drawable/ic_signal_strength_zero_bar_no_internet.xml
create string at res/values/strings.xml

Bug: 173971144
Test: atest ProviderModelSliceHelperTest
Change-Id: I7f63a6b04784325989e776cb140017314ebde4ce
2020-12-22 21:50:40 +08:00
Allen Su
fc41649147 Merge "Change carrier config" am: ba38382627 am: 3d9ede1815 am: 034b2236dd
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1512649

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I88fcda205e510641bc718d25b7f580e1c2d18648
2020-12-22 07:16:06 +00:00
Allen Su
034b2236dd Merge "Change carrier config" am: ba38382627 am: 3d9ede1815
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1512649

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I521b6e79f50ac9b7a6b5ecb72a6e4d8ad0a580dc
2020-12-22 01:35:07 +00:00
Allen Su
ba38382627 Merge "Change carrier config" 2020-12-22 00:26:52 +00:00
Jeremy Goldman
7d5483f6d7 Merge "Enhanced4gLteSliceHelper specifies immutable intent" 2020-12-21 07:25:30 +00:00
Jeremy Goldman
50dd14d111 Enhanced4gLteSliceHelper specifies immutable intent
Bug: 172812686
Fixes: 172207848
Test: atest -c Enhanced4gLteSliceHelperTest
Change-Id: I1bfac82e3ce5c66639465befb0517839fb55415e
2020-12-21 05:41:01 +00:00
Bonian Chen
bb5688ea22 Merge changes from topic "eSIM with same group UUID" into rvc-qpr-dev am: 0968b8603e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13241064

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I104ea3e6ace5e0d3fbe80d62e835d2fa986b852b
2020-12-17 15:52:05 +00:00
Bonian Chen
4ea9c2d6a5 [Settings] Only display 1 SIM UI when multiple with same group UUID am: 150eb72a81
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13209427

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ide453d4b8f1a2b40057804fa1bb47705c05dbf86
2020-12-17 15:52:03 +00:00
Bonian Chen
c2232020c4 [Settings] code refactor - rename isSubscriptionCanBeDisplayed
canSubscriptionBeDisplayed is more readable.

Reasonale:
When cherry-picking ag/12886476 into Android R branch (ag/13209427), a comment from code reviewer suggested this change.
Since ag/12886476 has been merged for a while, another patch for it is perferred option when comparing with reverting that CL and resubmit it.

Bug: 175830728
Change-Id: Ie91eb82504fd7cff6671803a2bc2560139690952
Test: build pass
Merged-In: Ie91eb82504fd7cff6671803a2bc2560139690952
2020-12-17 03:04:50 +00:00
Bonian Chen
79b8ce0212 [Settings] code refactor - rename isSubscriptionCanBeDisplayed
canSubscriptionBeDisplayed is more readable.

Reasonale:
When cherry-picking ag/12886476 into Android R branch (ag/13209427), a comment from code reviewer suggested this change.
Since ag/12886476 has been merged for a while, another patch for it is perferred option when comparing with reverting that CL and resubmit it.

Bug: 175830728
Change-Id: Ie91eb82504fd7cff6671803a2bc2560139690952
Test: build pass
2020-12-17 03:04:24 +00:00
Bonian Chen
150eb72a81 [Settings] Only display 1 SIM UI when multiple with same group UUID
Some carrier(s) expand their service through providing eSIM in companion
with pSIM. Group UUID is designed to group them together as a single
SIM.

Bug: 169455114
Bug: 175069803
Test: make RunSettingsRoboTests ROBOTEST_FILTER=SubscriptionsPreferenceControllerTest
Change-Id: I0934a45a2917ab106627c733162efbee9a13f216
(cherry picked from commit a6b249d625)
Merged-In: I0934a45a2917ab106627c733162efbee9a13f216
2020-12-17 02:12:44 +00:00
Peter Wang
5eb94b4a00 Merge "Added an option in reset menu in Settings to enable resetting Euicc data only" 2020-12-16 20:03:25 +00:00
Peter Wang
ecd856eeeb Added an option in reset menu in Settings to enable resetting Euicc data
only

Bug: 159650638
Fix: 159650638
Test: Local
Change-Id: Ia260b47a4dd0ddf0363740891b5e1d818c8631b7
2020-12-15 18:27:34 -08:00
Jiashen Wang
881d253247 Merge "Fix minor issue for DeleteEuiccSubscriptionDialogActivity" 2020-12-15 01:32:15 +00:00
allenwtsu
91f11e9a47 Change carrier config
Use KEY_ENABLE_PRESENCE_CAPABILITY_EXCHANGE_BOOL instead of
KEY_USE_RCS_PRESENCE_BOOL

Bug: 173828080
Test: build pass
Change-Id: I384686bd073a00341f4e552b71b24798619502fa
2020-12-15 00:28:20 +08:00
Jeremy Goldman
e092a54381 Merge "Update string for discarding changes to a particular APN's settings." 2020-12-14 04:42:09 +00:00
Jeremy Goldman
11f91e47ea Merge "Enhanced4gBasePreferenceControllerTest migrated to junit" 2020-12-14 02:58:24 +00:00
Jeremy Goldman
7a16e45290 Update string for discarding changes to a particular APN's settings.
Previously was unclear whether the changes, or the entire APN was
being discarded. The word "Cancel" more closely implies that the most
recent changes to the screen will be discarded rather than the entire
APN.

This only changes the resource for english. However, many other
languages have a menu_cancel string that seems much closer
to "Cancel" than "Discard" as well.

i.e. http://cs/android/packages/apps/Settings/res/values-zu/strings.xml?l=1029&rcl=a7397bec91183a7a32561fd8d67b0478af6c65bb
http://cs/android/packages/apps/Settings/res/values-es/strings.xml?l=1029&rcl=a7397bec91183a7a32561fd8d67b0478af6c65bb

Bug: 171538880
Test: N/A
Change-Id: I80fde04dbc36078d5c53e68231fcc4e5c3cf94e6
2020-12-14 02:57:39 +00:00
TreeHugger Robot
6571548a37 Merge "[Provider Model] Fix the NetworkDashboardFragmentTest failed issue" 2020-12-13 15:18:40 +00:00
Jeremy Goldman
4348c2c826 Enhanced4gBasePreferenceControllerTest migrated to junit
Bug: 175389659
Test: atest -c Enhanced4gBasePreferenceControllerTest
Change-Id: I7ebcb303eb74168b81dd650fe78f3988647aa64d
2020-12-12 01:11:13 +08:00
Zoey Chen
44559badaf [Provider Model] Should show "No SIM" if there is no SIM in the device.
Bug: 172053880
Test: atest NetworkProviderCallsSmsControllerTest#getSummary_noSim_returnNoSim
Change-Id: I31fd8b4b6928ef8aa7c45ac7651fa26e0b08446e
2020-12-11 20:29:13 +08:00
Weng Su
66869d2ff5 [Provider Model] Fix the NetworkDashboardFragmentTest failed issue
Since the getPreferenceScreenResId() is modified to return different resource ID when provider model enabled. So we need to update SEARCH_INDEX_DATA_PROVIDER class to match the same behavior.

Bug: 175290124
Test:
- Set Settings/System/Developer options/Feature
flags/settings_provider_model to true.
- atest -c NetworkDashboardFragmentTest

Change-Id: I05b0f830158429ddbbfba414cdb33a6df6a7465e
2020-12-10 13:29:49 +00:00
Jiashen Wang
a0a5165c72 Fix minor issue for DeleteEuiccSubscriptionDialogActivity
Bug: 170508680
Test: Manually tested
Change-Id: I656b16f6ca568cd9f5dcbf9a0b031f1ee6f71b49
2020-12-09 23:27:04 -08:00
Remi NGUYEN VAN
f40f71ccf1 Replace isWeaklyValidatedHostname with guava
The guava implementation is more accurate than the basic NetworkUtils
implementation.
NetworkUtils is being moved to its own JAR and will not be available
from Settings.

Bug: 174436414
Test: m
      Wrote test for isWeaklyValidatedHostname, verified it passes with
      guava
Change-Id: I1d01f2beba36009e17f651652e2d7f57be5aa398
2020-12-08 14:02:17 +09:00
Jiashen Wang
8b113cb74a Merge "[SIM Dialog Migration] Sending push notification after DSDS reboot" 2020-12-07 18:31:06 +00:00