Commit Graph

3464 Commits

Author SHA1 Message Date
jeffreyhuang
78a560ff28 Introduce BluetoothDeviceNoNamePreferenceCtrl
- Create new BluetoothDeviceNoNamePreferenceController
 - Create controller inside the DashboardFragment
 - Port logic from DevelopmentSettings into the controller

Bug: 34203528
Test: make RunSettingsRoboTests -j40
Change-Id: Ia73952bd396fb50d96393befd011f7cdc08689f7
2017-09-26 12:10:47 -07:00
jeffreyhuang
34fa4823cc Introduce WifiAggressiveHandoverPreferenceCtrl
- Create new WifiAggressiveHandoverPreferenceController
 - Create controller inside the DashboardFragment
 - Port logic from DevelopmentSettings into the controller

Bug: 34203528
Test: make RunSettingsRoboTests -j40
Change-Id: Ic32119a83ca21a6475cfd27b04cde76ba87bd372
2017-09-26 11:48:37 -07:00
TreeHugger Robot
9aae9d5d80 Merge "Rename TelephonyMonitor to ConnectivityMonitor" 2017-09-26 17:14:34 +00:00
jeffreyhuang
2145f8a275 Introduce CameraHalHdrPlusPreferenceControllerV2
- Create new CameraHalHdrPlusPreferenceControllerV2
 - Copy logic from CameraHalHdrPlusPreferenceController with slight
   modifications for dashboard fragment compatibility
 - Deprecate CameraHalHdrPlusPreferenceController

Bug: 34203528
Test: make RunSettingsRoboTests -j40
Change-Id: I9b88286d16930df208c7c413728c816637409c81
2017-09-26 09:59:39 -07:00
Jeffrey Huang
070a0f9c43 Merge "Introduce WifiRoamScansPreferenceController" 2017-09-26 16:56:57 +00:00
Naveen Kalla
cac657fdbb Rename TelephonyMonitor to ConnectivityMonitor
TelephonyMonitor can be extended to catch WIFI and GPS
issues.

Bug: 38422753
Test: Unit tests and manual testing
Change-Id: I71f9cf75fdc792452dd35a3581ef0f5fcc0c1ab0
2017-09-26 05:36:44 -07:00
TreeHugger Robot
36fe2ca3dc Merge "Move the indexing back into DatabaseIndexingManager" 2017-09-26 04:21:45 +00:00
Matthew Fritze
80e54df833 Move the indexing back into DatabaseIndexingManager
For the sake of incremental updates, we moved all of the
conversion from PreIndexData to IndexData, and the
insertion of the rows into the SQLite DB into a new class,
IndexDataConverter. However, it's real role is just to
convert PreIndexData into IndexData.

So this CL moves the insertion of the rows back into
DatabaseIndexingManager.

Again, for the sake of simplicity, I did not change the
conversion flow. Rather, instead of inserting a row at the
end of the conversion, I just put it into a list which is
then returned. This lets me move the tests to appropriate
locations, without having to change them too much.

In the tests, the references to real xml layouts are
changed to fake references. Hooray for being less brittle.
IndexDataConverter now just tests that the IndexData
has the appropriate data from PreIndexdData.

Independently, we test that IndexData gets inserted in
DatabaseIndexingManager.

In the next CL, I'll refactor the conversion
flow for readability.

Bug: 33577327
Test: make RunSettingsRoboTests
Test: Took a database dump before and after change,
      and they were the same. Cool.

Change-Id: I39cc812d1f736e13a0a51af50984c239961ecf7a
2017-09-25 16:48:22 -07:00
jeffreyhuang
914d9fa55e Introduce WifiRoamScansPreferenceController
- Create new WifiRoamScansPreferenceController
 - Create controller inside the DashboardFragment
 - Port logic from DevelopmentSettings into the controller

Bug: 34203528
Test: make RunSettingsRoboTests -j40
Change-Id: I967944e8d22d985035c94874d13e02c3f5e70781
2017-09-25 16:43:55 -07:00
Jeffrey Huang
07aba19287 Merge "Introduce WifiDisplayCertPreferenceController" 2017-09-25 22:31:22 +00:00
Jeffrey Huang
ae51e78998 Merge "Introduce CameraLaserSensorPreferenceControllerV2" 2017-09-25 21:24:21 +00:00
jeffreyhuang
d61c360385 Introduce WifiDisplayCertPreferenceController
- Create new WifiDisplayCertificationPreferenceController
 - Create controller inside the DashboardFragment
 - Port logic from DevelopmentSettings into the controller

Bug: 34203528
Test: make RunSettingsRoboTests -j40
Change-Id: I34688131054e1a9d660482b04ad4b792235c445a
2017-09-25 13:55:28 -07:00
jeffreyhuang
c215b3c4e9 Introduce CameraLaserSensorPreferenceControllerV2
- Create new CameraLaserSensorPreferenceControllerV2
 - Copy logic from CameraLaserSensorPreferenceController with slight
 modifications for dashboard fragment compatibility
 - Deprecate CameraLaserSensorPreferenceController

Bug: 34203528
Test: make RunSettingsRoboTests -j40
Change-Id: I8854d3e891afab607025a427a376e33e9b61dcc3
2017-09-25 12:42:47 -07:00
Jeffrey Huang
8ac9352b02 Merge "Introduce DisableAutoUpdatesPreferenceController" 2017-09-25 19:19:38 +00:00
Doris Ling
8d4aa3f9b3 Merge "Put code that updates the access points lists inside a Handler." 2017-09-22 22:39:24 +00:00
jeffreyhuang
6177d91efe Introduce DisableAutoUpdatesPreferenceController
- Create new DisableAutomaticUpdatesPreferenceController
 - Create controller inside the DashboardFragment
 - Port logic from DevelopmentSettings into the controller

Bug: 34203528
Test: make RunSettingsRoboTests -j40
Change-Id: Iae7ff3f7d2e296968c67e14c33089b3b42c4912a
2017-09-22 14:57:38 -07:00
jackqdyulei
0b6a3bc9c4 Hide summary for type system
Bug: 66573821
Test: RunSettingsRoboTests
Change-Id: I9d0f829cbe3577665d1c3d593e2ae95c0bbfa8b6
2017-09-22 13:45:51 -07:00
Winson Chung
078d01c8c1 Merge "Fixing issue with PiP settings not showing apps for other profiles." into oc-mr1-dev
am: 625b1dd13a

Change-Id: I5904804d9407a279de508fc8e071bc4132856545
2017-09-22 20:43:39 +00:00
Jeffrey Huang
ce7721625d Merge "Introduce CoolColorTemperaturePreferenceController" 2017-09-22 20:38:40 +00:00
Winson Chung
625b1dd13a Merge "Fixing issue with PiP settings not showing apps for other profiles." into oc-mr1-dev 2017-09-22 20:30:28 +00:00
Maurice Lam
e18902ec67 Update Robolectric to 3.4.2
Bug: 66693279
Test: m RunSettingsRoboTests
      m RunSettingsRoboTests-jacoco
Change-Id: I9df619c3d68f0af2ee2ae944a15998275129f7c2
2017-09-22 18:34:00 +00:00
Jeffrey Huang
e8ac23d93f Merge "Introduce DebugViewAttributesPreferenceController" 2017-09-22 17:02:44 +00:00
Jeffrey Huang
1257b7bcec Merge "Introduce LocalTerminalPreferenceController" 2017-09-22 17:01:41 +00:00
TreeHugger Robot
0660d19629 Merge "Let SuggestionFeatureProvider manage SuggestionService name" 2017-09-22 16:55:08 +00:00
Fan Zhang
6598a7b4cd Let SuggestionFeatureProvider manage SuggestionService name
Bug: 65065268
Test: robotests
Change-Id: I82315a7b1565dc34b516bf685ad8e831a1e28591
2017-09-21 18:25:40 -07:00
jeffreyhuang
af7737c15c Introduce DebugViewAttributesPreferenceController
- Create new DebugViewAttributesPreferenceController
 - Create controller inside the DashboardFragment
 - Port logic from DevelopmentSettings into the controller

Bug: 34203528
Test: make RunSettingsRoboTests -j40
Change-Id: Ida84c187f2670a601aaf1ff2f141807b28ec081c
2017-09-21 17:02:29 -07:00
jeffreyhuang
2ebb0dd1d6 Introduce LocalTerminalPreferenceController
- Create new LocalTerminalPreferenceController
 - Create controller inside the DashboardFragment
 - Port logic from DevelopmentSettings into the controller

Bug: 34203528
Test: make RunSettingsRoboTests -j40
Change-Id: Ib4a375181af9367a4aef74fd9889de2de1c8652d
2017-09-21 16:23:04 -07:00
TreeHugger Robot
d0b1297e84 Merge "Fixing issue with PiP settings not showing apps for other profiles." 2017-09-21 23:08:48 +00:00
Jeffrey Huang
b9a1f1a563 Merge "Introduce PictureColorModePreferenceController" 2017-09-21 21:07:29 +00:00
Doris Ling
744ff5c607 Merge "Fix NPE crash in UsageAccessDetails" am: cd959f28a0 am: 296c46404c am: c13415391b
am: 913d1667ce

Change-Id: Ib859bec6cd9ca1422856d091fc7a0b9894397b04
2017-09-21 19:31:54 +00:00
Doris Ling
913d1667ce Merge "Fix NPE crash in UsageAccessDetails" am: cd959f28a0 am: 296c46404c
am: c13415391b

Change-Id: I8e5050b2b4c5884b93ef56155f50d1fffcc13579
2017-09-21 19:29:53 +00:00
Doris Ling
296c46404c Merge "Fix NPE crash in UsageAccessDetails"
am: cd959f28a0

Change-Id: I21f898f7ec8fd67d4f29d73491b4ac57cad7a252
2017-09-21 19:24:52 +00:00
jeffreyhuang
6162fa5ef8 Introduce PictureColorModePreferenceController
- Create new PictureColorModePreferenceController
 - Create controller inside the DashboardFragment
 - Refactor ColorModePreference so isAvailable() no longer depends on
 ColorModePreference
 - Port logic from DevelopmentSettings into the controller

Bug: 34203528
Test: make RunSettingsRoboTests -j40
Change-Id: I8dff5b0d5ad1d7f043fc7ead540b2c0c960933e3
2017-09-21 12:24:32 -07:00
Winson Chung
e8b8633181 Fixing issue with PiP settings not showing apps for other profiles.
Bug: 65417722
Test: make -j40 RunSettingsRoboTests
Change-Id: If3562dc7c2ddf07e2fc19591238dc3a7b4e9dba7
Merged-In: I3c3fc7a68c172eeccc767cd04b1393b38b36073e
2017-09-21 09:40:42 -07:00
Winson Chung
3baa08b44f Fixing issue with PiP settings not showing apps for other profiles.
Bug: 65417722
Test: make -j40 RunSettingsRoboTests
Change-Id: I3c3fc7a68c172eeccc767cd04b1393b38b36073e
2017-09-21 09:26:39 -07:00
tiansiming
39de7aedee Fix NPE crash in UsageAccessDetails
mPackageInfo will be null in RefreshUI method in UsageAccessDetails.java

Bug:https://issuetracker.google.com/issues/65872768
Test:As explained in the link above

Change-Id: I8bd4b822cfe5d8a3347ca7f5886605cbdfb9b8b6
Signed-off-by: tiansiming <tiansiming@xiaomi.com>
2017-09-21 14:12:50 +08:00
Jack He
d8684d44f1 Bluetooth: remove unnecessary state tracking in BluetoothSummaryUpdater am: ac040e3b1f
am: 1197438540

Change-Id: I1ee2b808431c7eb324bc30e43c34f5e4799281f2
2017-09-21 05:07:36 +00:00
jeffreyhuang
47da294f7e Introduce CoolColorTemperaturePreferenceController
- Create new CoolColorTemperaturePreferenceController
 - Create controller inside the DashboardFragment
 - Port logic from DevelopmentSettings into the controller

Bug: 34203528
Test: make RunSettingsRoboTests -j40
Change-Id: I9aca46ef0949b71437f8d181c501b8099d77774c
2017-09-20 18:01:15 -07:00
Jeffrey Huang
31b04f526f Merge "Revert "Introduce CoolColorTemperaturePreferenceController"" 2017-09-21 00:54:18 +00:00
Jeffrey Huang
8c57f28c7a Revert "Introduce CoolColorTemperaturePreferenceController"
This reverts commit ebcf01f128.

Change-Id: Ie26f1790833741e56012dda95702f087d867c552
2017-09-21 00:33:40 +00:00
Jeffrey Huang
6b9f2e1414 Merge "Introduce CoolColorTemperaturePreferenceController" 2017-09-21 00:01:51 +00:00
Doris Ling
308a2d93fb Move listening to brightness changes to onStart/onStop.
Currently, we register the brightness listener in onResume() and stop
listening in onPause(). When we launch the brightness selection bar, the
display settings is paused, and hence we don't get the brightness
update, and only refresh the percentage when the brightness bar is
dismissed.

Moving the listening logic to onStart()/onStop() instead, so that we
will get the updates all the time when the display settings is launched.

Change-Id: I6ed9c8485fdf7721374baff5cea5f7011b63d7ea
Fixes: 65981061
Test: make RunSettingsRoboTests
2017-09-20 15:36:14 -07:00
Doris Ling
e76df1ca34 Put code that updates the access points lists inside a Handler.
When access point is forgot, we got callbacks from WifiManager to tell
us if the forget action is successful or not. We will refresh the access
point list in both cases. However, these callbacks happens on a
different thread and updating preferences should only be done on the
main thread. Creating a handler to handler all updates in the main
thread.

Change-Id: I7593befb20e46391ad69a284375693351a2cc794
Fixes: 65745404
Test: make RunSettingsRoboTests
2017-09-20 15:04:51 -07:00
jeffreyhuang
ebcf01f128 Introduce CoolColorTemperaturePreferenceController
- Create new CoolColorTemperaturePreferenceController
 - Create controller inside the DashboardFragment
 - Port logic from DevelopmentSettings into the controller

Bug: 34203528
Test: make RunSettingsRoboTests -j40
Change-Id: Ib138dd55f197ae4cc14db4f3414abdd644e6b202
2017-09-20 14:48:09 -07:00
Jack He
1197438540 Bluetooth: remove unnecessary state tracking in BluetoothSummaryUpdater
am: ac040e3b1f

Change-Id: I13a2bd7e40a94773fc0afe37d71d7ba60e2b625b
2017-09-20 21:43:24 +00:00
TreeHugger Robot
41df9518ab Merge "Add since_visible_millis to Settings action logs." 2017-09-20 20:32:37 +00:00
Jeffrey Huang
ff3971038e Merge changes from topic "OemUnlockPreference"
* changes:
  Add comments to avoid merge conflicts
  Introduce OemUnlockPreferenceController
2017-09-20 20:26:57 +00:00
Jack He
ac040e3b1f Bluetooth: remove unnecessary state tracking in BluetoothSummaryUpdater
* LocalBluetoothAdapter is already a cache of BluetoothAdapter and its
  methods should be used directly to obtain states instead of caching them
  in BluetoothSummaryUpdater
    - Use LocalBluetoothAdapter.isEnabled() to check whether Bluetooth
      is enabled
    - Use LocalBluetoothAdapter.getBondedDevices() to get list of bonded
      devices
* BluetoothDevice is a stable Bluetooth API and its methods should not
  incur large latency. We should use API methods as much as possible to
  avoid intermediate wrappers
    - Use BluetoothDevice.isConnected() to check if a device is connected
* Add more logging messages in error conditions
* Show status as "Not Connected" when there is a state mismatch (i.e.
  adapter says it is connected, but no bonded device is connected)
* Updated unit tests to reflect the latest behavior

Bug: 65591907
Test: make, unit test, pair with Bluetooth devices, check Settings UI
Change-Id: I0fa54959c8bed8ac67a935f150785ba8197d0411
2017-09-20 11:35:19 -07:00
Eric Schwarzenbach
79f3476021 Add since_visible_millis to Settings action logs.
This change adds a new action logging method on MetricsFeatureProvider
within Settings.

Uses the VisibilityLoggerMixin to calculate the elapsed time since
the fragment has been visible. Adds tagged data in
MetricsFeatureProvider#action() to store this elapsed time in
NOTIFICATION_SINCE_VISIBLE_MILLIS in MetricsEvents. Modifies the
LogWriter interface to accept variadic taggedData args in its action()
methods. Annotates the old subtype #action() methods as deprecated.

EventLogWriter also no longer casts the subtype values to strings before
sending them to MetricsLogger, so they are correctly stored as subtype
instead of package.

Bug: 65371699, 65631695
Test: make RunSettingsRoboTests
Change-Id: Iec6a61dd6a49ab237e2bdc4469fed45e89d9c380
2017-09-20 11:26:35 -07:00
TreeHugger Robot
10ba1f1ee7 Merge "Fix NPE when calling getSuggestionV2 in adapter." 2017-09-20 17:57:45 +00:00