Commit Graph

9929 Commits

Author SHA1 Message Date
TreeHugger Robot
4c0659f531 Merge "Enable background restrictions" 2017-01-20 02:55:30 +00:00
TreeHugger Robot
5bb4c96d43 Merge "ActivityThread: Only update code paths that have been added" 2017-01-20 01:59:18 +00:00
TreeHugger Robot
d48fed9b55 Merge "Rename View.setTooltip/getTooltip to setTooltipText/getTooltipText" 2017-01-20 01:07:20 +00:00
TreeHugger Robot
54df14956e Merge "Disable moving 3rd party apps to internal if not allowed." 2017-01-20 00:57:36 +00:00
Christopher Tate
42a386b771 Enable background restrictions
Apps that target O+ are always subject to background restrictions.
Legacy apps' background restriction is subject to the OP_RUN_IN_BACKGROUND
app op.

Apps with these properties are exempted from background restrictions:
  - persistent process
  - currently on the idle battery whitelist
  - global whitelist for things like bluetooth services

Bug 30953212

Change-Id: Icc19b2fbc05f40dcf8c3fc4abf718c373dc8d4f6
2017-01-19 16:23:02 -08:00
Adam Lesinski
d33ef56651 ActivityThread: Only update code paths that have been added
When an ApplicationInfo object is updated and we want to update
code paths without restarting the app's process, we need to make
sure that we only update the paths that have changed. This means
diffing between the old paths and the new paths.

Test: watch /proc/<pid>/maps for dex entries before and after
      running adb exec-out am update-appinfos all <package>
Change-Id: I6855d860478ade3184bbb578a5483d8548396daa
2017-01-19 16:17:46 -08:00
Sudheer Shanka
513dc5417f Merge "Add new api Instrumentation.ActivityMonitor.onMatchIntent." 2017-01-20 00:15:14 +00:00
Shreyas Basarge
6fbd65aa1a Merge "Non incremental backup flag for requestBackup" 2017-01-19 23:44:18 +00:00
Yao Chen
022b8eaa1d Disable moving 3rd party apps to internal if not allowed.
ag/1633903 added config_allow3rdPartyAppOnInternal flag to specify
whether 3rd party apps are allowed on internal storage. We need to
respect the flag when moving apps between storages.

Bug: 30980219

Test: Added ApplicationPackageManagertest

Change-Id: I0f8e76467b5071d70f40da28c2087e689c049c06
2017-01-19 15:32:41 -08:00
Shreyas Basarge
38e7486d38 Non incremental backup flag for requestBackup
This cl adds a new requestBackup API to
BackupManager that takes in an int flag
to indicate whether the caller wants the
entire key value set to be passed to the
transport and not just a diff.

Change-Id: Ia225797a58c4431fe742f2f116b257d006b30cd1

Bug: 33749084
Ref: go/request-backup-api-changes
Test: GTS Test at ag/1774002
2017-01-19 22:13:01 +00:00
Winson Chung
a0ad738594 Merge changes Iabb33606,I3c364ebe
* changes:
  Falling back to media session controls.
  Move activity to fullscreen stack when it is relaunched in PIP.
2017-01-19 20:50:48 +00:00
Vladislav Kaznacheev
6a944ca175 Rename View.setTooltip/getTooltip to setTooltipText/getTooltipText
Bug: 34454987
Test: android.view.cts.TooltipTest
Change-Id: I7203d5c61804b79584ba8449643c6c0f27a90747
2017-01-19 11:12:53 -08:00
Adam Lesinski
8f3b174d90 Merge "Teach apps to refresh AppInfos without restarting" 2017-01-19 18:30:43 +00:00
Winson Chung
3535df26e3 Move activity to fullscreen stack when it is relaunched in PIP.
- Only happens when the caller is not from the same package.

Bug: 33754261
Test: Open a PIP activity, try to launch it again from launcher
Change-Id: I3c364ebe31a7626b9133d9c4c1fafc718c2eecf9
2017-01-19 09:12:30 -08:00
Pavel Grafov
b271f34625 Merge "Store pending OTA state and make it accessible via polling api." 2017-01-19 11:09:32 +00:00
Felipe Leme
dfd119615e Fixed enhanced for loop.
It was trying to interact through null, which could throw an exception. Example:

01-18 18:28:12.609   862  2038 W Binder  : Binder call failed.
01-18 18:28:12.609   862  2038 W Binder  : java.lang.NullPointerException: Attempt to get length of null array
01-18 18:28:12.609   862  2038 W Binder  : 	at android.app.Notification$Action$Builder.build(Notification.java:1289)

Test: manual verification
Change-Id: I84fda80ebd12df7d90730b17fa77d4b9ce5f58d2
2017-01-18 18:38:46 -08:00
Chris Tate
9e83cbbc10 Revert "Enable background restrictions"
This reverts commit 21f778060b.

Change-Id: I65586f9739da84fb32b51b0ea166b8288c41d1b3
2017-01-19 01:12:19 +00:00
Shane Brennan
57bf4ea479 Merge "Add support for audio-focused notifications." 2017-01-19 00:12:09 +00:00
Jason Monk
9cfbe9573e Merge "Allow FragmentContainer to play a role in fragment construction" 2017-01-18 23:58:38 +00:00
TreeHugger Robot
155873057f Merge "Enable background restrictions" 2017-01-18 22:32:17 +00:00
TreeHugger Robot
db595b087a Merge "Protect use of onFindViewById for Fragment Transitions." 2017-01-18 20:26:20 +00:00
Shane Brennan
472a3b330a Add support for audio-focused notifications.
Add extras keys and methos to Notification and RemoteInput for notifications
whose contents have an audio representation and whose RemoteInputs
can accept data results (useful for, e.g., voice messaging
applications, photo results, etc).

This motivator for this change is it enables an end-to-end flow for
audio messaging including
  * System receives the audio message
  * Replying to the message with the user's voice
  * App receives the audio reply data

Note that this CL just adds the capabilities, but does not
add any UI or implementation to perform the above flow.

Test: As agreed, this will be tested both with a set of unit tests,
      and with an "end-to-end" test that simulates two apps, one
      creating an audio message with audio reply action, and a
      second app that executes that action, providing an audio
      result.

Change-Id: I55779ac4b781d8273c13c69fded0b56ee639cf01
2017-01-18 12:15:16 -08:00
Christopher Tate
21f778060b Enable background restrictions
Apps that target O+ are always subject to background restrictions.
Legacy apps' background restriction is subject to the OP_RUN_IN_BACKGROUND
app op.

Apps with these properties are exempted from background restrictions:
  - persistent process
  - currently on the idle battery whitelist
  - global whitelist for things like bluetooth services

Bug 30953212

Change-Id: Ib444829a2d222125f64ff19e8218823fa78373f9
2017-01-18 11:30:41 -08:00
Sudheer Shanka
d1d12d1149 Add new api Instrumentation.ActivityMonitor.onMatchIntent.
During testing, sometimes it's sufficient to know that intent is being
triggered and no need to actually launch the target activity as part of
the test. Currently, ActivityMonitor solves this problem but we have to
know all the intents that will be triggered during the test and provide
ActivityMonitors for each of them. So, this change adds a new api
ActivityMonitor.onMatchIntent which can be used for intercepting any
outgoing intents during tests.

Bug: 31810293
Test: cts-tradefed run singleCommand cts-dev --module CtsAppTestCases -t \
      android.app.cts.Instrumentation_ActivityMonitorTest
Change-Id: I46ba4b9a21da000492f9e7b242c01999ebc54423
2017-01-18 11:24:59 -08:00
TreeHugger Robot
b9cb9000c0 Merge "Execute non-optimized add operations one at a time." 2017-01-18 18:27:09 +00:00
Bartosz Fabianowski
094119df3e Merge "Allow system to retrieve permission grant state" 2017-01-18 17:25:49 +00:00
Bartosz Fabianowski
4b0624fee4 Allow system to retrieve permission grant state
To inform the user which apps were granted permissions by the admin,
the Settings app needs to access this information without being a DO/PO.

Bug: 32692748
Test: FrameworksServicesTests unit test

Change-Id: I3770ec6343b85be9c6f7655675ed6db5cb50612c
2017-01-18 18:22:50 +01:00
TreeHugger Robot
2ec59897cf Merge changes I01e81b9c,I532c2d74
* changes:
  Add a listener when task snapshots change
  When app dies, destroy snapshot
2017-01-18 12:17:45 +00:00
TreeHugger Robot
38f8292234 Merge "Adding Notification.TvExtender API" 2017-01-18 02:20:47 +00:00
George Mount
498348d34b Protect use of onFindViewById for Fragment Transitions.
Bug 34163850

onFindViewById is only valid once the Fragment's View
has been created, but the child fragment manager
can be used prior to its creation. This protects
the use of onFindViewById from use by fragment
transitions.

Test: Ic72cd7dae8d7982b78258116e7910c4f07d75d50

Change-Id: I67e3b2d5f59c2e741f29211d08ab07476c78a0ca
2017-01-17 17:09:28 -08:00
Jorim Jaggi
fb9d78afb7 Add a listener when task snapshots change
Since we start recents before we take the snapshot, we need to add
a mechanism to inform recents about task snapshots changes.

We add a new method to TaskStackChangedListener,
onTaskSnapshotChanged, which gets called whenever a task snapshot
changes. Then, SystemUI registers such a listener and updates the
task thumbnail view for the specific task.

Test: Open app, press recents, make sure thumbnail is up-to-date
Bug: 31339431
Change-Id: I01e81b9cd11886da734da671c68d5732aa51009f
2017-01-18 01:50:51 +01:00
George Mount
a27a237098 Execute non-optimized add operations one at a time.
Bug 34125817

It appears that some developers rely on fragment views containing
other fragments without using the fragment's child fragment manager.
This CL executes all unoptimized add operations separately to make
sure that this continues to work. Pop operations continue to be
executed together as they did previously.

Test: Ia0333ac1c09e18a6d9b08fe56b1e5c080652ab5b
Change-Id: I832fe631d05dbf8e9712899fef797da1f5747f5e
2017-01-17 15:37:47 -08:00
Jorim Jaggi
10abe2fe29 When app dies, destroy snapshot
Also destroy snapshot when we remove the AppWindowToken.

Test: runtest frameworks-services -c
com.android.server.wm.SnapshotCacheTest
Test: Open app, go home, kill app, make sure snapshots are
destroyed.

Change-Id: I532c2d7499a86164175f9fcbc8b77c6eb6bfeae6
2017-01-18 00:15:26 +01:00
TreeHugger Robot
6725c8d93e Merge changes I906f6667,I42421408
* changes:
  Construct ambient view in Notification
  Notification: Refactor template parameter passing
2017-01-17 22:38:11 +00:00
Mårten Kongstad
49a4a1dfce Teach apps to refresh AppInfos without restarting
Teach running applications to refresh already loaded ApplicationInfo
objects without resorting to restarting the application process.

Activities will be scheduled for restart via the regular life-cycle.
This is similar to a configuration change but since ApplicationInfo
changes are too low-level we don't permit apps to opt out.

This change is intended to be used with runtime resource overlays and
split APKs.

Test: Manual - command to update application via ActivityManagerShellCommand
Change-Id: Ice10a1691cced90eee95e3278fd784b8a9206d87
2017-01-17 13:08:05 -08:00
Adrian Roos
487374fd6d Construct ambient view in Notification
Bug: 30876804
Test: manual
Change-Id: I906f666711a8d92b557184c652b1d6e33ae6f3d8
2017-01-17 13:06:31 -08:00
Adrian Roos
70d7aa3bd0 Notification: Refactor template parameter passing
Introduce a parameter object to reduce the amount of method overloading
we need to do now and in the future.

Bug: 30876804
Test: manual
Change-Id: I4242140835d440d910a2e2e0ee79af2271e1c046
2017-01-17 13:06:22 -08:00
Andrii Kulian
059df13f32 Merge "Add unit tests for 180 degree rotation" 2017-01-17 19:32:00 +00:00
TreeHugger Robot
5feafb1f71 Merge "Properly track fragments from pop operations." 2017-01-17 17:49:25 +00:00
TreeHugger Robot
ce29c76a1b Merge "Fix focus problems when using optimized fragment transactions." 2017-01-17 17:48:38 +00:00
Pavel Grafov
d65799ee81 Store pending OTA state and make it accessible via polling api.
Change-Id: Ieb71dfb902371a683b17561f51ba9c2c730eb37b
Test: gts-tradefed run gts -a armeabi-v7a -m GtsGmscoreHostTestCases -t com.google.android.gts.devicepolicy.DeviceOwnerTest
Bug: 31000521
2017-01-17 15:06:22 +00:00
TreeHugger Robot
ef99fb85f9 Merge "Make device wide DO features available if all users affiliated" 2017-01-16 18:09:51 +00:00
Esteban Talavera
d36dd15d9b Make device wide DO features available if all users affiliated
Currently, those features are available on single user devices only
(since they collect privacy sensitive data device wide). Now making
them available as long as all users are affiliated.

It'll take a certain amount of time between user creation and the DPC
of that new user setting the appropriate affiliation ids. The DO won't
be able to access the logs during that time (and won't get any "logs
ready" callback). Once the affiliation ids are set, if they match,
logs become available again - this includes logs collected while the
user was being setup. Some logs might be lost though if the amount of
data exceeds the internal limit.

Test: runtest -c com.android.server.devicepolicy.DevicePolicyManagerTest frameworks-services

Test: cts-tradefed run cts -a armeabi-v7a --module CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.DeviceOwnerTest

Bug: 32326223

Change-Id: Idfe881dd6497d3ad2bead10addfd37b98b8a6e2b
2017-01-16 11:13:01 +00:00
Jesse Hall
b12249b671 Create GraphicsEnvironment for communicating with driver loaders
The GraphicsEnvironment class is given information during application
start, and makes it available to EGL/GLES/Vulkan loaders that don't
have easy access to the VM or to the application Context. Currently
only the driver path is handled, but the existing support for setting
library paths (for Vulkan extensions) and cache directory information
should move here.

Bug: 33531483
Test: various apps w/ and w/o driver package installed
Change-Id: I5820d3d1301d5461e10706f551b268c54d4f8926
2017-01-14 17:31:56 -08:00
TreeHugger Robot
18de051c98 Merge "Send EXTRA_USER with DevicePolicy lock broadcasts" 2017-01-14 17:12:57 +00:00
Bartosz Fabianowski
9e0642287e Merge "Add install reason" 2017-01-14 12:58:20 +00:00
Dmitri Plotnikov
9e9cfd93f1 Adding Notification.TvExtender API
Bug: 30972434
Change-Id: Iccdaa6253fd5a118893f2869bfb876b1d1e015c7
Test: No tests yet. Want to get a preliminary OK for the new API. Will add a test before submitting.
2017-01-13 18:13:59 -08:00
Zak Cohen
9013325c3a Merge changes from topic 'vrmode'
* changes:
  Set ui mode in UiModeManagerService to vrheadset when VR mode is enabled.
  Introduce new UI_MODE_TYPE_VR_HEADSET and qualifier.
2017-01-13 23:15:00 +00:00
Bartosz Fabianowski
a34f53f61b Add install reason
This CL allows a reason to be specified when installing a package. The
install reason is a sticky piece of metadata: When a package is e.g.
installed via enterprise policy and an update is then manually
installed or sideloaded, the install reason will remain "policy."
The install reason is tracked separately for each user.

With this CL, two install reasons exist: "policy" and "unknown." Other
install reasons will likely be supported in the future.

Bug: 32692748
Bug: 33415829
Test: Tested manually with "adb install" / "adb uninstall"

Change-Id: I0c9b9e1b8eb666bb6962564f6efd97e41703cd86
2017-01-13 16:51:28 +01:00
Winson Chung
27379c0f89 Merge "Ensure that we always resume task overlay activities if requested." 2017-01-13 07:02:51 +00:00