Commit Graph

7417 Commits

Author SHA1 Message Date
TreeHugger Robot
bc0bfe841e Merge "Add subscriptions list to the multi-network header" 2018-12-17 23:03:42 +00:00
Salvador Martinez
5bb0a63ba9 Add Battery Saver Schedule screen logic
This CL creates the controllers for the screen and makes it so that
the appropriate APIs are called when the user makes selections.

Test: battery saver comes on when state changed via adb, robotests
Bug: 111450127
Change-Id: I1dbcadd4b91276b700947df5a9444aabfec63aa3
2018-12-17 14:35:54 -08:00
Antony Sargent
74cb72433a Add wifi connection info to the multi-network header
The Network & internet page will have a dynamic header at the top when
users have more than one mobile subscription, showing information about
connectivity.

This CL adds a preference to this header when there is a wifi connection,
showing the same information as on the wifi-page (connection strength,
speed rating if available, etc.).

Bug: 116349402
Test: make RunSettingsRoboTests
Change-Id: Ia80d6e236a4996b501372ac4cd8e46ba6c5f8841
2018-12-17 13:46:40 -08:00
Antony Sargent
e92e07eb97 Add subscriptions list to the multi-network header
The new UX for showing multiple active mobile plan subscriptions (SIMs,
eSIMs, etc.)  needs a header at the top of the Network & internet page
that shows wifi status and a list of active mobile subscriptions in the
form of one Preference per subscription.

This CL adds display of the mobile subscriptions to this header. It does
not yet show the correct summary text or do anything when you tap on
them - that will be coming in subsequent CLs. Also, since adding a
variable number of items to the top of the page messes up our current
strategy of having a fixed number of hidden items at the bottom based on
overall item count, this CL just makes all items visible. Subsequent CLs
can restore this behavior with dynamic adjustment.

Bug: 116349402
Test: make RunSettingsRoboTests
Change-Id: Ibfadf8cb61f6f5aff6ce38b7974267b1e4ddc719
2018-12-17 13:26:13 -08:00
Julia Reynolds
18873b9278 Merge "Link to the appropriate config activity for dnd rules" 2018-12-17 21:08:55 +00:00
Fan Zhang
44b28f4a2b Remove battery saver condition.
Battery saver is also implemented as a contextual card. no need to use
condition any more.

Change-Id: I2607c610593c6e250569fbd3b4f1a5516f6ea62f
Fixes: 121115306
Test: robotests
2018-12-17 12:31:50 -08:00
TreeHugger Robot
91a6c6123f Merge "Migrate packages/apps/Settings to androidx.test" 2018-12-17 19:42:24 +00:00
TreeHugger Robot
cec9f138fc Merge "Add boolean flags to show/hide top-most settings." 2018-12-17 19:38:53 +00:00
TreeHugger Robot
3f5966bb48 Merge "Get enrollment animation from overlay" 2018-12-17 18:15:01 +00:00
Fan Zhang
2f54f0b90e Merge "Fix build failed of Settings test cases while importing AndroidX" 2018-12-17 18:14:01 +00: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
Jason Chiu
93d4993556 Micro cleanup and refactoring
- organize import
- remove unused code in ContextualCardLoaderTest
- refactor CardDatabaseHelper

Test: robotest
Change-Id: I1a5a49bee1c4edb34f1c59f3dbe37cb22f01b0d4
2018-12-17 17:13:08 +08:00
Jason Chiu
7aa7ece7a2 Fix build failed of Settings test cases while importing AndroidX
- API change in AndroidX Preference causes a build breakage
- Apply explicit casting for the new API interface

Test: robotest
Fixes: 121109361
Change-Id: If3e7be9e53c7860252523700d6721ae4956db68a
2018-12-17 16:46:42 +08:00
Johnson Lu
ebbb0bc563 Adjust camera preview area to square
1.Choose the smaller size of both dimensions as its size.
2.Set transform matrix to crop and center the preview picture.

Bug: 118797380
Test: make RunSettingsRoboTests
Change-Id: Ic65fb1fe0c5082995d6903f50dda48eec16c3fb1
2018-12-15 16:07:02 +08:00
TreeHugger Robot
c748b6eeef Merge "Make location history package not disableable." 2018-12-15 05:10:30 +00:00
Kevin Chyn
9ed7cb40cb Get enrollment animation from overlay
Bug: 111548033

Test: Able to get animation from overlay
Test: atest RunSettingsRoboTests

Change-Id: Ib02f484474b306ba8d61f9be541acb12dd1ecd90
2018-12-14 18:02:54 -08:00
pastychang
103409bd4a Change to use footer button of setupcompat
Bug: 120805516
Test: RunSettingsRoboTests
Change-Id: I0eba5f8fff37bbb13b54a4d41290ae9363905f96
2018-12-15 09:24:56 +08:00
Ben Lin
11f698ba22 Add boolean flags to show/hide top-most settings.
Bug: None
Test: RunSettingsRoboTests
Change-Id: Ib576f5979feda0fa7f573915acffc5065d40095c
2018-12-14 16:00:21 -08:00
Julia Reynolds
ec84a9367f Link to the appropriate config activity for dnd rules
Test: atest, manual
Bug: 111474881
Change-Id: I0c1d7b14abe3cf65762167f3c412fa8f2be1d842
2018-12-14 14:41:48 -05:00
cosmohsieh
64b894f81d Implement getConfig() method to get WifiConfiguration
Make a duplicated function of WifiConfigController.getConfig(). This
function could get a new WifiConfiguration from input AccessPoint or
ScanResult.
Should be removed if there is standard one in framework.

Bug: 120827021
Test: RunSettingsRoboTests

Change-Id: Ia5981e8d41f434c097b464a2bfe18e1356f7b087
2018-12-14 09:54:34 +00:00
Stanley Wang
3f80d1b64b Implement the Copyable interface to PhoneNumberPreferenceController
Change-Id: I70085cffe13047ac808d1bf08a467f693b1d8737
Fixes: 118398321
Test: manual and robotests
2018-12-14 15:09:34 +08:00
Philip P. Moltmann
41061cb63e Use new UsbManager#getPorts API
Test: - Looked as USB state in Settings
      - RunSettingsRoboTests
Bug: 115301401
Change-Id: I07ac20ac6a3f33d99e9edb6718318ede22681be1
2018-12-13 15:27:25 -08:00
Matthew Fritze
735d6ef195 Move Panel to public API
Change the SettingsPanelActivity to reference the
public API.

Bug: 117804442
Test: robolectric, manual app
Change-Id: I4b128ae9d97c1000fdaa0c3fb5b94f8dc096055f
2018-12-13 13:58:07 -08:00
Fan Zhang
abbc619601 Remove SettingsRobolectricTestRunner
Test: rerun robotests
Change-Id: I7054d8d5cfc4756beb8d3032bc92361534229494
2018-12-13 11:20:40 -08:00
TreeHugger Robot
887fa5c646 Merge "Use binary resource support in robolectric" 2018-12-13 07:44:19 +00:00
TreeHugger Robot
a56b5926a9 Merge "Fix ANR in SliceRelayReceiver" 2018-12-13 06:20:19 +00:00
Fan Zhang
e824c7e005 Merge changes I6e73bcf9,I257ba108
* changes:
  Add a timeout waiting for contextual card loader.
  Set setting back to default when turning off dev option
2018-12-13 04:03:28 +00:00
James Lemieux
f1dade40d2 Use binary resource support in robolectric
The resources available to tests are now exactly the merged resources
located in the APK under test.

Bug: 74359828
Test: make -j56 RunSettingsRoboTests
Change-Id: I050db81a92decefea23314b5ec7a62f77ff4bb2b
2018-12-12 19:53:49 -08:00
Colin Cross
1f5fab1480 Merge "Revert "Change LayoutPreference resource path in robo test"" 2018-12-13 03:16:05 +00:00
Colin Cross
75ac728e0e Revert "Change LayoutPreference resource path in robo test"
This reverts commit ff8fca7d9e.

Reason for revert: broke build when combined with ag/5781147
Bug: 120706174

Change-Id: Id543bc3cb0b4979144e92c400e57988009f4c407
2018-12-13 03:15:08 +00:00
Raff Tsai
86a2afe798 Fix ANR in SliceRelayReceiver
The same broadcast are handled in SliceRelayReceiver and WifiScanWorker.
We will only use WifiScanWorker to handle wifi broadcast.

Change-Id: I32c2fcc699ae240f12bd1049ba33e1792ae123b0
Fixes: 120284615
Test: manual
2018-12-13 10:34:45 +08:00
TreeHugger Robot
906d731b11 Merge "Change LayoutPreference resource path in robo test" 2018-12-13 02:11:59 +00:00
Pasty Chang
57baac2df5 Merge "Change to use setupcompat and setupdesign for suw pages" 2018-12-13 01:48:58 +00:00
Johnson Lu
d6a40032c1 Merge "Implement receiver flow of WiFi sharing feature" 2018-12-13 00:54:46 +00:00
Fan Zhang
ad12b76a98 Add a timeout waiting for contextual card loader.
- Intially setting it to 1 second.
- Also changed card appear animation from drop in to fade in. It looks
  less janky if we don't animate any size change.
- And some random code cleanup

Change-Id: I6e73bcf98fd9aa1d76ae002b94ab5b068dfecf1e
Fixes: 120916829
Test: robotests
2018-12-12 16:28:24 -08:00
Fan Zhang
07933cb967 Set setting back to default when turning off dev option
When turning off developer options, mobile data always on setting should
be set back to default, which is ON not OFF.

Change-Id: I257ba108976b05162fa3cea6e48f3490e9c64f80
Fixes: 119719605
Test: robotests
2018-12-12 16:28:24 -08:00
Wei Wang
4c3a0d7c2a Make location history package not disableable.
Bug:119226131

Test: Unit test, also tested manually on device

Change-Id: Ib72fdd8b5195b67ef9d79a8a6dbb91acc54dbbbf
2018-12-12 16:21:39 -08:00
TreeHugger Robot
6718986bb9 Merge "Add temporary link to PermissionController for new default apps UI." 2018-12-12 23:49:30 +00:00
Hai Zhang
2101151180 Add temporary link to PermissionController for new default apps UI.
This change adds a temporary link in the default apps settings to
allow launching the new default apps UI in PermissionController during
the process we migrate default apps to use roles.

Bug: 110557011
Test: manually tested the UI
Change-Id: I0ac340acd5a077c74b48b28c97f517adb2084a36
2018-12-12 10:47:17 -08:00
TreeHugger Robot
db363a8026 Merge "Implement Wi-Fi DPP UI." 2018-12-12 10:05:45 +00:00
Pasty Chang
c1f8600d9f Change to use setupcompat and setupdesign for suw pages
1. remove the dependence of setupwizardlib.
2. add to use setupcompat and setupdesign.
3. modify new footer button in following up cl.

Bug: 120805516
Bug: 120872944
Test: RunSettingsRoboTests
Change-Id: I463dd35b799d4250b2aabce0cb0b8102cf9dd7d6
2018-12-12 03:16:29 +00: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
Salvador Martinez
6974be492b Merge "Create shell UI for smart battery saver" 2018-12-11 23:24:53 +00:00
Xin Li
419086d8b3 DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master
Bug: 120502534
Change-Id: I63bedf30fa0a4629cfab1dbe94359b4d36cf9ac1
2018-12-11 15:24:05 -08:00
Salvador Martinez
108faaf1ce Create shell UI for smart battery saver
This CL creates the new screen WITHOUT any of the behaviors
(changing the global settings/calling power manager apis) and
hooks it up to the preference in BatterySaverSettings for
navigation. The logic for the preference in BatterySaver Settings
is also added so that it shows the correct summary when the
schedule settings are modified. Additionally, a small tweak is
made to the radio preference widget to make it possible to hide
the appendix view. It didn't seem to do anything except get in
the way and potentially ruin your day, much like its biological
counterpart.

Test: Overriding power mode via adb, robotests
Bug: 111450127
Change-Id: Ic681aaf565ce1caf7d00d314e14ae6c4779fe8f6
2018-12-11 11:20:02 -08:00
tmfang
ff8fca7d9e Change LayoutPreference resource path in robo test
Since we change the name of LayoutPreference in SettingsLib,
we also need to change its path for robo test.

Test: robotest
Change-Id: I0401351585564ebfc320c52279af6bfa3b6dbb84
Fixes: 120706174
2018-12-11 21:49:42 +08:00
Cosmo Hsieh
5ac2c048fb Merge "Rename wifi/NetworkRequestTimeoutDialogFragment to wifi/NetworkRequestErrorDialogFragment for extending usage." 2018-12-11 08:21:14 +00:00
TreeHugger Robot
c53717f5d7 Merge "Add a helper class for listening to subscription and airplane mode changes" 2018-12-11 07:11:57 +00:00
Johnson Lu
5aef897e9b Implement receiver flow of WiFi sharing feature
1.Add a button to launch QR code scanner when add a network.
2.Scan button added in AddNetworkFragment / WifiDialog / WifiSettings.

Bug: 120630683
Test: make RunSettingsRoboTests
Change-Id: I340bfa2247e092f586dd90dfea37c355e681ffee
2018-12-11 14:25:07 +08:00
Johnson Lu
8ef2edfe32 Merge "Implement host flow of WiFi sharing feature" 2018-12-11 05:51:32 +00:00