Commit Graph

393 Commits

Author SHA1 Message Date
menghanli
a8b9f30d11 Accessibility Service & Shortcut Redesign - Remove “volume key shortcut” setting (2/n)
Bug: 142529032
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityShortcutPreferenceControllerTest
Change-Id: Ic55d4fd8db0678b8fccbbb6ef1d217b47a5094bd
2020-02-13 15:44:11 +08:00
David Su
68913c5a8b Migrate to getNetworkSelectionStatus()
isNetworkEnabled() & isNetworkPermanentlyDisabled()
should not be formal APIs. Instead,
getNetworkSelectionStatus() with a set of constants
is sufficient as an API surface, and will be more
maintainable in the future.

Bug: 146046526
Test: atest SettingsUnitTests
Change-Id: If599ce88f68a87fa7186ef96156c2bb1fdc1c2c3
2020-01-30 20:36:53 -08:00
David Su
c267acd0ef SettingsUnitTests: migrate to @SystemApi Builders for WifiInfo & NetworkSelectionStatus
Use the newly created Builder classes to construct
WifiInfo & NetworkSelectionStatus with the
appropriate fields set, so that they can be
parceled/unparceled.

Bug: 138801922
Test: atest SettingsUnitTests
Change-Id: I8dd6bc5d51d1a41ff4b8b2760faaa00b633fc2f7
2020-01-11 18:44:14 -08:00
Philip P. Moltmann
c996edf265 Adapt test to change internal API SubscriptionController#getActiveSubscriptionInfoList
Test: atest SettingsUnitTests
Bug: 136595429
Change-Id: I2320cd8405ab42fe725f698ca844341785dcd9f9
2019-11-14 13:31:10 -08:00
Bonian Chen
38701ed7ea Merge "[Settings] Hidden API remove - WFC mode settings" 2019-11-06 06:05:21 +00:00
Bonian Chen
c3b94292ea [Settings] Hidden API remove - WFC mode settings
Change API from getWfcMode/setWfcMode into APIs within ImsMmTelManager.

Bug: 140542283
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=WifiCallingPreferenceControllerTest
make RunSettingsRoboTests -j ROBOTEST_FILTER=WifiCallingSettingsForSubTest
make RunSettingsRoboTests -j ROBOTEST_FILTER=WifiCallingSliceHelperTest
atest WifiCallingSettingUiTest

Change-Id: I2ee01852cb4ee90fe9db256d3333f461cc070da5
2019-11-06 12:17:09 +08:00
Raff Tsai
c5e1fc677c Integrated SearchIndexableResources interface in Settings
- New SearchIndexableResources interface returns SearchIndexableBundle,
we don't need reflection to get SearchIndexableProvider

Bug: 135053028
Test: robolectric, check database search_index.db items
Change-Id: I5ed3416ccf72ef3d38db817fcb4aff7502649ed4
2019-11-05 17:38:32 +08:00
Ryan Mitchell
dc67778100 Merge "Remove config_show_regulatory_info tests" 2019-10-14 16:14:30 +00:00
Rubin Xu
010116a173 Introduce LockscreenCredential
Bug: 65239740
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.password
Change-Id: Icb73d639291d6d2eda8015e18e93d0906f916bb2
2019-10-13 21:20:02 +01:00
Ryan Mitchell
4de772fddb Remove config_show_regulatory_info tests
Runtime Resource Overlays (RROs) can no longer change the value of
resources in manifest when read during PackagerParser.

Remove usage of config_show_regulatory_info and rely on OEMs
configuring the component using <component-override>.

Bug: 135048762
Test: adb shell pm resolve-activity
com.android.settings/com.android.settings.RegulatoryInfoDisplayActivity
Change-Id: If48f40eb261a9c90e183d4ef9bcafb0fbda38f22
2019-10-10 18:06:57 +00:00
Paul Hu
77226593e0 Merge "[Settings] Replace CONNECTIVITY_INTERNAL to TETHER_PRIVILEGED" am: a67ca4cfd7 am: 3a728ae13b am: a6dadc465b
am: 67fe04814d

Change-Id: I27e85d6780025122b5b56c0f8f827a0a8060e955
2019-10-01 03:21:27 -07:00
Paul Hu
3a728ae13b Merge "[Settings] Replace CONNECTIVITY_INTERNAL to TETHER_PRIVILEGED"
am: a67ca4cfd7

Change-Id: I7a2a4d76d1e0092188121d390c75c12eac20cdab
2019-10-01 03:03:36 -07:00
Raff Tsai
966fa01423 Use SettingsLib Indexable
- Use SettingsLib Indexable
- Directly use resource id in getPreferenceScreenResId

Bug: 135053028
Test: roboletric
Change-Id: I05f493b55e8b6e2091301e9231ba5615215618e6
2019-09-25 18:24:56 +08:00
Raff Tsai
ac3e0d0988 Directly use BaseIndexableProvider
- Add function getXmlResourceId, Fragments don't need to write
xml resource id twice.
- Remove getPreferenceControllers from Indexable.java. Because it will
move to SettingsLib later for other apps which don't need this function

Bug: 135053028
Test: robolectric
Change-Id: I1e74519aecdea3dde64a5aea79f08d766dbc0003
2019-09-24 00:35:52 +08:00
paulhu
52d24750a4 [Settings] Replace CONNECTIVITY_INTERNAL to TETHER_PRIVILEGED
Settings is using CONNECTIVITY_INTERNAL to restrict launching
tether provisoning activity by provioning apps only. However,
CONNECTIVITY_INTERNAL will be deprecated from Android R, replace
the permission to TETHER_PRIVILEGED.

Bug: 32963470
Test: atest TetherServiceTest
Change-Id: I4c8312b92de8d5d9c9090c572e54622dc4fcf9d4
2019-09-12 17:21:43 +08:00
Arc Wang
a12b372dd2 [Wi-Fi DPP] Refine code
Remove unused code.
Rename some variables and methods for better readability.
Fix typos.
Reduce unnecessary variable scope and method scope.
Simplify some code logic.

Bug: 120645817
Test: atest com.android.settings.wifi.dpp
Change-Id: I8f30b3e445f25ada927e995befee1783d2270b91
2019-07-19 10:29:06 +08:00
TreeHugger Robot
33c8c8e4a2 Merge "[Wi-Fi DPP] remove unused code" 2019-07-09 03:36:42 +00:00
Arc Wang
2d211208d6 [Wi-Fi DPP] remove unused code
Bug: 120645817
Test: atest com.android.settings.wifi.dpp
Change-Id: I467888de0efe8ae663863e9eacc15e77d32487d2
2019-07-08 18:23:56 +08:00
Mark Chien
5cc68af9ca Merge "Fix entitlement failed when device is on CBRS" into qt-r1-dev am: 8a44e4f274
am: 649f98541a

Change-Id: I226fff13988a87780cbf7c042619c36efcbae63f
2019-07-03 19:21:40 -07:00
Mark Chien
649f98541a Merge "Fix entitlement failed when device is on CBRS" into qt-r1-dev
am: 8a44e4f274

Change-Id: Ifabc853b754fd6323e01246613656fe72961c253
2019-07-03 17:19:49 -07:00
markchien
0331222483 Fix entitlement failed when device is on CBRS
When active cellular internet is switched to CBRS in DSDS case,
default data sub id may not be changed. Fix by using active
subscription id and pass this sub id to entitlement app.

Bug: 134994718
Test: atest TetherServiceTest
Test: manual test with carrer SIMs.

Change-Id: I30a1d70c0690f0dba8f4171a2bde884f9b7ccfc4
2019-06-26 17:05:48 +00:00
Yanting Yang
7130bc63b4 Disable flaky test launchDashboard_shouldSeeFooter
To avoid false alarm in presubmit, will plan a new way to fix it later.

Bug: 133334887
Test: atest LifecycleEventHandlingTest
Change-Id: I711319fcb091b19ff895b93b140360b974e80c20
2019-05-28 22:05:11 +08:00
Arc Wang
8e3c49123d [Wi-Fi DPP] Refine Wi-Fi DPP UI layouts with SUW library
1. Use GlifLayout in all fragments
2. Fragments use 32dp icon instead of 48 dp
3. Replace ScrollView & ProgressBar & Header & Footer of original layout with GlifLayout design
4. Remove ActionBar (no more back button on screen top)

Bug: 129021867
Test: manual
Change-Id: I2fda48cb7f7819b2c8dd85c10d39e1f187463bd8
2019-05-21 13:59:39 +08:00
Colin Cross
e43660a00d Merge "Convert Settings to Android.bp" into qt-dev-plus-aosp
am: a7125ade35

Change-Id: I7627072b9a64c6713acc657e47a7755dca7383f9
2019-05-14 17:58:41 -07:00
Colin Cross
946a0fd964 Convert Settings to Android.bp
See build/soong/README.md for more information.

Test: m checkbuild
Test: m RunSettingsRoboTests-jacoco
Change-Id: I267534c095c30833f77273dbdb1893b7830ed45d
2019-05-13 13:42:01 -07:00
Arc Wang
2723563a19 Merge "Fix back arrow in wifi settings "connect to this network connection qr code" does not work" into qt-dev am: 5c461a2859
am: 6830a691dd

Change-Id: I3c74212e9efa6227f5c591080f3b593fb7e42b5a
2019-05-08 20:32:32 -07:00
Arc Wang
ac75faa207 Fix back arrow in wifi settings "connect to this network connection qr code" does not work
When clicking back button, pop fragment and Finish the activity if there is nothing to pop

Bug: 132132756
Test: atest WifiDppConfiguratorActivityTest
Change-Id: Ia16951e79e578f1625e5fadd26553735fa90bffa
2019-05-07 18:06:54 +08:00
Lei Yu
d68c8c59e5 Fix settings unit test
Also remove some obsolete tests

Fixes: 126257657
Test: atest
Change-Id: Ib9b654b9076176db3c331bf5ca14ac185c9e0b5f
2019-04-24 20:40:59 +00:00
Mark Chien
f886be6999 Merge "Ignore the outdated entitlement check" am: d7885ca73a
am: 7b30503dc4

Change-Id: I294f9f2e9ca239cb8f1c689580ce266ddead8f5b
2019-04-19 21:07:49 -07:00
markchien
8667e01cf5 Ignore the outdated entitlement check
Don't run entitlement if the request is base on outdated subId.

Bug: 129751453
Test: -build, flash, boot
      -atest TetherServiceTest
      -manual test with carrier SIM

Change-Id: Id3157df1a5758f8c72acbc45c9fefd2215c87395
Merged-In: Id3157df1a5758f8c72acbc45c9fefd2215c87395
2019-04-18 13:53:40 +00:00
markchien
f9f0d11782 Ignore the outdated entitlement check
Don't run entitlement if the request is base on outdated subId.

Bug: 129751453
Test: -build, flash, boot
      -atest TetherServiceTest
      -manual test with carrier SIM

Change-Id: Id3157df1a5758f8c72acbc45c9fefd2215c87395
2019-04-15 15:54:52 +08:00
Arc Wang
e2b4bccbf1 Should not decode Wi-Fi QR code after onPause
Bug: 130141694
Test: manual
      atest WifiDppQrCodeScannerFragmentTest

Change-Id: I412fb7c06220c23bddc7b3c448fcc72a00bdecc3
2019-04-09 13:30:59 +08:00
Arc Wang
4a5ff58511 Supports to share Wi-Fi networks of WPA3 security SAE & OWE via QR code generator
When scanned a no password ZXing QR code, add both open network &
enhanced open network to configured Wi-Fi network list because this kind
of QR code may refer to a open network or an enhanced open network.

Bug: 124131581
Test: manual
Change-Id: Id9f85ef8dcdf72347be8106938437aecd0eed9f5
2019-04-09 10:36:07 +08:00
Ryan Mitchell
139ea3f082 Merge "Fix Settings test that uses OverlayInfo" 2019-03-22 21:39:41 +00:00
Ryan Mitchell
5f6924761e Fix Settings test that uses OverlayInfo
Now that targetOverlayableName has been added to OverlayInfo, the tests
that construct the info objects must be fixed.

Bug: 128830059
Test: atest SettingsRoboTestStub
Change-Id: I2cee25e417ec643f758ebe40551cc97b1f0828ac
2019-03-22 08:15:44 -07:00
TreeHugger Robot
b54224ef1d Merge "Make settings do nothing if ranking for a card is invalid" 2019-03-12 01:17:33 +00:00
Fan Zhang
0d093fd1e1 Make settings do nothing if ranking for a card is invalid
Fixes: 124386997
Test: robotests
Change-Id: Ib01c75ec0490cdc034255300a09e8099e05fc389
2019-03-11 16:17:58 -07:00
Arc Wang
b249fb7d13 Support to share Wi-Fi hotspot via QR code
1. QR code scanner (Wi-Fi Easy Connect) does not support sharing Wi-Fi hotspot
   at current stage
2. Wi-Fi hotspot QR code button only shows when Wi-Fi hotspot is enabled
3. The QR code has the security string "WPA" for hotspot's WPA2_PSK

Bug: 123151660
Test: atest WifiTetherSSIDPreferenceControllerTest
            WifiQrCodeTest WifiDppConfiguratorActivityTest
            WifiDppEnrolleeActivityTest
            WifiDppQrCodeGeneratorFragmentTest
            WifiDppQrCodeScannerFragmentTest
            WifiNetworkListFragmentTest
            WifiDppChooseSavedWifiNetworkFragmentTest

Change-Id: I2e89450180b82cc841ee3b15be52bfc6f9f6164d
2019-03-08 11:48:12 +08:00
Fan Zhang
eb493d5d69 Wake up/unlock device before running tests
Fixes: 127452134
Test: atest
Change-Id: I627f848a080b4569b658678094d45576eab9247c
2019-03-05 13:27:47 -08:00
TreeHugger Robot
0fa2651d3f Merge "Change Easy Connect intent naming" 2019-03-03 16:17:33 +00:00
Arc Wang
c1036df9b8 Change Easy Connect intent naming
1. From ACTION_PROCESS_WIFI_EASY_CONNECT_QR_CODE to ACTION_PROCESS_WIFI_EASY_CONNECT_URI
2. Remove EXTRA_QR_CODE and use data Uri to specify Easy Connect bootstrapping information string

Bug: 125874365
Test: atest AvailableIntentsTest
      WifiDppChooseSavedWifiNetworkFragmentTest
      WifiDppConfiguratorActivityTest
      WifiNetworkListFragmentTest

Change-Id: I706513520daa10197a27f596fa08ca58980205d8
2019-02-27 10:06:04 +08:00
TreeHugger Robot
683bbb5ce9 Merge "Update settings notification ui tests" 2019-02-26 19:15:17 +00:00
Beverly
5588921190 Update settings notification ui tests
Test: atest AppNotificationSettingsTest
Test: atest ZenModeSettingsIntegrationTest
Test: atest ChannelNotificationSettingsTest
Fixes: 126253682
Change-Id: Ie7fc5f177eb418162ecf24b0c4818ee52a8088db
2019-02-26 10:38:53 -05:00
Fan Zhang
0047944c2e Clean up instrumentation tests
- Fixed some important tests
- Deleted some useless tests
- Some tests are still broken, filed bugs for these

Fixes: 124572765
Test: atest
Change-Id: Iac4e6a1fb1dbf9383d91945525df69a651ae77fd
2019-02-25 16:24:35 -08:00
Yi-Ling Chuang
dde76e6d5c Make slices precheck executes in parallel.
Slice binding takes up sometime which may cause latency.
Thus, making it run in parallel instead of sequentially to improve the
performance and avoid hitting the timeout problem.

Bug: 124366297
Fixes: 123668403
Test: robotests, unit tests
Change-Id: I5d9fa4605f59e2acef65aadf6fce85df36d8fff1
2019-02-21 15:24:28 +08:00
Yi-Ling Chuang
daa8ff36cc Use a better way to bind slice for slice precheck.
Calling Slice.bindSlice() directly will cause the exception stating that
slices are not pinned, which sometimes leads to crash. Hence, change the
way we bind slices which handles pinSlice() for us before onBindSlice().

Bug: 120552892
Test: robotests, unit tests
Change-Id: I3e65c6b79876dbee5db6f19387bc6b675f734161
2019-02-21 14:18:01 +08:00
Arc Wang
7bdcadbe72 Handle different error codes in DPP
Show error message for corresponding Wi-Fi DPP error code. And

1. To update error message only from each fragment,
   remove some callbacks which calls from fragment to activity.
2. After clicking 'Share Wi-Fi' button, hide it before Wi-Fi DPP handshake completes.
3. Show 'Done' button for some error codes.
4. Use ViewModel to call startEasyConnectAsConfiguratorInitiator and
   startEasyConnectAsEnrolleeInitiator because a lifecycle object
   does not receive an Executor callback after configurator change.
5. In WifiDppQrCodeScannerFragment, show an error message for 10s instead of 2s
   since new added error messages may carry more information.
6. Show a different error message for enrollee handshake success but Wi-Fi
   connection fail case.
7. stop camera when scanned a Wi-Fi DPP QR code for enrollee.
8. In QR code scanner fragment, support to show error message after
    configuration change.

Bug: 124247872
Bug: 124491247
Test: manual test
      atest WifiQrCodeTest
      atest WifiDppConfiguratorActivityTest
      atest WifiDppEnrolleeActivityTest
      atest WifiDppQrCodeGeneratorFragmentTest
      atest WifiDppQrCodeScannerFragmentTest
      atest WifiNetworkListFragmentTest
      atest WifiDppChooseSavedWifiNetworkFragmentTest

Change-Id: Id130215e9ddafac8bc4c68238deda48ce99b4255
2019-02-20 14:28:52 +08:00
Lei Yu
88d6b2f9ad Merge "Add intent action for BT device detail page" 2019-02-12 19:40:18 +00:00
markchien
c992d0f4a9 Support entitlement check in DSDS
Get resource from preferred SIM's subId.

Bug: 122108346
Bug: 120069528
Test: atest TetherServiceTest
Change-Id: Ia4279a418dfa6cd14942b7f4d2a313156066381b
Merged-in: Ia4279a418dfa6cd14942b7f4d2a313156066381b
2019-02-12 16:17:36 +08:00
Mark Chien
a432a61943 Merge "Support entitlement check in DSDS" 2019-02-12 08:05:11 +00:00