Commit Graph

8542 Commits

Author SHA1 Message Date
Tsung-Mao Fang
91399607fe Fix pendingIntent in SettingsSliceProvider could be Hijacked
A malicious app is able to obtain this pending intent.
It can then mutate all fields except for the action and
launch the intent. This can be used to launch any activity
with the ACTION_SETTINGS action.

So, we enfore assign the package name for this intent,
it only can launch the settings app.

Fix: 147355897
Test: a) Install the new settings apk, and it won't launch other screen.
(See details in bug)
b) Start the settings search, slice search results work as normal.

Change-Id: Ie954d8a4b7153d6a4cac40621f363b45185990f2
(cherry picked from commit b3c0a2a6c1)
Merged-In: Ie954d8a4b7153d6a4cac40621f363b45185990f2
2020-03-06 18:14:03 +08:00
Arc Wang
9e46a0bc93 [Wi-Fi] Ignore incorrect user certificates
These incorrect user certificates displayed when users
editing a Wi-Fi network of WPA3-Enterprise in 192bit.

Bug: 149763958
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigControllerTest
Change-Id: Idcbc80aa3e945f83ba6b77ebf9ef443398ef8e3c
Merged-In: Iab35ac975933abc54fda83b99a2109d53d6722d4
2020-03-02 22:28:46 +08:00
TreeHugger Robot
594a5c71f5 Merge "[Wi-Fi] Force users to select a phase2 authentication for PEAP & TTLS" into qt-qpr1-dev 2020-02-28 06:04:46 +00:00
changbetty
288fa30c2d [Telephony Setting] Add supplementary conditions for CDMA display IMEI info when subscriptionInfo is null
Bug: 149307162
Test: make RunSettingsRoboTests ROBOTEST_FILTER=ImeiInfoDialogControllerTest
Change-Id: I1dd83ba55b34433b2b600b8a998000347b6ae5e8
Merged-In: I011b52fd25ca9ad48be3afcdabd9bdd443cd121d
2020-02-26 18:23:31 +08:00
Jason Chiu
59f7342986 Set the max length of user name field in Profile info
Settings may crash when entering a very long user name.

Fixes: 136005061
Test: manual, robotest
Change-Id: Ica17297588fc6b84ef111ef00017afb27360acd3
Merged-In: Ica17297588fc6b84ef111ef00017afb27360acd3
(cherry picked from commit ca2bbc0685)
2020-02-03 10:25:55 +00:00
Arc Wang
f3848729b4 [Wi-Fi] Force users to select a phase2 authentication for PEAP & TTLS
To improve security.

Bug: 143601727
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigControllerTest
Change-Id: Idb93d5ca1eb81bdcc2bc139679f72053161e3e35
Merged-In: I0cb1ceda6d89a52224f80ea5ffd1af709a6acace
2020-02-03 11:21:30 +08:00
Tsung-Mao Fang
8a91fbec72 Add a RTT setting in A11y screen
- Add RTT setting in Accessibility screen.
- Create a controller for RTT setting preference.
- Create an array strings to define the subtext.

Test: Rebuild, and visual
Change-Id: I248654c822284473b8a8265de4a3938af89cdf7a
Merged-In: I248654c822284473b8a8265de4a3938af89cdf7a
Fix: 146540478
2020-01-10 07:16:25 +00:00
TreeHugger Robot
12510978c3 Merge "Add Tapjacking Protection for SettingsHomepageActivity" into qt-qpr1-dev 2019-12-20 18:11:29 +00:00
TreeHugger Robot
bc96cf54cd Merge "Update the behavior of the Dark theme slice" into qt-qpr1-dev 2019-12-20 15:23:53 +00:00
Sunny Shao
5f42f2f7a7 Update the behavior of the Dark theme slice
- Dark theme slice disappear when battery saver is ON.

Bug: 146149658
Fixes: 142476879
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=ROBOTEST_FILTER=com.android.settings.homepage.contextualcards.slices.DarkThemeSliceTest
Change-Id: I071014d7f0658db2098e353717afda905f162ecd
2019-12-20 13:25:49 +08:00
Tsung-Mao Fang
8e58e2c7a5 Remove permission bar chart in Privacy setting
- Because permission hub is already postponed,
we don't need to show this UI in privacy settings.

Test: Rebuild, visual, robotest
Change-Id: I51aca52bc605a3c6b0cafc084e8e491c280d770f
Fix: 143447873
Merged-In: I51aca52bc605a3c6b0cafc084e8e491c280d770f
(cherry picked from commit ab914adc00)
2019-12-19 16:51:58 +08:00
Sunny Shao
a74060c1b7 Add Tapjacking Protection for SettingsHomepageActivity
Add/remove the SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS flag into/from
SettingsHomepageActivity and SettingsPanelActivity with lifecycle.

Bug: 138442483
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.homepage
      make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.panel
      manual test
Change-Id: I72f9a947f57f74a8c09127d6c39173594c248ddc
Merged-In: I72f9a947f57f74a8c09127d6c39173594c248ddc
2019-12-19 02:59:10 +00:00
Kevin Chyn
15f241b296 Add feature provider for face unlock
Bug: 146085546

Test: Builds
Change-Id: If5c7d57c12a3f679d81cee22fb94a53fce1de29a
2019-12-16 18:19:20 -08:00
Jay Aliomer
f4bc80c45c Battery saver mode should disable dark mode modification
disable toggle options and disable the dark theme drop down selection

Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.display.DarkUIPreferenceControllerTest" && \
make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.display.darkmode.DarkModeActivationPreferenceControllerTest" && \
make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.display.darkmode.DarkModeObserverTest" && \
make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.display.darkmode.DarkModeScheduleSelectorControllerTest"

Fixes: 	145098277
Fixes: 145297188
Fixes: 	145254016
Change-Id: I5c81a295810cc2d9a45657978104647e9c15da46
2019-12-02 18:19:52 +00:00
Jay Aliomer
53ad4fedc6 Revert "Revert "Add settings for scheduling dark theme""
This reverts commit 50c0fa136c.

Reason for revert: Fixed the error which is code incompatibility
Test: run all settings tests
Change-Id: I8f05b50f8198c4b2565bb9b6f62ddda5029c8365
Merged-In: I8f05b50f8198c4b2565bb9b6f62ddda5029c8365
Bug: 141567787
2019-11-22 20:58:23 +00:00
Preston O'Neal
50c0fa136c Revert "Add settings for scheduling dark theme"
This reverts commit 7141b142df.

Reason for revert: This is breaking builds on git_qt-qpr1-dev

Change-Id: I7766826d3fc86a12fc8411b027a52eceb5a66019
2019-11-21 22:09:53 +00:00
Jay Aliomer
7141b142df Add settings for scheduling dark theme
Adding a settings page similar to night light for Dark theme. it will allow the user to schedule
dark mode from sunrise to sunset

Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.display.DarkUIPreferenceControllerTest" && \
make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.display.darkmode.DarkModeActivationPreferenceControllerTest" && \
make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.display.darkmode.DarkModeObserverTest" && \
make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.display.darkmode.DarkModeScheduleSelectorControllerTest"

Fixes: 141567787

Change-Id: I3094b655c04f59c23a95162a1be5ee8260e28a48
(cherry picked from commit 0828e6be9c)
2019-11-21 20:07:24 +00:00
TreeHugger Robot
713143df37 Merge "Add a dark theme slice" into qt-qpr1-dev 2019-11-19 01:26:30 +00:00
Bill Yi
60f2a277e0 Import translations. DO NOT MERGE
Change-Id: I8c576fcd3e758334750e0fa24253cff9ee95466b
Auto-generated-cl: translation import
2019-11-15 12:09:15 -08:00
Sunny Shao
abcbc79d7d Add a dark theme slice
Fixes: 142476879
Test: make RunSettingsGoogleRoboTests -j ROBOTEST_FILTER=com.android.settings.homepage.contextualcards.slices.DarkThemeSliceTest
Change-Id: I4865c3c4a807bc4ac96762a882b193a3e2595019
2019-11-15 13:41:49 +08:00
Raff Tsai
6a3433b67a Fix Battery page animation
TextView summary1 has default height 2 line. If the content is longer
than 2 line, the TextView increases itself which causes the animation.
By increasing minLines to 3, it can avoid the animation. And remove
summary2 because it is only for debug purpose, the debug information
can be merged to summary1.

Fixes: 139554919
Test: visual, make RunSettingsRoboTests
Change-Id: I167ac87c9bd83035e00d4991961599e76f4f69e1
(cherry picked from commit 648ada031d)
Merged-In: I167ac87c9bd83035e00d4991961599e76f4f69e1
2019-11-05 12:11:51 +08:00
SongFerngWang
dd7f9b57f6 Preferred network list add 5G item
Preferred network list add 5G item, and change "recommended" from 4G to
5G, and add summary for 5G.

Bug: 138544359
Test: 1.fake the device network type bitmask to 5G, UI show 5G list
2.atest EnabledNetworkModePreferenceControllerTest.java :pass

Change-Id: I4a78e2e7fbb067ce841df4aaf1d5161607fdcf90
2019-10-04 04:53:31 +00:00
Bonian Chen
c7c84d2c87 [Settings Telephony] Carrier name API replacement
Replacing TelephonyManager.getNetworkOperatorName() by
Obtaining carrier name from SubscriptionInfo.getCarrierName().

TelephonyManager.getNetworkOperatorName() only be used when there's no
SubscriptionInfo can be found.

Bug: b/140443508
Test: Manual testing
  atest MobileNetworkUtilsTest
  atest OpenNetworkSelectPagePreferenceControllerTest

Change-Id: I7a86395c86d31fe2ba54c04ac16b1a0ebfc843f3
2019-10-01 17:59:43 +00:00
Kevin Chyn
acde97cf90 Fix FaceSetupSliceTest
Bug: 141380252

Test: make -j56 RunSettingsRoboTests

Change-Id: Ifb9a29d8f3115759a9e8e93e3721135c6ba229bf
2019-09-26 22:32:52 -07:00
joshmccloskey
bba7632f28 Added different flow for re-enrollment
In order to enable this new flow, a user must currently have an enrolled
face and the security setting face_unlock_re_enroll must be non-zero.

Ex.
1. Enroll Face.
2. adb shell settings put
(secure face_unlock_re_enroll|secure_face_unlock_must_re_enroll) 1
3. If settings is opened, close it.
4. Open settings
5. Verify the new flow appears.

Bug: 141380252
Bug: 141254937
Test: Verified that the user's face is deleted after clicking delete.
Test: Verified that the user can re-enroll after removing their face.
Change-Id: I2b36a0bda5cb10fb33dfb2a5627d8fa40f14fb7e
2019-09-26 23:54:59 +00:00
Mady Mellor
eac42583a1 Merge "qt-r1-bubbles-dev @ build 5835883" into qt-qpr1-dev 2019-09-16 21:55:52 +00:00
TreeHugger Robot
17cbea0112 Merge "[Network Connection] Call NetworkRequestUserSelectionCallback#reject() if user quit activity without selection" into qt-qpr1-dev 2019-09-12 20:49:56 +00:00
TreeHugger Robot
ec3055b9eb Merge "[Wi-Fi] Can't change EAP method for a saved enterprise Wi-Fi network" into qt-qpr1-dev 2019-09-12 08:05:21 +00:00
Mady Mellor
91ba8e9b66 qt-r1-bubbles-dev @ build 5835883
Test: presubmit setup on source branch

Bug: 129158983
Bug: 136034310
Bug: 137876221

Change-Id: I5ade70c2101d09eed4698ce29bd3242483ec7f8b
Merged-In: If2b813f24cf5998829fe417e32179c5e8283d308
Merged-In: I58f0287ed99a4daf3758316e4004bca05f17b0d1
2019-09-11 22:42:17 +00:00
Raff Tsai
2d709131ba Fix Settings crash when click uninstall button
When mPackageName is null, mFinish is true. OnResume() doesn't
invoke refreshUI(). It causes uninstall button is still enabled.
The solution is hiding AppButtonsPreference when mFinish is true.

Fixes: 138524326
Test: make RunSettingsRoboTests ROBOTEST_FILTER
Change-Id: I9759e53f002afbd4c88d8d536df3bf01c343135e
(cherry picked from commit 88228c3399)
2019-09-06 05:24:12 +00:00
Arc Wang
31a79feccd [Wi-Fi] Can't change EAP method for a saved enterprise Wi-Fi network
Should only allow saved network UI initialization for once.

Bug: 140362368
Test: WifiConfigControllerTest
      manual:
      Manually change EAP method and other security fields for a saved
      Wi-Fi neterprise network.

Change-Id: Iddc1dae53849760f43b41b75262358dff6ba09af
Merged-In: Iddc1dae53849760f43b41b75262358dff6ba09af
2019-09-05 14:57:07 +08:00
cosmohsieh
98690197e6 [Network Connection] Call NetworkRequestUserSelectionCallback#reject() if user quit activity without selection
Call NetworkRequestUserSelectionCallback#reject() to notify framework that user quit this request without
selecting any network.

Bug: 138855477
Test: make RunSettingsRoboTests -j32 ROBOTEST_FILTER=com.android.settings.wifi.NetworkRequestErrorDialogFragmentTest
Change-Id: I4b06c9772598ab3f9416f32456cd0a65e2d70d68
Merged-In: I4b06c9772598ab3f9416f32456cd0a65e2d70d68
2019-09-05 14:22:00 +08:00
Jayachandran Chinnakkannu
ddc7dda71b Merge "[Settings] hide preferred network mode UI" into qt-r1-dev
am: 7afb9854a7

Change-Id: Idfbc3f765fc834ab3cb7e07ec340a98606ce87ad
2019-08-27 00:40:42 -07:00
Jayachandran Chinnakkannu
15a9d54958 Merge "[Settings] hide preferred network mode UI" into qt-r1-dev
am: 7afb9854a7

Change-Id: I2598b482b4630279d47685381ddac9c746fbe12d
2019-08-23 20:31:09 -07:00
TreeHugger Robot
318be48d07 Merge "[Wi-Fi] Support hidden SSID Wi-Fi networks for Wi-Fi QR code scanner & generator" into qt-qpr1-dev 2019-08-23 05:04:35 +00:00
Bonian Chen
128de7bdb6 [Settings] hide preferred network mode UI
Hide preferred network mode UI no matter home, roaming or no service
when KEY_HIDE_PREFERRED_NETWORK_TYPE_BOOL been enabled.

Bug: 137681413
Test: atest PreferredNetworkModePreferenceControllerTest
      atest EnabledNetworkModePreferenceControllerTest
      Manual with AT&T SIM card in out of servce and in service

Change-Id: Ia0d1333c6cbae3a3717c8db6b77fbb9ea8cec968
2019-08-22 14:36:12 -07:00
SongFerng Wang
201fc40816 Merge "If the user add APN with empty APN type, map it for default type" into qt-qpr1-dev 2019-08-22 09:49:27 +00:00
andychou
34fc2495d2 If the user add APN with empty APN type, map it for default type
Original behavior will map all APN type if enter empty APN type. But it
sometimes cause problem that MMS or IMS not working when select to this
custom APN. So if the user doesn't enter any APN type, just map to
valure of carrier config 'apn_settings_default_apn_types_string_array'
to avoid all the functions broken.

Bug: 129704611
Test: 1.Enter empty APN type and check if only default is added into
APN. 2.atest ApnEditorTest pass.
Change-Id: Icec274e5b402af06822479bcc60294b347f5254f
2019-08-21 21:20:49 +08:00
govenliu
14a74125e6 [Wi-Fi NetworkRequest] Set theme for the NetworkRequest dialog
We should set the same theme which applied in Settings APP to the NetworkRequestDialog

Bug: 139294487
Test: check if the right theme is applied when launching this activity.
Change-Id: Iefdfd5b810f5cf22c220830e1ee965113a439a3e
Merged-In: Iefdfd5b810f5cf22c220830e1ee965113a439a3e
2019-08-21 12:23:32 +08:00
Arc Wang
3fff50e3ba [Wi-Fi] Support hidden SSID Wi-Fi networks for Wi-Fi QR code scanner & generator
WifiTracker#getAccessPoints() only contains a hidden SSID Wi-Fi
network if it's a saved Wi-Fi network. We can't check if a hidden
SSID Wi-Fi network is reachable inadvance. That is the difference
after a user scanned a QR code of hidden SSID Wi-Fi network.

Bug: 135892509
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiDppUtilsTest
      manual test:
      Click the Share button of a connected hidden SSID Wi-Fi network
      and save the QR code image. Use Wi-Fi QR code scanner in Wi-Fi
      Settings to scan the saved QR code image.

Change-Id: I9056622e6dadb04e5642ae1c50fb4d227a78d26d
Merged-In: I9056622e6dadb04e5642ae1c50fb4d227a78d26d
2019-08-20 16:15:02 +08:00
Arc Wang
2394d0821b Merge "[Wi-Fi] Fix multi SIM devices switch to mobile data automatically settings missing problem" into qt-r1-dev
am: 54dbed859d

Change-Id: I19214265a783f092bb183b3341aa1c2116f3188f
2019-08-17 07:17:59 -07:00
Arc Wang
5101624819 Merge "[Wi-Fi] Fix multi SIM devices switch to mobile data automatically settings missing problem" into qt-r1-dev
am: 54dbed859d

Change-Id: I7267b4fe82f6e5e6e6523463eb710049c68e66f9
2019-08-17 07:17:59 -07:00
Arc Wang
91200e610d [Wi-Fi] Fix multi SIM devices switch to mobile data automatically settings missing problem
Context#getResources loading is done based on the last SIM to
come up, we may get wrong customization settings.

This fix check the setting of active subscription and shows the preference.

Bug: 138956509
Test: CellularFallbackPreferenceControllerTest
      manual test:
          1. Insert feature supported SIM and check UI.
          2. Remove feature supported SIM and check UI.
          3. Turn airplane mode on and check 1. and 2..

Change-Id: I72b6db415429181395a02f163889bb1b9c0f070f
Merged-In: I72b6db415429181395a02f163889bb1b9c0f070f
2019-08-17 01:37:21 +00:00
Yi Jiang
7933af0273 Merge "Don't show suggestion slice if 'Screen attention' is already on" into qt-qpr1-dev 2019-08-13 01:28:31 +00:00
Arc Wang
bde8c0a64d [Wi-Fi] Remove unsupported EAP methods for WPA3-Enterprise 192-bit
1. Only support EAP-TLS for WPA3-Enterprise 192-bit
2. Remove "Do not validate" from the CA certificate menu
3. Remove "Do not provide" from user certificate menu

Bug: 135127581
Test: WifiConfigControllerTest
Change-Id: Ibf904da9407ec803afb8bb995e9df1a2e25f0dcb
Merged-In: Ibf904da9407ec803afb8bb995e9df1a2e25f0dcb
2019-08-08 14:52:08 +08:00
Yi Jiang
811908f568 Don't show suggestion slice if 'Screen attention' is already on
Bug: 137259771
Fix: 137259771
Test: Manually

Change-Id: I5568b569ecd4db943f1a239c7ddcd2923bec4028
(cherry picked from commit 06f0bd6d4e)
Merged-In: I5568b569ecd4db943f1a239c7ddcd2923bec4028
2019-08-05 17:06:24 +00:00
Edgar Wang
063cc34713 Merge "Add skip lock screen in Notification & security lock screen settings" into qt-r1-dev
am: 8e3b202070

Change-Id: Ib1cf35ee24f88a9eae71714349fe40cb982214b0
2019-08-01 22:49:22 -07:00
Edgar Wang
345315c440 Merge "Add skip lock screen in Notification & security lock screen settings" into qt-r1-dev
am: 8e3b202070

Change-Id: I37b7b29cd4c88948a6e7f0197bec84d0d1c2b0e4
2019-08-01 22:49:04 -07:00
Edgar Wang
8e3b202070 Merge "Add skip lock screen in Notification & security lock screen settings" into qt-r1-dev 2019-08-02 05:38:23 +00:00
Youming Ye
d893200d78 Check the missing useHomeWfMode case
am: b7923f5a3f

Change-Id: I359a8f3a93837b54a119f7dd9d8a7ca3b508e257
2019-08-01 11:30:47 -07:00