Commit Graph

6016 Commits

Author SHA1 Message Date
TreeHugger Robot
17e2907285 Merge "Code cleanup to conform to style guide / linter." 2019-01-23 19:04:15 +00:00
Peiyong Lin
ea5b721943 Merge "[Game Driver] Add blacklist mechanism." 2019-01-23 18:04:03 +00:00
Nandana Dutt
9de4d6a3f5 Merge "Improvements to Bugreporting API." am: 212353c896 am: 42df2e1602
am: 73226aa0f8

Change-Id: I947ffa533288c91b169863a045d71e735486773e
2019-01-23 09:47:56 -08:00
Nandana Dutt
73226aa0f8 Merge "Improvements to Bugreporting API." am: 212353c896
am: 42df2e1602

Change-Id: I7ea14750afc2c8b6f2b387ad23a054acf1ec6384
2019-01-23 09:36:20 -08:00
Treehugger Robot
212353c896 Merge "Improvements to Bugreporting API." 2019-01-23 17:00:48 +00:00
Nandana Dutt
b2da22a0de Improvements to Bugreporting API.
* Add cancelBugreport method.
* Remove unused arguments to onFinished listener call.
* Publish the system service now that sepolicy for it
  is submitted.
* Use the new bugreportd service.

Test: boots
BUG:111441001
Change-Id: I12d72e0e1f4ca72d285fd02a3fc1a44f5c179885
2019-01-23 10:21:45 +00:00
Denny cy Lee
c5a7c29581 DeviceIdle: Support aggressive/unaggressive doze mode
Test: atest com.android.server.DeviceIdleControllerTest
Bug: 121167278
Change-Id: I3bc645a23a6a93e120f12a9a3fa5cf038fa6ca8f
2019-01-23 09:51:37 +00:00
Remi NGUYEN VAN
c56ce9735a Merge "Add UserHandle constants to SystemApi" am: 0a9054639d
am: 7b0f06d7d9

Change-Id: I4ab95e6114546f01648a949b5712b7a609319684
2019-01-22 23:39:57 -08:00
Jeff Sharkey
8a83ae1069 Merge "Sanity check raw paths against requested volume." 2019-01-23 05:47:17 +00:00
Remi NGUYEN VAN
6c7877b7bb Add UserHandle constants to SystemApi
The affected constants are already SystemApi in internal.

Bug: 112869080
Test: m
Change-Id: Iacefdefa59346eaebd8b92743fe8710845edcc29
Merged-In: I261dfcc5cfdfc76bda5d70181785e11c2715a558
2019-01-23 11:06:18 +09:00
Chris Wailes
efce929711 Code cleanup to conform to style guide / linter.
This commit made the following changes to make the code conform to the
Frameworks style guide:
* Re-named variables
* Re-flowed code
* Organized includes

Topic: zygote-prefork
Test: make & flash & launch apps
Bug: 68253328
Change-Id: I9274b32f1f606f29f6eb3a1e5068ca18f607afe7
2019-01-22 16:07:31 -08:00
TreeHugger Robot
e54b7b5498 Merge changes I4054d6f4,Ib14e9a93,Iafbe6d51
* changes:
  CpuStats - Do not write debug entries to dump output
  Set ThreadLocalWorkSource when delivering Alarms
  Add WorkSource.getAttributionUid()
2019-01-22 23:14:25 +00:00
Peiyong Lin
9ca1dd8dab [Game Driver] Add blacklist mechanism.
When a blacklist is set, we must not use driver package for those applications
on the blacklist.

BUG: 120869311
Test: Build, flash, boot. Verify with command line.
Change-Id: I1c9f10a3086007038c328a20346ffadeff1861ae
2019-01-22 14:16:41 -08:00
TreeHugger Robot
c797867220 Merge "Update HandlerThread's javadoc" 2019-01-22 21:10:37 +00:00
Jeff Sharkey
3f64ec57dd Sanity check raw paths against requested volume.
When callers are inserting or updating raw "_data" paths, we need to
sanity check them to make sure they're not "crossing the streams"
between storage devices.  For example, it would be really broken to
insert a file on the SD card into the "internal" storage volume.

This also enforces that callers don't "cross the streams" between
multiple storage volumes on devices that support them, since
otherwise they'd end up with very confusing behavior, such as
the same underlying file being inserted into multiple databases.

Also, the "internal" storage volume should really only be used for
common media (such as ringtones), and it shouldn't be allowed to
point into private app data directories, since MODE_WORLD_READABLE
has been deprecated for many years now.

Bug: 117932814
Test: atest MediaProviderTests
Test: atest cts/tests/tests/media/src/android/media/cts/MediaScanner*
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I267eacd45bbd270b8ce9b28de9d6e209f780f31a
2019-01-22 13:55:25 -07:00
Eugene Susla
6f210eeede Update HandlerThread's javadoc
Addresses concerns in b/63382879

Fixes: 63382879
Test: proofread
Change-Id: I4aaf543df86123d46b708f35c80c04df0f737989
2019-01-22 10:40:46 -08:00
Marcin Oczeretko
5329540c39 Add WorkSource.getAttributionUid()
Bug: 119802232
Test: atest WorkSourceTest
Change-Id: Iafbe6d516b93315f58466385c2dc2031073d8573
2019-01-22 18:26:42 +00:00
Remi NGUYEN VAN
7aa9b885c3 Merge "Expose UIDs for NetworkStack permission checks" am: 3b887bdf4a am: 29515d751b
am: f10038e9ca

Change-Id: I4156471eec78511fd86a1c381d53df57b1f4ea98
2019-01-22 06:13:46 -08:00
Remi NGUYEN VAN
f10038e9ca Merge "Expose UIDs for NetworkStack permission checks" am: 3b887bdf4a
am: 29515d751b

Change-Id: Ia9bc41cebf048d536efa8aeea992fed3f583ba1b
2019-01-22 06:04:32 -08:00
Remi NGUYEN VAN
3b887bdf4a Merge "Expose UIDs for NetworkStack permission checks" 2019-01-22 13:40:57 +00:00
Remi NGUYEN VAN
b809148b9a Merge changes Ieef54d84,Ica3e88c2 am: 491f53523a am: 8e4ce11318
am: c904972acd

Change-Id: Idcc18b95951c566335431a493ed7b9d49477a4c0
2019-01-22 05:32:01 -08:00
Remi NGUYEN VAN
c904972acd Merge changes Ieef54d84,Ica3e88c2 am: 491f53523a
am: 8e4ce11318

Change-Id: I33fc6ee4cf47676dc2a4a9369dd3fc053dba34ec
2019-01-22 05:22:30 -08:00
Remi NGUYEN VAN
0d81df94cd Expose UIDs for NetworkStack permission checks
The UIDs are unlikely to change and added as public API.

Test: m
Bug: 112869080
Change-Id: I5477093a4c8593dd9ada7587b86c65352e628c34
2019-01-22 20:44:06 +09:00
Lorenzo Colitti
a27da72cd1 Expose ServiceSpecificException as @SystemApi.
This class is useful as a system API because:

- It is one of the few exceptions that is natively Parcelable.
- It is directly supported by native code without using JNI,
  using Status::fromServiceSpecificError.
- Unlike other natively parcelable exceptions, it contains both
  an error message and an error code.

Test: m
Bug: 112869080
Change-Id: Ica3e88c2b6877e429a61b053d75f69b9f19fc74a
2019-01-22 18:44:12 +09:00
Sudheer Shanka
7461df211d Merge "Create a new MOUNT_EXTERNAL_LEGACY storage mode." 2019-01-19 18:04:40 +00:00
Nandana Dutt
e0546e6b12 Merge "Pass in calling UID and package to dumpstate" am: bc6e433ae4 am: ae97716377
am: ec3ce57698

Change-Id: I70d120ed5666322fa75646c05c12a6dfd51ed1f3
2019-01-19 06:24:23 -08:00
Nandana Dutt
ec3ce57698 Merge "Pass in calling UID and package to dumpstate" am: bc6e433ae4
am: ae97716377

Change-Id: Ie1126fb68184c7789fe969b008ee1550d4424809
2019-01-19 06:11:19 -08:00
Sudheer Shanka
0b6da5362d Create a new MOUNT_EXTERNAL_LEGACY storage mode.
Apps that are already installed on the device before isolated_storage
feature is enabled will be granted MOUNT_EXTERNAL_LEGACY mode. In this
mode, /mnt/runtime/write will be mounted at /storage giving them same
level of access as in P.

A new mount directory /mnt/runtime/full is also created which will be
used for mounting at /storage for apps started with MOUNT_EXTERNAL_FULL
mode. This will allow apps with WRITE_MEDIA_STORAGE permission to
read/write anywhere on the secondary devices without needing to bypass
sdcardfs.

Bug: 121277410
Test: manual
Test: atest android.appsecurity.cts.ExternalStorageHostTest
Change-Id: I4ec73276d7c586ae4afc482580d1eb8ee03d5be1
2019-01-18 18:48:55 -08:00
TreeHugger Robot
d839beae5b Merge "Make security warning on contains() more obvious." 2019-01-18 22:33:42 +00:00
TreeHugger Robot
b128866274 Merge "Prepare setresuid()/setresgid() seccomp filter in AppZygote." 2019-01-18 22:10:09 +00:00
Alan Stokes
2a7f8e6a32 Make security warning on contains() more obvious.
The dire warning about canonicalising paths before calling
FileUtils#contains was present on two overloads but not the
third. Added it there to try to make it harder to miss.

Test: Builds.
Change-Id: I983fe86e57ff3f7052f4f5d55f2bbd9e5740429a
2019-01-18 17:07:07 +00:00
Martijn Coenen
86f08a5190 Prepare setresuid()/setresgid() seccomp filter in AppZygote.
The application zygote can run untrusted user code; since it also
has the capability to change the uid/gid of the process, we need
to ensure that any changes to the uid and/or gid stay within the
range that we have allocated for this application zygote.

For application zygotes, we install the app_zygote seccomp
filter instead of the regular app filter; the only difference
between this filter and the app one is that it allows
setuid/setgid calls.

To further limit this, pass down the allocated UID range to the
Zygote itself, which in turn installs an additional seccomp
filter that restricts setuid/setgid calls to this range.

The actual calls into seccomp are commented out until the seccomp
changes are merged; to avoid catastrophe, this will leave the
regular app filter for the app_zygote, which is more restrictive
and doesn't allow setuid at all.

Bug: 111434506
Test: atest CtsSeccompHostTestCases passes
Change-Id: I112419629f5ee4774ccbf77e2b1cfa5ddcf77e73
2019-01-18 16:37:09 +01:00
Yifan Hong
e331390d1f Merge "Add VintfObject / VintfRuntimeInfo methods to TestApi." 2019-01-17 23:44:46 +00:00
Yifan Hong
5857870774 Add VintfObject / VintfRuntimeInfo methods to TestApi.
Add methods used by VintfDeviceInfo, a CTS test, to TestApi.
Also remove them from greylist.

Bug: 111610941
Test: builds

Change-Id: Ieccf8c9225132fd604d7df0fc7e9976f63f9077c
2019-01-17 12:11:04 -08:00
Nandana Dutt
161a44616c Pass in calling UID and package to dumpstate
BUG: 111441001
Test: builds
Change-Id: Ib623f6d4f50b81f331131cf3fda92fe2526dd6c7
2019-01-17 16:15:27 +00:00
Tim Van Patten
df1f806cdd Merge "Enhance Logging When Skipping Loading Temp Rules" 2019-01-17 15:49:55 +00:00
Yiwei Zhang
c631eeadd6 Merge "GUP: Add a global property for genreal preference" 2019-01-17 02:02:44 +00:00
Nandana Dutt
2a7be974fc Merge "BugreportAPI : Connect listener to binder callbacks" am: 4fefbddead am: 7b5f8817ce
am: 3a26a0bd5d

Change-Id: Iad0274d6ae8bf76475f1852a1d202a9df83c661d
2019-01-16 08:59:55 -08:00
Nandana Dutt
3a26a0bd5d Merge "BugreportAPI : Connect listener to binder callbacks" am: 4fefbddead
am: 7b5f8817ce

Change-Id: I5e296f6780569fe838e388962e1d0e2affd50aad
2019-01-16 08:44:27 -08:00
Treehugger Robot
4fefbddead Merge "BugreportAPI : Connect listener to binder callbacks" 2019-01-16 16:24:15 +00:00
Lorenzo Colitti
3d375dbd97 Merge changes Iec53a9fd,Iac4cfe70 am: 29afcf0eb0 am: b0c74fb227
am: 333a70ebe5

Change-Id: Ie225d000aeafb4a0b1e3910967c619fd932f239f
2019-01-16 02:03:06 -08:00
Lorenzo Colitti
333a70ebe5 Merge changes Iec53a9fd,Iac4cfe70 am: 29afcf0eb0
am: b0c74fb227

Change-Id: I56af4e9a82f66e507d2360822af27a39e0fcb238
2019-01-16 01:51:38 -08:00
Lorenzo Colitti
29afcf0eb0 Merge changes Iec53a9fd,Iac4cfe70
* changes:
  Test parceling empty LinkProperties.
  Delete the clatd functions from NetworkManagementService.
2019-01-16 09:28:06 +00:00
Narayan Kamath
69b09b0b7b Merge "Build: Add PREVIEW_SDK_FINGERPRINT." 2019-01-16 09:14:47 +00:00
Steven Moreland
93b988e6ba Merge "HIDL stuff to TestApi." am: bc79587a85
am: e6883edf8a

Change-Id: I31b92b9c23f54d889bee4bc2d2d370b5ad3af303
2019-01-15 13:41:59 -08:00
Steven Moreland
bc79587a85 Merge "HIDL stuff to TestApi." 2019-01-15 21:15:34 +00:00
TreeHugger Robot
d08f18b455 Merge "Make some Process constants @TestApi." 2019-01-15 16:08:07 +00:00
Tim Van Patten
3df6643ad7 Enhance Logging When Skipping Loading Temp Rules
We only want to load a temporary rules file for processing if the
current app is debuggable or if adb is running as root.   The logic to
do this is a bit less than straightforward to read and we don't
currently log the values to help make it clearer (though we know they were
both 'false' to return early).   This change helps make the code a bit
easier to read and adds some logging that helps make reading the logs a
little easier too.

Bug: 122612037
Test: atest CtsAngleIntegrationHostTestCases
Change-Id: I38baf02ebdb847f9423a80a1093385903eda1686
2019-01-15 08:45:33 -07:00
Nandana Dutt
331f2e988e Merge "Add the new dumpstate listener methods to implementations" am: 55c2344bc5 am: 4524abd318
am: 0296c0cf26

Change-Id: I87243f66fb70de378d962ba5c180ca0a4c5e541b
2019-01-15 06:49:57 -08:00
Nandana Dutt
0296c0cf26 Merge "Add the new dumpstate listener methods to implementations" am: 55c2344bc5
am: 4524abd318

Change-Id: Icbfe6a1f810d61ae4ba92a8c2894b5e8a0d6a992
2019-01-15 06:36:21 -08:00