Commit Graph

3336 Commits

Author SHA1 Message Date
Dianne Hackborn
851ec49de7 Fix issue #32125907: Intent.replaceUnsafeExtras() corrupts original bundle
We now recursively generate new Bundle objects if we need to
do any stripping.

Change-Id: I4ca7896a0771c25264591ae7c79df85816d630d4
2016-10-12 18:17:58 -07:00
Jeff Sharkey
42a4aaab44 Set MIME type when building BROWSE intents.
If we created a BROWSE PendingIntent early during boot (while the
device was still locked), we would resolve the MIME type as "null"
meaning the intent would fail to launch.

Since we always know what the MIME type will be, set it explicitly.

Test: boot device while USB device attached
Bug: 30742481
Change-Id: I23c523cbe2660ca63a3b7df1f41300ab803b314c
2016-10-10 21:28:40 +00:00
Tao Bao
473b048cf7 Merge "Handle the race condition when calling uncrypt services." into nyc-mr1-dev 2016-09-30 23:07:38 +00:00
Tao Bao
1eabf53437 Handle the race condition when calling uncrypt services.
We call uncrypt services to setup / clear bootloader control block (BCB)
for scheduling tasks under recovery (applying OTAs, performing FDR).
However, we cannot start multiple requests simultaneously. Because they
all use the same socket (/dev/socket/uncrypt) for communication and init
deletes the socket on service exits.

This CL fixes the issue by a) adding synchronized blocks for the service
requests; b) checking the availability of the socket before initiating a
new one.

Note that adding synchronized blocks to RecoverySystem doesn't help,
because the calls could be made from different processes (e.g. priv-app,
system_server).

Bug: 31526152
Test: FDR works while a priv-app keeps calling clear BCB.

Change-Id: I95308989e849a9c98a9503ac509f2bc51ed3de19
(cherry picked from commit 794c8b0b3f)
2016-09-29 23:12:16 -07:00
Tianjie Xu
e422b0b29f Merge "Log the error when uncrypt timeouts" into nyc-mr1-dev 2016-09-29 18:03:30 +00:00
Tony Mantler
5eb91a437c AsyncTask terminating with exception calls onCancelled
Test: cts/tests/tests/os/src/android/os/cts/AsyncTaskTest.java
b/30304893

Change-Id: Icb50cda8026ddd70d457b5e62eb29c81313ee47d
2016-09-28 21:16:56 +00:00
Tianjie Xu
2a03586998 Log the error when uncrypt timeouts
Log the error code to uncrypt_status if uncrypt gets killed because
of timeout.

Test: We log the error code correctly in uncrypt_status when uncrypt timeouts.
Bug: 31603820
Change-Id: Ia623c333714295e68f4269257fbb4297a867e42b
(cherry picked from commit 036d08638e)
2016-09-28 11:19:03 -07:00
Christopher Tate
4b17e984b6 Don't leak wakelock instances
Bug 31247436

Change-Id: I7c2ad956c43233b37e53856e9321cb87b01c35da
2016-09-27 15:00:48 -07:00
Vadim Tryshev
06b9b60c6d Adding compatibility note for drag/drop in N.
Bug: 31702571
Change-Id: Ib4b839eec21ea8e1c2b3686595a45642eb8285ba
2016-09-23 15:32:33 -07:00
Jeff Sharkey
2c89a4c170 Rename should behave like create: avoid conflict.
When we create a file that already exists, we try attaching a suffix
like "(1)" to the filename to avoid the conflict.  The newly added
rename method should do the same, since developers may not have
access to delete the conflicting file.

Test: boots, rename via UI, new unit tests
Bug: 31545404
Change-Id: Ie397eebb0fbf98cf079eee3bbbb6c6b7ca627d91
2016-09-21 23:01:25 +00:00
Adrian Roos
f940aa3ea1 Merge "Hold WakeLock while DreamService starts" into nyc-mr1-dev 2016-09-19 22:47:30 +00:00
Tianjie Xu
492450c88a Collect status on uncrypt time cost
Read and report time cost of uncrypt (in seconds) from last_install.

Bug: 31383361

Change-Id: I283970c33b2a0324f2f51cde328e3e527eff7c58
(cherry picked from commit 3477efce30)
2016-09-16 12:13:49 -07:00
Makoto Onuki
d6f06df5ec Merge "Fix system crash due to mismatching begin/finishBroadcast()" into nyc-mr1-dev 2016-09-16 17:13:18 +00:00
Patrick Baumann
4a0b061ff6 Merge "Adding advanced pattern support to PatternMatcher" into nyc-mr1-dev 2016-09-15 21:20:35 +00:00
Makoto Onuki
7bdb9ce978 Fix system crash due to mismatching begin/finishBroadcast()
Bug 31449363

Change-Id: I514196355a2566c5e4f7f3af91fbf3c57cb67a48
2016-09-15 12:59:43 -07:00
Patrick Baumann
2baf095ca9 Adding advanced pattern support to PatternMatcher
This change adds a new pathMatch attribute to the intent-filter tag
that supports a subset of regular expression syntax. Supported
tokens include dot (.) and set ([]) and supported modifiers include
zero-or-more (*), one-or-more(+) and ranges ({}).

Change-Id: I2ec3bc8a9eb3e94d21caf34a1ed0f3fd3fb33a35
Bug: 30805203
2016-09-15 11:17:54 -07:00
Adrian Roos
7445c0bb86 Hold WakeLock while DreamService starts
Fixes a bug where DozeService would not properly initialize
because the CPU went to sleep before onDreamingStarted completed,
causing the pickup gesture to not work.

Change-Id: I85955a2b7d6bad5171accbc336117a9660b1b198
Fixes: 31044352
2016-09-08 20:06:48 +00:00
Felipe Leme
873a83af3f Created a NETWORK trace tag.
Also applied it to a few critical paths on NetworkPolicyManagerService.

BUG: 31281543

Change-Id: If27240d86c21e5b49b9595bfcbc90214126cf489
2016-09-07 13:50:52 -07:00
Jeff Sharkey
c041f5a3b8 DO NOT MERGE. Clarify FileObserver docs for null value.
Change-Id: I7dc0b0d26220d6eb82f956a9860cfb6aeccfd12f
Test: none
Bug: 30511606
(cherry picked from commit 902316d553)
2016-08-31 21:42:54 +00:00
Mark Lu
86caa4aebf docs: Fix typo and broken link in AsyncTask.java am: 53415ff24e
am: bae52ec98c

Change-Id: Idb695142488874d52dd406bede0fb4848f7663a9
2016-08-26 01:03:59 +00:00
Mark Lu
bae52ec98c docs: Fix typo and broken link in AsyncTask.java
am: 53415ff24e

Change-Id: I1fd10e79a2af2db5bc175dcc4126d3f88c35f4b1
2016-08-26 00:53:59 +00:00
Tony Mantler
97231323b7 Merge "Fix AsyncTask to handle exceptions in doInBackground" into nyc-mr1-dev 2016-08-24 17:00:04 +00:00
Fyodor Kupolov
19551a8d8d Added getDataPreloadsMediaDirectory
Bug: 31015966
Change-Id: I8b4117daae2b1f7a59d6a192b34a105f91cbac55
2016-08-22 21:59:01 +00:00
Narayan Kamath
99f960f7da Process: Fix communication with zygote.
am: 448be0a622

Change-Id: I530a1f04545a796d22ca59141aa8fe3de349388c
2016-08-18 23:08:49 +00:00
Dianne Hackborn
c1b607df71 Docs only: N is no longer a shrug.
Change-Id: I6fa8f77d93f53b7969ec6aab4c7e9ca27d17d01f
2016-08-12 17:01:35 -07:00
Mark Lu
53415ff24e docs: Fix typo and broken link in AsyncTask.java
Bug: 29323321
Change-Id: Ie3a62480bfee881083b5d266cbc1481fb148d237
2016-08-12 13:02:32 -07:00
TreeHugger Robot
fd97e7bc8c Merge "Do not toggle OEM unlock if bootloader unlocked" into nyc-mr1-dev 2016-08-11 18:45:26 +00:00
Esteban Talavera
c48b20f8f1 Do not toggle OEM unlock if bootloader unlocked
Bug: 30681215
Change-Id: Ia0fd55dd7b6b731d6f5733fc733621e99bd7b153
2016-08-11 18:14:03 +01:00
Dianne Hackborn
5f1649e852 A little more on issue #30766518: Document what targeting N does
Change-Id: I67f2bfd01261a4304b532495a0d3cc791726ed5e
2016-08-09 18:00:31 -07:00
Dianne Hackborn
b34cbedb4e Fix issue #30766518: Document what targeting N does
Also small documentation cleanup in a few other places.

Change-Id: I16581c751aa0ffa146faba3b140a8fa2170f4520
2016-08-09 13:21:24 -07:00
Narayan Kamath
448be0a622 Process: Fix communication with zygote.
Don't write partial requests, and don't return (or throw) early after
partially reading a response.

bug: 30143607
Change-Id: I5881fdd5e81023cd21fb4d23a471a5031987a1f1
2016-08-09 18:30:07 +01:00
Joe Onorato
adbee556a9 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-05 16:10:13 -07:00
Tony Mantler
78a8e9d293 Fix AsyncTask to handle exceptions in doInBackground
When cancelling, the exception will be eaten by FutureTask, but
onCancelled would end up never being called due to the exception
causing the code to skip calling postResult.

b/30304893

Change-Id: I47d859d9ef77245889816b2b6e10bb380bc4979b
2016-08-05 22:03:45 +00: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
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
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
b84ce2e034 Merge "Support multiple intents in ShortcutInfo" into nyc-mr1-dev 2016-07-20 23:05:31 +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
TreeHugger Robot
f0de4da42f Merge "Improved storage size detection." into nyc-mr1-dev 2016-07-20 19:06:12 +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
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
5f056f6d87 Record UID of wakeup packets
Bug:28931278
Change-Id: I50a3b6a8026b4d06aaa2730cd531658d280ddb73
2016-07-18 12:30:46 -07: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
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