Commit Graph

1527 Commits

Author SHA1 Message Date
jackqdyulei
db42779cf1 Merge "Turn on power accounting in AOSP" into oc-dev
am: 0a6d61883c

Change-Id: I9204d0b51db9fedbf2f49b5d635e46b221c5d7ea
2017-05-25 04:01:46 +00:00
TreeHugger Robot
0a6d61883c Merge "Turn on power accounting in AOSP" into oc-dev 2017-05-25 03:57:29 +00:00
Fan Zhang
4472d8af83 Merge "Recursively remove preference from screen." into oc-dev
am: 7731b4244e

Change-Id: Ib3c637bcb4bbd6ded83f626b1b00dff32f9cb12c
2017-05-25 03:25:43 +00:00
TreeHugger Robot
7731b4244e Merge "Recursively remove preference from screen." into oc-dev 2017-05-25 03:22:51 +00:00
Doris Ling
be520a5f34 Merge "Listener to tether state change on Network & internet page." into oc-dev
am: 1dead24890

Change-Id: Ic64e4f29c2e7124b3e977acb245f0e3e15f84ff6
2017-05-25 02:34:26 +00:00
TreeHugger Robot
1dead24890 Merge "Listener to tether state change on Network & internet page." into oc-dev 2017-05-25 02:25:56 +00:00
Doris Ling
5bf5c8ac04 Listener to tether state change on Network & internet page.
User can navigates to the page and turn hotspot on or off from the quick
settings. Need to listen to the tether state updates to refresh the
summary for the Hotspot & tethering preference accordingly.

Change-Id: I7c6869b909306b09556e19cf7b7543ce9dcd890e
Fix: 38452559
Test: make RunSettingsRoboTests
2017-05-24 16:51:14 -07:00
Fan Zhang
e84407f5c3 Recursively remove preference from screen.
The preference framework does not remove pref recursively. So when a
preference is nested in preference hierarchy, it's not safe to simply
call screen.removePreference(). We need to first find its parent and
remove pref from its parent.

Change-Id: Ic7fefa498ed71a8877d862845ddcc2d6d6034a55
Fix: 38507066
Test: make RunSettingsRoboTests
2017-05-24 21:21:00 +00:00
jackqdyulei
4516644b46 Merge "Make "Battery usage" accessible at any time" into oc-dev
am: a935b3c030

Change-Id: I969c301888aca43b5e2154fc86dd139ebb83c3f3
2017-05-24 19:26:16 +00:00
TreeHugger Robot
a935b3c030 Merge "Make "Battery usage" accessible at any time" into oc-dev 2017-05-24 19:19:55 +00:00
Matthew Fritze
934a04509f Merge "Revert "Revert "Replace dynamic summary text for SettingPref""" into oc-dev
am: ae0886c9f7

Change-Id: I29ca4bdf7ad579699283fe4adde2ad22439d7ce9
2017-05-24 17:16:01 +00:00
TreeHugger Robot
ae0886c9f7 Merge "Revert "Revert "Replace dynamic summary text for SettingPref""" into oc-dev 2017-05-24 17:12:35 +00:00
jackqdyulei
58406203e2 Make "Battery usage" accessible at any time
Before this cl, user could go to "Battery usage" page only if
related app has battery usage. This cl breaks this rule so we
could open "Battery usage" without battery data.

Bug: 38497822
Test: RunSettingsRoboTests
Merged-In: Ic53c33b7dcbac82de58f31cf96e0bd8fa54e53ea
Change-Id: Ic53c33b7dcbac82de58f31cf96e0bd8fa54e53ea
2017-05-24 10:12:13 -07:00
Tony Mak
f7c007b2c1 Merge "Show app battery usage in correct user" into oc-dev
am: 7226c9f4c4

Change-Id: I719a19c92d9671e471b648aa6db9881dbd01ad30
2017-05-24 10:53:25 +00:00
TreeHugger Robot
7226c9f4c4 Merge "Show app battery usage in correct user" into oc-dev 2017-05-24 10:49:12 +00:00
jackqdyulei
c0351e0243 Merge "Split loading process for battery header" into oc-dev
am: 987ee5338a

Change-Id: I395b493338f0225bd300e155d3303a1ba9136555
2017-05-24 01:33:01 +00:00
TreeHugger Robot
987ee5338a Merge "Split loading process for battery header" into oc-dev 2017-05-24 01:22:25 +00:00
jackqdyulei
4a7c8d7125 Split loading process for battery header
This cl creates BatteryHeaderPreferenceController, which will first
load the battery level in ui thread(in displayPreference()), then
display the remaining time once we get the battery stats.

This is the best we can do to avoid ui flashing while removing the
animation

Bug: 38349587
Test: RunSettingsRoboTests

Merged-In: Ic3622bb73562ba42e69b37e5674a724c03c45f12
Change-Id: Ic3622bb73562ba42e69b37e5674a724c03c45f12
2017-05-23 16:21:33 -07:00
jackqdyulei
1d51b3cc15 Turn on power accounting in AOSP
Bug: 38328724
Test: RunSettingsRoboTests
Change-Id: Ibb2691ffdf8581549a1e99f94a8dbaa849453742
2017-05-23 16:05:12 -07:00
Matthew Fritze
c9f9961d8d Merge "Remove duplicates in Security Settings" into oc-dev
am: 96a8dffafb

Change-Id: I1e987af06d086fd971e2865d5fa854b58ce0e409
2017-05-23 22:21:18 +00:00
TreeHugger Robot
96a8dffafb Merge "Remove duplicates in Security Settings" into oc-dev 2017-05-23 22:13:38 +00:00
Matthew Fritze
c1e9f8787f Revert "Revert "Replace dynamic summary text for SettingPref""
This reverts commit 8061aaef62.
Test: make RunSettingsRoboTests
Fixes: 36101902
Change-Id: Ide74780153fc7f36d897f559c7a3c138190e3320
2017-05-23 22:04:58 +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
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
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
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
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
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
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
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
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
d85bdebe0e Merge changes I573e4fb9,I8e7baadc into oc-dev
am: 67e38774ce

Change-Id: Id3a830eb46004a3febdb9c4bf96a39b8c4afaedd
2017-05-18 17:08:33 +00:00
Lei Yu
67e38774ce Merge changes I573e4fb9,I8e7baadc into oc-dev
* changes:
  Drop the misc and not smear it.
  Smear screen power usage based on activity time.
2017-05-18 17:00:27 +00:00
jackqdyulei
7d7080ab64 Drop the misc and not smear it.
Bug: 38347725
Test: RunSettingsRoboTests
Change-Id: I573e4fb945bc212505c9211d9b92f77a6a9a2739
2017-05-17 18:12:03 -07:00
Fan Zhang
60d26cfffa Merge "Fix bug where accounts are duplicated in user&account list." into oc-dev
am: 2b030aeb65

Change-Id: I4c13fb0ce652108fdabbaa8ca215a5799374c8f8
2017-05-18 01:11:00 +00:00
jackqdyulei
2b923ce44f Smear screen power usage based on activity time.
Bug: 38328636
Test: RunSettingsRoboTests
Change-Id: I8e7baadcd88a8e9d674f5bc8d8e42e0f3953c98a
2017-05-17 18:06:47 -07:00
Fan Zhang
2b030aeb65 Merge "Fix bug where accounts are duplicated in user&account list." into oc-dev 2017-05-18 01:05:39 +00:00
Fan Zhang
3970916cf1 Merge "Fix robolectric test failure" into oc-dev
am: 2545bcaa74

Change-Id: I632edffaced0b4ce7d391d525c4d9288e5ba97cc
2017-05-18 01:01:12 +00:00
Fan Zhang
2545bcaa74 Merge "Fix robolectric test failure" into oc-dev 2017-05-18 00:41:18 +00:00
Fan Zhang
c754f59fb0 Fix bug where accounts are duplicated in user&account list.
This happens when user has different accounts with same account name. For
example: user@domain.com for type1 and same email for type2, etc. When
we refresh the account list during onResume(), the same account name
incorrectly causes the logic to think they are the same account and
updates the account list by mistake.

- Introduced a util method to generate unique key from Account object.
And set it as preference key.
- when updating preference on screen, use key to find preference instead
of the preference instance itself.

Change-Id: I0aa692cb965b7037155a746389a919cd155843da
Fix: 34035653
Test: make RunSettingsRoboTests
2017-05-17 23:50:30 +00:00
Youhan Wang
c6b1845d0f Merge "TelephonyMonitor: Replace boolean decision with multiple status." into oc-dev
am: 350ba4a4c3

Change-Id: Ia508085e2fe2dd2061d772b0caf976d039aaa213
2017-05-17 23:42:49 +00:00
Youhan Wang
350ba4a4c3 Merge "TelephonyMonitor: Replace boolean decision with multiple status." into oc-dev 2017-05-17 23:38:08 +00:00
Fan Zhang
28dcdb7c3b Fix robolectric test failure
Default UserManager caches instance across entire test suite, so 
test becomes flakey depending on the order they are run. Using a 
a ShadowUserManager without the cache ensures each test class gets
a UserManager with clean state.

Change-Id: Ia54f6a3259859add5a1e5d0101829497fb985ab1
Fix: 38393235
Test: make RunSettingsRoboTests
2017-05-17 22:46:27 +00:00
jackqdyulei
7548f1fa77 Add screen usage string for battery settings
In advanced battery page we still use "Used for"

Bug: 38328647
Test: Build & Screenshot
Change-Id: Ic194bfed45a76c811c431a13b5554f5bc978bca5
2017-05-17 13:14:45 -07:00