Commit Graph

8998 Commits

Author SHA1 Message Date
Calin Juravle
b1818b8a36 Merge "PackageManager: Clean up code related to foreign dex use"
am: eef66fd0c7

Change-Id: I443f001c15daddd63a17685c2e82fc9a619c45ee
2017-03-07 21:23:03 +00:00
Calin Juravle
4c06f55f14 PackageManager: Clean up code related to foreign dex use
We simplified the way we track whether or not a dex file is used by
other apps. DexManager in the framework keeps track of the data and we
no longer need file markers on disk.

Test: device boots, foreign dex markers are not created anymore

Bug: 32871170

(cherry picked from commit 74f0a3450c)

Change-Id: I2a9daca15e5120518852584fa17aa94012af8f1a
Merged-In: I3660e2f3913a73904181449c2d910af0a0477950
2017-03-07 11:39:24 -08:00
Dimitry Ivanov
029170ee2b Merge "Add isBundled argument to LoadedApk.makePaths call"
am: 0743d56e2b

Change-Id: I74deae8126109555bbbe57983ffd6a22ab50e303
2017-02-23 23:30:16 +00:00
Dimitry Ivanov
484fbe9273 Add isBundled argument to LoadedApk.makePaths call
There is a disconnect between the way webview created
classloader and the way makePaths decides if paths are
intended for bundled app.

This change moves decision making out of makePaths method
which allows WebViewZygote to pass correct argument and
have makePath omit java.library.path for libPaths

Bug: http://b/35426785
Test: manual
Change-Id: Iab5a18c0091d0193dafa750498eb00f378411ba0
(cherry picked from commit 638d810099)
2017-02-23 14:16:45 -08:00
Leonard Mosescu
5d2af16008 Merge "Add missing break statement." am: 7a4b88de49
am: 080456edd6

Change-Id: I2acd644f0bb5916f9c90a1103b023544a7eebddb
2017-02-17 20:34:48 +00:00
Leonard Mosescu
456d5fc159 Add missing break statement.
It was caught in the code review after the merge (thanks Narayan!).
This is already fixed and tested in the internal branch (see Merged-In)

Test: manual, CTS in internal

Change-Id: I9f6f72995e9ab633564b6bc22846fbe99eb65105
Merged-In: If14126e645b2d0a1307404e2f50088b3994abce2
2017-02-17 10:10:55 -08:00
Leonard Mosescu
de021d8162 Merge "Adding "attach-agent" to ActivityManagerShellCommand" am: 05dfd10254 am: db0803b4e8
am: 7bf598cbd9

Change-Id: If7b73860cc8249b997d5e9a7a4d149732b08449b
2017-02-16 23:37:48 +00:00
Leonard Mosescu
7bf598cbd9 Merge "Adding "attach-agent" to ActivityManagerShellCommand" am: 05dfd10254
am: db0803b4e8

Change-Id: I4493e6b3bd2cf8447e8c3043878ad0f531c0e677
2017-02-16 23:29:16 +00:00
Leonard Mosescu
02758a9a80 Adding "attach-agent" to ActivityManagerShellCommand
This new command is used to attach runtime agents to a running application:

attach-agent <PROCESS> <FILE>
   Attach an agent to the specified <PROCESS>,
   which may be either a process name or a PID.

Test: m test-art-host, manual testing:
    . invalid syntax, missing arguments
    . invalid syntax, extra arguments
    . invalid numeric PID
    . invalid process name
    . valid process, not debuggable
    . valid process, missing agent
    . valid process, valid agent

Bug: 31682382

Change-Id: I61cc8bf20addb1702acc8e7aae65b2f9ed7c5ca0
Merged-In: Ife88dbf23991dde7945d9208e54cd014bb7ecdc6
2017-02-16 13:19:41 -08:00
Philip P. Moltmann
b02f8eb241 resolve merge conflicts of d043a840f7 to nyc-mr2-dev-plus-aosp
Test: Clean merge
Change-Id: Ib2420ff793fdf22fd80cfaed7848ff6b8be8d382
2017-02-14 09:51:16 -08:00
Philip P. Moltmann
d043a840f7 Merge "[DO NOT MERGE] Revert "[DO NOT MERGE] Delay SharedPreferences.apply() by 50 ms"" into nyc-mr2-dev 2017-02-14 16:03:32 +00:00
Philip P. Moltmann
755d78dbd9 [DO NOT MERGE] Revert "[DO NOT MERGE] Delay SharedPreferences.apply() by 50 ms"
This reverts commit 2fc44947dd.

Bug: 30662828
Change-Id: Ia22343c19e155555dff3b0cb58f7b58df0ce6301
2017-02-13 23:44:31 +00:00
Rubin Xu
6ee5a0c8a5 Merge "Fix uri permission grant on remote bug report uri" into nyc-dev am: 42f2e80293 am: 824c8284ce am: 72074e3ab9 am: f85a20702a
am: 060cde9802

Change-Id: Ic591b48e298823b46f8d1fc25b0e01a82cc263b5
2017-02-10 12:32:48 +00:00
Rubin Xu
060cde9802 Merge "Fix uri permission grant on remote bug report uri" into nyc-dev am: 42f2e80293 am: 824c8284ce am: 72074e3ab9
am: f85a20702a

Change-Id: I3861a5229fdb55f7dc7fd57e1706b34f9847d492
2017-02-10 12:28:56 +00:00
Rubin Xu
0f2c853889 Merge "Fix uri permission grant on remote bug report uri" into nyc-dev am: 42f2e80293 am: 824c8284ce am: 72074e3ab9
am: f85a20702a

Change-Id: If9e569ba66dc9e5876fab5ffd2a6c9b0a9fb923b
2017-02-10 12:28:47 +00:00
Rubin Xu
f85a20702a Merge "Fix uri permission grant on remote bug report uri" into nyc-dev am: 42f2e80293 am: 824c8284ce
am: 72074e3ab9

Change-Id: I1cd4db65e0fe8c92628f22f94fe937cf64f2da04
2017-02-10 12:24:43 +00:00
Rubin Xu
72074e3ab9 Merge "Fix uri permission grant on remote bug report uri" into nyc-dev am: 42f2e80293
am: 824c8284ce

Change-Id: If4dfa2d7af980c91ec3d3f8faa7e7f4a39350c82
2017-02-10 12:20:18 +00:00
Rubin Xu
824c8284ce Merge "Fix uri permission grant on remote bug report uri" into nyc-dev
am: 42f2e80293

Change-Id: Ic167e10a205b5c8f9df81cd20a6f08359d3807f4
2017-02-10 12:16:19 +00:00
TreeHugger Robot
42f2e80293 Merge "Fix uri permission grant on remote bug report uri" into nyc-dev 2017-02-10 12:11:00 +00:00
Jeff Sharkey
78f2e38a12 DO NOT MERGE. Grant MMS Uri permissions as the calling UID.
A recent security fix prevents the system UID from handing out Uri
permission grants directly from itself.  Instead, services need to
issue grants as the original calling UID to ensure that the caller
actually has access to the Uris.

Test: builds, boots, send/recv MMS works in primary/secondary users
Bug: 33231106
Change-Id: Ia9fe19843b52977c8a94ee5349b907beda1882fc
Merged-In: Ia9fe19843b52977c8a94ee5349b907beda1882fc
(cherry picked from commit 7ff418d9a9)
2017-02-09 18:03:18 +00:00
Jeff Sharkey
d94624347f DO NOT MERGE. Grant MMS Uri permissions as the calling UID. am: 3eddf40675 am: 14b308de91
am: 473b52eb62

Change-Id: Ic9afb12547b271de6e423601131605b0d930e10b
2017-02-09 17:42:09 +00:00
Jeff Sharkey
19fd8e3f06 DO NOT MERGE. Grant MMS Uri permissions as the calling UID. am: 3eddf40675
am: 14b308de91

Change-Id: I3ae65230058cd51b4efb06358dae35dce419c04b
2017-02-09 17:39:14 +00:00
Jeff Sharkey
473b52eb62 DO NOT MERGE. Grant MMS Uri permissions as the calling UID. am: 3eddf40675
am: 14b308de91

Change-Id: I428dcaa5e44364d30a51392c224ad68a6e455e2b
2017-02-09 17:37:44 +00:00
Jeff Sharkey
14b308de91 DO NOT MERGE. Grant MMS Uri permissions as the calling UID.
am: 3eddf40675

Change-Id: Ied7f446ac2e539654b9f7d5e1ab7cce8aec7390e
2017-02-09 17:33:43 +00:00
Rubin Xu
ca53b27c34 Fix uri permission grant on remote bug report uri
System server is no longer allowed to grant uri permission directly. As a result
we use grantUriPermissionFromIntent() to grant permission from the shell UID,
who is the owner of the bug report content.

Also fix a security bug where the broadcast to notify user consent of remote
bug report mismatches the <protected-broadcast> definition, causing it to be
sendable by anyone.

Bug: 34159108
Test: manual - Install TestDPC and request bugreport, try accept and decline
      once the report is ready (Bullhead).

Merged-In: I66e3f2a16d4547549f09d3c96d52aed2330caedf
Change-Id: I66e3f2a16d4547549f09d3c96d52aed2330caedf
2017-02-08 10:15:48 +00:00
Jeff Sharkey
a78841ebd4 DO NOT MERGE. Grant MMS Uri permissions as the calling UID.
A recent security fix prevents the system UID from handing out Uri
permission grants directly from itself.  Instead, services need to
issue grants as the original calling UID to ensure that the caller
actually has access to the Uris.

Test: builds, boots, send/recv MMS works in primary/secondary users
Bug: 33231106
Change-Id: Ia9fe19843b52977c8a94ee5349b907beda1882fc
(cherry picked from commit 7ff418d9a9)
2017-02-07 04:04:15 +00:00
Jeff Sharkey
3eddf40675 DO NOT MERGE. Grant MMS Uri permissions as the calling UID.
A recent security fix prevents the system UID from handing out Uri
permission grants directly from itself.  Instead, services need to
issue grants as the original calling UID to ensure that the caller
actually has access to the Uris.

Test: builds, boots, send/recv MMS works in primary/secondary users
Bug: 33231106
Change-Id: Ia9fe19843b52977c8a94ee5349b907beda1882fc
(cherry picked from commit 7ff418d9a9)
2017-02-07 01:23:32 +00:00
Pavel Grafov
c3beac34f6 Fix the documentation for SecurityLog.SecurityEvent.getData(). am: 739cda8f31 am: fca679ff74
am: 5a474b4930

Change-Id: If1731db386157b1f53c3a7bbe379299c1ada0ca9
2017-02-06 17:52:37 +00:00
Pavel Grafov
5a474b4930 Fix the documentation for SecurityLog.SecurityEvent.getData(). am: 739cda8f31
am: fca679ff74

Change-Id: Ic6e2aab590583c501fa74317ee614ab1ebaea378
2017-02-06 17:46:11 +00:00
Pavel Grafov
1bb00e0849 Fix the documentation for SecurityLog.SecurityEvent.getData(). am: 739cda8f31
am: fca679ff74

Change-Id: I9f02c30450e56b8f25bbbe4b1baa2381c84437c8
2017-02-06 17:46:09 +00:00
Pavel Grafov
fca679ff74 Fix the documentation for SecurityLog.SecurityEvent.getData().
am: 739cda8f31

Change-Id: I0c6f1271392bfc9cc8d253d5fa5e029213492b48
2017-02-06 17:41:08 +00:00
Philip P. Moltmann
416a36a83b [DO NOT MERGE] Delay SharedPreferences.apply() by 50 ms
am: 2fc44947dd

Change-Id: Ie0bb1c0c23928318cbaf3dc22ca0aa6761bbfa75
2017-02-02 19:21:40 +00:00
Pavel Grafov
739cda8f31 Fix the documentation for SecurityLog.SecurityEvent.getData().
If the payload contains more than one object, it is passed in Object[].

Change-Id: I28ca2ec35d920c644bdea13f15b2787ef3170310
Fixes: 34871284
Test: Read aloud, sounds good.
2017-02-02 12:47:53 +00:00
Philip P. Moltmann
2fc44947dd [DO NOT MERGE] Delay SharedPreferences.apply() by 50 ms
... so that multiple applies can be combined into a single write.

Do do this I replaces the executor in the QueuedWork by a more Android-y
handler.

Test: Ran shared preferences CTS tests. Looked at log and saw a lot of
      skipped writes

Bug: 33385963
Bug: 30662828

Change-Id: I8f33df717be7091532930ccf6ca8c48940e4edd4
(cherry picked from commit 3349644872)
2017-01-31 02:50:24 +00:00
Shukang Zhou
bb44e42de9 [Frameworks] Add an 'am' cmd option to enable streaming in profiling.
Add option '--streaming' to 'am start' and 'am profile' commands.
If the option is given, the output of method trace profiling
will be streamed into the specified file, so the output is no
longer limited by the buffer size.

Test: m -j48 test-art-host;
m -j48 ART_TEST_TRACE=true ART_TEST_TRACE_STREAM=true test-art-host;
I also tested manually. Tried all 8 combinations of
    sampling/instrumention
    streaming/non-streaming
    'am start --start-profiler' / 'am profile start'
The output files are all in expected shape.

Bug: 33300765

Merged-In: I8a5136a1c7330c8260b7c6c8da63f42a73aee275

Change-Id: I8a5136a1c7330c8260b7c6c8da63f42a73aee275
2017-01-30 13:07:40 -08:00
John Reck
6e4f930457 Merge "Fix a bunch of repeated reads of a ro.* property" am: 4265991701 am: e4c2e8f303
am: 3c2837e77e

Change-Id: Idbcb9dfeac57036d3621474ee65ba967cc7bc499
2017-01-27 23:05:52 +00:00
John Reck
3c2837e77e Merge "Fix a bunch of repeated reads of a ro.* property" am: 4265991701
am: e4c2e8f303

Change-Id: Id6af451556fde8eefac8076735e625911f8bf272
2017-01-27 23:02:41 +00:00
Treehugger Robot
4265991701 Merge "Fix a bunch of repeated reads of a ro.* property" 2017-01-27 22:49:04 +00:00
John Reck
ed065024a5 Fix a bunch of repeated reads of a ro.* property
SystemProperties.get() is not particularly fast,
especially if a string is returned. Since ro.* values
are unable to be changed, there's no need to
continously re-query them. Cache the value at
static init time to trivially fix this.

Test: refactoring CL.
Change-Id: Iccb021d3cb2ba3a4a1d0048ddec6811bb7409eec
(cherry picked from commit aa67f684ff)
2017-01-27 11:04:39 -08:00
Shukang Zhou
221e58fe95 Merge "[Frameworks] Add an 'am' cmd option to enable streaming in profiling." am: e924640c4b
am: b0f03a64ea

Change-Id: I35fa80e43cd4f6af76099848714f838f217b7989
2017-01-27 19:01:44 +00:00
Paul Navin
dd91db5515 Add hidden API for whether permission review mode is on. am: 7b89a7b1f7
am: 7c230c6f3c

Change-Id: I89c9a580a96d0f69ed30cad9ec2e4f9c215a403b
2017-01-27 16:59:33 +00:00
Paul Navin
7c230c6f3c Add hidden API for whether permission review mode is on.
am: 7b89a7b1f7

Change-Id: I925b6de9f79850dcc816a73357d1d589eeac6333
2017-01-27 16:55:03 +00:00
Paul Navin
90e9bbc814 Add hidden API for whether permission review mode is on.
am: 7b89a7b1f7

Change-Id: Ic7f4d30bd689bf5677600552030a3e696b16dfbb
2017-01-27 16:54:58 +00:00
The Android Automerger
7bc2aebd53 Merge commit '48a1136c8b3000c651e8bcd86325acd1dce6e4ec' into nyc-mr1-dev-plus-aosp
* commit '48a1136c8b3000c651e8bcd86325acd1dce6e4ec':
  Implement metered tracking for NetworkStats summary queries.
2017-01-27 06:39:41 +00:00
The Android Automerger
53095bb5bd Merge commit 'a19056c35d16ddb5a6c1d3343729701b8939f1e1' into nyc-mr1-dev-plus-aosp
* commit 'a19056c35d16ddb5a6c1d3343729701b8939f1e1': (35 commits)
  NetworkMonitor: send one DNS probe per web probe
  NetworkMonitor metrics: add first validation information
  APF: also drop any ICMPv6 RSs
  ConnectivityServiceTest: fix testAvoidBadWifiSettings
  Fix ConnectivityServiceTest testRequestBenchmark
  Switch over to new "time.android.com" NTP pool.
  Define API for metering network stats buckets.
  Refactored NetworkStatsServiceTest to use Mockito instead of EasyMock.
  Use @Ignore to explicitly disable a @Test method.
  Fixed NetworkStatsServiceTest and converted it to JUnit4.
  VPN network stat accounting changes.
  ConnectivityThread: use lazy holder idiom
  ConnectivityManager: use ConnectivityThread looper
  ConnectivityManager: a simpler CallbackHandler
  Indicate the NsdServiceInfo attributes are only filled in for a resolved service.
  Add a null check for the OnStartTetheringCallback.
  TokenBucket for rate-limiting and throttling
  IpConnectivityMetrics reads buffer size in settings
  CaptivePortalLogin: set mixed content policy to compatibility.
  Add IP conn metrics to dumpsys and bug reports
  ...
2017-01-27 06:39:05 +00:00
Paul Navin
7b89a7b1f7 Add hidden API for whether permission review mode is on.
BUG: 34240393
Change-Id: I68e55767a7da1d457a6cedd210aac9e339fb996c
2017-01-27 03:42:32 +00:00
Stephen Chen
48a1136c8b Implement metered tracking for NetworkStats summary queries.
Dependent on ag/1550196 where API is defined.

Bug: 31015360
Bug: 26545374
Test: runtest --path
frameworks/base/core/tests/coretests/src/android/net/NetworkStatsTest.java,
other test classes.

(cherry picked from commit 2514787897)

Change-Id: I46da93ba4afa968facf98f7c3d844fd0c469095a
2017-01-26 18:52:32 +09:00
Stephen Chen
94eab5c526 Define API for metering network stats buckets.
This is a continuation of b/26545374, since now we can also set the
metered bit with NetworkScorer. The tracking of metered state changes
will be implemented in a seperate CL.

Bug: 31015360
Bug: 26545374
Test: N/A

(cherry picked from commit 9ac251d116)

Change-Id: I6a2fcc8577d62daa8823dff9e0128a5cf39ede7b
2017-01-26 18:52:08 +09:00
Elliot Waite
9b21265b2c Fix @links in reference docs. am: 54de77470d am: ab978c035e
am: 28ba4722a9

Change-Id: I98177a8cf0a20677e140406bb7371474ca259e5b
2017-01-26 04:44:54 +00:00
Elliot Waite
28ba4722a9 Fix @links in reference docs. am: 54de77470d
am: ab978c035e

Change-Id: If0d0613362e0ea95cf48eaf9a16d3eea48b589ea
2017-01-26 04:39:57 +00:00