Commit Graph

365 Commits

Author SHA1 Message Date
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
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
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
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
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
Mark Chien
a432a61943 Merge "Support entitlement check in DSDS" 2019-02-12 08:05:11 +00:00
TreeHugger Robot
d9b86280d5 Merge "Fix Wi-Fi DPP fragment back stack problems" 2019-02-12 03:17:57 +00:00
Fan Zhang
671a39f905 Remove intent-filters from SettingsSliceProvider
And remove unused methods from SliceDeepLinkSpringBoard.

This is part 1 of b/110156445

Bug: 110156445
Test: atest
Change-Id: Iab36a97332fd847ed911a9e34b505fd4a64522d3
2019-02-11 15:01:10 -08:00
jackqdyulei
715408e592 Add intent action for BT device detail page
Also update detail page to accept cold start:
1. Check whether profile is ready
2. When it is ready, refresh UI

Bug: 123665527
Test: SettingsRoboTests
Change-Id: I39382fd97e9da46fca08cd2e4a3ef15d32703664
2019-02-11 13:48:16 -08:00
Arc Wang
9d33313735 Fix Wi-Fi DPP fragment back stack problems
1. When a Wi-Fi network connected and receiving
   intent android.settings.PROCESS_WIFI_EASY_CONNECT_QR_CODE,
   show WifiDppAddDeviceFragment from WifiDppConfiguratorActivity
   instead of WifiNetworkListFragment

2. Only handle intent when savedInstanceState is null

3. To show a fragment
   I. do nothing when a fragment is already visible on screen,
   II. pop back stack if it's in back stack, we can do this because
   current fragment transactions are arranged in an order

Bug: 124194531
Test: atest WifiQrCodeTest
      atest WifiDppConfiguratorActivityTest
      atest WifiDppEnrolleeActivityTest
      atest WifiDppQrCodeGeneratorFragmentTest
      atest WifiDppQrCodeScannerFragmentTest
      atest WifiNetworkListFragmentTest
      atest WifiDppChooseSavedWifiNetworkFragmentTest

Change-Id: I1d44eeb3bdc7bfb2ec2e4d81efaab64b066651ad
2019-02-11 11:42:21 +08:00
markchien
1dd1d79d90 Support entitlement check in DSDS
Get resource from preferred SIM's subId.

Bug: 122108346
Bug: 120069528
Test: atest TetherServiceTest
Change-Id: Ia4279a418dfa6cd14942b7f4d2a313156066381b
2019-02-04 18:55:16 +08:00
Chandan Nath
e0dde6a6cd Merge "[Multi-user] Change Backup Settings page to support multi-user." 2019-01-30 14:03:38 +00:00
Daniel Sandler
30f0643c9e Merge "Fix dsandler's email address." 2019-01-30 02:09:54 +00:00
Dan Sandler
3d0078766d Fix dsandler's email address.
Test: dsandler can give OWNERS approval again
Change-Id: I8a59453ec95b98ce74703bbe003c9039e2a96f22
2019-01-29 14:41:54 -05:00
Johnson Lu
d1be14fe28 Use the UiDevice.setOrientation methods to simulate orienting the device
The UiDevice methods have a build in call to UiDevice.waitForIdle()
which will block until the UI has not changed for at least 500ms.

Bug: 123382213
Test: atest WifiDppConfiguratorActivityTest
Change-Id: I57539edecfd60f27a061a3ccc263c053ce158855
2019-01-29 09:16:20 +08:00
Chandan Nath
0bfef63812 [Multi-user] Change Backup Settings page to support multi-user.
With multi-user backup, backup will be available or secondary users and profiles too.

1. When there are profile users, this CL changes UI flow A to B
A. Settings Homepage -> System -> Google Backup Settings for primary user
to
B. Settings Homepage -> System -> Profile Select Dialog -> Google Backup Settings for chosen profile.
Change done as per https://g3doc.corp.google.com/company/teams/apps-android-settings/howto/ia.md?cl=head
2. Functionality remains the same when there are no profiles (BackupSettingsHelper, BackupSettingsContentProvider)
3.  Also, enabled Backup Settings for secondary users. (Previously, backup settings were only shown for
system user).(SettingsGateway)

Bug: 121198738

Test: 1) System -> Backup -> shows Profile Select Dialog -> Backup page for selected profile
2) On secondary user without profile, System -> Backup (with summary) -> Backup page for secondary user.

Change-Id: I6e21279978a5dfc6eca6f5a34bbfc15a34eac68b
2019-01-29 00:45:55 +00:00
Salvador Martinez
2611190def Update configurator intent to be public
This updates the settings code to use the public intent instead.

Test: tests still pass
Bug: WIP
Change-Id: Id40f60b4c2209073aef8747faa5de4e7ff9692ae
2019-01-28 12:33:30 +08:00
pastychang
9bdb59a764 Rename ButtonFooterMixin to FooterBarMixin
1. Change to FooterBarMixin
2. Move FooterButton to the same package with FooterBarMixin

Bug: 120805516
Test: RunSettingsRoboTests
Change-Id: Ic6937e3cbc515dd7bf877c9193932cd5800ac801
2019-01-24 16:18:28 +08:00
Pasty Chang
1fe41d44fe Merge "Migrating to new footer button for ChooseLockPassword page" 2019-01-23 07:37:23 +00:00
pastychang
76ad11c179 Migrating to new footer button for ChooseLockPassword page
Bug: 120805516
Test: RunSettingsRoboTests
Change-Id: I1fb4588d0c2cf04bca88ec470d59945c2fcab01c
2019-01-22 15:10:36 +08:00
Arc Wang
cb64510ff7 Control UI behavior according to different Wi-Fi DPP intents.
When it's a configurator from Settings, the cancel button of WifiDppChooseSavedWifiNetworkFragment
should pop back stack. When it's a configurator from a camera app, the cancel button of
WifiDppChooseSavedWifiNetworkFragment should finish host activity.

Bug: 120517242
Test: manual test
Change-Id: Ia0fb0daf16c94ecd62aa6d357405fcd529935d2f
2019-01-22 13:45:27 +08:00
Johnson Lu
ec18560911 Merge "Implement WifiNetworkListFragment - Part 2" 2019-01-15 15:41:09 +00:00
Johnson Lu
e910c7af60 Merge "Implement WifiNetworkListFragment" 2019-01-15 15:40:54 +00:00
Johnson Lu
98bc9e5384 Implement WifiNetworkListFragment - Part 2
Uses connected access point to start DPP in Configurator-Initiator role directly.

Bug: 118794978
Test: RunSettingsRoboTests
Change-Id: Ie2d5661fdef3588bb597d4a7e4dfe5f981737c84
2019-01-15 13:27:47 +08:00
Johnson Lu
0adba0aa1b Implement WifiNetworkListFragment
1.Scan valid access points for DPP configurator by using WifiTracker.
2.Allow user to add a new network for DPP configurator.

Bug: 118794978
Test: RunSettingsRoboTests
Change-Id: I36504d28dec7d2c9091aa6c35ebe2495045681f7
2019-01-15 13:27:47 +08:00
Svetoslav Ganov
8b9529e533 Merge "Update tests due to new platform API intruducing ambibuity" 2019-01-11 18:48:55 +00:00
Lei Yu
aa8de12e8d Merge "Add UiBlocker for DashboardFragment" 2019-01-11 18:17:56 +00:00
Svet Ganov
27b0668c91 Update tests due to new platform API intruducing ambibuity
Tests: atest MockLocationAppPreferenceControllerTest
       atest RestrictAppPreferenceControllerTest

bug:111061782

Change-Id: I287d40d5b1e5a6fff6a85cb5ba6a8b87096da9d4
2019-01-10 18:48:46 -08:00
jackqdyulei
22904a05b7 Add UiBlocker for DashboardFragment
If DashboardFragment detects blocker controllers, it won't display
until:
1. All blocking controllers finish bg works.
2. Timeout

This CL adds UiBlockerController to control this behavior and
BlockingSlicePreferenceController as an example.

Bug: 120803703
Test: atest SettingsUnitTests
Change-Id: I66fc194776d46ee49b3ec7685f3167834e673ba2
2019-01-10 14:25:43 -08:00
Arc Wang
dcf3f2906f Fix Wi-Fi DPP activity crash after configuration change.
Both QR code and Wi-Fi network data may not come from intent.
After configuration change, the null data will crash the activity.

Bug: 120243131
Test: atest WifiDppConfiguratorActivityTest
Change-Id: I6abbfc5d25431789e8ac9f6ee9dfaaef15b2de33
2019-01-10 12:22:56 +08:00
Arc Wang
a7d51370c8 Implement Wi-Fi DPP flow
1. Wi-Fi DPP hanshake fail UI
2. Show Wi-Fi DPP QR code information field on WifiDppAddDeviceFragment if it's available.
3. Click 'Choose Different Network' button will show WifiDppChooseSavedWifiNetworkFragment
4. After QR code scanner scans success, WifiDppConfiguratorActivity caches WifiQrCode instead
   of just a QR code string

Bug: 122429170
Test: manual test
Change-Id: I1ce1b014ff86903b5a7a8f3575cc98eb1079583c
2019-01-10 12:09:58 +08:00
Arc Wang
8e580952c3 Change action WIFI_DPP_CONFIGURATOR_CHOOSE_SAVED_WIFI_NETWORK to
PROCESS_WIFI_DPP_QR_CODE for more intuitive naming.

This change also caches the Wi-Fi DPP QR code in activity for
fragment to use.

Bug: 118794978
Test: manual test
Change-Id: I4bdb021883cb21ce7cc56edf656d1eee079359e5
2019-01-04 09:59:40 +08:00
Arc Wang
1988fb75c6 Implement Wi-Fi QR code scanner flow.
1. Implements WifiNetworkConfig Wi-Fi connection method
2. Shows error message when the QR code is not valid and hides it after 2s
3. In configurator mode, launchs AddDeviceFragment for a valid QR code
4. In enrollee mode, connects Wi-Fi for a valid QR code

Bug: 118794978
Test: manual test
      atest WifiQrCodetest
      atest WifiDppConfiguratorActivityTest
      atest WifiDppEnrolleeActivityTest
      atest WifiDppQrCodeScannerFragmentTest

Change-Id: Ie4731b22df295c60906156d33ea28dad9c084ce4
2019-01-02 07:12:15 +00:00