Commit Graph

3522 Commits

Author SHA1 Message Date
Clara Bayarri
3b8b07c8f4 Add Build.isAtLeastO
This makes it easier for features to check the build is O or later
without dealing with codenames and then the switch to an api number.

Change-Id: Ica04e0fdf1e68d72f289f5428aaff6c5aff816c9
2016-08-08 14:58:50 +01:00
TreeHugger Robot
03bbd4f7b7 Merge "Remove WiFi related methods from NetworkManagementService" 2016-08-05 20:57:54 +00:00
Srinath Sridharan
1a61a0ae43 Adding a new getThreadScheduler() method.
bug:  30226969
Change-Id: Icbd57e99740ebf6ba744a103e6fa69a3160c9422
2016-08-03 15:00:17 -07:00
Jorim Jaggi
526694ea52 resolve merge conflicts of 3c1b0f0 to master
Change-Id: I2314728cba47c28ff580f4dfc69868f8cb5ff5db
2016-08-03 16:23:28 +00:00
Joe Onorato
92fd23fc62 Have BatteryStats track and report the running wakelocks.
The times reported are in the screen off / on battery time base.

Bug: 29546924
Change-Id: I025b2959becb256a26cf531e944786d4e9a59149
2016-08-02 17:27:01 -07:00
Christopher Wiley
212b95f587 Remove WiFi related methods from NetworkManagementService
These are no longer necessary, since WiFi manages its own details.

Bug: 30041228
Change-Id: Ia3824da43367ae74d3f3a204318cfe5470d74957
Test: Compiles
2016-08-02 11:38:57 -07:00
Jorim Jaggi
407c0be727 Only get trace name if tracing is enabled
String formatting creates new objects, so only do it if needed.

Bug: 30549756
Change-Id: I8035357c2b9c3066ef7663b938654f698a2321bc
2016-08-02 11:06:46 +02:00
James Carr
2dd7e5e3ef Calculate and account for memory power use
Use PowerProfile to calculate mAh (MemoryPowerCalculator), and
involve this calculation in the overall accounting of battery
for when the phone is unplugged from a charger.

Note: Depends on ag/1196281

Change-Id: Id02bef19c9b250c614df0a6c88711b486faaef46
2016-07-27 14:50:23 -07:00
Tony Mak
fe84fe01d7 Persist master volume mute across reboot am: c1205111a9
am: c33b549af8

Change-Id: Id5e57ebdf81824af0f86854d8668a05f8109e0e1
2016-07-25 10:45:02 +00:00
Tony Mak
c33b549af8 Persist master volume mute across reboot
am: c1205111a9

Change-Id: Ia2badcd0fa06e8a8b74ffdfb26e525852d97cf07
2016-07-25 10:39:25 +00:00
Tony Mak
0df1d34e6e Merge "Persist master volume mute across reboot" into nyc-mr1-dev 2016-07-25 10:31:01 +00:00
Tony Mak
c1205111a9 Persist master volume mute across reboot
Fix: 30133263

Change-Id: I53450a504e40e55516acc88550f369a74a244eaf
2016-07-22 17:12:54 +00:00
Srinath Sridharan
af8a8c54c8 Adding a new getThreadScheduler() method.
am: 1b15d13243

Change-Id: Ie15ad328a687bac65e1505e2c324536d3eb0102a
2016-07-22 02:13:13 +00:00
Erik Kline
f9b4d50541 Support removing specific routes from local_network am: 6599ee8b96
am: 51c8fe903b

Change-Id: I02c0805c38e11226bd11b815da5418f1afc1ab89
2016-07-22 01:56:33 +00:00
Srinath Sridharan
6c92c0eb5c Merge "Adding a new getThreadScheduler() method." into nyc-mr1-dev 2016-07-21 16:00:40 +00:00
Erik Kline
6599ee8b96 Support removing specific routes from local_network
Bug: 9580643
Change-Id: Id0aaf4bc7424797e2beef03fb18a2c1885a86509
2016-07-21 22:23:50 +09:00
Makoto Onuki
de1e6e4d2d Merge \\"Support multiple intents in ShortcutInfo\\" into nyc-mr1-dev am: b84ce2e034
am: 9a6109f284

Change-Id: I0f1caf54cc544db0b73f8e3275005923904f57a8
2016-07-20 23:15:32 +00:00
Makoto Onuki
b84ce2e034 Merge "Support multiple intents in ShortcutInfo" into nyc-mr1-dev 2016-07-20 23:05:31 +00:00
Adam Lesinski
984d575d2e Merge \\"BatteryStats: Don\\'t print empty platform idle state\\" into nyc-mr1-dev am: ebbbead915
am: 7da697a79f

Change-Id: I644c302cc1cbea8b2387d9ac591845b7c43cc5c0
2016-07-20 22:10:44 +00:00
TreeHugger Robot
ebbbead915 Merge "BatteryStats: Don't print empty platform idle state" into nyc-mr1-dev 2016-07-20 21:56:02 +00:00
Makoto Onuki
440a1ea8e2 Support multiple intents in ShortcutInfo
Also fix b/30230996.

TODO: Support the sourceBounds argument to LauncherApps.
startShortcut().

Bug 30218829
Bug 30230996

Change-Id: Ibb6c59d5b7c0a320c21d09436d016d0eac94644f
2016-07-20 14:46:48 -07:00
Srinath Sridharan
1b15d13243 Adding a new getThreadScheduler() method.
bug:  30226969
Change-Id: Icbd57e99740ebf6ba744a103e6fa69a3160c9422
2016-07-20 13:20:21 -07:00
Felipe Leme
4b3a0e2385 Merge \\"Improved storage size detection.\\" into nyc-mr1-dev am: f0de4da42f
am: d8b866e615

Change-Id: Ied4ea6aeb589ed0b64e16b40b8a7df2ddf50b99b
2016-07-20 19:27:02 +00:00
TreeHugger Robot
f0de4da42f Merge "Improved storage size detection." into nyc-mr1-dev 2016-07-20 19:06:12 +00:00
Dianne Hackborn
e0b1f592a0 Merge \\"Add reporting of long wake locks.\\" into nyc-mr1-dev am: ca37695ebc
am: af52a9d1bf

Change-Id: I29451b3dc161e29804f42f40aa9e15836979cd4a
2016-07-20 16:00:57 +00:00
Dianne Hackborn
d0db6f0043 Add reporting of long wake locks.
These appear as a new event in the battery stats history,
"longwake" in the long version and "Elw" in the checkin.

The power manager keeps track of which wake locks are held
for a long time and reports them to battery stats.  Long
is currently considered 1 minute or more.  Once it is long,
the start event will appear, and once if is released the
event will end.

In the case of a wake lock changing (typically its work
source changing), for purposes of this accounting this is
considering a pure release of the old state and start of
the new state...  so the timer will reset back to one
minute until the wake lock is considered long.  This is done
to prevent things that make lots of changes to wake lock
work sources from spamming the log.

Bug: 28753137

Change-Id: I33b6168c57a7ea6ea558273dec731704123124a5
2016-07-19 14:16:50 -07:00
Fyodor Kupolov
4e9af06576 Updated JavaDoc for getApplicationRestrictions
The method performs disk I/O and shouldn't be called on the main thread.

Bug: 28303952
Change-Id: Iab4d79158b32858baac4147ab73c6ac7aaa51b5b
2016-07-19 10:28:31 -07:00
Felipe Leme
179923a611 Improved storage size detection.
The total storage size was calculating by reading and multiplying the
contents of /sys/block/mmcblk0/size and
/sys/block/mmcblk0/queue/hw_sector_size.

On some devices, such calculation doesn't work because:

1.The primary block is not /sys/block/mmcblk0 .
2.The sector size is not the right value to use.

These 2 issues are temporarily addressed by providing alternative
primary blocks and hardcoding the size (512 bytes). In the long term,
the size should be calculated by vold, so each device could provide its
own calculation if necessary.

BUG: 30216622
Change-Id: I8f9a9f4f753d3c92bab9257062b61ed2b9d665c5
Fixes: 24128505
2016-07-19 09:59:41 -07:00
Adam Lesinski
daa3e9cd80 Merge \\"Record UID of wakeup packets\\" into nyc-mr1-dev am: 117cf8de91
am: d279c1291e

Change-Id: I6973342d48a8a8cebe8f4515c6d67d271dbcf7f7
2016-07-18 21:29:56 +00:00
Adam Lesinski
5f056f6d87 Record UID of wakeup packets
Bug:28931278
Change-Id: I50a3b6a8026b4d06aaa2730cd531658d280ddb73
2016-07-18 12:30:46 -07:00
Tim Murray
36030dda49 Merge \\"Make sure StrictMode allows disk reads when calling isThreadInProcess.\\" into nyc-mr1-dev am: afa67f3d34
am: 62547293e3

Change-Id: Idc39bd967dfc45c9d66aaf5f28e1012c4c15bd78
2016-07-16 19:29:44 +00:00
Tim Murray
9bc12a83b6 Make sure StrictMode allows disk reads when calling isThreadInProcess.
If an application thread disables disk reads on the main thread,
isThreadInProcess will trigger a strict mode violation. This is bad if
the RenderThread is created after disk reads have been disallowed.

bug 30170339

Change-Id: I6918605d11f0c586c156f3168051376c3209b3f1
2016-07-16 11:48:01 -07:00
Adam Lesinski
8568d8fd4f BatteryStats: Don't print empty platform idle state
Bug:28863586
Change-Id: Iac1fae2063498337c7325011603933aa4f6ebfdd
2016-07-15 18:13:23 -07:00
Nicolas Geoffray
19e0f615ca Merge changes I7a052a8e,Idb11b1c0 into nyc-mr1-dev am: 7366e8c16a
am: 5a7be749f7

Change-Id: Idb189d89f9cebcc6e9809e7f489c51baae5e8253
2016-07-14 08:49:16 +00:00
Nicolas Geoffray
7366e8c16a Merge changes I7a052a8e,Idb11b1c0 into nyc-mr1-dev
* changes:
  [RFC] Special case system apps for profile optimizations
  Compile core-apps according to their own "reason" for A/B
2016-07-14 08:32:52 +00:00
Calin Juravle
0bd7762079 [RFC] Special case system apps for profile optimizations
If the OTA updates a system app which was previously preopted to a non-
preopted state the app might end up being verified at runtime. That's
because by default the apps are verify-profile but for preopted apps
there's no profile.

Do a hacky check to ensure that if we have no profiles (a reasonable
indication that before the OTA the app was preopted) system apps get
compiled with a non-profile filter (by default interpret-only).

Bug: 30032273
Test: Andreas "has verified that Calin's change to A/B works as expected
and promotes things like SystemUI to speed. From my side, that's
ready to be merged"

Change-Id: I7a052a8ea76cab7f649dc993237ea05534d6c4b9
2016-07-14 08:20:29 +00:00
Mahaver Chopra
e4ffde9cac Merge \\"Added UM.DISALLOW_OEM_UNLOCK, Removed Global.OEM_UNLOCK_DISALLOWED.\\" into nyc-mr1-dev am: 695a1c50a2
am: e64f60a455

Change-Id: Iedc9544179d3c3de8616375e51f7a60ddd1c8c3b
2016-07-13 12:41:16 +00:00
Mahaver Chopra
695a1c50a2 Merge "Added UM.DISALLOW_OEM_UNLOCK, Removed Global.OEM_UNLOCK_DISALLOWED." into nyc-mr1-dev 2016-07-13 12:27:01 +00:00
Mahaver Chopra
3d9805d502 Added UM.DISALLOW_OEM_UNLOCK, Removed Global.OEM_UNLOCK_DISALLOWED.
Currently we used global setting to restrict user from enabling oem
unlock. As global settings can be chagned using adb, using user
restrictions instead.

Bug: 29893399
Change-Id: Ic83112a4838b8279bf50408a29ae205e0b8639ee
2016-07-12 19:29:14 +01:00
Felipe Leme
978bf2a2e2 LOG, Y U NO TAG?
Change-Id: I9b6cfba865647efc3c803dee1e769e70a4ad17d0
Fixes: 29941527
2016-07-12 10:55:45 -07:00
Tim Murray
b334d64371 Merge changes from topic \\'stune\\' into nyc-mr1-dev am: b646ec13e1
am: 6ab97e587e

Change-Id: I92ed34e44dd8ca7fe430a8ac1931e57fd10c2070
2016-07-12 02:04:56 +00:00
Tim Murray
b646ec13e1 Merge changes from topic 'stune' into nyc-mr1-dev
* changes:
  Put bootanimation in top-app stune group.
  Sets android.ui to be in the fg stune group.
2016-07-11 20:29:40 +00:00
Shubham Ajmera
807cf8699a Merge "Add new StrictMode thread policy - DETECT_UNBUFFERED_IO" 2016-07-11 12:15:24 +00:00
Tim Murray
4074ad01e8 Sets android.ui to be in the fg stune group.
setThreadGroup(TOP_APP) will place a thread in the fg stune group but
not the top_app cpuset. This allows android.ui to get more runtime to
render transitions between activities without impacting its CPU
placement.

bug 29512132

Change-Id: I95e031975f83290f88ac6e538abf1062aea27ed4
2016-07-08 15:45:45 -07:00
Andreas Gampe
8f4731db63 Merge \\"Revert \\"Frameworks/base: Refactor UserHandle and Environment a bit\\"\\" into nyc-mr1-dev am: 56177bf81b
am: 5c1dc014ca

Change-Id: Ia51a5349ea826ca56ec0c5f8baf1c1afac7c6b81
2016-07-08 18:27:10 +00:00
Andreas Gampe
56177bf81b Merge "Revert "Frameworks/base: Refactor UserHandle and Environment a bit"" into nyc-mr1-dev 2016-07-08 18:09:54 +00:00
Andreas Gampe
d281b4204a Revert "Frameworks/base: Refactor UserHandle and Environment a bit"
Breaks monkey in root mode.

This reverts commit 6e16714c68.

Bug: 29338430
Change-Id: I238f89dad77d7dcae6d02eccbda52eb9c6c6466c
2016-07-08 03:50:27 +00:00
Tim Murray
aa1735370b Merge changes from topic \\'fifo\\' into nyc-mr1-dev am: a96d445aef
am: 03b34e402c

Change-Id: If3104889f659aef9a6d7035e18ab839544c9ecb3
2016-07-07 20:59:09 +00:00
Tim Murray
a96d445aef Merge changes from topic 'fifo' into nyc-mr1-dev
* changes:
  Add new mode for SCHED_FIFO on UI and RenderThreads.
  Add isThreadInProcess.
2016-07-07 20:29:24 +00:00
Tim Murray
33eb07f575 Add new mode for SCHED_FIFO on UI and RenderThreads.
Add a new mode, controlled by sys.use_fifo_ui property, that enables the
top app's UI and RenderThread to be SCHED_FIFO. This eliminates almost
all jank due to scheduling competition with non-UI critical
threads. This mode may not be suitable for all devices.

bug 24503801

Change-Id: I7b8a31830ad80f7efa00236928d5476998ed4e00
2016-07-07 12:55:31 -07:00