Commit Graph

3295 Commits

Author SHA1 Message Date
Dianne Hackborn
4e1fa3c476 resolve merge conflicts of a14aac9 to master
Change-Id: If92c42a9e6fbc3cccd24fa2677f0e4c34d65c923
2016-05-04 16:53:38 -07:00
Dianne Hackborn
d8e877d27d Maybe fix issue #28457907: Pebble app crash + reboot
Fix this long-standing multi-threading issue in Bundle
when multiple threads are trying to read from a Bundle
and conflict to due unparceling.

There are two critical sections this protects: writing
the bundle in to a parcel (when it is doing this from
the bundle's already parcelled representation), and
unparcelling a bundle into its map of entries.

Change-Id: I5470002f090e63dd623a573da6c204d3b5b661f4
2016-05-04 13:43:58 -07:00
Adam Lesinski
a021b1ebfa Merge "BatteryStats: Fix units on battery charge counter" into nyc-dev am: 00194e0f24 am: 45b8afabc0
am: 2110964764

* commit '211096476447865bc243259b4e3046a766dfe754':
  BatteryStats: Fix units on battery charge counter

Change-Id: Id9117da75a7cdc3b4f9b8285de7db8a81d7cba21
2016-05-03 20:00:35 +00:00
Adam Lesinski
a8018ac47a BatteryStats: Fix units on battery charge counter
The unit for the battery charge counter is in micro-Ampere-hours, not coulombs.
We store the value as uAh but display it in dumpsys as mAh.

Bug:27174034
Change-Id: Ib5cc1ee1c5c191336a3e1f18dbb12c38e833f8d0
2016-05-03 10:41:47 -07:00
Tianjie Xu
4ca5415d01 Merge "Set security update label in framework" into nyc-dev am: 8ebedfd0d9 am: 87a51a7a7f
am: a4a0f43b6e

* commit 'a4a0f43b6efb1a845ee88c29f51c800a2071eb2d':
  Set security update label in framework

Change-Id: I882f55e797a59bfdbd4f80c5c2f721e8e8f3be03
2016-05-02 18:01:42 +00:00
Tianjie Xu
8ebedfd0d9 Merge "Set security update label in framework" into nyc-dev 2016-05-02 17:38:52 +00:00
Pierre Imai
58b12ce344 Merge changes I86257bc8,I5c2221c5 into nyc-dev am: 4a992cbde8 am: 617c9a3625
am: c8a0ebcb18

* commit 'c8a0ebcb18c12ba3d7cfede25ce51cae47489f93':
  Use Netd's binder interface to set resolver configuration.
  Add Gservices settings for resolver configuration.

Change-Id: I83cb2668c50e910a7ce3a4dede7414b4c2bfa8d9
2016-05-02 13:08:34 +00:00
Lorenzo Colitti
4a992cbde8 Merge changes I86257bc8,I5c2221c5 into nyc-dev
* changes:
  Use Netd's binder interface to set resolver configuration.
  Add Gservices settings for resolver configuration.
2016-05-02 12:49:19 +00:00
Pierre Imai
8e48e67827 Add Gservices settings for resolver configuration.
BUG: 25731675

Change-Id: I5c2221c5a2478fe2fa0fdf9ceeb13a932d758d33
2016-05-02 08:26:09 +00:00
Adam Lesinski
28468efe50 Merge "BatteryStats: Keep track of coulomb counter" into nyc-dev am: 3cb7f6bdcd am: 132d565eac
am: 3bd94c3e8a

* commit '3bd94c3e8a34ad328125783973e5d523eb36f000':
  BatteryStats: Keep track of coulomb counter

Change-Id: I3c0bc2e5ddd001a57978fe58f7d4bd511e8a8499
2016-04-30 02:31:26 +00:00
TreeHugger Robot
3cb7f6bdcd Merge "BatteryStats: Keep track of coulomb counter" into nyc-dev 2016-04-30 02:21:38 +00:00
Adam Lesinski
926969b411 BatteryStats: Keep track of coulomb counter
Bug:27174034
Change-Id: Ica66817faa20b9788536f28f0e593483f033904b
2016-04-29 17:40:11 -07:00
Tianjie Xu
ac75f1effa Set security update label in framework
GmsCore will use different filenames to distinguish a security update
from a normal update. (update.zip for normal update and update_s.zip for
security update.) So, if framework observes the filename as
"update_s.zip", write command "--security" to BCB. This cmd ask the
recovery image to choose the right background string for update.

Bug: 27837319
Change-Id: I2ef12267a6be57d8a81f7f9f34c09aea54530c1f
2016-04-29 16:19:30 -07:00
Andreas Gampe
e105b0bed9 Merge "Frameworks/base: Use holder in FileUtils" into nyc-dev am: ecd73f48fe am: 289da55c68
am: a4661cbbd1

* commit 'a4661cbbd12713266ab30f8e75db33aadc97a079':
  Frameworks/base: Use holder in FileUtils

Change-Id: I9e16512c1af9d67ef47291cc67df1764a42a7cd3
2016-04-29 07:20:38 +00:00
Andreas Gampe
0693fd85f6 Frameworks/base: Use holder in FileUtils
Use a holder for an uncommon Pattern instance in FileUtils.

Allows to compile-time initialize:
* android.os.FileUtils

Bug: 28174137
Change-Id: I4a7a388795a96678b4b26e4f2c02b1117d6a67f6
2016-04-28 19:33:05 -07:00
Jeff Sharkey
23d8cb4a25 Merge "Introduce "unlocking" vs "unlocked" nuance." into nyc-dev am: 8c2fb9edae am: 35c6f6c70a
am: c68126587a

* commit 'c68126587aab22d27cf6ad19a05cb58b5d1bad50':
  Introduce "unlocking" vs "unlocked" nuance.

Change-Id: I9a24147c091c7f370923e43148b78a855fcb43be
2016-04-28 19:33:53 +00:00
Jeff Sharkey
ce18c81677 Introduce "unlocking" vs "unlocked" nuance.
There is a narrow window of time during user unlock where we're
reconciling user storage and dispatching the "unlock" status to
various internal system services.  While in this "unlocking" state,
apps need to be told that the user still isn't actually "unlocked"
so they don't try making calls to AccountManager, etc.

The majority of internal services are interested in merging together
both the "unlocking" and "unlocked" state, so update them.

Clarify naming in AccountManagerService to make it clear that a local
list is being used, which mirrors the naming in MountService.

To match UX/PM requested behavior, move PRE_BOOT_COMPLETED dispatch
after the user is unlocked, but block BOOT_COMPLETED dispatch until
after all PRE_BOOT receivers are finished to avoid ANRs.

Bug: 28040947, 28164677
Change-Id: I57af2351633d9159f4483f19657ce0b62118d1ce
2016-04-28 10:51:39 -06:00
Badhri Jagan Sridharan
bc07967a69 Merge "Add low power stats to batteryhistory" into nyc-dev am: 5149abe am: b0ec5e2
am: 90edbf9

* commit '90edbf9a2c5d5eec58643fee9c485b79910b3896':
  Add low power stats to batteryhistory

Change-Id: If3b2f1145ca38e05bf880d6471c1467d195edede
2016-04-28 00:58:08 +00:00
Badhri Jagan Sridharan
68cdf1997f Add low power stats to batteryhistory
Exports SOC specific low power state info to batterystats service.
BatteryStats service queries the powerHAL module whenever and
updates the HistoryStepDetails whenever setBatteryState is called by the
BatteryService. The stats get appended to the battery history whenever
there is a change in the battery level.

Bug: 26564574
Change-Id: I02b4db00aec0c69d1558492224f3a4dc1c386fa6
2016-04-27 13:08:40 -07:00
Kweku Adams
78502626ae Merge "Removing extraneous field from batterystats dumpsys." into nyc-dev am: 3cabb2a am: 6c0291c
am: 5a3350b

* commit '5a3350b65c95ecb4c3252c07f1d6450dbd6a3071':
  Removing extraneous field from batterystats dumpsys.

Change-Id: Ied21cfa884915e8008bd32add81f38cf4baf26e5
2016-04-25 21:50:55 +00:00
Kweku Adams
5b2747e133 Removing extraneous field from batterystats dumpsys.
Accidentally introduced in ag/851920.

Change-Id: I89ac490cef1735defa7165e6d27beae20490091d
2016-04-25 10:44:05 -07:00
Ricky Wai
75374dbbd5 Merge "Make "work mode on dialog" show personal challenge in unified work lock" into nyc-dev am: 4ace836 am: e4c8276
am: c6002d0

* commit 'c6002d0819a23f25dfc7fc87916d5fd82a7c4a67':
  Make "work mode on dialog" show personal challenge in unified work lock

Change-Id: I2170df9c34e825783dd6bfd472b7243422b2a71c
2016-04-25 13:30:32 +00:00
Ricky Wai
7881cf8f81 Make "work mode on dialog" show personal challenge in unified work lock
Bug: 28183335
Change-Id: Ib212b283b9561f88899f6e7ea130944391b6e558
2016-04-25 10:26:14 +00:00
Svet Ganov
879f5ba3f7 Merge "Cleanup of the PackageInstaller API - Frameworks" into nyc-dev am: c947ebd am: 70d720c
am: 13da561

* commit '13da5613e2fce0ca2d5682fd202234856d2206e9':
  Cleanup of the PackageInstaller API - Frameworks

Change-Id: Ibe4a6258c6437a9e86ed25e242301ca6d6635d26
2016-04-22 22:35:29 +00:00
Svet Ganov
ae0e03a9e0 Cleanup of the PackageInstaller API - Frameworks
The PackageInstaller app manages side-loading apps as well
as permission management. It should be updatable, hence
should rely on system APIs to talk to the platform. This
is the first step of defining an API boundary.

Change-Id: I9814eafd0b22ae03b4b847a7007cdbf14c9e5466
2016-04-22 14:18:32 -07:00
Ruchi Kandoi
a30439d6cd Merge "fix build: remove SUSTAINED_PERFORMANCE_WAKE_LOCK link" into nyc-dev am: 316c68f144 am: fb8c76df29
am: cd3e0f594f

* commit 'cd3e0f594f8097e09094373e5e57e5b82d70624c':
  fix build: remove SUSTAINED_PERFORMANCE_WAKE_LOCK link

Change-Id: I53785eb2d1326ef1f59814b6cc489429619962c3
2016-04-21 02:57:25 +00:00
Ruchi Kandoi
a2689dcf71 fix build: remove SUSTAINED_PERFORMANCE_WAKE_LOCK link
Change-Id: Ic12b98cbafcc8c81eadba119ab416a9eddb7214a
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
2016-04-20 17:22:27 -07:00
Ruchi Kandoi
a2b96b1c8c Merge "Revert "PowerManager: Adds the Sustained performance API."" into nyc-dev am: 0fea8ad am: 4c24df5
am: d84169a92f

* commit 'd84169a92ffe2137a7e53c2debcde42cf2eb1878':
  Revert "PowerManager: Adds the Sustained performance API."

Change-Id: Iadb804137b77b1fd9f20da6b03c2b8e30617ed0c
2016-04-21 00:21:51 +00:00
Ruchi Kandoi
e325e5629f Merge "window: Adds a Sustained Performance Mode window flag." into nyc-dev am: a645c97 am: 75da7b4
am: a78d8d3

* commit 'a78d8d303e46b06948e4d2199f9f2942ee09138e':
  window: Adds a Sustained Performance Mode window flag.

Change-Id: I4f2c47cdaa9fa6391e73d725aebb0348ae28f0ac
2016-04-20 23:05:29 +00:00
Andreas Gampe
74755c9eb5 resolve merge conflicts of 7983723 to master
Change-Id: I1e903d23598c8066b9103499287a7ee04d33c75a
2016-04-20 15:11:43 -07:00
Ruchi Kandoi
9c36c02f0e Revert "PowerManager: Adds the Sustained performance API."
This reverts commit 0abc001275.

Bug: 28150358
Change-Id: I99c71b3d6641310a33e898d6fd475d37c79ba9d0
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
2016-04-20 20:49:18 +00:00
Ruchi Kandoi
a645c9753f Merge "window: Adds a Sustained Performance Mode window flag." into nyc-dev 2016-04-20 20:35:21 +00:00
Andreas Gampe
58f20726e9 Merge "Frameworks/base: Add holder to BaseBundle" into nyc-dev 2016-04-20 18:58:32 +00:00
Ruchi Kandoi
43e38de253 window: Adds a Sustained Performance Mode window flag.
Adds setSustainedPerformanceMode(boolean) API for applications to set
the mode for a given window. The mode will be disabled automatically when the
window is no longer in focus.

Bug: 28150358
Change-Id: Ibe8bc564eeaaccbcaad5c4f792cda16da931dffd
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
2016-04-20 09:57:11 -07:00
Andreas Gampe
52764cba59 Frameworks/base: Add holder to BaseBundle
Move EMPTY_PARCEL into an inner holder class. Add holder to
preloaded-classes. Clean up dependencies.

Allows to compile-time initialize:
* android.os.BaseBundle
* android.os.Bundle
* android.os.PersistableBundle
* android.telephony.CarrierConfigManager

Bug: 27265238
Change-Id: Ib8017aa419c2985963b3c68a8046462a38652ef2
2016-04-19 20:46:43 -07:00
Joe Onorato
a5d2056f25 Merge "Consolidate the HealthStats UI to only use milliseconds." into nyc-dev am: 4c4afed am: 6ee19e4
am: 67288c5

* commit '67288c5b6f05e18e85dd9a520f273d311952276f':
  Consolidate the HealthStats UI to only use milliseconds.

Change-Id: I8ea14a4502f124daee32c0ef92130200431f04e7
2016-04-19 21:10:42 +00:00
Joe Onorato
bee44ae8e5 Consolidate the HealthStats UI to only use milliseconds.
BatteryStats uses a mix of microseconds and milliseconds, and keeping
which one is which straight is difficult.  The internal bookkeeping
is left using us where it already does, for the extra precision. But
having the API be mixed will only make it harder for developers, and
lead them to make the same mistake that I did in the API where I
missed some conversions.

Bug: 28197858
Change-Id: I99114bae259b9bdd47ce5c22e724d87bbd63336d
2016-04-19 11:27:05 -07:00
Jeff Sharkey
b3bf559a77 Merge "Disable "defusable" logging for now." into nyc-dev am: d3a25ad am: ea54db6
am: df6d014

* commit 'df6d01463adf4b96bdd4dc317ac7b479bb2bc0d4':
  Disable "defusable" logging for now.

Change-Id: I6458200608363a58c8a769fdcc4d309bb4e8de91
2016-04-19 17:28:49 +00:00
Jeff Sharkey
d3a25ad4b9 Merge "Disable "defusable" logging for now." into nyc-dev 2016-04-19 17:10:56 +00:00
Adam Lesinski
529c1ec13d Merge "BatteryStats: Introduce Async external stats requests" into nyc-dev am: 0d47f4b am: 811c48d
am: 5b7c57d

* commit '5b7c57d53b08b29f8dc2c05a4193ec9524ce8c60':
  BatteryStats: Introduce Async external stats requests

Change-Id: I6c789ebd217f9ff15f69d6361d0e6fb3b61ff45e
2016-04-18 23:45:58 +00:00
Adam Lesinski
0d47f4b646 Merge "BatteryStats: Introduce Async external stats requests" into nyc-dev 2016-04-18 23:27:10 +00:00
Jeff Sharkey
8e32a52cd9 Merge "Merge "Consistent creation/destruction of user data." into nyc-dev am: ad14b88 am: 724dd82" into nyc-mr1-dev-plus-aosp
am: f89add2

* commit 'f89add2a7fe35c8fe25e5563fca8fd1b12a8ddd6':
  Consistent creation/destruction of user data.

Change-Id: I679c8be4aeb6c82045cfee80a38e663a62456d3c
2016-04-18 20:04:27 +00:00
Jeff Sharkey
cb45951cad Disable "defusable" logging for now.
Bug: 28240784
Change-Id: I2c259867a8169eef220fb9faea6cdcafdde675b8
2016-04-18 13:56:11 -06:00
Jeff Sharkey
ad14b884f4 Merge "Consistent creation/destruction of user data." into nyc-dev 2016-04-18 19:43:18 +00:00
Narayan Kamath
75d09e6608 Remove unnecessary allocation+unboxing of objects. am: a09b4d2 am: 4c89ae0
am: 42c2de5

* commit '42c2de56abb91a613291a935cc88da3f655b3a9d':
  Remove unnecessary allocation+unboxing of objects.

Change-Id: Ic48935549f7f9b13d5f0a2d98fc0979fbfc5a38b
2016-04-18 10:42:28 +00:00
Narayan Kamath
a09b4d2a61 Remove unnecessary allocation+unboxing of objects.
Transforming String->int can be done with 0 allocations
using Integer.parseInt.

bug: 28078871
Change-Id: I8d9f322d7154728849dde61ef282046032858d60
2016-04-18 09:55:59 +01:00
Amith Yamasani
d9af2fcd34 Merge "Address API review for UserManager user creation" into nyc-dev am: 25c66ac
am: 6797d86

* commit '6797d86d76ee193bc20809f118163a86eaf28b4b':
  Address API review for UserManager user creation

Change-Id: Ibfc33fcf16d958272b7dc6cad59e5ee557716706
2016-04-16 00:24:51 +00:00
Adam Lesinski
010bf374d8 BatteryStats: Introduce Async external stats requests
Instead of calling out to external processes with a blocking IPC,
pass along a Binder on which the external process can pass back
the response. The calling process can then wait for the reply with
a timeout.

This eliminates watchdog restarts of the system_server when an external
process like telephony or bluetooth hangs.

Bug:26842468
Change-Id: I1b242e4ed22a63f1a4a0be8c78de8ac4d7bf56c5
2016-04-15 15:27:52 -07:00
Amith Yamasani
0696434c62 Address API review for UserManager user creation
Don't return null from createUserCreationIntent()
Provide a way for apps to query if the device
supports multiple users.

Some additional documentation for UserManager class to
make things clear about the types of users and relationship
with accounts.

Change-Id: I768d816e73a1d7f61cdc415f9e482adc79e2715a
Fixes: 28150359
2016-04-15 14:10:02 -07:00
Jeff Sharkey
fcf1e55821 Consistent creation/destruction of user data.
Preparing and destroying users currently needs to be split across
installd, system_server, and vold, since no single party has all the
required SELinux permissions.

When preparing user directories on a storage device, always enforce
the serial number and destroy data if we run into a mismatch.  When
deleting a user, write the updated user list first before we start
destroying data.  Also start reconciling users on internal storage
at boot, so we can recover from stale data left behind from partially
destroyed users.

Check both CE and DE user directories when reconciling user storage
on a newly mounted storage device.

Bug: 27896918
Change-Id: I4536c82b0196e2720628c4f73fccb742c233350b
2016-04-15 13:35:36 -06:00