Commit Graph

84 Commits

Author SHA1 Message Date
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
Amith Yamasani
5334cf609f Fix NPE for stability tests
Bug: 9882651
Change-Id: I4164764a058d68d448ef4a4aba2a18f072079b9c
2013-09-09 13:16:00 -07:00
Lifu Tang
ad7bfbd346 Creates Sipper even the consumption is very little
Change-Id: I9682f262a481f3586760b8464b96eeb22814a840
2013-09-03 08:08:02 -07:00
Lifu Tang
bfa96c3b10 Supress Location button when coming from Location
Change-Id: Ie1f1aed17206530ec7c8a1cde43a4380b7232823
2013-08-19 14:15:52 -07:00
Lifu Tang
c3e9ac937a Linked the recent location apps to battery page
* Extracted BatteryStatsHelper from PowerUsageSummary

* Dropped the "pause" and "resume" method from the
RadioButtonPreference

* Opening battery usage page when the user clicks the recent location
apps item

Change-Id: I5a2d03271434765780154265976d8caa7f8060d8
2013-08-15 14:49:08 -07:00
Dianne Hackborn
15ab7758df Update to show new location monitoring op.
Change-Id: I921e95327c743c5b9b89bfe5a94beca67bfdb7de
2013-07-09 18:50:44 -07:00
Dianne Hackborn
6e28a4d70a Use FastPrintWriter.
Change-Id: If7f77185d7a76f14ac63f9c2af9911fb67ad97d9
2013-06-24 17:54:06 -07:00
Dianne Hackborn
b05bc1454a Following renaming of battery stats.
Change-Id: I889680dddf18fb2a480017199cc072a2d1469c27
2013-06-14 15:22:18 -07:00
Jeff Sharkey
133581e267 Follow network stats changes.
Now Wi-Fi and mobile traffic is recorded separately, which means we
can compute much more accurate usage estimates.

Bug: 5543387
Change-Id: I26120a219649a3c84806fab0fd1602ab07509410
2013-06-06 14:35:37 -07:00
Amith Yamasani
b0b0b110c0 Use circular avatars wherever appropriate
Battery stats, Data usage and Running apps

Change-Id: Ib7f851e55ef7e44f18d3f8a2cd27f5f2204b0145
2013-05-13 16:01:20 -07:00
Dianne Hackborn
1d675e6546 Fix issue #7691456: adbd CPU usage identified as Bluetooth in battery stats
Should be comparing with Bluetooth UID, not the wrong and broken GID.

Change-Id: I2cb33e25b0ae5a441a467c12d91860dcf36232dc
2013-04-10 12:50:32 -07:00
Amith Yamasani
a521d11796 Actually use the cache for names and icons.
Fixes the flashes in name and icon in Battery usage screen when refreshing.
Bug: 8219466

Some earlier refactoring must have messed up the cache's scope. It will now
avoid reloading name and icon if already present in the cache.

Change-Id: I99c1f14dd53828dcb74cf12c02c47628e2e64d30
2013-02-19 10:40:33 -08:00
Mathias Agopian
b287ba3e2b fix an issue where sensors power usage wasn't reported properly
the battery service records a sensor's *handle*, but the
PowerUsageSummary code used it as a sensor *type*.

Change-Id: I0d2cbdffc24238d5e02f0d6369fa44ed990176a4
2013-02-04 19:24:46 -08:00
Amith Yamasani
8f716f66cf Refresh battery stats when the battery state or charge level changes.
This will keep them in sync. We still don't automatically update
the stats periodically, in case the user is investigating some
behavior. That's why we have a refresh button.

Bug: 7737824
Change-Id: I8a59cad6c72f540533b3526fc476260465c73492
2012-12-26 08:41:25 -08:00
Amith Yamasani
aeb57edaef Pass the locale code in the help url for help pages.
Otherwise the help will always be shown in English.

Bug: 7564049
Change-Id: I94da36aa1ae5aabd118178866b7e570bb77add34
2012-12-06 14:40:51 -08:00
Dianne Hackborn
c715fb1207 Fix issue 7198767, 7198366, 7189824.
Bug #7198767: Crash on choosing App info from the Recent apps tab
Bug #7198366: Settings UI should not show other Users' apps
Bug #7189824: Settings crashes on trying to access Battery usage summary

Also fix running services to be able to show user bitmap when in
secondary users, crash in running services if a service is running
whose app is not installed for the current user.

Change-Id: Ief24810c9ddce1ec3f8641ce08af79e1bc18f221
2012-09-21 17:02:22 -07:00
Jeff Sharkey
8882ccdd3e Load user photos through system_server.
Bug: 7194137
Change-Id: Ie36ca40c48fb06d55d120bfcf3db69aea9d83829
2012-09-19 11:16:24 -07:00
Amith Yamasani
e940dac47a Use UserManager.getUserIcon() to get the user's avatar.
Change-Id: I035a5e2a518eb827a2e44910471ed04923921aa3
2012-09-17 12:39:41 -07:00
Dianne Hackborn
52e56a2490 Multi-user battery settings.
Aggregates battery use from other users into one line item.

Change-Id: I811e681891a9ff098491de1e096232f38bf061a9
2012-09-12 21:45:18 -07:00
Nick Pelly
cafe527dcd Include WIFI scan time in per-application power usage summary.
Also, improve logging to more easily show power break-down for
each UID.

Bug: 6642581
Change-Id: Ib36f4bf9c8c579797225cf887e5b2d323cca61b0
2012-06-15 16:14:23 -07:00
Amith Yamasani
b0b37ae21c Help menus for several screens.
Bug: 5144896
Change-Id: Ib2f5146f6f62f2a33261bb165c3bf1bf13b22f38
2012-04-23 15:35:36 -07:00
Todd Poynor
103b28073a Android OS battery usage overstated by screen on time
Change-Id: Icbc4b3ecf91bdbb90da3ee0cf1c68bec953d0177
Signed-off-by: Todd Poynor <toddpoynor@google.com>
2011-12-16 16:15:13 -08:00
Jeff Sharkey
3d4c9a7a32 Bring back network counters in battery stats.
Bug: 4902271
Change-Id: I0900c030407a86efb14a9d528ab355c56f54679e
2011-10-09 13:21:10 -07:00