Commit Graph

55271 Commits

Author SHA1 Message Date
Hugh Chen
eda6d60e05 Fix crash on "Connection preferences"
This CL adds a null check condition to avoid crash for
some device not support PrintManager.

Bug: 159848003
Test: make -j42 SettingsGoogle
Change-Id: Ic6c4c17bb563458f4f5a61dc0d93ae22b05f8763
2020-11-03 11:02:38 +08:00
Treehugger Robot
cd4ca97828 Merge "Fixes ApnEditor not restoring previous UI" 2020-02-27 08:50:37 +00:00
Lee Chou
80d8c3bc83 Fixes ApnEditor not restoring previous UI
ApnEditor tries read and set the UI in onCreate, before the previous
bundle is restored. This caused problems when the configuration has
changed (such as switching to Dark Theme).

This moves the UI changes to onViewRestored

Fixes: 146399432
Test: make SettingsGoogle and manual test UI
Change-Id: I8147ec96569fa28867c088d6c36584aa344f40ed
Merged-In: I8147ec96569fa28867c088d6c36584aa344f40ed
2020-02-27 12:33:16 +08:00
Xiangyu/Malcolm Chen
aaee4539c7 Merge "Catch crash in mobile network ProgressDialog" 2020-02-24 21:07:17 +00:00
Sarah Chin
7c849787ee Merge "Rename references to getLteOnCdmaMode" 2020-02-21 22:09:16 +00:00
Joshua Duong
317c9dc2ca Merge "[adb-wireless] Add Wireless Debugging Switch in Developer options." 2020-02-21 16:27:10 +00:00
Daniel Hunt
9f74807e89 Catch crash in mobile network ProgressDialog
When enabling "Automatically select network" in "Settings -> Network &
internet -> Mobile network -> Advanced" and rotating the device while
the dialog is showing there will be an IllegalArgumentException since
the decorView isn't attached to the window when dismissing the dialog.
Fixed by simply catching the exception since the dialog will be gone
anyway.

Bug: 146057372
Test: manual (see comment above)
Change-Id: I15f1d6f505fdf33964ce973ece31d6aa0d8f3909
2020-02-21 10:47:12 +00:00
Treehugger Robot
e4ad103957 Merge "Update OWNERS file" 2020-02-21 06:54:10 +00:00
George Chang
75d2a7f065 Update OWNERS file
Test: None
Merged-In: Ifa7045000ce578a611bb065cd821a87a54edd49c
Change-Id: Id8fcd93340d7869d7f5f933c720dbb3d277a368a
2020-02-21 06:07:48 +00:00
Sarah Chin
51617e3ceb Rename references to getLteOnCdmaMode
Use @SystemApi TelephonyManager#isGlobalModeEnabled()

Test: build
Bug: 147335742
Change-Id: Ie1b01a97cf163d68e4a5529f1718a9a782d44bb0
Merged-In: Ie1b01a97cf163d68e4a5529f1718a9a782d44bb0
2020-02-20 16:43:13 -08:00
Joshua Duong
0110afcc46 [adb-wireless] Add Wireless Debugging Switch in Developer options.
Bug: 111434128
Bug: 119492574

Test: make RunSettingsRoboTests ROBOTEST_FILTER=WirelessDebugging
Change-Id: I188badb43035172642cf235bb27e56d3a1dea169
Merged-In: I188badb43035172642cf235bb27e56d3a1dea169
2020-02-20 06:13:15 +00:00
Benedict Wong
9579a76913 Merge "Update Settings UI for IKEv2/IPsec VPNs" 2020-02-19 07:39:41 +00:00
Benedict Wong
0c1abce1a6 Update Settings UI for IKEv2/IPsec VPNs
This CL updates Settings for IKEv2/IPsec Platform VPN profiles.

Platform VPN profiles currently configure DNS and routes based on the
configuration received from the server. As such, these parameters are
not required to start an always-on VPN.

Similarly, a numeric server address is not required, as the IKEv2
library will do the DNS resolution based on the current Network. This
has the nice property of allowing the VPN to run with IPv4 or IPv6 outer
addresses (as opposed to LegacyVpn, which runs only in IPv4)

Lastly, this always allows configuration of the IKEv2 local identifier,
whether MSCHAPv2, RSA or PSK authentication is used.

Bug: 148991741
Test: Compiles, manually tested.
Change-Id: Ib1049fdc602e349bb0d24de536767a6e15adf194
2020-02-17 16:19:20 -08:00
Betty Chang
251329c85c Merge "[Mainline] To use getActiveSubscriptionInfo() instead of get default subscription Info with data/sms/voice" 2020-02-17 06:38:29 +00:00
changbetty
1a5351c433 [Mainline] To use getActiveSubscriptionInfo() instead of get default subscription Info with data/sms/voice
- getDefaultDataSubscriptionInfo()
   	- getActiveSubscriptionInfo(getDefaultDataSubscriptionId());
   - getDefaultSmsSubscriptionInfo()
   	- getActiveSubscriptionInfo(getDefaultSmsSubscriptionId());
   - getDefaultVoiceSubscriptionInfo()
   	- getActiveSubscriptionInfo(getDefaultVoiceSubscriptionId());

Bug: 147206736
Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageUtilsTest
      make RunSettingsRoboTests ROBOTEST_FILTER=MobileDataSliceTest
      make RunSettingsRoboTests ROBOTEST_FILTER=MobileDataPreferenceControllerTest
      make RunSettingsRoboTests ROBOTEST_FILTER=DefaultSubscriptionControllerTest

Change-Id: I7b5988b3c3068c12e242e123ebb54477093d37ad
Merged-Id: I7b5988b3c3068c12e242e123ebb54477093d37ad
2020-02-15 14:56:58 +08:00
Zoey Chen
864bd01efe Merge "[Settings] Add permission for #getCdmaRoamingMode and use value from TelephonyManager Bug: 145788881 Test: make Change-Id: Idf237f008af2ab6cab07689f1f2a602f6a98c4f1 Merged-In: Idf237f008af2ab6cab07689f1f2a602f6a98c4f1" 2020-02-14 06:49:45 +00:00
Treehugger Robot
226ef3d100 Merge "Import translations. DO NOT MERGE" 2020-02-12 01:12:50 +00:00
Paul Hu
bc80ff1630 Merge "Launch TetherSettings via Settings.ACTION_TETHER_SETTINGS" 2020-02-11 02:27:00 +00:00
Zoey Chen
5503c8ea9e Merge "[Settings] To avoid use APIs in IccCard directly, calling APIs through TelephonyManager" 2020-02-08 04:25:32 +00:00
Treehugger Robot
af463b86c9 Merge "DO NOT MERGE - Merge QQ1A.200205.002 into master" 2020-02-08 01:29:23 +00:00
paulhu
08efd36bf2 Launch TetherSettings via Settings.ACTION_TETHER_SETTINGS
Bug: 149068177
Test: Build, Flash, manual test.
Change-Id: If01bdeb7f6ea021cc28c462360a969985882348b
2020-02-07 14:42:08 +08:00
zoey chen
9d49a395c3 [Settings] Add permission for #getCdmaRoamingMode and use value from TelephonyManager
Bug: 145788881
Test: make
Change-Id: Idf237f008af2ab6cab07689f1f2a602f6a98c4f1
Merged-In: Idf237f008af2ab6cab07689f1f2a602f6a98c4f1
2020-02-07 14:31:08 +08:00
Treehugger Robot
4f4c05addb Merge "Update profile api" 2020-02-07 02:46:12 +00:00
Bonian Chen
c2823ab2ce Merge "[Settings] fix failure test case - ConditionContextualCardController" 2020-02-07 02:40:17 +00:00
Jack Yu
c36cc4e120 Merge "Refactored cell broadcast area info support" 2020-02-06 17:17:49 +00:00
Zoey Chen
814b7c40cb Merge "[Settings] Cannot use UnsupportedAppUsage API, use #hasIccCard() to replace" 2020-02-06 06:11:50 +00:00
hughchen
4d94a32482 Update profile api
The profile will auto connect / disconnect when set enable / disable
profile. This CL remove connect / disconnect method.

Bug: 141582844
Test: make -j42 RunSettingsRoboTests
Change-Id: Ib875d126be0d8483fb539e7ba950242a4f38cf81
Merged-In: Ib875d126be0d8483fb539e7ba950242a4f38cf81
2020-02-06 11:20:09 +08:00
Xin Li
8c472e240f DO NOT MERGE - Merge QQ1A.200205.002 into master
Bug: 147428392
Change-Id: I37f2fe376d2feaf5e6e3e640c3eef6bb42f14c52
2020-02-05 10:45:13 -08:00
Treehugger Robot
5c262a92de Merge "Add TEST_MAPPING to schedule auto test" 2020-02-05 12:22:33 +00:00
Raff Tsai
55422c7517 Add TEST_MAPPING to schedule auto test
Test: atest :postsubmit
Change-Id: Ied8e241ef223ea5e87ca6ee0f04f4128c51ddb87
Merged-In: I0847d1dea352d0e3b87b1bb95d5c2600a80a7438
2020-02-05 10:40:01 +00:00
Jack Yu
98973e3ba1 Refactored cell broadcast area info support
Area info cell broadcast messages are not handled
by cell broadcast receiver anymore. Instead, they will
be processed in cell broadcast service. Privileged apps
that are interested in getting the information will need
to get it directly from cell broadcast service.

Note this is only enabled for certain countries and carriers.

Test: Manual
Bug: 141318859
Merged-In: If6a0a0c6a76e8b90a8feaea1e2771993e2d0edfe
Change-Id: If6a0a0c6a76e8b90a8feaea1e2771993e2d0edfe
(cherry picked from commit c4da22a2ce)
2020-02-04 20:42:43 -08:00
zoey chen
d54004f45e [Settings] Cannot use UnsupportedAppUsage API, use #hasIccCard() to replace
Bug: 145967955
Test: make
Change-Id: I8b948d1d416e1eb79e34be073b8ad81645d5ebb1
Merged-In: I8b948d1d416e1eb79e34be073b8ad81645d5ebb1
2020-02-05 12:04:22 +08:00
Benedict Wong
e9b3f3303e Merge changes from topic "platform-vpn-user-consent"
* changes:
  Update setVpnPackageAuthorization call with VPN type
  Add Platform VPNs to VPN list
2020-02-04 23:56:16 +00:00
Benedict Wong
62e55361a8 Update setVpnPackageAuthorization call with VPN type
This commit updates the Settings to also pass the additional
VPN type for app-based VPNs.

Bug: 144246835
Test: Compiles, manually tested to be working
Change-Id: I10cf17419636c3c30e1ec06bb3e6751cb5c65d9b
Merged-In: I10cf17419636c3c30e1ec06bb3e6751cb5c65d9b
2020-02-04 21:06:07 +00:00
Bonian Chen
ac55b2ca49 [Settings] fix failure test case - ConditionContextualCardController
Setup parameters required by CellularDataConditionController

Bug: 148834975
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=ConditionContextualCardControllerTest
Change-Id: I8e0c7435cf18cfdafa39f58697b6d29db34b1867
Merged-In: I974df385d956dbff10aac874487d07d626992e4b
2020-02-04 18:59:53 +08:00
Bonian Chen
91638e079f Merge "[Settings] Avoid rename inactive subscription from NullPointerException" 2020-02-04 10:43:01 +00:00
Treehugger Robot
1668f18a16 Merge "Use IEC units in app info data usage." 2020-02-04 04:33:30 +00:00
Bonian Chen
ab459dc194 [Settings] Avoid rename inactive subscription from NullPointerException
1. Init instance before accessing it
2. Re-enable test case

Bug: 147321836
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=RenameMobileNetworkDialogFragmentTest
Change-Id: I2375043f16b5a25372af5c9f413fb8384850316c
Merged-In: Ifc245bec739b4c81d2cee04b091bcdb54d567d4a
2020-02-04 11:43:37 +08:00
Betty Chang
cc9aef705a Merge "[Mainline] Use the @SystemApi setAlwaysAllowMmsData in TelephonyManager for mainline" 2020-02-04 02:44:15 +00:00
Bill Yi
be651d3874 Import translations. DO NOT MERGE
Change-Id: I5afe4b717cfa2d20b5e78caaf3417b0a161eb62b
Auto-generated-cl: translation import
2020-02-01 15:30:04 -08:00
Neil Fuller
45834d96a8 Merge "Tidy up libcore.timezone APIs" 2020-01-30 11:25:35 +00:00
Benedict Wong
bcd6b8cbca Add Platform VPNs to VPN list
This change allows the Settings VPN pages to pull the apps providing a
new Platform VPN.

Bug: 144246835
Test: Compiles, manual testing
Change-Id: Ibb7e79ccde754724c9fc00c88da98e975f325ba7
2020-01-30 01:46:19 -08:00
Sooraj Sasindran
ef77c1d67f Merge "access system resources with android.R package" 2020-01-29 17:34:53 +00:00
Sarah Chin
0c2cd2a94d Merge "[DO NOT MERGE] Update CellIdentityGsm Constructor" 2020-01-29 15:56:09 +00:00
Neil Fuller
7b54a31132 Tidy up libcore.timezone APIs
Tidy up the libcore.timezone APIs to make them as close as possible to
android.timezone. In future, these classes should be repackages to be
the actual android.timezone classes, so the APIs need to be in sync.

Bug: 148086409
Test: treehugger
Change-Id: I8d0521467bb3c3c8741ce98f50cde0ee8c1bec1a
2020-01-28 15:08:31 +00:00
Chalard Jean
bbd637d391 Use IEC units in app info data usage.
Settings > Apps & notifications > select some app that has done
some internet traffic.
Observe "Mobile data & Wi-Fi" summary data and take note of the
numbers. Then tap on it and observe that the numbers on the
details page don't match the one in the summary. This is because
the details use IEC units while the summary uses SI units.

This fix changes the summary to use IEC units too, removing
the discrepancy.

Bug: 137917003
Test: manually cause some traffic, see that the numbers are now
      consistent between the app info and usage details page

Change-Id: I4be5830d4e98a1c4739001c812e59d82415bf24a
2020-01-28 20:22:45 +09:00
Sooraj Sasindran
a30bdaaaf8 access system resources with android.R package
Bug: 143289541
Test: make
Merged-In: Idc10955639bce7b8e579c50af78056389d44d492
Change-Id: Idc10955639bce7b8e579c50af78056389d44d492
2020-01-27 22:17:28 -08:00
Bonian Chen
5c8b22657c Merge "[Settings] DataUsage crash when no SIM inserted" 2020-01-27 05:21:35 +00:00
Bonian Chen
f550fc2181 [Settings] DataUsage crash when no SIM inserted
Check for null pointer when looking up subcription id.

Bug: 148175728
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageUtilsTest
Change-Id: Icc1314d262f1af686134dcf6a0b187adfc3eb4df
Merged-In: I4e893fc7de4a3292b3949860ebb59fbe52ac1a8f
2020-01-25 09:37:00 +00:00
Benedict Wong
b189ffb318 Merge "Add IKEv2/IPsec VPN options" 2020-01-23 05:11:47 +00:00