Commit Graph

390 Commits

Author SHA1 Message Date
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
Arc Wang
87c40f3b60 Fix ZXing Wi-Fi QR code parsing bug.
ZXing Wi-Fi QR code uses ';' as the delimiter for key/value pairs,
should not treat an escaped "\;" as the delimiter.

This fix also change the parsing result:

  If there is no specified key, the result value is null.
  If specified key exists with empty value, the result value is an empty string.

Bug: 118797380
Test: atest WifiQrCodetest
Change-Id: I786ce7c4fa66dcb31d8a61d7a3251c2f539ccc99
2019-01-02 06:07:46 +00:00
pastychang
5dfdb4ff45 Migrating to new footer button for lockscreen pages.
Bug: 120805516
Test: RunSettingsRoboTests
Change-Id: I12d68cd2eaa750eecd2c40e172efd6b6b16a0849
2018-12-26 11:12:46 +08:00
TreeHugger Robot
0b9740883f Merge "Remove tests in WifiSettingsUiTest" 2018-12-21 03:33:34 +00:00
jackqdyulei
2bdefaf68b Remove tests in WifiSettingsUiTest
One is obsolete and one is covered by robo test

Change-Id: I862882c5e1f2f4a7be15b042a8f778a158a9b89c
Fixes: 73796195
Test: atest
2018-12-20 15:55:36 -08:00
TreeHugger Robot
4bd75b0715 Merge "Implement QR code parser WifiQrCodetest." 2018-12-20 10:05:26 +00:00
Arc Wang
e1b6712926 Implement QR code parser WifiQrCodetest.
The parser supports standard WI-Fi DPP QR code & ZXing reader library's
Wi-Fi Network config format.

Bug: 118797380
Test: atest WifiQrCodetest
      atest RunSettingsRoboTests

Change-Id: Ia47b8f65a900099749a6aa24afa3abd21ede1582
2018-12-20 15:12:34 +08:00
pastychang
1b1666855e Migrating to new footer button for fingerprint and face enrolling pages.
Bug: 120805516
Test: RunSettingsRoboTests
Change-Id: I89a5e3674b8ba9ec66945c03c9b783664eee214f
2018-12-19 23:24:48 +08:00
Brett Chabot
031dcf5019 Migrate packages/apps/Settings to androidx.test
See go/jetpack-test-android-migration

Test: make checkbuild
Change-Id: If67b124188fd4e303154eb11263d03abfb3718c6
2018-12-17 09:20:05 -08:00
Arc Wang
4ab0d168e2 Implement Wi-Fi DPP UI.
Add WifiDppEnrolleeActivity
  Remove bottom buttons of WifiDppQrCodeScannerFragment
  Add ActionBar in WifiDppQrCodeScannerFragment &
      WifiDppQrCodeGeneratorFragment

Bug: 118797380
Bug: 118794858
Test: atest WifiDppConfiguratorActivityTest
      atest WifiDppQrCodeScannerFragmentTest
      atest WifiDppQrCodeGeneratorFragmentTest
      atest atest RunSettingsRoboTests

Change-Id: I1d464dc9a8d54a896b8e0c9185a74bed7b193b60
2018-12-12 10:07:20 +08:00
Arc Wang
e43bb77e5d Use multiple actions to launch Wi-Fi DPP configurator with different mode.
Bug: 118797380
Bug: 118794858
Test: atest WifiDppConfiguratorActivityTest
      atest WifiDppQrCodeScannerFragmentTest
      atest atest RunSettingsRoboTests

Change-Id: I96aba3c5e3d57c89d6948d3bf3dd85f29f705778
2018-12-04 11:46:37 +08:00
Johnson Lu
a558c01696 Integrate QrCode Camera with WifiDppQrCodeScannerFragment
Bug: 118797380
Test: RunSettingsRoboTests
Change-Id: I328bebbbcf44136df2c18ca1929a5da377a0cf6b
2018-12-01 09:03:39 +08:00
Arc Wang
6f8dc162df Merge "Upload basic UI files for Wi-Fi DPP Settings development II." 2018-11-30 02:48:53 +00:00
Fan Zhang
53f75f0df9 Move all custom slice uris to a registry class.
Change-Id: I192320f95ac81d14c8891ce2531d603912e59f56
Fixes: 119776308
Test: robotests
2018-11-29 16:41:21 -08:00
Arc Wang
f5d6089d35 Upload basic UI files for Wi-Fi DPP Settings development II.
Add 3 fragments:

  WifiDppQrCodeGeneratorFragment
  WifiDppChooseSavedWifiNetworkFragment
  WifiDppAddDeviceFragment

Bug: 118797380
     118797202
     118794978
     118796825
     118794858
Test: atest WifiDppConfiguratorActivityTest
      atest WifiDppQrCodeScannerFragmentTest
      atest atest RunSettingsRoboTests

Change-Id: I2fbc2f46f941d49b63e4ac74d92f94bf617d2b9b
2018-11-29 07:11:29 +00:00
Arc Wang
4591d82bdf Upload basic UI files for Wi-Fi DPP Settings development.
WifiDppQrCodeScannerActivity is the activity for user to scan
QR code and add device to a saved network.

Bug: 118797380
Test: manual
Change-Id: If2c8c5ba1620e5584fb47ba7b0ea2bc2d7acb641
2018-11-21 10:06:47 +00:00
TreeHugger Robot
ae30afb820 Merge "Enable Skip fingerprint when adding corp account." 2018-11-09 22:02:17 +00:00
Doris Ling
3e6d80c121 Enable Skip fingerprint when adding corp account.
- override the internal activity for picking screen lock from setup
wizard, so that when adding corp account, it can skip fingerprint even
when device is not yet provisioned.

Change-Id: I9485c54d097c82a584297fcaeb63b3271e05c1b6
Fixes: 112706989
Test: atest com.android.settings.password.SetupChooseLockGenericTest
2018-11-09 10:36:22 -08:00
Fan Zhang
5e6e6a14f2 Move all contextual card related classes.
... from homepage to contextualcards.

Test: rebuild
Change-Id: Id7889566ce1e7257eb699d963ae996906fdb58ff
2018-10-26 10:02:04 -07:00
Fan Zhang
130c477044 Remove DashboardSummary and all related classes.
- Condition is already supported in PersonalSettingsFragment
- Suggestion is already supported in PersonalSettingsFragment
- Static/dynamic tiles are supported in TopLevelSettings

Change-Id: I51882e3bd0919ad95109baefac683d98667c11e3
Fixes: 110405144
Test: robotests
2018-10-25 11:27:47 -07:00
Raff Tsai
db55661271 Change homepage layout
- merge PersonalSettingsFragment and TopLevelSettings together

Bug: 118224579
Test: manual
Change-Id: Ieee50a22babb25023e2a1767793e220862a38363
2018-10-23 19:37:19 +08:00
Mill Chen
77b2a30e9d Updated misc in Contextual Settings Homepage
- Set static cards with full width and removed packageName from setName
method.
- Removed Storage card from createStaticCards method because it does not
belong to default category.
- Changed the parameter type of setSliceUri from String to Uri in ContextualCard.
- Added StorageSlice and DeviceInfoSlice to the contextual card
provider.
- Fixed test cases related to these changes.

bug: 117874766
Test: robotest
Change-Id: Ic2dca353f85d0b6191ab19882dd8c5cb9c6cc658
2018-10-18 10:43:23 +08:00
Emily Chuang
9f25efc4d8 Add a filter to take out unnecessary homepage data.
After getting the full list from CardContentProvider, at render side
(Settings side) we should perform final filtering to filter out those
data that are not applicable at that moment. Apart from that, we should
also perform slice URI check in this stage to take out invalid slices.

Bug: 116063073
Test: robotests
Change-Id: Idfa94ec6176a9d9cb3379543e0a23858941af742
2018-10-09 16:20:34 +08:00
Fan Zhang
6632529ba1 Remove DeviceIndex feature/service.
Change-Id: I8444101669aef013183842c2d13cf3960c756398
Fixes: 112587202
Test: rerun all tests
2018-10-08 13:47:07 -07:00
Mill Chen
623eb5a904 Create the default static cards for Contextual Settings Homepage
Adding three default ContextualCard data to CardContentProvider, in case
of empty database or no SettingsIntelligence, to keep Contextual
Settings Homepage working well.

Bug: 113372471
Test: visual, atest SettingsHomepageActivityTest
Change-Id: Id7b26818e10f7945b2618100901310a005d8cc0d
2018-09-28 14:23:14 -07:00
Aurimas Liutikas
b1af85d155 Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
Merged-In: I941dea40562170649bf056e675cc32e5163c0e39
(cherry picked from commit a290b873d0)
2018-08-28 11:48:56 -07:00
Matthew Fritze
7f0a30226a Refactor WifiSlice to CustomSliceManager
Modify the WifiSliceCode to follow the pattern for
Slices that do not match existing UI components.

Test: robotests
Bug: 80263568
Change-Id: Id69e019608777282f4b64ff945e8c30c97aaf577
2018-08-20 08:03:34 -07:00