Commit Graph

14631 Commits

Author SHA1 Message Date
TreeHugger Robot
70f04ce261 Merge "Allow delegates to see the notifications they post" 2018-12-19 15:33:50 +00:00
Chandan Nath
2ec8b91026 Merge "[Multi-user] Change more BackupManager AIDL methods to accept userId in methods" 2018-12-19 11:50:10 +00:00
Dianne Hackborn
2da290134f Merge "Add package information to association sources." 2018-12-18 23:58:33 +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
Chandan Nath
d1ee43e576 [Multi-user] Change more BackupManager AIDL methods to accept userId in methods
Bug: 120120742

Test: 1) atest RunFrameworksServicesRoboTests
2) atest $(find \
frameworks/base/services/tests/servicestests/src/com/android/server/backup \
-name '*Test.java')
3) atest CtsBackupTestCases
4) atest CtsBackupHostTestCases
5) atest GtsBackupTestCases
6) atest GtsBackupHostTestCases
7) 'adb shell bmgr' enabled/backupnow flow

Change-Id: Ia0641f66dd0a935420f1aee332bb2e21ca03610e
2018-12-18 14:10:17 +00:00
Dario Freni
8aeec22e28 Merge "Implement ModuleInfoProvider" 2018-12-17 21:45:29 +00:00
Julia Reynolds
feb504cb66 Merge "Deprecate ConditionProviderService." 2018-12-17 21:08:55 +00:00
Ruslan Tkhakokhov
938e0f56a8 Merge "[Multi-user] Add -user param to adb backup/restore" 2018-12-17 20:33:50 +00:00
Julia Reynolds
d12392c427 Allow delegates to see the notifications they post
Via getActiveNotifications().

Test: cts
Bug: 116512137
Change-Id: Ic5a95725ab4297b25d75d375f6fdb2bd34b55306
2018-12-17 19:10:54 +00:00
Eugene Susla
b3469e7390 Merge "On role revocation, don't revoke appops/perms for other held roles" 2018-12-17 18:42:49 +00:00
TreeHugger Robot
56208f49dc Merge "Another round of changes on Content Capture." 2018-12-17 17:59:40 +00:00
TreeHugger Robot
c698e729bb Merge "Adds DESTROY_CONTENT_ON_REMOVAL to VirtualDisplay flags" 2018-12-17 17:56:25 +00:00
Ruslan Tkhakokhov
a2fe6c5bb9 [Multi-user] Add -user param to adb backup/restore
Add an optional parameter -user to provide ID of the user for which to
run backup/restore operation. Add robolectric test to verify the
new parameter is proccessed correctly.

Bug: 119908153
Test: 1) atest BackupTest
      2) atest BackupManagerServiceTest
      3) atest TrampolineTest
      4) atest GtsBackupTestCases
      5) atest GtsBackupHostTestCases
      6) Manual:
        - Run "adb backup -all" and verify that backup is successfull
        - Run "adb restore" and verify that restore is successfull
        - Run "adb backup -all -user 10" and verify that backup faield as
          it's only currently supported for system user
        - Run "adb restore -user 10" and verify that restore failed as it's
          only currently supported for system user

Change-Id: I6dbf9c87eedd5a72da0446beff7d2551f98f2654
2018-12-17 16:48:13 +00:00
Julia Reynolds
68062074c6 Deprecate ConditionProviderService.
And replace it with something more battery friendly!

Test: CTS, runtest systemui-notification
Bug: 111474881
Change-Id: I45af94135fb8d2de050d5f7baaa9724b95bb1907
2018-12-17 09:13:59 -05:00
Paul Duffin
407396e349 Merge "Remove uses of libcore.io DropBox and EventLogger" 2018-12-17 11:19:50 +00:00
Michael Groover
f1a5b6e0bf Merge changes from topic "SensorPrivacyMode"
* changes:
  Add SensorPrivacy constants to SettingsBackupTest
  Prototype Spaceship mode qstile
2018-12-15 18:07:26 +00:00
Felipe Leme
aa5088ede6 Another round of changes on Content Capture.
- Get rid of activity-level events.
- Renamed InteractionSessionId and InteractionContext to
  ContentCaptureSessionId and ContentCaptureContext (and made them public)
- Create the explicit concept of ContentCaptureSesssion (and moved notification
  APIs to it).
- Added APIs to let apps create new sessions (not implemented yet).
- Added APIs to remove user data based on some context properties (like URI).

The reasoning behind this change is to let app developers explicitly associate
the captured content with some app-level domain (and also let the app ask the
service to clear such data at user's request). For example, a browser app
(and WebView) can use these APIs to associate the content capture events with
the URL being rendered.

Bug: 117944706
Fixes: 121034139

Test: atest CtsContentCaptureServiceTestCases
Test: m update-api && m

Change-Id: I7841da303b6a39c825651b03a07e3081fbd0bdf5
2018-12-14 18:02:24 -08:00
TreeHugger Robot
72ea8b20a4 Merge "Allowing Jobs with no constraints." 2018-12-15 01:43:25 +00:00
Chad Brubaker
90f391fe87 Prototype Spaceship mode qstile
Initial prototype disabling location/sensors and enabling airplane mode.
Camera/Mic will come in a followup.

Test: manual
Bug: 110842805
Change-Id: I26132fcc9ffea83e3e78a0e54882d23c99ee590c
2018-12-14 20:46:04 +00:00
Mark Renouf
97fcc1807b Adds DESTROY_CONTENT_ON_REMOVAL to VirtualDisplay flags
Currently when an ActivityView is removed/released, any remaining
tasks on the display are moved to the main display. This change
causes those tasks to be destroyed instead.

Bug: 111236845
Test: manual, built and tested with ActivityView SystemUI plugin
Change-Id: Ifaa9df6fab05ce82e1bad4e2f5a19c4c7476aec6
2018-12-14 14:25:59 -05:00
Adrian Roos
19cc34233c Merge "KeyguardDisableHandler: make properly user aware" 2018-12-14 18:42:56 +00:00
Paul Duffin
ecb6124d54 Remove uses of libcore.io DropBox and EventLogger
DropBox and EventLogger provide hooks for use by framework to intercept
messages sent by libcore. However, neither of these mechanisms are
actually used by libcore so there is no point in framework code using
it.

Bug: 119748341
Test: make checkbuild, flash
Change-Id: I9dbd1b6dea92f7441efb6d0a579efd13bc0e5139
2018-12-14 15:27:05 +00:00
Eugene Susla
a2a8032641 On role revocation, don't revoke appops/perms for other held roles
Bug: 110557011
Test: atest android.app.role.cts.RoleManagerTest#revokeSingleRoleThenEnsureOtherRolesAppopsIntact
Change-Id: I4ff110ae950b2a6b6acbef1195d69877d2f34c72
2018-12-14 00:59:35 +00:00
TreeHugger Robot
26b28799ab Merge "AM: Report launch state with activity launch info" 2018-12-13 23:27:39 +00:00
Adrian Roos
fc52100419 Merge "API: Clean up redundant and ineffective usages of SystemApi and TestApi (2/2)" am: a48e431113 am: a11f1d2d50
am: 84f03da369

Change-Id: I4c746b570470301f076efca9d4897cb2032a3732
2018-12-13 15:25:59 -08:00
Adrian Roos
84f03da369 Merge "API: Clean up redundant and ineffective usages of SystemApi and TestApi (2/2)" am: a48e431113
am: a11f1d2d50

Change-Id: I726f41142ead73b0a579b01ea477df63e74673e5
2018-12-13 14:33:46 -08:00
TreeHugger Robot
04ac23c715 Merge "cherry-pick from pi-dev docs: Fixing malformed javadoc" 2018-12-13 21:45:33 +00:00
Andrew Solovay
27e4346490 cherry-pick from pi-dev docs: Fixing malformed javadoc
Several @link & @see javadoc directives were malformed, resulting in the
Javadoc code being output to the HTML.

Staged to:

http://go/dac-stage/reference/android/app/slice/Slice.Builder
http://go/dac-stage/reference/android/app/slice/SliceProvider
http://go/dac-stage/reference/android/text/style/ImageSpan
http://go/dac-stage/reference/android/content/ContentProvider

Bug: 120743732
Test: make ds-docs
Change-Id: I589644f8d266a116441409fbdaf7a0c533e0e356
Exempt-From-Owner-Approval: Doc-only change
2018-12-13 11:45:21 -08:00
Andrew Solovay
d788835735 Merge "docs: Fixing malformed @links" into pi-dev am: 39f74d5732
am: b2ad787a44

Change-Id: I6064f1fdeb3e55ccca760de6c3bb42c1a4621298
2018-12-13 11:34:21 -08:00
Vishnu Nair
bb9ab4b914 AM: Report launch state with activity launch info
Bug: 119988524
Test: atest ActivityMetricsLoggerTests
Test: adb shell am start -W ...

Change-Id: I1d323e84d725722a198a60c51884dba897ec253f
2018-12-13 10:29:46 -08:00
Narayan Kamath
2c828c1d98 Implement ModuleInfoProvider
Implements the PackageManager's getModuleInfo and getInstalledModules
API. These APIs are now backed by XML metadata that's parsed from a
"module metadata" provider package. The package name for the module
metadata package is stored in the config_defaultModuleMetadataProvider
config value.

The module metadata provider must contain a <metadata> entry for its
<application> tag. The meta-data entry must contain a single key
android.content.pm.MODULE_METADATA whose value is a reference to an
XML resource that contains metadata about the list of modules on a
given device.

The XML document must consist of a single top level <module-metadata>
element with one or more children. Each of these children are <module>
elements. The <module> elements must contain each of the following
attributes :

name : A resource reference to a User visible package name, maps to
    ModuleInfo#getName
packageName : The package name of the module, see ModuleInfo#getPackageName
isHidden : Whether the module is hidden, see ModuleInfo#isHidden

Example :
<module-metadata>
    <module name="@string/resource" packageName="package_name" isHidden="false|true" />
    <module .... />
</module-metadata>

The module metadata is parsed eagerly and cached during system server
startup.

Test: atest FrameworksServicesTests:com.android.server.pm.ModuleInfoProviderTest

Change-Id: I0251c3f7429c42e3cce863eeeea792579dffecfb
2018-12-13 17:38:53 +00:00
Andrew Solovay
b2ad787a44 Merge "docs: Fixing malformed @links" into pi-dev
am: 39f74d5732

Change-Id: Iaf4fefbba3e1e76b348923ba9501107b2439ac1a
2018-12-13 09:35:03 -08:00
Narayan Kamath
2c07da7945 Merge "Add ModuleInfo class" 2018-12-13 17:34:24 +00:00
Sahin Caliskan
a37ca569b0 Merge "Move RCS APIs to android.telephony.ims" 2018-12-13 16:30:20 +00:00
Jeff Sharkey
95268aeb69 Merge "Create a new mount mode for installer packages." 2018-12-13 16:16:44 +00:00
Adrian Roos
a48e431113 Merge "API: Clean up redundant and ineffective usages of SystemApi and TestApi (2/2)" 2018-12-13 13:19:25 +00:00
TreeHugger Robot
9dc97a8c67 Merge "Fix javadoc error when building SDK" 2018-12-13 11:40:16 +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
Evan Rosky
6474e30926 Merge "Move policy handling into ATM hierarchy [4/n]" 2018-12-13 03:42:41 +00:00
Evan Rosky
1ac8446c69 Move policy handling into ATM hierarchy [4/n]
Moves Task-level policy into configuration update

This moves most of the configuration policy logic out of
updateOverrideConfig and into the configuration update via
the new resolveOverrideConfiguration stage. The advantage
of this is that the TaskRecord configuration is more
adaptive: for example, minimal task bounds enforcement
is now done during resolve, so the task's override bounds
can be retained even when the task is drawn bigger. This
also fixed some issues with minimal task bounds (ie. it
no-longer relies on exact size-match).

As part of this, a bunch of logic was pulled out of the
StackWindowController and moved/rewritten in TaskRecord.
This was done so that the policy logic would be more
adaptive to changes in their parents and to help with
our ATM/WM merge goal.

This also presented an opportunity to move more resize
logic into the separate displayed bounds paradigm.

Bug: 113900640
Test: go/wm-smoke + wmtests
Change-Id: Ie27020616983646b274b073f17accea627399df0
2018-12-12 16:41:30 -08:00
Andrew Solovay
8a788f4094 docs: Fixing malformed @links
Several @link javadoc directives were malformed, resulting in the
Javadoc code being output to the HTML.

Staged to:

http://go/dac-stage/reference/android/app/Activity
http://go/dac-stage/reference/android/app/RemoteInput
http://go/dac-stage/android/os/UserManager

Bug: 120743732
Test: make ds-docs
Change-Id: I2c00c7e1e3adcff696e6d000206aeeaea61e7ecd
Exempt-From-Owner-Approval: Doc-only change
2018-12-12 16:36:14 -08:00
Rubin Xu
fd4a3b441b Implement DELEGATION_PACKAGE_INSTALLATION
Previously a Device Owner or an affliated Profile Owner of the DO can silently
install APKs via PackageInstaller APIs. This CL additionally grants delegates
of DO the same access.

Bug: 112982695
Test: atest com.android.cts.devicepolicy.MixedProfileOwnerTest#testDelegation
Test: atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDelegation
Test: atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testDelegation
Change-Id: I777ee6aa1ecd036ee56270fc6b4e86b74d1042a6
2018-12-12 23:22:59 +00:00
Rubin Xu
6e2ee03497 Fix javadoc error when building SDK
Test: make -j110 PRODUCT-sdk_phone_armv7-sdk
Bug: 112982695
Change-Id: I09f1fcf7ae40adb78ff2fdd235498b666b96cfdb
2018-12-12 21:50:59 +00:00
TreeHugger Robot
559ff8acbc Merge "New API for getting the screen lock complexity" 2018-12-12 21:12:43 +00:00
Hui Yu
b8f2dff7c6 Merge "UsageStats tracking of screen usage." 2018-12-12 20:51:00 +00:00
Yueming Wang
a5abb4a711 Merge "Correct the doc for startViewCalendarEventInManagedProfile." 2018-12-12 19:14:38 +00:00
yuemingw
06891909bc Correct the doc for startViewCalendarEventInManagedProfile.
Bug: 118456236
Test: manually
Change-Id: Ie66dd25ae742246c41837dc0dee1b34ab4ae42dd
2018-12-12 19:12:15 +00:00
Yueming Wang
3dc2f1ef59 Merge "Add API to view calendar events cross profile." 2018-12-12 19:07:05 +00:00