Commit Graph

12585 Commits

Author SHA1 Message Date
Calin Juravle
2b6e24c7e5 Merge "[framework] Extend profile operations to take the profile name" 2018-01-25 18:58:09 +00:00
TreeHugger Robot
15050aaa99 Merge "Statsd broadcasts when it is alive" 2018-01-25 18:55:45 +00:00
Artem Iglikov
0edd645492 Merge "Revert "Make idiomatic use of ApkAssets and AssetManager"" 2018-01-25 18:06:49 +00:00
Michal Karpinski
3b6be64e85 Merge "Deprecate BackupManager#requestRestore()" 2018-01-25 16:46:25 +00:00
Selim Cinek
d41477f494 Merge changes from topic "notification_launch"
* changes:
  Added the reply draft as an extra to the content intent
  Launching notification settings correctly inline
  Launching Notification animations inline
2018-01-25 16:05:15 +00:00
Jorim Jaggi
8e725bbad2 Merge changes Id2832518,Ic8c128ed,Id8fde482,I99cc170b
* changes:
  Revert "1/ Create display content window controller to position stacks in the display"
  Revert "2/ Add support for remote Recents animation"
  Revert "3/ Add input consumer to capture touches during a Recents transition"
  Revert "4/ Update SysUI shared lib for Recents transition"
2018-01-25 16:03:21 +00:00
Jorim Jaggi
9f8518e532 Revert "2/ Add support for remote Recents animation"
This reverts commit 0026a5152c.

Breaks presubmits
2018-01-25 15:21:54 +01:00
Artem Iglikov
16b3dff2d5 Revert "Make idiomatic use of ApkAssets and AssetManager"
This reverts commit e70b57a659.

Reason for revert: b/72482083

Bug: 72482083
Change-Id: I36b0aff6d533d7fb59d367a1cd4e96e03df5f462
2018-01-25 13:59:13 +00:00
Robert Berry
98a8e24148 Add flag indicating transport is device-to-device transfer
This flag allows BackupAgent instances to optionally backup more data
for a device-to-device transfer. i.e., an app developer might want to
only backup certain sensitive data if the transport is either
client-side encrypted or a direct device-to-device transfer.

Test: none, as it is just adding a flag
Bug: 72486408
Change-Id: I7512ed0b1510f48789fe47cb8b7379674c315e76
2018-01-25 13:44:10 +00:00
Robert Berry
39194c0582 Add #getTransportFlags to BackupDataOutput
This allows a BackupAgent to check whether the transport has client-side
encryption enabled. It can then use this information to decide whether
to back up more sensitive data.

Bug: 72299360
Test: Manually verified full & kv backup agents receive transport flags
Test: m -j RunFrameworksServicesRoboTests
Change-Id: Ibd9b5f9479815e1721e9d6b7663d892b9ab3fcae
2018-01-25 09:28:55 +00:00
Robert Berry
3746a7cabb Merge "Remove @hide from incremental flags & return code." 2018-01-25 09:28:29 +00:00
TreeHugger Robot
6d8cefdde9 Merge "Set ActivityView background to current top task's color" 2018-01-25 06:52:42 +00:00
TreeHugger Robot
73a331f524 Merge "Statsd broadcast subscriber" 2018-01-25 06:23:36 +00:00
Winson Chung
ab380db64a Merge changes Ib57ea73f,I5cbd21ed,Id32f03c7,I131df87f
* changes:
  4/ Update SysUI shared lib for Recents transition
  3/ Add input consumer to capture touches during a Recents transition
  2/ Add support for remote Recents animation
  1/ Create display content window controller to position stacks in the display
2018-01-25 03:31:30 +00:00
Tyler Gunn
d0f9811fc2 Merge "Add handover permission, fill in some missing API gaps." 2018-01-25 03:21:03 +00:00
TreeHugger Robot
1ccf72543d Merge changes from topic "assetmanager-refactor"
* changes:
  libandroidfw: Improve performance of AssetManager2
  libandroidfw: Add ApplyStyle and SetConfiguration benchmark
  Make idiomatic use of ApkAssets and AssetManager
  Replace AssetManager with AssetManager2 implementation
2018-01-25 02:05:30 +00:00
Winson Chung
0026a5152c 2/ Add support for remote Recents animation
- Allow the recents component to drive the animation from an app into
  Recents using the remote animation framework. When initialized, the
  animation repositions the recents activity behind the currently visible
  tasks and provides the set of surface controls for the visible tasks.
  Once complete, the recents component notifies the system whether it
  has completed the animation into the recents activity, or whether it
  should restore the previous state. In addition, there is a prescribed
  delay after which the system automatically cancels the recents animation.

Bug: 70180552
Test: go/wm-smoke
Test: Manual, swipe up with suitable launcher build

Change-Id: Id32f03c7ad2288dce06231cfaa4b21916da511d7
2018-01-24 17:01:30 -08:00
Selim Cinek
de4de0e204 Added the reply draft as an extra to the content intent
Change-Id: I406833a5875221731baf0834f2e47e283b84aae9
Fixes: 36858677
Test: Add notification, draft reply and click on it. Ensure that extra is sent
2018-01-25 00:25:33 +00:00
Tyler Gunn
79bc1ec8a9 Add handover permission, fill in some missing API gaps.
Adding the ACCEPT_HANDOVER runtime permission which an app must have in
order to accept handovers (this is per design).

Adding missing onHandoverComplete method in the android.telecom.Connection
API (per design).

Finishing plumbing for android.telecom.Call#onHandoverComplete API.

Fix issue where the new handover API methods would never get called; the
legacy handover extra was being used in this case when it should not have
been.

Bug: 65415068
Test: Verified using new CTS tests
Change-Id: If1558f6a23911862c02ac5b18fb62d86911ed7e2
2018-01-24 16:11:27 -08:00
Bookatz
5c800e3f0b Statsd broadcasts when it is alive
To send configurations and PendingIntents to statsd, statsd must first
be alive. In particular, a PendingIntent must be resent to statsd each
time it starts (they are not stored, since reboots make them expire
anyway). Therefore, statsd needs to send a broadcast to inform them of
its starting.

The broadcast receiver will require DUMP permission.

Bug: 72450885
Bug: 70389379
Test: manually confirmed broadcast is sent
Change-Id: I47c130130342465a50cd625bdb135855d5d04f6e
2018-01-24 15:52:15 -08:00
TreeHugger Robot
e9d3cc5ad8 Merge "ActivityManager: add API for wifi bug report" 2018-01-24 23:36:19 +00:00
Selim Cinek
7fa385abd8 Launching notification settings correctly inline
Previously, the panel would still collapse when launching
the notification settings. We're now looking at the
newly returned result of the activity launch instead to
determine if we should collapse.

Bug: 69168591
Test: launch settings activity from notification guts, observe no collapsing
Change-Id: I414e7f4a9fd22d4f0b46437bfdb94e5c0f6cce58
2018-01-24 23:30:01 +00:00
Adam Lesinski
e70b57a659 Make idiomatic use of ApkAssets and AssetManager
Move away from using deprecated addAssetPath methods
and cache the instances of ApkAssets created.

Test: CTS passes
Change-Id: I257c72261a97e4aa802abb46dc1f44d80e1d42ad
2018-01-24 15:19:09 -08:00
Calin Juravle
6ae39fc2e5 [framework] Extend profile operations to take the profile name
Extend the installd profile interface to take the profile name as
argument. This shifts the responsibility for choosing the names of
profiles for primary apks completely to PackageManager. Each of the
application code paths will get an unique profile name based on their
split name.

All the profile operations will now work on a specific profile name rather
than assuming a default global name.

Also, move dumpProfiles and clearProfiles functionality to the
ArtManagerService so that we can re-use profileName computations easier.

Test: manual (dexopt apps, merge profiles, clear profiles)
      gts GtsAndroidRuntimeManagerHostTestCases
Bug: 30934496

Change-Id: Ie65d45eed7de0844edf4b7af918d7eaa74ec1f2c
2018-01-24 14:56:38 -08:00
Bookatz
c697797d43 Statsd broadcast subscriber
Allows a uid that uploads a statsd config to additionally
register a BroadcastSubscriber with statsd. If statsd
detects an anomaly (according to the config's Alert),
statsd can inform a BroadcastSubscriber provided in the config.
The config uses a subscriberId (just an int) to identify the
BroadcastSubscriber. It then uses StatsManager.setBroadcastSubscriber
to associate that subscriberId with a given PendingIntent.
Then, when the anomaly is detected, statsd sends a broadcast
using that PendingIntent, alerting whoever was specified by
the config/setBroadcastSubscriber.

Bug: 70356901
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.alert.BroadcastSubscriberTests
Change-Id: I4d9ea9a6c8a85e61fadfd99c1513c55abbadd5e9
2018-01-24 13:08:19 -08:00
Antoan Angelov
2a5a43d61c Merge changes from topic "dpc-migration-atomic"
* changes:
  Notify DO after PO ownership transfer when they belong to affiliated users.
  Tests for owner transfer atomicity.
  Make owner transfer an atomic operation.
2018-01-24 20:11:54 +00:00
Vladislav Kuzkokov
f4e01170b8 Merge "Fix Printing policy in profile owner." 2018-01-24 20:11:31 +00:00
arangelov
b46faf35c8 Notify DO after PO ownership transfer when they belong to affiliated users.
Test: Locally modified TransferDPC to print the callback after manually setting DO, PO and then transfering PO owner.
Bug: 72218214
Change-Id: I6c9af00bcfa703c81d9d5b35fe534c928991ff93
2018-01-24 19:20:37 +00:00
arangelov
91201bdbca Make owner transfer an atomic operation.
Test: bit FrameworksServicesTests:com.android.server.devicepolicy.TransferOwnershipMetadataManagerTest
Test: runtest -x frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/OwnerTransferParamsManagerTest.java
Test: bit FrameworksServicesTests:com.android.server.devicepolicy.DevicePolicyManagerTest#testRevertDeviceOwnership_noMetadataFile
Test: bit FrameworksServicesTests:com.android.server.devicepolicy.DevicePolicyManagerTest#testRevertDeviceOwnership_adminAndDeviceMigrated
Test: bit FrameworksServicesTests:com.android.server.devicepolicy.DevicePolicyManagerTest#testRevertDeviceOwnership_deviceNotMigrated
Test: bit FrameworksServicesTests:com.android.server.devicepolicy.DevicePolicyManagerTest#testRevertDeviceOwnership_adminAndDeviceNotMigrated
Test: bit FrameworksServicesTests:com.android.server.devicepolicy.DevicePolicyManagerTest#testRevertProfileOwnership_noMetadataFile
Test: bit FrameworksServicesTests:com.android.server.devicepolicy.DevicePolicyManagerTest#testRevertProfileOwnership_adminAndProfileMigrated
Test: bit FrameworksServicesTests:com.android.server.devicepolicy.DevicePolicyManagerTest#testRevertProfileOwnership_profileNotMigrated
Test: bit FrameworksServicesTests:com.android.server.devicepolicy.DevicePolicyManagerTest#testRevertProfileOwnership_adminAndProfileNotMigrated
Bug: 69543005

(cherry picked from commit 5a6d391dedcdec13fcc4cf1770e7bf9fc1be8643)

Change-Id: Ic2d729d48fdb47b0ebd60030b45615b0cec174a2
2018-01-24 19:20:36 +00:00
Oscar Key
dda88e7f07 Remove @hide from incremental flags & return code.
See ag/3457616 for the implementation of the flags.
See ag/3498077 for the implementation of the return code

These changes are related because the transport uses the value of the
incremental/non-incremental flag to decide whether to request a
non-incremental backup using the new return code.

I chose to add both an INCREMENTAL and NON_INCREMENTAL flag to allow the
transport to distinguish between both cases and older versions of the OS
not supporting this flag.

Bug: 71792427
Change-Id: Ifa099fb73de70eb3b5b315cc3b266c308dfb719d
Test: None required, only changing javadoc.
2018-01-24 19:03:52 +00:00
mukesh agrawal
d9e1df58be ActivityManager: add API for wifi bug report
Under certain (limited) conditions, we would like to
automatically trigger a bug report to help diagnose
Wifi problems.

The regular bugreport can't be used for this purpose,
as it takes a long time to generate. To support
lightweight auto-bug generation, add a Wifi-specific
bugreport.

Bug: 69934148
Test: manual

Manual test
-----------
- boot walleye
- enable wifi
- connect to googleguest
$ adb root
$ adb shell pkill -f 'wifi@'
- notice "Bug report #1 captured" notification
$ adb pull '/data/user_de/0/com.android.shell/files/bugreports
$ unzip bugreports/*.zip
$ grep "was the duration of 'DUMPSTATE'" bugreport*.txt
->  ------ 1.548s was the duration of 'DUMPSTATE' ------

Change-Id: If657eb8f61b16cefe717c977663438c28f515bd7
2018-01-24 10:03:35 -08:00
Dianne Hackborn
994b5ad737 Fix issue #72116995: Add permission guarding Service#startForeground
Now requires permission if targeting P.

Note that this is a separate permission from the existing one
that is required for instant apps to use foreground services.  The
reason for this is that their semantics are different (the instant
apps permission is associated with an app op for control over what
the app is allowed, while the regular app permission is just a
normal permission that is always granted and only there for
auditing of apps), and there are probably going to be cases where
a developer will want to use a foreground service in the full
version of their app but not as an instant app.

Bug: 72116995
Test: atest CtsAppTestCases
Change-Id: If5a79e7ed5ab9e0edc77410315eb4d2df8ac850b
2018-01-24 17:58:24 +00:00
TreeHugger Robot
fa0bfce3ef Merge "Add requireViewById" 2018-01-24 17:48:52 +00:00
Geoffrey Pitsch
d997d191ed Merge "Security model for moving sharesheet to systemui" 2018-01-24 17:33:59 +00:00
Jason Parks
5511634f52 Merge "Allow unaffiliated Profile Owners to use lock task" 2018-01-24 17:07:17 +00:00
TreeHugger Robot
d12ad36399 Merge "Add broadcast when notification block state changes" 2018-01-24 15:03:22 +00:00
Vladislav Kuzkokov
fef75eee1d Fix Printing policy in profile owner.
Sometimes app inside profile can't get package info for its owner.
Instead of relying on calling user id, we make PrintManagerService switch to
system id and pass user that called print() explicitly.

Bug: 72309652
Test: cts-tradefed run cts-dev --module CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.MixedDeviceOwnerTest#testPrintingPolicy
Test: cts-tradefed run cts-dev --module CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testPrintingPolicy
Test: cts-tradefed run cts-dev --module CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.MixedProfileOwnerTest#testPrintingPolicy
Test: bit FrameworksServicesTests:com.android.server.devicepolicy.DevicePolicyManagerTest
Change-Id: Ib97018f56693549fbca506dba6efaadb6dd010b3
2018-01-24 15:24:08 +01:00
Oscar Key
9712788a06 Merge "Let the transport ask for non-incremental backup." 2018-01-24 13:51:26 +00:00
Michal Karpinski
0df62ac206 Deprecate BackupManager#requestRestore()
Turned the method into a no-op.
The rationale behind deprecating discussed in the bug.

Bug: 62650350
Test: make update-api && make -j40
Change-Id: I216a0700e351050836a8a39d7e36539bb84ad1dc
2018-01-24 13:30:18 +00:00
Adrian Roos
0d2d90d221 Merge "FRP: Explicitly throw UnsupportedOperation when FRP is not supported" 2018-01-24 11:56:32 +00:00
TreeHugger Robot
449e7d62a5 Merge "Implement activity --proto --processes" 2018-01-24 07:21:35 +00:00
Andrii Kulian
cf8f683432 Set ActivityView background to current top task's color
When ActivityView is being resized to a bigger region and an app
in it hasn't received new configuration yet, it will continue
drawing in old smaller size for some time. This results in black
bars being drawn in expanded area.
This CL tracks the topmost task launched on the ActivityView and
uses its background color to fill this expanded area.

Bug: 72220802
Test: Launch activity on ActivityView, resize and observe background
Change-Id: Id7090a1ad5ec49a31c19fe185fb3815b1788e77f
2018-01-23 23:19:26 -08:00
TreeHugger Robot
192e0870b3 Merge "Add APIs to manipulate Override APN." 2018-01-24 06:54:17 +00:00
TreeHugger Robot
c1ac0355ce Merge "Fixing bugs in Notification proto dumping." 2018-01-24 06:24:29 +00:00
yuemingw
e3d9c099e5 Add APIs to manipulate Override APN.
Add APIs to add, update, query and remove Override APN. Add APIs to enable
Override APNs or query if Override APNs are currently enabled.

Bug: 68208301
Test: cts test in b/68208416

Change-Id: I65ebbb948d2ac4e31a73e1e761e32dc8ba1502c3
2018-01-24 06:13:57 +00:00
TreeHugger Robot
21d7f24efa Merge changes Idd092c44,I85f7686e
* changes:
  Indication area alignment in AOD
  Fix alignment of ambient notificaiton
2018-01-24 05:15:44 +00:00
TreeHugger Robot
c7904e1d05 Merge "Keep history of standby bucket changes." 2018-01-24 04:33:46 +00:00
TreeHugger Robot
064f16638b Merge "Add API to expose signing certificate proof-of-rotation." 2018-01-24 03:00:27 +00:00
Jason Parks
3c13b64267 Allow unaffiliated Profile Owners to use lock task
Bug: 64948750
Test: bit FrameworksServicesTests:com.android.server.devicepolicy.DevicePolicyManagerTest
Change-Id: Ib775161dd62c819e7975744eaa074fc60d9a6b1b
2018-01-23 20:57:34 -06:00
Amith Yamasani
bfc4bf5feb Keep history of standby bucket changes.
Push standby bucket changes into UsageStats as events.
Don't use the event for aggregation.

Bug: 63527785
Test: atest CtsUsageStatsTestCases:UsageStatsTest
Change-Id: Icd152b21935e3ef73aaa1a62f09574e51ce921bd
2018-01-23 18:34:34 -08:00