Commit Graph

12616 Commits

Author SHA1 Message Date
TreeHugger Robot
9add1b8c1b Merge "Revert "Fix issue #72116995: Add permission guarding Service#startForeground"" 2018-01-26 04:05:31 +00:00
Bryce Lee
c91d86152a Merge "Perform Activity#onStart when launching in LocalActivityManager." 2018-01-26 01:11:56 +00:00
Bryce Lee
886e7fed9e Perform Activity#onStart when launching in LocalActivityManager.
We move to the start state when launching a tabbed activity through
LocalActivityManager, but currently do not inform the activity
thread due to changes in how ActivityThread is updated through the
ActivityLifecycler. This changelist addresses this issue.

Change-Id: Ibc2bda39617e1741bb3ee8637a182dc9f14dd61d
Fixes: 70813462
Fixes: 70812753
Test: atest CtsAppTestCases:android.app.cts.LifecycleTest
Test: atest LocalActivityManagerTest
Test: atest ActivityGroupTest
2018-01-25 17:10:28 -08:00
Winson Chung
66f0026f3f Merge changes from topics "reland_recents_animation", " reland_recents_animation"
* changes:
  Fix issue with reparenting stacks on displays.
  Revert "Revert "4/ Update SysUI shared lib for Recents transition""
  Revert "Revert "3/ Add input consumer to capture touches during a Recents transition""
  Revert "Revert "2/ Add support for remote Recents animation""
  Revert "Revert "1/ Create display content window controller to position stacks in the display""
2018-01-26 00:46:34 +00:00
Winson Chung
41234f6248 Merge "Add feature check before entering PIP." 2018-01-26 00:16:14 +00:00
David Brazdil
f416008101 Merge "Show a warning toast/dialog when an app uses hidden APIs" am: fbef950d95 am: d750a7c68c
am: 61c4d63c98

Change-Id: If75eacd24b072e382042885e20434b184dc91426
2018-01-26 00:07:33 +00:00
Android Build Merger (Role)
a6216a86f0 Merge "Merge "Merge "ActivityManager: Add support for agents on startup" am: d5cba89b98 am: ebc0afd811" into oc-mr1-dev-plus-aosp am: 954ba2c6a1" 2018-01-25 23:06:23 +00:00
Android Build Merger (Role)
6b3dd70b1f Merge "Merge "ActivityManager: Add support for agents on startup" am: d5cba89b98 am: ebc0afd811" into oc-mr1-dev-plus-aosp
am: 954ba2c6a1

Change-Id: I218eb054ef0da896c72674c597249c6a5120500d
2018-01-25 23:03:11 +00:00
David Brazdil
61c4d63c98 Merge "Show a warning toast/dialog when an app uses hidden APIs" am: fbef950d95
am: d750a7c68c

Change-Id: I9b62537d76e4ceb7ce03ca4de5ccf5a182c4439c
2018-01-25 22:32:28 +00:00
Winson Chung
80fa2d88b4 Add feature check before entering PIP.
Bug: 72063615
Test: ActivityManagerPinnedStackTests
Change-Id: I4bed3a39c28c62121db47b8a61dda2516e41d245
2018-01-25 14:26:48 -08:00
TreeHugger Robot
b93b797199 Merge "Update to the ActivityManager proto" 2018-01-25 22:21:30 +00:00
Andreas Gampe
d6e151c469 Merge "ActivityManager: Add support for agents on startup" am: d5cba89b98
am: ebc0afd811

Change-Id: Ie8b991014a43ca4fba83aeab3ba826996d2813df
2018-01-25 22:10:27 +00:00
David Brazdil
d750a7c68c Merge "Show a warning toast/dialog when an app uses hidden APIs"
am: fbef950d95

Change-Id: Icab7166bf83d2920c8d3f22774eafa4aea9fdaa4
2018-01-25 22:01:49 +00:00
Andreas Gampe
ebc0afd811 Merge "ActivityManager: Add support for agents on startup"
am: d5cba89b98

Change-Id: Iee82ac1a08183857ea4fcf2d67b99dede5d5a2ae
2018-01-25 21:50:42 +00:00
Winson Chung
e2d721781f Revert "Revert "2/ Add support for remote Recents animation""
This reverts commit 9f8518e532.

Reason for revert: Testing relanding changes with ag/3515280

Change-Id: I410bd752c815a5b998a719453def01e00a9d47c8
2018-01-25 13:44:44 -08:00
TreeHugger Robot
15dc9d7ddd Merge "Internal Framework changes needed by DocumentUI's ScopedAccessProvider:" 2018-01-25 21:30:22 +00:00
David Brazdil
fbef950d95 Merge "Show a warning toast/dialog when an app uses hidden APIs" 2018-01-25 19:53:13 +00:00
Felipe Leme
23a0c7a009 Internal Framework changes needed by DocumentUI's ScopedAccessProvider:
- Changed AM.getGrantedUriPermissions() API.
- Made DocumentsContract.PATH_TREE public.

Also fixed related AM methods to use explicit for on some loops.

Bug: 63720392
Test: manual verification

Change-Id: I33bdcb949f4301534bd8467c8018d6f03b4588a4
2018-01-25 11:04:29 -08:00
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
Dianne Hackborn
c2cbc0727a Revert "Fix issue #72116995: Add permission guarding Service#startForeground"
This reverts commit 994b5ad737.

Waiting for Chrome prebuilt.

Test: NA
Bug: 72116995
Change-Id: Ifcfea94ddefda27267640283038c9d0f933ea1d8
2018-01-25 10:43:28 -08: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
Andreas Gampe
5b495d54d3 ActivityManager: Add support for agents on startup
Add setAgentApp similar to setDebugApp. If given, attempt to attach the given
agent during handleBindApplication.

The flow needed a slight refactor. It is not possible to do a debuggability
check at setAgentApp time (without checking all installed apps). Instead,
when a ProfilerInfo contains an agent, perform a debuggability check then.
This is consistent with how setDebugApp works.

Expose through the shell command:

  cmd activity set-agent-app process agent

Add CTS coverage.

Bug: 69929492
Test: m
Test: m cts
Test: cts-tradefed run commandAndExit cts-dev -m CtsJvmtiAttachingHostTestCases
Change-Id: I65e869debd45e6073f9ab21cb9de9c9deb828a2e
2018-01-24 17:48:02 -08: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
Bookatz
db026a28aa Update to the ActivityManager proto
Rename the activitymanager.proto to enums.proto, in accordance with the
new convention on naming these protos.
Also, changes processStateAmToProto from simplying multiplying by 100 to
a switch statement, to be more future-proof.
Also, changes the values of the proto's process state, to reflect that
the values will not be kept in sync with ActivityManager.

Note that this cl was originally started in ag/3008434, and partially fulfilled in ag/3114337.

Bug: 69478930
Test: run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.ProcStateAtomTests
Change-Id: I2b3bf2552b879c74d8985338df5a57c01850cb91
2018-01-24 12:07:35 -08:00
David Brazdil
927d6de11f Show a warning toast/dialog when an app uses hidden APIs
Check VMRuntime.hasUsedHiddenApi() on each Activity start and show
a toast/dialog urging the user to check logcat.

Test: manual
Bug: 64382372
Change-Id: Ida8a6ed9ab9b56a76882501b2a3473a5f1448cb3
2018-01-24 19:57:18 +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