Commit Graph

1451 Commits

Author SHA1 Message Date
Alexandra Gherghina
0f5440f6e2 Apply predefined icon and label to managed profiles
Bug: 18132630
Change-Id: Ie6cfee420847d6992accb0bc0ca3f5535260bc55
2014-10-31 12:03:53 +00:00
Michael Wright
ca6bc2aefa Skip Misc/Overcounted battery stats in release builds. automerge: f7a5017
automerge: 95f29a1

* commit '95f29a1930244b9978a55073326c9fb071c2615f':
  Skip Misc/Overcounted battery stats in release builds.
2014-10-24 22:33:50 +00: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
John Spurlock
a0d2822535 am ef390443: am a312f7f8: Fix battery-history-chart large-mode labels in RTL layouts.
* commit 'ef390443eb7a6a4ac52c62aea65e7ba94f1f897a':
  Fix battery-history-chart large-mode labels in RTL layouts.
2014-10-13 22:13:01 +00:00
John Spurlock
a312f7f804 Fix battery-history-chart large-mode labels in RTL layouts.
Bug: 17425651
Change-Id: Iae53e111fa3c6bc822821a6a30bd34edb058c1a5
2014-10-13 15:48:50 -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
Elliott Hughes
83f013cfd4 Fix percentage formatting throughout Settings.
Bug: 15476051
Change-Id: Ic64e7c36d0e2732d3e0e79fec2b79de42decf77d
2014-10-03 15:52:20 -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
7258650efd Merge "Start PowerUsageDetails fragment in the correct activity" into lmp-dev 2014-09-25 10:35:58 +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
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
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
Dianne Hackborn
94aae9afd1 Little more on issue #17495264: tweak when we ignore initial times.
Change-Id: I7053eb64d7d2281984baef9606334c2df4783cc5
2014-09-15 14:00:37 -07:00
Dianne Hackborn
2b54a9fa57 Fix issue #17495264: Battery history graph is bad
Deal better with wall clock time changes in the battery history.

Change-Id: I9d63edafc37bbf663e328a08ba09300be2142594
2014-09-14 19:17:17 -07:00
John Spurlock
41e8351448 Settings: Use new PowerManager call to set low power mode.
Bind the master switch to the power manager state instead
of directly to the single setting.

Depends on frameworks/base change:
  Ic030504c9cad9868a7137abbe837b170da37852b

Bug:17460535
Change-Id: I8c68735308f58fdc07d4f64e765e84286918be7a
2014-09-14 11:23:01 -04:00
Dianne Hackborn
c891ce6565 Fix some things in settings: manage apps, battery, procstats
Issue #17461567: java.lang.ArithmeticException: divide by zero when
looking at Settings > Battery

Yeah, let's not do that.

Issue #17365562: Running services RAM totals are wrong

Okay so like a few months ago, I had this vacation coming up, and
it was around the feature complete (hahah) deadline, and I had to
rush to get this in before I left.  So I rushed.  And, well, I forgot
a few things.  Here they are.  We now show the right numbers and
even update things correctly when you change what processes are
being shown.  Wow.

Finally, fixed a few issues in the dev tools procstats UI.

Change-Id: I8348a9c2ec3226a455c5c8465729e4487f324c8b
2014-09-11 18:09:29 -07: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
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
Dianne Hackborn
1cf2077c37 Fix issues in Settings: 16660423, 13172381, 16868094
Issue #16660423: Stability: ArrayIndexOutOfBoundsException in settings:
at com.android.settings.fuelgauge.BatteryHistoryChart$ChartData.draw(
BatteryHistoryChart.java:109)

Issue #13172381: No content description in Battery charging section

Issue #16868094: Settings crash on switching to landscape mode with
"Google Text-to-speech" settings icon selected

Change-Id: I94d0e83f72d571eb90aad6742acabce56c0298ec
2014-08-10 16:32:08 -07: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
John Spurlock
249cf50b19 Settings: Battery saver updates.
- Fewer trigger level options, new default of 0 (never)
 - Use new shared feature description text (in framework)
 - Remove "always on", add new top-level switch bar.

Depends on the framework changes in I3d1ded1eec9e63e7d97469486f6a320e1bebbccd

Bug:16214395
Change-Id: Ia01186cfeb19d00672f62cc84787584b4dcc1143
2014-08-02 17:23:46 -04:00
Fabrice Di Meglio
4a70996465 Make Battery History chart non selectable
- ... because it should not be selectable

See bug: #13140648 Settings needs to support the new Quantum Paper theme

Change-Id: I625d1533991623f5c3897be15ccfa48fd0fc02f8
2014-07-29 16:29:00 -07: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
Alexandra Gherghina
95b86a5488 Refactoring useless UserUtils class
Bug: 16542609
Change-Id: Iadb83c5e378cd342ea89d6e224ddc45e6f940c8b
2014-07-28 07:40:48 +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
Dianne Hackborn
6fd48e224f Issue #15986092: Add power tracking of flashlight.
Also improve drawing of date markers to allow a middle
marker for really looong durations.

Change-Id: I0c12ec9b6de102360d9171627787462dfa58b7ef
2014-07-08 17:16:29 -07:00
Fabrice Di Meglio
200cca4c1d Fix icon size for Data Usage / Battery Stats / Process Stats
- remove padding from app_percentage_item and apply it correctly
on its containers
- wrap app_percentage_item into preference_app_percentage for having
correct padding o nProcessStatsPreference and PowerGaugePreference

Change-Id: I290c92959f51a33a1edb49435cd0bd1e6cd9afa3
2014-06-26 14:04:11 -07:00
Fabrice Di Meglio
b974ab5825 Make Apps Icons size consistent in Battery Stats
- set them to 24dip as for the Settings Dashboard

Change-Id: Iadab299cac88a6b22157d285aff8a7dcf506fc97
2014-06-25 17:04:39 -07:00
Dianne Hackborn
96debb5c96 Update to follow battery stats change.
Improve how we decide that WIFI is on.

Change-Id: If209d85dd88b6bdd56913684a890f732b8234a8c
2014-06-20 16:02:12 -07:00
Dianne Hackborn
68f005fbd4 Modify proc stats to show new memory use computation.
Switch the proc status UI's memory use bar to be based on the
new total memory use computation, instead of showing that weird
"time spent in memory states" thing.

Also now have it link to a detail page that shows details of time
spent in memory states and RAM used by various things.

Change-Id: I6817a499db518adb8e72466a5e9cfe18a81be5d5
2014-06-19 21:35:27 -07:00
Dianne Hackborn
b11c973799 Fix issue #15597136: n7 not showing estimated discharge time
Use battery plugged state to decide whether to show the estimated
discharge time remaining vs. charge time remaining.

Change-Id: I2e0d12871201e7d4927aaa9a94d15bff949a881c
2014-06-12 16:40:56 -07:00
John Spurlock
5fe76205b6 Settings: Workaround duplicate onActivityCreate
Bug: 13329308
Change-Id: Ia6b8cf766d517b4e8e5689e33cbb52299471407b
2014-06-12 15:42:12 +00:00
Dianne Hackborn
9f789fbe08 Merge "I am a Material girl, living in a Material world." into lmp-preview-dev 2014-06-10 22:12:51 +00:00
Dianne Hackborn
3bd46a70c1 I am a Material girl, living in a Material world.
Change-Id: I3206041666a3236fdeb5f5897e6d8767137c2b85
2014-06-11 16:27:22 -07:00
Dianne Hackborn
2f2cbbc760 Merge "Small fixes to power save UI." into lmp-preview-dev 2014-06-10 22:18:15 +00:00
Dianne Hackborn
de159c8d16 Small fixes to power save UI.
Use the correct default setting, and don't crash.

Change-Id: I33fd612aba404e13c8bbe9110535dff1cfba12a4
2014-06-10 23:17:01 -07:00
Fabrice Di Meglio
782d0f6891 Merge "Fix bug #15545573 Battery use chart is incorrect for date labels and time axis labels" into lmp-preview-dev 2014-06-10 22:18:15 +00:00
Fabrice Di Meglio
a7a62c5b66 Fix bug #15545573 Battery use chart is incorrect for date labels and time axis labels
- use DateFormat.getBestDateTimePattern(...) to get the best Date and Time format
depending on the Locale
- format the label according to the best format
- remove non needed formatting strings

Change-Id: I78b62b9a7c9401e47e62c7161214636bb43324fc
2014-06-10 20:26:42 -07:00
John Spurlock
5845d98a8a Settings: Remove master swtich from battery saver.
And make it a normal switch called "Always on".  Better reflects
the actual effect.

Change-Id: I9f801ddfff39591cb19d665f61a1a05bda317888
2014-06-11 18:44:24 -04: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