Commit Graph

57 Commits

Author SHA1 Message Date
Jason Monk
82f30d2a41 Fix battery detail issues with "Android OS"
Bug: 22638215
Change-Id: Ia5bab7eb3bfb964e7f914e8c8f392f4fea66eb29
2015-07-22 10:12:05 -04:00
Jason Monk
d5884c5023 Fix crash in ignore optimizations dialog
Launch it like a dialog, because it is one.

Bug: 22181580
Change-Id: Ibeda8506cfb7a9a9d60f70462a4e03972b38f8aa
2015-06-30 10:17:25 -04:00
Adam Lesinski
cba028c60a Report real wifi running time in Power Details
Bug:21934412
Change-Id: Ic8623c8b424021f1af3d143d3b07398dd22091d6
2015-06-26 18:04:47 -07:00
Adam Lesinski
46b62233d4 Add computed power to each Battery Details page
Some battery sippers have nothing interesting besides
their power consumption. Show that.

Bug:21934412
Change-Id: I7669343086892fb7be34fec00d1fd4c0bfd08b55
2015-06-25 11:14:21 -07:00
Jason Monk
04ac693da7 Remove battery history graph from details screen
Bug: 21854416
Change-Id: I3172106c8b1adbe19179adddcec2848d14d04588
2015-06-18 11:07:31 -04:00
Ruben Brunk
2627190bac Add UI for camera + flashlight battery reporting.
Bug: 11694505
Change-Id: Idca51a2e8cc7c2fb3e9d10f84f94e66600dee6fa
2015-06-05 16:05:18 -07:00
Jason Monk
3bdb0d690e More updates to battery optimization whitelist
Mostly just string updates.

Also fix crash in power details.

Bug: 19991702
Bug: 21027488
Bug: 21063077
Change-Id: I5a5e382a20ffaecd9eb16454906c985cc1510572
2015-05-12 15:55:23 -04:00
Jason Monk
bcb4f2c913 Update strings for ignore optimizations control
Bug: 19991702
Change-Id: Ie5b54fd70176cfceb8b88cf18a9974321ba84c28
2015-05-11 16:01:21 -04:00
Jason Monk
8f600a4fbc Button that goes from app info details to app info
This info button is shown on the header of all app detail pages.
This button is hidden when coming from app info, to avoid allowing
users to go in circles.

Since app notification details had a settings button where the new
info button goes, the app notification settings will move down to
be a preference (this matches the usage access screen UX).

Also fix a bug in launching app notification settings for managed
profiles.

Bug: 20633669
Change-Id: Idbb4f7c3326b4c6b0a19559b722ee0406eaba6c0
2015-05-08 15:35:46 -04:00
Jason Monk
20f464edde Fix app headers in settings
Use SettingsPreferenceFragment's method for pinned headers where
possible, and add a frame within the fragment for them to live in
otherwise so that this view doesn't end up on the activity.

Bug: 20886475
Change-Id: I985eb1497744ea50bfabed862e5088eb89df5b61
2015-05-06 16:00:25 -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
Lifu Tang
82210af707 Merge "Worked around back button navigation issue" 2015-04-09 17:26:47 +00:00
Lifu Tang
d033285ca7 Worked around back button navigation issue
Calling startWithFragmentAsUser() without specifying FLAG_ACTIVITY_NEW_TASK to
the intent starting the fragment could cause a native stack corruption. See
b/17523189. However, adding that flag and start the preference panel with the
same UserHandler will make it impossible to use back button to return to the
previous screen. See b/20042570.

We work around this issue by adding FLAG_ACTIVITY_NEW_TASK to the intent, while
doing another check here to call startPreferencePanel() instead of
startWithFragmentAsUser() when we're calling it as the same user.

Bug: 20042570
Change-Id: I26b269414f410912b77aaa553a3fccebfa148659
2015-04-09 10:10:12 -07: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
Alan Viverette
0ba89bd54c Update Settings to use themed Context.getDrawable()
Explicit null theme is passed when using Resources.getDrawable() and
no theme is available, e.g. when using getResourcesForApplication().
This fixes an issue with ic_text_dot theming and helps avoid similar
issues in the future.

BUG: 17648301
Change-Id: I3e97c3490b6f2a55744f567b21284f2935ae9af7
2014-10-10 10:58:58 -07:00
Zoltan Szatmary-Ban
a2b7bb6be6 Merge "Make Force Stop button work for packages of managed profile" into lmp-dev 2014-09-25 10:38:40 +00:00
Zoltan Szatmary-Ban
d50c7a8878 Start PowerUsageDetails fragment in the correct activity
Make sure the stack does not get corrupted by running a fragment as a
managed profile in an activity that runs as primary profile.

Bug:17523189

Change-Id: I7a066a411c7995ffe44b73c6dc27b24eec85b5b3
2014-09-24 12:33:33 +01:00
Zoltan Szatmary-Ban
9b521f8519 Make Force Stop button work for packages of managed profile
Call force stop of a package for the correct profile.

Bug: 17580914
Change-Id: I7c601618f7819d6775cf422dca70a929ee1089d9
2014-09-23 17:22:58 +01:00
Zoltan Szatmary-Ban
7a2ccf201e Show Power usage details for the correct user
Settings > Battery > Details has to observe managed profiles and start the
Power Usage Detail fragment for the correct profile.

Bug: 17523189

Change-Id: I7a47b972a8a0492b4a411197cd2c8c65f24c2e7e
2014-09-18 12:06:56 +01:00
Elliott Hughes
7253df35a0 Start cleaning up percentage formatting in Settings.
This fixes some of the percentage formatting issues, but there are
still about ten strings with hard-coded %%s in them.

Bug: 15476051
Change-Id: I668b6b16e598425f6006f6de0005c980f613f5b2
2014-09-03 17:04:01 -07: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
Dianne Hackborn
1ca16bb65b Fix to show correct percentage in battery details.
Change-Id: I5745ca4dc6330b044e02e94630cf3d2c3e1266af
2014-03-19 17:13:43 -07:00
Dianne Hackborn
3c741d2be8 Show new radio active times.
Change-Id: Id3b2d072df87dce5312a1e7b7d6a0012a1b5b19a
2014-02-26 15:53:47 -08: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
18083b1eb7 Battery: report calculated power, tweak signal strength colors.
BatteryHistoryHelper now computes the total power to be the total
including the unaccounted, so we don't go > 100%.  However for the
unaccounted/over-counted details, we want to report the actual
computed amount.  Use a new API to do this.

Also tweak the signal strength colors so that the "no signal" state
is stronger, by being reddish instead of bright yellow.

Change-Id: I6af9fbcce8c3324883db0184f7ac215cb41b6230
2014-01-22 14:18:39 -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
Dianne Hackborn
fb03058dc9 Update to follow BatteryStats.
Change data use to be based on packets instead of bytes.

Change-Id: I536dd2c2fc3fbeb12689e793f79e5fac984fe3af
2013-12-19 13:10:25 -08:00
Dianne Hackborn
49759af6b0 Various proc stats UI improvements.
- Option to include system processes.
- Option to use uss instead of pss sizes.
- Option to select type of stats: background processes, foreground (top)
  processes, cached processes.
- Details now shows max mem usage.

Change-Id: Ic994564ce846bc1021bf35576feeb9ef095b0e48
2013-09-15 13:22:28 -07:00
Amith Yamasani
e63cc20570 Pass correct user id for the extra
This was causing PrintManagerService to get a broadcast with an incorrect
userid and ended up crashing the SettingsProvider.

Bug: 10608503
Change-Id: I4693de181ddfa599d685ac9bd16ac15cea8b2e52
2013-09-03 17:44:49 -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
5d4e69a527 Shows "App Info" for system apps
If a specific Uid contains only one package, we show the "App Info"
button, even if it's a system app

Change-Id: Ie39b6d90e62ae432c636d50729f0aa45405ce67c
2013-08-14 17:25:12 -07:00
Lifu Tang
83ab7c932e Moved LocationSettings into location sub-package
Change-Id: I55b30df5b6889576539b8cb880e3032f417ddfd7
2013-07-29 12:13:48 -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
Jeff Sharkey
97d07fa3ae Push scrollbars to screen edges.
Push scrollbar to screen edges on custom ListView and ScrollViews to
match Preferences framework behavior.

Bug: 7633165
Change-Id: Ideecd0e243c7de7bf977caef2b1585e707a00ca4
2012-11-30 16:15:09 -08:00
Jeff Sharkey
f707491cfb Internationalize bytes and percentages.
Bug: 7545890
Change-Id: I634fafe9d61a2ebbf7a0cc56d8255457ee9fe1b2
2012-11-14 16:56:11 -08:00
Jeff Sharkey
5246e7f76d Follow more Secure settings to Global.
Bug: 7232014, 7231331, 7231198
Change-Id: Iea055cfa58edb253b55fe30bf294994ad338cfa4
2012-09-27 16:22:55 -07: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
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
Dianne Hackborn
5c2b48d4d5 Fix issue #5320747: Disabling an app that is an active device administrator...
...can lead to an unsecure device

Now you can't disable device admins.

Or clear their data.

Or force stop them.

Or uninstall them (though the package manager also prevents uninstalling, might
as well disable this button along with everything else).

Change-Id: I69eefc2342e6f932908e9f5b87d3a601752810a4
2011-09-16 13:36:20 -07:00
Jeff Sharkey
28130d9638 Unify data/power layout, confirm disable, round.
Share consistent layout between data usage and battery usage.  Show
confirmation dialog before disabling mobile data.  Round warning/limit
sweep values to match displayed label.  Suppress fade when switching
data usage tabs.

Bug: 5208510, 5058157, 5038589, 5252816
Change-Id: I3c76f3397445d2d3b173666a41672871df4c61af
2011-09-02 16:15:25 -07:00
Gilles Debunne
c9575c489b Bug 5038721: battery info links to new location setting for GPS management.
Change-Id: I7063e0b93b6ef9f94cd783ce57206e302126bd9a
2011-08-22 18:02:42 -07:00
Dianne Hackborn
c05dedf9be Buttons in battery details now switch fragments.
These were launching a whole new settings activity.

Change-Id: I6876acf54d484119eec339c8597b5d9d843bae56
2010-11-12 12:44:52 -08:00
Dianne Hackborn
59a48604b5 Start fragmentizing battery usage.
Change-Id: I0864f6738b37c3203e166bb8f7e61e8904d9980a
2010-11-11 22:32:58 -08:00
Dianne Hackborn
728ac35373 New Running Services UI.
This introduces a simplified (thanks, dsandler!) UI for Running Services,
collapsing the groups of apps and processes into single lines.  Tapping
on a line moves to a new activity showing details on that group, where the
stop functionality is now available.

This UI is now also integrated into Manage Applications, as the Running
tab.  You no longer get a really confusing, misleading, scary list of
every package that appears to be laying around for some reason.

The code was also re-organized, to put everything related to Manage
Applications and Running Services under its own package.

There is still some clean-up -- some performance improvements (such as
not re-computing the world when we switch to the details view), and if
this looks good then eradicating the old running services UI.

Change-Id: I3fc059c18060600742cab5b455d11ff74bf45ae3
2010-06-07 12:33:53 -07:00
Jacek Surazski
456dc95fee Send battery reports using ApplicationErrorReport.BatteryInfo. 2010-02-26 22:53:54 +01:00
Dianne Hackborn
cb497546ba Add new button to report battery usage to the developer.
This displays a new button on the application battery usage details
screen for the user to send a bug report to the developer, if that is
possible to do.  Also adds a button to directly force stop the app
from the details screen, and uses the new facilities to determine
whether the button should be enabled.
2010-02-22 11:31:37 -08:00