Commit Graph

106 Commits

Author SHA1 Message Date
Jason Monk
a627844fed Fix only one battery stat showing sometimes.
Take into account the prefs we are currently caching within the
group when counting how many prefs have been added.

Change-Id: I962acd41592c1a9366882711d3f4944bffb54d22
Fixes: 27931457
2016-04-21 10:12:30 -04:00
Jason Monk
e04517611f Pull pref summaries from power usage summary
Change-Id: I9bd3d1041576e183e7e5e03aaecc5128ea5227c2
Fixes: 27644604
2016-04-11 10:25:04 -04:00
Jason Monk
f38fb38f26 Switch to whitelist for animations
Disable animations for all SettingsPreferenceFragments, unless they
explicitly ask for them before creating their preference screens.

Turn it on for all fragments using the cached removal currently.

Bug: 27713314
Change-Id: I1bc14e7aeb3ee5b8ddb4f3547f472305cd312edf
2016-03-18 15:16:12 -04:00
Jason Monk
0d6a574100 Try to recycle prefs in battery summary
Bug: 27404159
Change-Id: I5a71413f22e14b8300b6821da661a613392a06e0
2016-03-16 15:52:35 -04:00
Jason Monk
d1ea8a05b0 Fix and update battery detail page
Bug: 27205329
Change-Id: Ie984348d59c1b15bec7283a94a94489f78cacb79
2016-02-23 12:45:20 -05:00
Jason Monk
9cc88e5e5e Make battery settings use new battery graph.
Change-Id: I633a8750f9668c6315cd42866297ac3460375c22
2016-02-18 14:12:32 -05:00
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05:00
Jason Monk
27985e1f92 Move some battery stuff to SettingsLib
So that it can be used in the battery detail panel

Change-Id: I31eac974d29838726450940109b52d458f29c192
2016-01-08 14:13:05 -05:00
Jason Monk
3069581512 Summary support for Settings Home
Also add summaries to a few of the major items.

Change-Id: I17924f14941fe095d819e142cdd21cf4b4e9ffd1
2015-11-17 13:51:45 -05:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Julia Reynolds
e492ee06ad Make the app header bar more consistent.
- Don't include info link if just came from app info page
- include back button on app info page when launched from header
Bug: 22203029

Change-Id: I737332a487c41e0a93d161b55659700a1f936844
2015-08-19 15:18:55 -04:00
Adam Lesinski
516ee46c48 Merge commit 'f34d3111' into manualmerge
Change-Id: I4bc1b449c4b48b6f295035457b66b95e180c6ddd
2015-08-14 14:22:48 -07:00
Adam Lesinski
8f743471d5 BatteryStats: Fix coalescing of shared app GIDs and system UIDs
UIDs that consumed power and were actually shared app GIDs are now
coelsced for system apps as well as regular applications. In addition,
system UIDs like logd, NFC, DRM, etc are coalesced into Android System.

Bug:23189342
Change-Id: I6c8eb4baec66fba3d1f71a155d8ea1fe920ffec9
2015-08-13 22:12:47 -07:00
Jason Monk
b4b4e2a981 am d1cecdd3: am 55511dab: am 9614b503: am a1f64bf2: am cf1e22f4: Merge "Remove extra help & feedback menu from power usage" into mnc-dev
* commit 'd1cecdd33e7366e5b23dcc7f05078bde0b43c13c':
  Remove extra help & feedback menu from power usage
2015-08-10 20:39:46 +00:00
Jason Monk
3006c377c2 Remove extra help & feedback menu from power usage
Bug: 23044354
Change-Id: Ic722655a50eddbf4f8e53a2b73ed49b5cf6426a4
2015-08-10 15:58:09 -04:00
Xiaohui Chen
e43640b376 Merge "sys user split: first pass updating Settings" 2015-07-28 17:39:59 +00:00
Xiaohui Chen
44879a387a sys user split: first pass updating Settings
Update various places in Settings to use "admin" ueser flag
instead of checking user id "0".  This should be no-op in
single user mode since the only admin user would be user 0.
In split system user mode, this will correctly ACL admin
user instead of non-interactive system user.

Bug: 19913735
Change-Id: Ida4d59c5f689ea0dc34b3b3ff0822b087fa0afd6
2015-07-27 15:39:28 -07:00
Jason Monk
5ef0a9e826 Battery summary - tint uid 0 icon
Bug: 22657823
Change-Id: If360420ada70777520ccc682022f7f4e2e50a70b
2015-07-27 13:03:42 -04:00
Jason Monk
82f30d2a41 Fix battery detail issues with "Android OS"
Bug: 22638215
Change-Id: Ia5bab7eb3bfb964e7f914e8c8f392f4fea66eb29
2015-07-22 10:12:05 -04:00
Adam Lesinski
4444fb85a9 Merge dex2oat with app being installed
Bug:22008744
Change-Id: Id87fe215760202e2969c27d686fa8ba106b00754
2015-06-29 14:56:01 -07:00
Jason Monk
6880ec09cd Fix crash in battery screen
Also add a fake app item

Bug: 21624653
Change-Id: I1a8598472e014f773d2396a9a08fd03e8e32b400
2015-06-04 10:52:01 -04:00
Jason Monk
f2819e0ead Fix battery usage screen issues
Tint icons properly
Bug: 21077770

Show better icons for wifi and bt (remove the old ones)
Bug: 21172936

Also add a way to show fake items in power list for testing.

Change-Id: I6b6804673a68190ebc3f2ea32802e30811a7f5b2
2015-06-02 16:03:32 -04:00
Jason Monk
15dcebe1e7 Help fallbacks and intent work
- Handle a backup URI, so that if the specified URI is not available,
   another can be used.
 - Add some data to help intents when they are intent URIs
 - Fill in the context with a classname when it isn't present

Bug: 15475009
Change-Id: I7050fa61121901929e650b20bd7a0ae21e8ba207
2015-05-28 09:50:45 -04:00
Jason Monk
1eb54eb2ff Add high power whitelist for apps
- Strings not final!
 - New UX for power usage details (more preferency)
 - Add high power apps list shows on/off and screen to
   change (when possible)
 - Link from power usage summary to high power list
 - Link from advanced apps to high power list

Bug: 19991702
Change-Id: I97c927ed82d3b89041e4429b427508545763d66c
2015-05-04 14:38:01 -04:00
Adam Lesinski
0c9c85a847 Update name of field used from BatterySipper
Change-Id: Ie7ec921d646b50826d4dfe942bc13ddfc4cd9190
2015-04-07 11:05:14 -07:00
Bart Sears
86c99e28e9 Revert "Update name of field used from BatterySipper"
Companion CL needed to be reverted as it was breaking the build, so
reverting this CL as well until Adam has a chance to investigate.

This reverts commit a74ddc29b8.

Change-Id: I8e6f2f48d930db9db7eae1a07492da91b0c38f88
2015-04-07 06:15:25 +00:00
Adam Lesinski
a74ddc29b8 Update name of field used from BatterySipper
This relies on change Ia3d97e0a1c3352127185c18626d8ba8221c9ab40

Change-Id: Ibfb31da3938bf2ff4cf20444e680addabcca9eb3
2015-04-06 18:21:43 -07:00
Chris Wren
8a963babe2 log visibility of views
Depends-On: I5b1dccb5d103ece3112acf38889bae16273b092f
Change-Id: I116aed2bb805f723a5bf2ec9eb94257de0b4a7b5
2015-03-27 13:39:07 -04:00
Michael Wright
f7a5017fa6 Skip Misc/Overcounted battery stats in release builds.
Bug: 18090734
Change-Id: I24d8eea9fcb0d0b9e50d512325ed91ce70eb16ac
2014-10-24 14:25:49 -07:00
Fabrice Di Meglio
6a5ebf5fef Fix bug #17594602 Battery Usage refresh icon needs updating
- use the correct Framework asset for "refresh"

Change-Id: I57d55c0646fb3a8693cf5cc51a4c7fa213873385
2014-09-23 16:17:00 -07:00
Dianne Hackborn
be300225df Fix issues #16941902, #16901402, and #16135174.
Issue #16941902: Charged % of battery is mismatching between phone status
area(top right corner) and battery screen

Need to make sure the stats are updated when we come back to
the foreground.

Issue #16901402: Crash in Settings observed after tap on Battery option

Don't allow us to have a null stats object.

Issue #16135174: Apps page "smoke" gradient footer must be removed

Finish tweaking layout to match mocks.

Change-Id: I29d56b506a9468ec548feef7c3f9502a9b16ef4d
2014-08-27 15:49:01 -07:00
Zoltan Szatmary-Ban
3aaf0eb457 Fix app icons on some Settings screens
App icons appeared as the default icon and sometimes without the corp badge on
Data Usage and Battery screens for applications that were only installed for
the managed profile. This CL fixes the issue.

Bug:16705204
Change-Id: I778d36554feb19f28f3cb9321a291cab3d3e17bb
2014-08-14 09:51:58 +00:00
Kenny Guy
39a3716313 Merge "Move over to CharSequence version of badging method." into lmp-dev 2014-08-07 18:53:12 +00:00
Kenny Guy
cc2cbaf421 Move over to CharSequence version of badging method.
Bug: 16484455
Change-Id: Ie5ee010efc439219cb71fd4241fdb798a5f4ea12
2014-08-07 22:01:22 +01:00
Dianne Hackborn
537a0a8235 Fix issue #16555033: Battery history overflowing too much
Use new mechanism to retrieve battery stats, now that they
can be much larger.

Make sure these will ever end up going through an IPC.

Change-Id: Ic582a61d736e24bddc905082c1565ece00fcbb29
2014-08-07 12:19:48 -07:00
Zoltan Szatmary-Ban
ebb36ec920 Badge texts correctly for accessibility in Settings
If an app is a managed profile's app then its label should read correctly by TalkBack.
Affected screens: Data Usage, Location, Battery.

Bug:16053981
Change-Id: I393c0ebf56917032d619b1e39b4bf141ee236981
2014-08-07 14:15:14 +01:00
Zoltan Szatmary-Ban
0598e6f684 Merge "Fix refresh issue of badged icons in Battery Settings" into lmp-dev 2014-07-24 15:35:58 +00:00
Zoltan Szatmary-Ban
08c2f36c3a Fix refresh issue of badged icons in Battery Settings
Bug: 16234577
Change-Id: Ia8df86ecbfda08335cc62e819d4a7303b748cecb
2014-07-18 16:24:30 +01:00
Dianne Hackborn
c19eb361a4 Battery chart fixes.
When there is no data to show, don't make a crazy collapsed chart.

Also avoid re-creating the chart when scrolling.

And fix various other things.

Change-Id: Ia1895bc7c46e6d830e66f66e66f17726e1e23e3f
2014-07-17 12:09:54 -07:00
Zoltan Szatmary-Ban
298f325f54 Update Battery Settings for Enterprise
Items related to the managed profile should show up on the
Battery usage list in Settings.

Bug: 15466789
Change-Id: Iaa5f5752130423a30dad3b0354fe558a17d3d9b3
2014-07-10 13:03:07 +01:00
John Spurlock
c7f8e8ce69 Settings: Battery saver settings sub-page.
New battery saver settings page, accessed via
the power usage settings overflow menu.

The settings page has a master switch to toggle
battery saver mode, feature disclosure text,
and a preference to configure the automatic
trigger level.

Remove developer checkbox now that this option
has a real home.

NO_SQ: multi project change
Bug:13329308
Change-Id: Iac54238f3406439711b44a3c17f220ac5e370a37
2014-06-10 17:26:47 -04:00
Dianne Hackborn
7158e62992 Tweak battery usage to match red lines.
Most of this is done, the main thing missing is the color
of the bars which seems like a framework issue.

Note that this introduces a change to the global theme
making colorControlActivated the specified blue color,
which impacts all of the settings UI.  (Except apparently
progress bars, and thus the bug.)

Change-Id: I4a5ca8c3b94dc23b8f065f60fe697ee0e76ff47d
2014-06-02 17:21:13 -07:00
Dianne Hackborn
a32d81797f Fix issue #15185822: Stability: ArithmeticException: divide by zero
Also small visual improvements.

Change-Id: I55dc30539a4ef67e9261f338c8c5a729a6958d9b
2014-05-23 16:47:37 -07:00
Dianne Hackborn
5a9ace3a7a Update battery use chart to better match new mocks.
Change-Id: I714cb30ccd9b8144785aee16a23ae2b723df4347
2014-05-21 14:19:11 -07:00
Dianne Hackborn
0be7598cb8 Show time remaining / to charge.
Rework the battery graph to include the time remaining or
time to charge.

Change-Id: Ib26b761cb10e01f5f3aa4189db10d44b8ce62f89
2014-04-24 12:05:51 -07:00
Dianne Hackborn
1ca16bb65b Fix to show correct percentage in battery details.
Change-Id: I5745ca4dc6330b044e02e94630cf3d2c3e1266af
2014-03-19 17:13:43 -07:00
Dianne Hackborn
17452d5238 Bat stats: misc, percents are of battery drain.
Change-Id: I6f1fb6ff33f524fe76d519a6194fad67559193bd
2014-03-13 09:51:19 -07:00
Fabrice Di Meglio
263bcc8b73 Use Drawer in Settings app
- get rid of PreferenceActivity as much as we can and use fragments instead
- add Drawer widget
- add Dashboard high level entry into the Drawer (but this is work in progress and would be done in another CL)
- add bypass of fragment's Header  validation when launched from the Drawer but *force* validation if external
call thru an Intent

Be aware that WifiPickerActivity should remain for now a PreferenceActivity. It is used by SetupWizard and should
not trigger running the SettingsActivity's header building code. SetupWizard is a Home during the provisionnig process
and then deactivate itself as a Home but would make the Home header to appear in the Drawer (because momentarily we
would have two Home).

Also, verified that:

- the WiFi settings still work when called from SetupWizard
- when you have multiple Launchers, the Home header will appear in the list of Headers in the Drawer

Change-Id: I407a5e0fdd843ad7615d3d511c416a44e3d97c90
2014-02-03 16:36:46 -08:00
Dianne Hackborn
7c80af410b Switch to BatteryStatsHelper implementation in the framework.
Change-Id: I3ad051e029885af70a6bd14a1351b32860ba565d
2014-01-15 16:24:28 -08:00
Dianne Hackborn
5b6f59a072 Add "unaccounted" item to battery use UI.
Kind-of informative.

Change-Id: I10d2ee1ad8fe598a1ce1989df6628da11b82d906
2014-01-13 17:40:50 -08:00