Commit Graph

1922 Commits

Author SHA1 Message Date
TreeHugger Robot
4d815d93ad Merge "Add wakeup alarm anomaly detector" 2017-05-23 18:08:10 +00:00
Matthew Fritze
3a50f5c290 Remove duplicates in Security Settings
Duplicates:
- Location
- Scanning
- Encryption and Credentials
- Screen Pinning
- Device Admin Apps

Bug: 33701673
Test: make RunSettingsRoboTests
Change-Id: Id06b6d9e82769abfa31a0c3e9900bcebdbd0c13c
Merged-In: I91566b8fb7fdb3b39c8833a6fa8e52bbbf6507b6
2017-05-23 17:44:35 +00:00
Matthew Fritze
2e34a64a55 Remove duplicates in Security Settings
Duplicates:
- Location
- Scanning
- Encryption and Credentials
- Screen Pinning
- Device Admin Apps

Merge for ag/2247508

Bug: 33701673
Test: make RunSettingsRoboTests
Change-Id: I91566b8fb7fdb3b39c8833a6fa8e52bbbf6507b6
2017-05-23 10:43:14 -07:00
Doris Ling
929bc614de Add summary text to Apps & notifications -> Notifications
Share the summary provider for Apps & notifications -> Notifications ->
Notifications with Apps & notifications -> Notifications so that the
upper level also shows the corresponding notification summary.

Change-Id: Id6879d9a6b00237781320c18591703b3031c9627
Fix: 36376411
Test: make RunSettingsRoboTests
2017-05-23 10:15:26 -07:00
jackqdyulei
495de548bd Add wakeup alarm anomaly detector
Wakeup alarm count frequent is calculated by a / b, where
1. a: the total wakeup alarm count since the last full charge
2. b: total time running since last full charge
(include sleeping time)

This cl also has the following changes:
1. Move bunch of methods to BatteryUtils
2. Create type WAKEUP_ALARM
3. Add and update tests

Upcoming cl will make sure we get the threshold from
AnomalyDetectionPolicy

Bug: 36921529
Test: RunSettingsRoboTests
Change-Id: I4f7b85606df68b6057f6c7d3f3be7f9a9a747f1d
2017-05-23 09:49:14 -07:00
jackqdyulei
f6dca8a68d Hook up the anomaly policy to wakelockanomaly
Bug: 38233034
Test: RunSettingsRoboTests
Change-Id: Id8c13480e08f609a1ba9927ba35558f82664904c
2017-05-23 09:43:01 -07:00
Tony Mak
764e52c8cf Show app battery usage in correct user
Test: m -j RunSettingsRoboTests

Change-Id: I6c0f74b79468ee670f642edb0a50400c030d1925

Merged-In: I6c0f74b79468ee670f642edb0a50400c030d1925

Fix: 38447829
2017-05-23 12:24:04 +00:00
Tony Mak
5ab93ad700 Show app battery usage in correct user
Test: m -j RunSettingsRoboTests

Fix: 38447829

Change-Id: I6c0f74b79468ee670f642edb0a50400c030d1925
2017-05-23 10:37:38 +01:00
Lei Yu
6784e41977 Merge "Use BatteryStatsLoader in InstalledAppDetails" into oc-dev am: 37f6b7f751
am: 996adfeb29

Change-Id: I11d0c39a68428637ce12aaffaa2a4f1e49bb716e
2017-05-23 06:23:31 +00:00
Lei Yu
996adfeb29 Merge "Use BatteryStatsLoader in InstalledAppDetails" into oc-dev
am: 37f6b7f751

Change-Id: I5b5edc8b88a16c83a77ca584d21279892ebb08bf
2017-05-23 06:21:32 +00:00
Lei Yu
37f6b7f751 Merge "Use BatteryStatsLoader in InstalledAppDetails" into oc-dev 2017-05-23 06:16:44 +00:00
Salvador Martinez
6976ccecee Merge "Use enhanced estimate battery info when available" 2017-05-23 03:28:32 +00:00
TreeHugger Robot
2f98a110d5 Merge "Log different type of values into different constants" 2017-05-23 03:01:32 +00:00
TreeHugger Robot
ff9d0f2028 Merge "Show shadow when entity header starts scrolling." 2017-05-23 02:01:44 +00:00
Lei Yu
603fba8afe Merge "Revert "Add animation for battery asyncLoader."" into oc-dev
am: 161571617b

Change-Id: I7022cedf1252c5b8b02c6336611c9158ed98dc6c
2017-05-23 01:56:48 +00:00
TreeHugger Robot
161571617b Merge "Revert "Add animation for battery asyncLoader."" into oc-dev 2017-05-23 01:49:23 +00:00
TreeHugger Robot
602a714502 Merge changes Ief9e9690,I1cc1bc2d
* changes:
  Split BluetoothSettings into two pages
  Dupe BluetoothSettings and DeviceListPreferenceFragment
2017-05-23 01:36:22 +00:00
Salvador Martinez
be6f07045a Use enhanced estimate battery info when available
This CL updates the battery page to get the updated strings and
other relevant battery info from directly from SettingsLib by
providing it an overrided drain time instead of manually changing
the value in the returned info. This will provide the added benefit
of using the new strings when appropriate that tell the user that
the estimate provided is based on their usage.

Test: robotests
Bug: 38399659
Change-Id: I0db572c2ea78910756314b6bf066d37e9f90a15c
2017-05-22 18:06:29 -07:00
Fan Zhang
aab631fed3 Log different type of values into different constants
Bug: 38258793
Test: make RunSettingsRoboTests
Change-Id: I3ed170613709be04ffb2c561e132094d64619dd4
2017-05-22 18:00:09 -07:00
jackqdyulei
013d3f6342 Use BatteryStatsLoader in InstalledAppDetails
InstalledAppDetails uses AsyncTask to update foreground mBatteryStatsHelper
in background thread, which is dangerous. This cl make
InstalledAppDetails use BatteryStatsLoader to update batteryStatsHelper
and only assign it once in UI thread.

Bug: 38497555
Test: RunSettingsRoboTests
Change-Id: I3078b60a2dae36995ae5f925b4d49e36e79bddfd
2017-05-22 17:39:19 -07:00
Fan Zhang
841d1d5aab Show shadow when entity header starts scrolling.
- Add a controller to manage add/remove onScrollChangedListener to
  recyclerviews.
- When recyclerview on each screen is scrolled to top, set actionbar
  elevation to 0, otherwise set it to non-zero.
- When screen is moved to background, detach the listener.
- Use the controller in entity header.

Change-Id: Iecf194d885098c98c392810f62893ae9189f3936
Fix: 37670670
Test: make RunSettingsRoboTests
2017-05-22 17:16:24 -07:00
jackqdyulei
52ccb49fbe Split BluetoothSettings into two pages
This cl splits the BluetoothSettings into paired device page and
pairing page, including small changes about:
1. Refactor the pages so they could get as much as static preference
from xml file rather than dynamically add/remove them everytime.
2. Remove creating method in BluetoothDeviceNamePreferenceController
and add it in xml file
3. Create BluetoothPairingDetail page, basically move the logic from
BluetoothSettings.
4. Make pairing preference clickable and jump to BluetoothPairingDetail
5. Add and update bunch of tests

Bug: 35877041
Test: RunSettingsRoboTests
Change-Id: Ief9e9690c612f7b46c58e866e5cecc511af642c8
2017-05-22 16:57:37 -07:00
Lei Yu
78684dc049 Revert "Add animation for battery asyncLoader."
This reverts commit a3c528f64d.

Test: Build
Change-Id: Ib50221873e39dee40c5cf8e4b41dcf7aa13f6134
Merged-In: Ib50221873e39dee40c5cf8e4b41dcf7aa13f6134
2017-05-22 16:49:55 -07:00
Lei Yu
210bf83cea Merge "Revert "Add animation for battery asyncLoader."" 2017-05-22 23:30:04 +00:00
Lei Yu
e1441c63ee Revert "Add animation for battery asyncLoader."
This reverts commit a3c528f64d.

Test: Build
Change-Id: Ib50221873e39dee40c5cf8e4b41dcf7aa13f6134
2017-05-22 14:33:24 -07:00
Fan Zhang
c7d632d313 Use label instead of raw value for theme preference summary
Change-Id: I4dd1c156c8e68dd5567093c56d5e6846357fc2d6
Fix: 38470685
Test: make RunSettingsRoboTests
2017-05-22 13:52:32 -07:00
TreeHugger Robot
7aac5c5791 Merge changes Iaf92730e,I54eb30f2,Ib80827ae
* changes:
  Use entity header on AccountDetailDashboardFragment
  Move entity header controller out of application package.
  Clean up settings_entity_header layout.
2017-05-19 01:24:50 +00:00
TreeHugger Robot
5d20c1ab87 Merge "Fix bug where app list says "No app" in multi-window mode" 2017-05-19 01:04:06 +00:00
Matthew Fritze
5569e3a33f Merge "Remove Language and Input duplicates" into oc-dev
am: 6f4a6a737d

Change-Id: Id6639a9dc08c1a27cf1bc4ed7969cc54a4bd2df2
2017-05-19 00:49:41 +00:00
TreeHugger Robot
6f4a6a737d Merge "Remove Language and Input duplicates" into oc-dev 2017-05-19 00:41:04 +00:00
Fan Zhang
98289a887b Use entity header on AccountDetailDashboardFragment
Bug: 37669238
Test: make RunSettingsRoboTests
Change-Id: Iaf92730e8c6b5c44cb8eca4525fc931487ce9630
2017-05-18 16:36:32 -07:00
Fan Zhang
d7414259d0 Move entity header controller out of application package.
Bug: 37669238
Test: rerun robotests
Change-Id: I54eb30f28fa0a88a6f0b97b53f9f1408320b5ce0
2017-05-18 16:36:32 -07:00
Fan Zhang
f5bd885a1d Clean up settings_entity_header layout.
update layout view IDs, and controller variable names to be more
generic.

Fix: 36734470
Bug: 37669238
Test: make RunSettingsRoboTests
Change-Id: Ib80827ae3eae6d01a600068b4a8a44b239c32511
2017-05-18 16:35:27 -07:00
TreeHugger Robot
dd6483461f Merge "Remove Language and Input duplicates" 2017-05-18 22:37:27 +00:00
Fan Zhang
462d852808 Fix bug where app list says "No app" in multi-window mode
Move updateUi logic from onPause/onResume to onStop/onStart.

Change-Id: Iebe38d201d531058472cd033a0408239d36d32e4
Fix: 36305836
Test: instrumentation test
2017-05-18 14:37:09 -07:00
jackqdyulei
5333ecd1fb Dupe BluetoothSettings and DeviceListPreferenceFragment
Create the obsolete version of the belowing fragments, so we could
flip between old page and new page.

BluetoothSettingsObsolete and DeviceListPreferenceObsoleteFragment
contains all the old logic but:
1. Logic about BluetoothPairingPreferenceController(ag/2239482),
since this preference shouldn't be checked in without the flag :(

This cl also adds logic in MasterSwitchPreferenceController to flip
these two pages.

Following cl will refactor these fragment to make it compatible
to new framework.

Bug: 35877041
Test: RunSettingsRoboTests
Change-Id: I1cc1bc2d49d8a3e11c3127e56f6409fbc84028d8
2017-05-18 14:12:02 -07:00
Matthew Fritze
742467ec9f Remove Language and Input duplicates
Change the keys in the Language and Input screen for the
gesture and tts-output settings so they can be disabled
in search. Then change the preference controllers to take
a key as input to avoid crashes on the other screens with
these settings.

Merge for: ag/2098173/

Test: make RunSettingsRoboTests
Bug: 33701673
Change-Id: I8bc0776131fcac5a6edf7e8271bc53252c2fc719
2017-05-18 13:57:54 -07:00
TreeHugger Robot
b287dc93d5 Merge "Skip cursor loader if not needed" 2017-05-18 20:28:52 +00:00
jackqdyulei
803f0c96e8 Merge "Show wifi and bluetooth item in battery settings" into oc-dev am: 21d2403c67
am: 972763ee50

Change-Id: Ic54ae913ec5f9418f81ad15437fbaca8b96fad15
2017-05-18 19:35:56 +00:00
jackqdyulei
b5219ba29a Merge "Add screen usage string for battery settings" into oc-dev am: 28cf04d994
am: 3ab2ca5cc9

Change-Id: Iaca27db0a637de88c09a45d88f35db258783fa16
2017-05-18 19:35:27 +00:00
jackqdyulei
972763ee50 Merge "Show wifi and bluetooth item in battery settings" into oc-dev
am: 21d2403c67

Change-Id: I7ee542befa8e5287dbd73be242ec812a1a5d0c19
2017-05-18 19:26:20 +00:00
jackqdyulei
3ab2ca5cc9 Merge "Add screen usage string for battery settings" into oc-dev
am: 28cf04d994

Change-Id: Ie60e5de8164bfc16fa29ca16b63caa08812db52f
2017-05-18 19:25:57 +00:00
TreeHugger Robot
21d2403c67 Merge "Show wifi and bluetooth item in battery settings" into oc-dev 2017-05-18 19:13:35 +00:00
TreeHugger Robot
28cf04d994 Merge "Add screen usage string for battery settings" into oc-dev 2017-05-18 19:10:16 +00:00
TreeHugger Robot
8311e26aba Merge "Rename app_details to entity_header" 2017-05-18 19:04:12 +00:00
TreeHugger Robot
3f4056212f Merge "Fix issue for new account not being shown in work profile." 2017-05-18 18:55:27 +00:00
TreeHugger Robot
f76dafea55 Merge "Dynamic summary text for network/connected device screen." 2017-05-18 18:54:48 +00:00
Salvador Martinez
44b9a4072c Skip cursor loader if not needed
The cursor loader was being started when the battery prediction
feature was not enabled. This could lead to null pointers because
it was not possible to provide it with a valid URI which would
make the CursorLoader unhappy. This CL makes it so we just skip
the CursorLoader initialization entirely when we know the feature
is disabled so we don't have this issue. It also includes a test
to make sure this does not regress.

Test: Robotests
Bug: 38371686
Change-Id: I4f6f6278bbc16668bca0b51fcc7e30f27a9e216f
2017-05-18 11:10:18 -07:00
Matthew Fritze
b97a1bffa8 Remove Language and Input duplicates
Change the keys in the Language and Input screen for the
gesture and tts-output settings so they can be disabled
in search. Then change the preference controllers to take
a key as input to avoid crashes on the other screens with
these settings.

Test: make RunSettingsRoboTests
Bug: 33701673
Change-Id: Ifeb2a2d34a3efded3f0a9ba02ac76fd6f8ffd087
Merged-In: I8bc0776131fcac5a6edf7e8271bc53252c2fc719
2017-05-18 17:36:59 +00:00
Lei Yu
9a4be81e5c Merge changes I573e4fb9,I8e7baadc into oc-dev am: 67e38774ce
am: d85bdebe0e

Change-Id: I865f41eae196aee32edd60169dacbc5dca772439
2017-05-18 17:12:34 +00:00