Commit Graph

4709 Commits

Author SHA1 Message Date
Fan Zhang
970bacd8cb Remove IA mapping for old connected device page
Change-Id: I201c09facb9e21d452c58ff3d257bdd37e6b854d
Fixes: 69471219
Test: robotest
2018-02-15 10:36:16 -08:00
jackqdyulei
c76bb78758 Make BatteryDatabaseManager singleton
In BatteryTipLoader, two threads may access BatteryDatabaseManager
simultaneously. In this case thread A may close the database thread B
holds, then settings will crash.

In this cl, we make the BatteryDatabaseManager as singleton and
synchronize all the database related method. Then it shouldn't have
the crash anymore.

Bug: 73346734
Test: RunSettingsRoboTests
Change-Id: Ib53b2894b25155cca0c6ec60d1a816663d27a578
2018-02-14 14:24:02 -08:00
TreeHugger Robot
a33ee8b349 Merge "Fix instrumentation tests" 2018-02-14 17:22:55 +00:00
Yuchen Chang
c6233057ca [Settings] Add focus for SSIDtext to show IME
Add focus to SSIDtext to show IME when choosing add network.

Bug: 72882629
Test: RunSettingsRobotests & Manual test
Change-Id: I1c51c4b800a7668c6760c88b97e920cf75c26b26
2018-02-14 14:07:25 +08:00
Adrian Roos
807cf8d2c5 Use new OverlayManager categories
Using this, we split overlays based on their category, so that
cutout emulation and theme overlays no longer clash in their
respective settings.

Bug: 72436677
Test: make ROBOTEST_FILTER=EmulateDisplayCutoutPreferenceControllerTest RunSettingsRoboTests
Change-Id: I23f22113351b3948beb9e3a1fb969700852539cc
2018-02-13 19:13:10 -08:00
TreeHugger Robot
03017fc928 Merge "Don't set USB mode if user is a monkey" 2018-02-14 02:35:10 +00:00
Jerry Zhang
9e16092cb3 Don't set USB mode if user is a monkey
Test: tests pass
Fixes: 73246183
Change-Id: I9570c8bd8b11edd6eb0944a4aa766c22b4cc3619
2018-02-13 16:51:21 -08:00
TreeHugger Robot
bee1a6d990 Merge "Introduce config_disable_uninstall_update flag." 2018-02-14 00:33:59 +00:00
TreeHugger Robot
c0850a75e4 Merge "Add summary for hostspot when airplane is on." 2018-02-14 00:14:09 +00:00
TreeHugger Robot
54d6620e58 Merge "Update detector and action for restrict app" 2018-02-13 22:46:07 +00:00
Ben Lin
bba02d88a4 Introduce config_disable_uninstall_update flag.
This adds the following flag:
config_disable_uninstall_update

Which by default is false. When set to true, it will hide the "Uninstall
updates" menu item for all cases.

This is useful for cases where the device OEMs want to allow users to
install apps, but do not want the ability to roll back updates on system
applications.

Bug: 62379281
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AppInfoDashboardFragmentTest
Change-Id: I55fe92467ca95c05f6682174c117031d8295790e
2018-02-13 14:45:34 -08:00
TreeHugger Robot
2e0de6bb41 Merge "Remove the battery optimization menu" 2018-02-13 22:31:39 +00:00
jackqdyulei
2c45737dfb Add summary for hostspot when airplane is on.
Change-Id: I5470dab7050b73ed474abd5b948e873699819751
Fixes: 72716285
Test: RunSettingsRoboTests
2018-02-13 14:25:05 -08:00
TreeHugger Robot
2792da1ec7 Merge "Add method to update "state" column in anomaly db." 2018-02-13 22:05:32 +00:00
jackqdyulei
af2ece7387 Update detector and action for restrict app
1. In detector, read data from database and display it.
2. Update the RestrictAppAction to mark anomaly as handled
if restriction is toggled.
3. Update the RestrictAppTip to handle state change.

Bug: 72385333
Test: RunSettingsRoboTests

Change-Id: I0bbe6f6fd049bf2e7a2bee1dee08d5199f922e31
2018-02-13 12:35:11 -08:00
jackqdyulei
25fc8e4556 Remove the battery optimization menu
Change-Id: I129f2c39dba506dabef2cf543e71f70cfd1e7fdf
Fixes: 73189468
Test: Test still pass
2018-02-13 11:06:26 -08:00
jackqdyulei
fe13d2813a Add method to update "state" column in anomaly db.
This state could be "new", "handled" or "auto-handled".

Bug: 72385333
Test: RunSettingsRoboTests
Change-Id: I2e3a9d2d3457f125421467e72f5b734990273abe
2018-02-13 10:16:24 -08:00
TreeHugger Robot
44935e8602 Merge "Add content description to suggestion card close button." 2018-02-13 11:07:11 +00:00
TreeHugger Robot
9017e45d09 Merge "Disable "double tap to check" when "always on"" 2018-02-13 04:07:14 +00:00
Lucas Dupin
8e490b4039 Disable "double tap to check" when "always on"
"Double tap to check" has no effect when AOD is enabled.
Double tapping will take you to the lock screen anyway.

Test: manual
Test: make RunSettingsRoboTests ROBOTEST_FILTER=DoubleTapScreenPreferenceControllerTest
Change-Id: Ia97b7ecb00a9d83b867959d83642d476841e2f13
Fixes: 73096311
2018-02-12 15:28:59 -08:00
Fan Zhang
2edbaa7062 Change print setting from a dynamic tile to static pref
...because dynamic tile is a lot harder to index correctly.

- Removed metadata that makes PrintSettings a dynamic tile.
- Added PrintSettings into connected_device xml.
- Added a new PreferenceController - all summary updating logic is
  copied from PrintSettingsFragment

Change-Id: I41e7c9d23e97ecd5a043ac7c33f2d404260c92e7
Fixes: 73128944
Test: robotests
2018-02-12 15:19:43 -08:00
Fan Zhang
d2e33e73a1 Fix instrumentation tests
Change-Id: I4f6891f095f4803e822b55a3f44d67ee4d173180
Fixes: 73242024
Test: atest
2018-02-12 14:26:47 -08:00
Leslie Watkins
29a2379b09 Merge "Remove all reference to SmsMirroring in Android Settings." 2018-02-12 22:13:48 +00:00
Leslie Watkins
58eb43a2e4 Remove all reference to SmsMirroring in Android Settings.
Test: Robotests

Change-Id: I3318c6915cae95522f09838f00a3c567fe9e5fc5
2018-02-12 22:05:56 +00:00
Doris Ling
98a6b74291 Add content description to suggestion card close button.
Change-Id: I2354dd5a4b092ac24bbc0c197bd228b73d8ede64
Fixes: 72958040
Test: talkback, make RunSettingsRoboTests
2018-02-12 11:40:03 -08:00
Victor Chang
d4c1d5ee90 Merge "Use 24-hour settings for time formatting" 2018-02-12 10:38:40 +00:00
Pavlin Radoslavov
ac8aed2ce8 Merge "Use proper string formatting for the "Active device" string" am: f5848d0f4d
am: 8018f82e5a

Change-Id: Iaf745544ca349cb5a0193b4dd0e46bcc89ff4e0c
2018-02-10 09:22:38 +00:00
Pavlin Radoslavov
8018f82e5a Merge "Use proper string formatting for the "Active device" string"
am: f5848d0f4d

Change-Id: Ic34959c5ca44ad6d0ac06dfb76b3b07cd4bee819
2018-02-10 09:12:16 +00:00
TreeHugger Robot
aa27a344aa Merge "Add test to verify external account settings is shown." 2018-02-10 00:31:17 +00:00
Pavlin Radoslavov
576d4448a9 Use proper string formatting for the "Active device" string
Updated testContextMock() how it checks the bluetooth_connected string.

Bug: 72317067
Test: Unit test updated:
      make ROBOTEST_FILTER=BluetoothDetailsHeaderControllerTest \
                           RunSettingsRoboTests
      Manual: two headsets and switching the active device
Change-Id: I3db178d71543e4dfa437544350c58241860ae703
Merged-In: I3db178d71543e4dfa437544350c58241860ae703
(cherry picked from commit b58b006e44)
2018-02-09 14:53:14 -08:00
TreeHugger Robot
373a33bb87 Merge "Fix double search icon in wifi calling page" 2018-02-09 22:39:30 +00:00
Doris Ling
f2ecc4bf26 Add test to verify external account settings is shown.
- add a test service that provides a test authenticator and a test
preference screen. Creates corresponding test account and verifies that
the preferences defined in the authenticator is displayed from the
account detail page.

Change-Id: Iab87177ae500d0a36272cf8ecf464139a3dc07cd
Fixes: 35353708
Test: make SettingsUnitTests
2018-02-09 14:27:06 -08:00
Fan Zhang
b91db42100 Fix double search icon in wifi calling page
- Moved fragments into wifi sub-package.
- Cleaned up inheritance for WifiCallingSettings
- Attach help and search action menu controller correctly.

Change-Id: I0bc8ab99df5d8c5ea64fb64de5ae70c2c9bd6f31
Fixes: 72958674
Test: robotest
2018-02-09 11:26:16 -08:00
Victor Chang
e226c9a8bf Use 24-hour settings for time formatting
Test: m RunSettingsRoboTests
Bug: 72311296
Change-Id: I7c1458dbc2e4e15765f703c35a0113341b912a2b
2018-02-09 18:35:14 +00:00
Sundeep Ghuman
0f711f86a6 Remove use of forceUpdate.
Now that WifiTracker correctly handles eviction of stale scan results
only after scanning has resumed, it is no longer necessary to
conditionally fetch APs on app resumption.

Fix broken test.

Bug: 68030053
Test: runtest --path
tests/unit/src/com/android/settings/wifi/WifiSettingsUiTest.java

Change-Id: Ib4c8d6e53cf760fcb5f00069da40c578171c09f4
2018-02-08 17:49:05 -08:00
TreeHugger Robot
e5020950f1 Merge changes Ib3d3df9f,Iae9096a1
* changes:
  Use BatterySaverReceiver in battery saver settings
  Add controller for battery saver button
2018-02-09 01:35:18 +00:00
TreeHugger Robot
7957d8125b Merge "Add test to verify Users settings shows in secondary user." 2018-02-09 00:11:41 +00:00
TreeHugger Robot
1a326b7ce1 Merge "Fix developer option not being enabled." 2018-02-08 23:24:49 +00:00
jackqdyulei
a2df26e9b3 Use BatterySaverReceiver in battery saver settings
Use this receiver to listen to following updates:
1. Plug state: if it is plugged in, disable this two state
button, otherwise make it enabled
2. low power mode: If mode on, show "turn off" otherwise show
"turn on"

Bug: 72228477
Test: RunSettingsRoboTests
Change-Id: Ib3d3df9f9a5fbac8b1b876c9e193beb75f522ebd
2018-02-08 15:22:27 -08:00
jackqdyulei
92757b2454 Add controller for battery saver button
Bug: 72228477
Test: RunSettingsRoboTests
Change-Id: Iae9096a10553ea761d099e1e72c1de56b693bac0
2018-02-08 15:19:00 -08:00
TreeHugger Robot
1dd690198f Merge "Use proper string formatting for the "Active device" string" 2018-02-08 22:47:52 +00:00
Doris Ling
7459f40bfd Add test to verify Users settings shows in secondary user.
- also update launch sequence for Users settings tests as Users settings
has been moved inside system settings and the preference title has
changed.
- and change the test to run with AndroidJUnit4.

Change-Id: I049b83f9ae4b2724608af267e8900dd9e6749874
Fixes: 34774778
Test: make SettingsUnitTests
2018-02-08 14:06:23 -08:00
Fan Zhang
39a5eb5f20 Merge "Move restriction check for dev settings into controller" 2018-02-08 21:51:50 +00:00
Doris Ling
e0014e2234 Fix developer option not being enabled.
- when screen lock is set, we will start the activity to check user's
credential. Override onActivityResult() and call BuildNumberPreferenceController's
method accordingly, so that we will checks the password confirm result and enable
the developer options if it is success.

Change-Id: Ie2df644c53430ad4eb394480348d956177804ec3
Fixes: 73102865
Test: make RunSettingsRoboTests
2018-02-08 13:17:54 -08:00
TreeHugger Robot
eab75df8fa Merge "Don't use debug data in app list controller" 2018-02-08 20:20:33 +00:00
TreeHugger Robot
f94f6d41d9 Merge "Add Toggle Controllers to XML" 2018-02-08 19:46:26 +00:00
Pavlin Radoslavov
b58b006e44 Use proper string formatting for the "Active device" string
Updated testContextMock() how it checks the bluetooth_connected string.

Bug: 72317067
Test: Unit test updated:
      make ROBOTEST_FILTER=BluetoothDetailsHeaderControllerTest \
                           RunSettingsRoboTests
      Manual: two headsets and switching the active device
Change-Id: I3db178d71543e4dfa437544350c58241860ae703
2018-02-08 11:14:10 -08:00
jackqdyulei
88c86f73bb Don't use debug data in app list controller
This is a bug, USE_FAKE_DATA should never be true in build

Change-Id: I14059cd243380c754ca0cff09f088d62828ec755
Fixes: 73117246
Test: Build
2018-02-08 10:25:24 -08:00
Jan Nordqvist
4fbe0f8354 Update DataUsageSummary to include carrier provided information.
This CL augments the existing data usage display with carrier provided
information about data usage and plans when available from the new
frameworks API.

Test: manual
Test: make RunSettingsRoboTests
Bug: 70950124

Change-Id: Idde1ff786e8c5dbc04e58ffbcc0fd18789682699
2018-02-08 10:13:42 -08:00
TreeHugger Robot
525d757c09 Merge "Apply checkbox enable state on viewholder bind" 2018-02-08 17:00:59 +00:00