Commit Graph

2604 Commits

Author SHA1 Message Date
Doris Ling
8d4aa3f9b3 Merge "Put code that updates the access points lists inside a Handler." 2017-09-22 22:39:24 +00:00
Jeffrey Huang
ce7721625d Merge "Introduce CoolColorTemperaturePreferenceController" 2017-09-22 20:38:40 +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
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
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
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
Fan Zhang
45424c5464 Fix NPE when calling getSuggestionV2 in adapter.
Change-Id: I3aa498c2255107ca2e33046f3df629c2ef43ec5c
Fixes: 66111737
Test: robotest
2017-09-20 09:19:17 -07:00
Christine Franks
bfb671391d resolve merge conflicts of 92f7794d90 to master
Test: I solemnly swer I tested this conflict resolution.
Change-Id: I2cbcd06b906904365f9257742ab1c51b67adc3af
2017-09-19 18:24:33 -07:00
Christine Franks
cb52e803bf Merge "Handle night display state when timezone changes" into oc-mr1-dev 2017-09-20 00:23:29 +00:00
TreeHugger Robot
530de5be78 Merge "Load suggestions through SettingsIntelligence." 2017-09-19 23:36:38 +00:00
jeffreyhuang
223484ea3c Introduce OemUnlockPreferenceController
- Create new OemUnlockPreferenceController
 - Add new onActivityResult method in DeveloperOptionsController
 - Create controller inside the DashboardFragment
 - Port logic from DevelopmentSettings into the controller

Bug: 34203528
Test: make RunSettingsRoboTests -j40
Change-Id: I0b1387b9547e7c9f2a1a0963421d0ebea55d9ff4
2017-09-19 13:21:25 -07:00
Fan Zhang
82cb5a5cc8 Load suggestions through SettingsIntelligence.
- Add flag to switch between old/new implementation
- Add SuggestionLoader to load using Loader (instead of AsyncTask)
- Update DashboardAdapater/SuggestionAdapter to take List<Suggestion>
- Marked old getter/setters as @Deprecated and added comment
- Update tests to cover suggestionV2 adapter changes.

TODO:
- Handler for dismissing suggestion not set up yet.
- Suggestion data structure is incomplete (missing icon, remote view, etc)
- Need to extend Suggestion data strcture to support icon and
  remote view binding

Bug: 65065268
Test: robotests
Change-Id: I2378ef4c9edee972d5de93c3868068e2cde23f56
2017-09-19 11:56:54 -07:00
Salvador Martinez
f966d09b73 Merge "remove old anomaly code" 2017-09-19 18:11:11 +00:00
Christine Franks
c6c299bdbb Handle night display state when timezone changes
Bug: 64458884
Test: make RunSettingsRoboTests -j100

Change-Id: I1f0c073b796aa6826c236757e19c6ff6d5cb7602
2017-09-19 10:54:13 -07:00
Doris Ling
c879239238 Add metadata handling for specifying tile order.
- if tile order is set in the metadata, it will be used as preference
order instead of the intent priority specified.

Change-Id: If1a09219ece7bb71fc476aad60dc66d7653dfd28
Fixes: 65172575
Test: make RunSettingsRoboTests
2017-09-18 16:19:05 -07:00
TreeHugger Robot
211ea46815 Merge "Refresh Wifi AP Config display when config changes" 2017-09-18 22:19:56 +00:00
Fan Zhang
5a8b70d3da Refresh Wifi AP Config display when config changes
Change-Id: I6fe284355223cbcedd82f95d6415c4d6b660f39f
Fixes: 64757839
Test: robotests
Test: rerun ACTS WifiTetheringTest:test_change_wifi_hotspot_ssid_when_hotspot_enabled
2017-09-18 13:42:36 -07:00
TreeHugger Robot
c0f1c8f216 Merge "Don't init batterystats in onCreate()" 2017-09-18 19:32:03 +00:00
TreeHugger Robot
0d019909a0 Merge "Introduce BluetoothSnoopLogPreferenceController" 2017-09-16 23:53:49 +00:00
TreeHugger Robot
2dec861b99 Merge "Introduce DeveloperOptionsPreferenceController" 2017-09-16 23:44:36 +00:00
TreeHugger Robot
6a48c518c3 Merge "Move SuggestionService AIDL related calls to a controller." 2017-09-16 02:41:27 +00:00
Fan Zhang
7c60efb930 Merge "Use "mid" stable id for condition cards conditionally." into oc-mr1-dev am: a42e9351c5
am: 3f070569a6

Change-Id: I7bf58afdb746d70b2a2728875b83d0f0c547d51e
2017-09-16 00:40:43 +00:00
TreeHugger Robot
a42e9351c5 Merge "Use "mid" stable id for condition cards conditionally." into oc-mr1-dev 2017-09-16 00:33:33 +00:00
Fan Zhang
ffd531f1d3 Move SuggestionService AIDL related calls to a controller.
The controller makes it easier to manage IPCs and make it easier for
testing.

Bug: 65065268
Test: robotests
Change-Id: Ie5797655543cb22d8196267058598a1b4222a8d1
2017-09-15 17:32:49 -07:00
jeffreyhuang
9679fde0bc Introduce BluetoothSnoopLogPreferenceController
- Create new BluetoothSnoopLogPreferenceController
 - Create controller inside the DashboardFragment
 - Port logic from DevelopmentSettings into the controller

Bug: 34203528
Test: make RunSettingsRoboTests -j40
Change-Id: I1122ab1406abef429e499576c9d7bd3e9f8e537a
2017-09-15 15:27:26 -07:00
jeffreyhuang
4bfa56a7fd Introduce DeveloperOptionsPreferenceController
- New abstract class for all preference controllers in developer
 options
 - Used to handle changes in the master switch
 - DeveloperSettingsDashboardFragment has a reference to all preference
 controllers to call "handleMasterSwitchToggled()"

Bug: 34203528
Test: make RunSettingsRoboTests -j40
Change-Id: I64c18f54e22551f025029336880e92ac3a0d4a8c
2017-09-15 15:27:26 -07:00
Fan Zhang
135fecbee3 Use "mid" stable id for condition cards conditionally.
When there is no suggestion, use "mid" stableId instead of "top"
stableId for the header card.

This avoid an animation jank: when user swipes away a suggestion, the
condition summary header moves up instead of disappears then reappears.

Old behavior:

---  Suggestion ---   --swipe-->     /// Top Header ///
///  Mid Header ///

New behavior:

--- Suggestion ---   -- swipe -->   /// Mid Header ///
/// Mid Header ///

(Notice the header id change)

Change-Id: I63512d3d21382488e43dddb8819fabe4af40d101
Fixes: 65729560
Test: robotests
2017-09-15 14:56:27 -07:00
Lei Yu
9bcf9723e5 Merge "Revert "Turn on wakeupAlarm anomaly detector"" into oc-mr1-dev am: c872c14785
am: 3a01adad6d

Change-Id: I4669be435441db3e94bd06afafeaf693c3fa614e
2017-09-15 21:46:59 +00:00