Commit Graph

10532 Commits

Author SHA1 Message Date
David Brazdil
9ad1461eb9 Merge "Annotate two non-SDK methods known to be used by apps" am: de441278e7 am: 32d2f8fe46
am: a5083783f7

Change-Id: I59f5f3ea5a0424036e1e715e56d8fa16572358b1
2018-12-20 06:09:41 -08:00
David Brazdil
a5083783f7 Merge "Annotate two non-SDK methods known to be used by apps" am: de441278e7
am: 32d2f8fe46

Change-Id: I0d1a0e85eebb555ca43c2d43e6c28ce96af94122
2018-12-20 05:59:08 -08:00
David Brazdil
ad857d637a Annotate two non-SDK methods known to be used by apps
Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 121237128
Bug: 120783643
Test: m appcompat
Change-Id: Ib7a8bdf3151290aa8a5ca85dc8650612432f0d59
2018-12-20 13:36:21 +00:00
Philip P. Moltmann
22b8498815 Factor out service handling out of RuntimePermissionPresenter
Fixes: 121270006
Test: Looked at settings page that use RuntimePermissionPresenter
Change-Id: I3030511bce76fd0f30fac1ac922f6ff9f09ca80e
2018-12-19 13:40:17 -08:00
Philip P. Moltmann
29ee0a4827 Make AbstractRemoteService available outside of system server
The handler of the services now runs on Looper.getMainLooper()

Test: Built
Bug: 117779333
Change-Id: Ie2fee4ce19d6e6181537d8adc196a4ceab7eb0f8
2018-12-19 13:39:13 -08:00
Philip P. Moltmann
bee3e3347c Merge "Expose UsbPort and UsbPortStatus as system API" 2018-12-19 19:10:06 +00:00
Nicolas Geoffray
8c38fd7d02 Merge "Use the boot class loader as parent of system server loader." am: 7baf5a8d73 am: c2a38e56f3
am: 955963c109

Change-Id: I732692d12432b0bd0d5e3a313e49388d2cfc34ac
2018-12-19 01:21:39 -08:00
Nicolas Geoffray
955963c109 Merge "Use the boot class loader as parent of system server loader." am: 7baf5a8d73
am: c2a38e56f3

Change-Id: I5b467cd965f89240910f6a286d723a50d621b81b
2018-12-19 01:08:02 -08:00
Nicolas Geoffray
7baf5a8d73 Merge "Use the boot class loader as parent of system server loader." 2018-12-19 08:35:24 +00:00
Dianne Hackborn
2da290134f Merge "Add package information to association sources." 2018-12-18 23:58:33 +00:00
Philip P. Moltmann
4374ef8506 Merge "Add private APIs to watch noted app ops - framework." 2018-12-18 23:22:02 +00:00
Svet Ganov
b3d2ae2644 Add private APIs to watch noted app ops - framework.
This change adds simple APIs to watch for noted ops. We are now
reporting a callback for every note which could lead to too many
call but until this is found to be the case we stick to the simple
solution. We already have APIs to watch started and stopped ops
which in theory could have the same frequence as noted ops, so
this is consistent to our approach.

bug:117617221
bug:119323172

Test: atest androidx.test.runner.AndroidJUnitRunner

Change-Id: I46c4b00e765eb14df8c30471d2b80dda905b8125
2018-12-18 13:04:51 -08:00
Dianne Hackborn
24bbe58df6 Add package information to association sources.
This is often known by the system, though not always.  But when
we do know it, it is really useful to maintain that info so we can
do queries like "give me all of the associations that package X is
involved with".

Bug: 121146315
Test: manual
Change-Id: I0dd7aeb9147ecfd65a510d3b2a8bb4a0fbab57e3
2018-12-18 11:09:55 -08:00
Philip P. Moltmann
0ee6ee0a92 Expose UsbPort and UsbPortStatus as system API
This is needed by making the setup wizard use only system-api.

Test: Built, switched USB port state
Change-Id: I8e56859a5b36e7de91691522a34f7d6f62dcbb20
Fixes: 115301401
2018-12-18 08:50:46 -08:00
Gustav Sennton
d25a64da78 Add logging for smart replies and actions.
Log (using TRON)
1. when smart replies and actions are shown in a notification, and
2. when a smart action is clicked.

Bug: 120767764
Test: manual - use logcat to ensure we log the correct values when a
notification is expanded / smart action is clicked.

Change-Id: I85dbc3ee355997142ad71b7b67a759e8fede94b6
2018-12-18 16:23:09 +00:00
Nucca Chen
7a4f27a7e0 Merge "Add new netd event callback for changes to NAT64 prefix" am: ed30ec8dd1 am: dba2101a3c
am: 97de461dcb

Change-Id: Ib08d3c201a71876a057176e2fce065e8360008e2
2018-12-17 20:27:31 -08:00
Nucca Chen
97de461dcb Merge "Add new netd event callback for changes to NAT64 prefix" am: ed30ec8dd1
am: dba2101a3c

Change-Id: I4e263d78c48a07fbcbfddc63e118c45b4cfb9c5a
2018-12-17 19:52:40 -08:00
Nucca Chen
ed30ec8dd1 Merge "Add new netd event callback for changes to NAT64 prefix" 2018-12-18 03:19:45 +00:00
Jeff Sharkey
90dcdb2177 Merge "Local and remote isolated storage feature flags." 2018-12-16 16:50:08 +00:00
Tiger Huang
860ed7c688 Merge "Make per-display focus optional (1/2)" 2018-12-16 07:15:30 +00:00
Jeff Sharkey
b0c363b21e Local and remote isolated storage feature flags.
Moving forward as we start enabling isolated storage in various
dogfood groups, we'll need to maintain separate values for the
feature flag for both "local" and "remote" opinions.  Any strongly
expressed local opinion will always take precidence over any remote
opinion.

Any changes to these feature flags means that we need to invalidate
any PackageManager parsed APKs, since PackageParser changes it's
output depending on the flag state.  Since other feature flags are
likely to need this type of invalidation in the future, define the
PackageManager cache using a SHA-1 hash of a collection of values
that should invalidate the cache.

Bug: 112545973
Test: atest android.os.SystemPropertiesTest
Change-Id: Ifafcdf15e40e694eb4126e06981aeb82df51da33
2018-12-15 18:07:01 -07:00
Tiger Huang
51c5a1d042 Make per-display focus optional (1/2)
In general cases, we don't have multiple input methods simultaneously.
So that it may not make sense to have multiple focused window in the
system. Especially when there are multiple blinking cursors of input
boxes on different displays, the user may not be able to know which
input box can receive key events. In these cases, we let the system
has only one focused window.

In some cases, there can be multiple input methods simultaneously (one
for each display). To enable multiple users to interact with the
corresponding displays at the same time, we should let the system have
per-display focused window in these cases.

This CL makes per-display focus optional, and also reverts ag/5312657

Fix: 120241480
Fix: 120790099
Test: atest ActivityManagerMultiDisplayTests \
            CtsWindowManagerDeviceTestCases \
            WmTests

Change-Id: Ie030eed523599b217060887171710692d050e5d8
2018-12-15 16:30:14 +08:00
Olivier Gaillard
28109b5714 Use elapsedTime for binder/looper debug entries
Test: atest BinderCallsStatsTest LooperStatsTest
Change-Id: I631b82a2c9dd490cff3d1d2db9c717e069378bc0
2018-12-14 16:28:28 +00:00
Jeff Sharkey
d2cc3434ae Merge "Legacy storage behavior for pre-isolated apps." 2018-12-13 21:11:42 +00:00
Dianne Hackborn
eb922e64f1 Merge "Add facility to limit associations that are allowed between apps." 2018-12-13 20:27:33 +00:00
Jeff Sharkey
11697f5b83 Legacy storage behavior for pre-isolated apps.
If apps have already been running on a device before the new isolated
storage feature is enabled, then they should get a "legacy" view
to continue working with minimal disruption.  End users will be able
to revoke this legacy access through Settings UI.

This offers the best trade-off possible between keeping existing apps
working, and preserving user privacy moving forward.

Note that this legacy behavior only applies to apps that are already
installed and actively using storage before the feature was enabled;
all newly installed/reinstalled apps will always receive a sandbox.

Bug: 120287776
Test: atest android.appsecurity.cts.ExternalStorageHostTest#testExternalStorageIsolatedLegacy
Change-Id: Ie98e9f89be44ffdb17fe5a0929711ecf5688297a
2018-12-13 10:38:19 -07:00
Makoto Onuki
b8bf83fd85 Merge "Change proc state inversion WTF to warning" 2018-12-13 16:42:31 +00:00
Jeff Sharkey
95268aeb69 Merge "Create a new mount mode for installer packages." 2018-12-13 16:16:44 +00:00
Nicolas Geoffray
5d1814e1b3 Use the boot class loader as parent of system server loader.
ART expects the parent of the system server class loader to
be the boot class loader during AOT, so use that at runtime too.

bug: 120039104
Test: boot test
Change-Id: I164f98d319f875d24baa360a4b3d152e8e2fc4d9
2018-12-13 09:27:04 +00:00
Sudheer Shanka
3a0df3bc33 Create a new mount mode for installer packages.
New external storage mount mode for installers so
that they can access obb dirs of all apps.

Bug: 111789719
Test: atest android.appsecurity.cts#testExternalStorageObbGifts
Change-Id: Ifab3c0702a431d542a6a3ae82ca8b67d9fcd7506
2018-12-12 22:53:46 -08:00
Treehugger Robot
a32f898720 Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master" 2018-12-13 05:45:20 +00:00
Makoto Onuki
621ed9f3f7 Change proc state inversion WTF to warning
Bug: 118826162
Test: boot with logcat | grep ProcessStats and make sure the WTF is now warnings
Change-Id: I12df38e07252254da837b529b7916122a5b2de0d
2018-12-12 16:42:47 -08:00
Dianne Hackborn
769b2e75e1 Add facility to limit associations that are allowed between apps.
This allows the system to be configured so that certain applications
are only allowed to do top-level interactions with a hard-coded set
of other applications.  This provides static enforcement of certain
security policies like "app A can only interact with the system and
app B, and even if updated can not directly have incoming or outgoing
interactions with other apps."

For example to limit a the package com.google.android.as to only
interact with telephony and contacts (in addition to the core
system):

    <allow-association target="com.google.android.as"
        allowed="com.android.providers.telephony" />
    <allow-association target="com.google.android.as"
        allowed="com.android.providers.contacts" />

Also improve procstats output to be able to print all associations
related to a process.  (I wanted to be able to do this by package,
but we don't have enough data in associations. :p)

Bug: 111276913
Test: Manual so far
Change-Id: I61b7f2d2b5c2c3d82b278e6678b600b579b19fb7
2018-12-12 13:04:36 -08:00
Steven Moreland
b45334bdba Merge "SystemConfig: allow reading sku specific props" am: 2a23450552 am: 79ad229599
am: 14b2f1aebb

Change-Id: I381e3356aa18ea69e3381321f9ba47c4afb09a18
2018-12-12 09:05:45 -08:00
Steven Moreland
14b2f1aebb Merge "SystemConfig: allow reading sku specific props" am: 2a23450552
am: 79ad229599

Change-Id: Ic07a75a9e66a3d20579ef71b442d32db04fbeb28
2018-12-12 08:50:03 -08:00
Steven Moreland
79ad229599 Merge "SystemConfig: allow reading sku specific props"
am: 2a23450552

Change-Id: I536568038a50d6a45a7387f46efbc5feb65ef9ee
2018-12-12 08:37:08 -08:00
Steven Moreland
2a23450552 Merge "SystemConfig: allow reading sku specific props" 2018-12-12 16:19:43 +00:00
Xin Li
15b123ef45 DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master
Bug: 120502534
Change-Id: Idc8bfb6d97a869b76cfb87ca1a494201baf9e8bd
2018-12-11 14:13:44 -08:00
Jeff Sharkey
f9eeca1364 Merge "Surface tree statistics through metadata." 2018-12-11 21:13:25 +00:00
Jeff Sharkey
b95bd4429c Surface tree statistics through metadata.
As part of storage privacy work in Q, we're trying to help users
understand the impact of OPEN_DOCUMENT_TREE choices, and the best way
is to show statistics about what's actually contained inside a tree.

Define "count" and "size" statistics, and populate them for all
FileSystemProvider instances.

Bug: 117975747
Test: atest android.provider.cts.DocumentsContractTest
Change-Id: Ib3f8f208c619141c26abaee0137641f12b009c8f
2018-12-11 11:02:34 -07:00
Olivier Gaillard
a3686dd042 Only keep one overflow entry per uid.
Test: atest binderLibTest BinderWorkSourceTest BinderCallsStatsServiceTest
Change-Id: I99ba18d894d3291f3b31fa07ba8a48131f30b2e9
2018-12-11 15:43:19 +00:00
Olivier Gaillard
76c231d0d8 Sets ThreadLocalWorkSource to authorized work source.
Test: atest binderLibTest BinderWorkSourceTest BinderCallsStatsServiceTest
Change-Id: I4995c35eed87154312e5e560716d66b3fc2ae221
2018-12-11 15:43:19 +00:00
Olivier Gaillard
0e4d61ea13 Make sure callEnded is always called.
Currently checkParcel might throw for instance although this is not
enabled by default.

Test: atest binderLibTest BinderWorkSourceTest BinderCallsStatsServiceTest
Change-Id: Ia836da7daa690dfa176d48cfe86ca4b7eb7cccc6
2018-12-11 15:42:12 +00:00
TreeHugger Robot
395585171d Merge "LooperStats - convert UIDs to package names in dump" 2018-12-11 15:26:55 +00:00
Marcin Oczeretko
c4c45a8b33 LooperStats - convert UIDs to package names in dump
Test: Manually called adb shell dumpsys looper_stats and UTs
Change-Id: I9e5e4560172da92a4a313af0207486a4dd7e64d3
2018-12-11 13:56:47 +00:00
Ben Lin
71c16d714d Obtain dependency information from permissions files for SharedLibs.
Bug: 120096113
Test: Build with built-in libraries that declares new depedency flag, no
more boot errors (tested with cheets_x86_64 and crosshatch_userdebug)
Change-Id: I6b3e2ab7626ed8f04c0bf1a5b3c32204a2f2c56b
2018-12-10 16:31:09 -08:00
Xin Li
75f75c18cc DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into stage-aosp-master
Bug: 120502534
Change-Id: I7351a1832c4bd2fd86324183ab83e9088d716822
2018-12-10 12:30:19 -08:00
Steven Moreland
d7827fdf5c SystemConfig: allow reading sku specific props
Sometimes, very similar devices share the same exact images but use
slightly different hardware. In this case, they distinguish themselves
with skus like ro.boot.product.hardware.sku. This SKU is also used to
distinguish between which HALs are exposed in the VINTF manifest.

In this CL, we add the following locations to read from:
odm/etc/sysconf/sku_${sku}/*.xml
odm/etc/permissions/sku_${sku}/*.xml

Only the configurations already available to be set from the ODM image
can be set here.

Bug: 119129238
Test: boot
Test: manually use unavailable-feature from odm sku directory

Change-Id: I465ac818e5c68f1118668f13b45940fd8fa0fa62
2018-12-10 19:29:35 +00:00
TreeHugger Robot
a5a81d2458 Merge "Add IMMS#showInputMethodPickerFromSystem." 2018-12-10 18:56:40 +00:00
Alison Cichowlas
13f94032c7 Merge "Additional activity in new Chooser flow must also forward Results." 2018-12-10 18:45:19 +00:00