Commit Graph

11625 Commits

Author SHA1 Message Date
Lucas Dupin
3698fc8ea6 Merge "Don't recycle bitmaps we don't own" into oc-dr1-dev am: bc907cf9a8
am: 11e0e33756

Change-Id: Ifcb92445f6e8cda2a2c9eb4350be65937ea5787b
2017-07-18 20:34:49 +00:00
Lucas Dupin
11e0e33756 Merge "Don't recycle bitmaps we don't own" into oc-dr1-dev
am: bc907cf9a8

Change-Id: Ib5533fdbcfba36fc1ed82e0089cc681e73a02f05
2017-07-18 20:24:53 +00:00
TreeHugger Robot
bc907cf9a8 Merge "Don't recycle bitmaps we don't own" into oc-dr1-dev 2017-07-18 20:08:58 +00:00
Charles He
3673863f3b Opt-out for always-on VPN
Always-on VPN is a feature introduced in N. Since then, all VPN apps
targeting N+ are assumed to support the feature, and the user or the DPC
can turn on / off always-on for any such VPN app. However, a few VPN
apps are not designed to support the always-on feature. Enabling
always-on for these apps will result in undefined behavior and confusing
"Always-on VPN disconnected" notification.

This feature provides a new manifest meta-data field through which a VPN
app can opt out of the always-on feature explicitly. This will stop the
always-on feature from being enabled for the app, both by the user and
by the DPC, and will clear its existing always-on state.

A @hide API is provided to check whether an app supports always-on VPN.
Documentation is updated to reflect the behavior change.

Bug: 36650087
Test: runtest --path java/com/android/server/connectivity/VpnTest.java
Test: cts-tradefed run cts --module CtsDevicePolicyManagerTestCases --test 'com.android.cts.devicepolicy.MixedDeviceOwnerTest#testAlwaysOnVpnUnsupportedPackage'
Test: cts-tradefed run cts --module CtsDevicePolicyManagerTestCases --test 'com.android.cts.devicepolicy.MixedDeviceOwnerTest#testAlwaysOnVpnUnsupportedPackageReplaced'
Test: cts-tradefed run cts --module CtsDevicePolicyManagerTestCases --test 'com.android.cts.devicepolicy.MixedProfileOwnerTest#testAlwaysOnVpnUnsupportedPackage'
Test: cts-tradefed run cts --module CtsDevicePolicyManagerTestCases --test 'com.android.cts.devicepolicy.MixedProfileOwnerTest#testAlwaysOnVpnUnsupportedPackageReplaced'
Test: cts-tradefed run cts --module CtsDevicePolicyManagerTestCases --test 'com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testAlwaysOnVpnUnsupportedPackage'
Test: cts-tradefed run cts --module CtsDevicePolicyManagerTestCases --test 'com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testAlwaysOnVpnUnsupportedPackageReplaced'

Change-Id: I477897a29175e3994d4ecf8ec546e26043c90f13
2017-07-18 00:55:38 +01:00
Neil Fuller
34aca9e2c5 Merge "Remove TODOs that are not needed" am: 0f9842304a am: 5c2cfc51c5
am: 444616f4bf

Change-Id: I5f4265d738aa3669a0c7acb8df49b454a3e27f9c
2017-07-17 22:40:28 +00:00
Neil Fuller
444616f4bf Merge "Remove TODOs that are not needed" am: 0f9842304a
am: 5c2cfc51c5

Change-Id: Ia585380cb88829bf55171092389b77081d941f17
2017-07-17 22:32:38 +00:00
Neil Fuller
5c2cfc51c5 Merge "Remove TODOs that are not needed"
am: 0f9842304a

Change-Id: Ie46a57ce88e25e40193b073c0add69adccc14a79
2017-07-17 22:24:36 +00:00
Neil Fuller
a9f0eeb36f Remove TODOs that are not needed
Remove TODOs to add classes to the system API that are not needed
(since they are used by a platform-only app).

Bug: 31008728
Test: make droid
Change-Id: I0d75686ddeae929e9d87c5ca8703a609a1450d76
Merged-In: I600e7b08853b86b27463193411cf85207ae09ce8
2017-07-17 17:57:11 +01:00
TreeHugger Robot
ba85991139 Merge "Add TimeZoneRulesDataContract to system API" 2017-07-17 16:44:47 +00:00
Lucas Dupin
42acf6009a Don't recycle bitmaps we don't own
WallpaperColors#fromBitmap should only recycle the bitmaps
created by itself.

Test: runtest -x tests/Internal/src/android/app/WallpaperColorsTest.java
Fixes: 63758291
Change-Id: I1710bf7118b6ae871442f9606f95ac9c9dbb7d24
2017-07-17 16:35:29 +00:00
TreeHugger Robot
080838c0a4 Merge "Test if allocation supported; @removed clean up." 2017-07-16 05:18:36 +00:00
Jeff Sharkey
4233f032fd Test if allocation supported; @removed clean up.
SM.allocateBytes() doesn't offer a clear way to detect if a failed
request could ever succeed.  (For example, we can never work with
pipes, or files on an unsupported storage device.)  So give
developers a first-class API to test if allocation is supported.

If the underlying filesystem doesn't support fallocate(), fall back
to ftruncate() instead of failing completely.

Clean up @removed APIs that were refactoring during API 26 review
process.

Remove support for storing downloads on the /cache partition, which
doesn't exist on many devices.

Bug: 63057877
Test: bit DownloadProviderTests:*
Test: bit DocumentsUITests:com.android.documentsui.services.CopyJobTest
Test: bit DocumentsUITests:com.android.documentsui.services.MoveJobTest
Change-Id: I85d42a1a7240034b4f2a6f359011ac182bdce36e
2017-07-15 21:08:56 -06:00
TreeHugger Robot
213d919f85 Merge "Don't crash when external storage is unmounted" 2017-07-15 01:09:46 +00:00
Christopher Tate
11179b40c6 Don't crash when external storage is unmounted
In particular, don't NPE if an app calls getExternalFilesDir() while
external storage is unmounted.  We were making assumptions about the
length of the array returned by the "tell me about all the external
locations" method, but in unmounted cases that array can be zero-sized.

(And similar for getObbDir() and getExternalCacheDir().)

Bug: 63604311
Test: manual
Change-Id: I4dec828161245047182e6fd39a0df10dd1681ba2
2017-07-14 16:00:36 -07:00
Jason Monk
0218d3fe06 Merge "Fix crash in monodroid apps" into oc-dr1-dev am: 3d80a73350
am: a6ef052f59

Change-Id: I098cd1c8d3ecf9c264a9720db226e123b6b7170f
2017-07-14 19:45:04 +00:00
Jason Monk
a6ef052f59 Merge "Fix crash in monodroid apps" into oc-dr1-dev
am: 3d80a73350

Change-Id: If80299af64fac8138e4cf9b681ebed13e09b8ccf
2017-07-14 19:35:18 +00:00
TreeHugger Robot
d066fa9b96 Merge "Fix typos in onProfileProvisioningComplete javadoc" 2017-07-14 18:22:57 +00:00
Jason Monk
0b06d4e0ba Fix crash in monodroid apps
Don't getApplicationContext if we already have an application.

Test: launch a monodroid app
Change-Id: I0c1558463053de3db0f1cd4693088e7c639ce5fa
Fixes: 63666480
2017-07-14 13:23:58 -04:00
Julia Reynolds
1cd8e1e3bf Merge "Fix system crash" into oc-dr1-dev am: 5a0958ed0b
am: e58e833819

Change-Id: I601238f6ced41633f5674d68a741fbdaeb3bb4a0
2017-07-14 13:55:30 +00:00
Julia Reynolds
e58e833819 Merge "Fix system crash" into oc-dr1-dev
am: 5a0958ed0b

Change-Id: Icd087a48c50670bc5a59c34a13ecb3df5d5529e2
2017-07-14 13:49:13 +00:00
Christopher Ferris
f003ae0f25 Merge "Implement dumpheap -m." 2017-07-13 20:10:47 +00:00
Julia Reynolds
0f17000fb3 Fix system crash
Change-Id: I47d6d79682bfe907544f9282c26e350576618ce2
Fixes: 63474899
Test: runtest systemui-notification
2017-07-13 11:35:46 -04:00
Kenny Guy
ac6e767bda Fix typos in onProfileProvisioningComplete javadoc
Test: make docs
Bug: 62697695
Change-Id: Ibdb9eae16639f9ff840241f83eb56d9c34bb0e45
2017-07-13 11:35:56 +01:00
Robert Berry
c2ecd9c336 Merge "Improve logging when restore fails to load Package Manager." 2017-07-13 08:43:02 +00:00
Yang Ren
363c238b5e Merge "Change Media Route Button animation images" 2017-07-13 00:03:51 +00:00
Christopher Ferris
8d652f8f7e Implement dumpheap -m.
Adds an option to dumpheap that calls mallocInfo and write the xml produced
to a file.

Bug: 36871013

Test: Run am dumpheap -m <FILE>, am dumpheap -n <FILE>, am dumpheap <FILE>
Test: and verified that they produce the correct data.
Change-Id: Ifb9e878ea621c7cacc3aa6e3a889c414681dee2d
2017-07-12 16:06:20 -07:00
Neil Fuller
baf1c3df80 Add TimeZoneRulesDataContract to system API
Add TimeZoneRulesDataContract to system API and remove
TODOs to add other classes that should not now be needed
in the system API (since they are used by a platform-only
app).

Bug: 31008728
Test: make droid
Change-Id: I600e7b08853b86b27463193411cf85207ae09ce8
2017-07-12 18:20:59 +01:00
Robert Berry
c4dd18c7fb Improve logging when restore fails to load Package Manager.
When the transport has no more packages to return, #nextRestorePackage()
returns RestoreDescription.NO_MORE_PACKAGES. Instead of logging that it had
been unable to get the package metadata, the code in BackupManagerService
was assuming that this was a valid package but one with an unexpected
package name, and hence logged a confusing error message.

Bug: 37695157
Change-Id: I75f2123d2bb062ad04003d7ef2a3a25d9661338c
Test: manual
2017-07-12 16:34:50 +00:00
yangren
d9125cf9df Change Media Route Button animation images
Bug: 34690983
Change-Id: Id68195fbba06102e8d860d89b8167400c8c8230f
2017-07-11 18:08:10 -07:00
TreeHugger Robot
0033e5f7b8 Merge "Protect FragmentManager from Menu calls while not CREATED." 2017-07-11 19:19:42 +00:00
George Mount
f558fa3bc2 Protect FragmentManager from Menu calls while not CREATED.
Bug 62673781

While the FragmentManager is not at least in the CREATED state,
it should not call any methods related to Menu to any of its
Fragments. This can happen after the FragmentManager has been
destroyed, but before the Activity has been replaced.

Test: I1357dcd5d6498a6d35552ee68a5fbda9de89b764
Support Lib Change: I6a34b5a95ad69190377eaa4afda041c6b9ef925b

Change-Id: I1a93812b7fa6be0d784d2160f8208939259698c8
2017-07-11 09:58:35 -07:00
Christine Franks
d019d4c315 Merge "Support demo mode and demo users" into oc-dr1-dev am: 2f87ca1637
am: b128d9cd77

Change-Id: I317aa17cefa918483aeec0cc58df89dd18f59472
2017-07-11 14:53:59 +00:00
Christine Franks
b128d9cd77 Merge "Support demo mode and demo users" into oc-dr1-dev
am: 2f87ca1637

Change-Id: I429ce9d2c273c9b093e2f9fe789d126a0b95f198
2017-07-11 14:47:35 +00:00
Dianne Hackborn
6de68dfa4e Merge "Fix issue #34471029: Don't allow audio use from background apps." 2017-07-11 10:03:24 +00:00
Christine Franks
361b825c0d Support demo mode and demo users
Bug: 62712426
Test: run cts -m CtsDevicePolicyManagerTestCases -t \
com.android.cts.devicepolicy.DeviceOwnerTest#testCreateAndManageEphemeralUser
and
run cts -m CtsDevicePolicyManagerTestCases -t \
com.android.cts.devicepolicy.DeviceOwnerTest# \
testCreateAndManageEphemeralUserFailsWithoutSplitSystemUser
and
runtest -c com.android.server.devicepolicy.DevicePolicyManagerTest \
frameworks-services
Change-Id: I77a71a994fe0f4f1f8c5df7c4ccf493aafa8fefe
2017-07-10 17:49:42 -07:00
TreeHugger Robot
547964fc43 Merge "SystemServer: Support for LowpanService" 2017-07-10 20:20:18 +00:00
TreeHugger Robot
de295549d1 Merge "Hide some systemapi methods" 2017-07-10 17:59:36 +00:00
TreeHugger Robot
1cb0485640 Merge "Add "-g" option to run GC to "am dumpheap"." 2017-07-10 17:50:40 +00:00
Robert Quattlebaum
87a7104ae9 SystemServer: Support for LowpanService
The LowpanService implementation can be found at:

    platform/frameworks/opt/net/lowpan/service

Bug: b/33073713
Change-Id: Ibca9c452492bf171bd2c30efdb44ddb472494c3b
2017-07-10 10:16:43 -07:00
Julia Reynolds
ed7b5c64e0 Merge "Limit the number of notis an app can enqueue" into oc-dr1-dev am: c65071d625
am: 8d4cd22ffb

Change-Id: I60ddda50a6d5a6a3028361435a340d6191f6c729
2017-07-10 17:14:57 +00:00
Lucas Dupin
0407c1259c Merge "Add theme style flag to WallpaperColors" into oc-dr1-dev am: 8b94ef697e
am: a9682937b6

Change-Id: Id3a0cd1c34166f156d0c94b412ca7d9397e38672
2017-07-10 17:06:33 +00:00
Julia Reynolds
8d4cd22ffb Merge "Limit the number of notis an app can enqueue" into oc-dr1-dev
am: c65071d625

Change-Id: I85e7117a88be1a629a953f1c721faba508d6d424
2017-07-10 17:06:23 +00:00
Lucas Dupin
a9682937b6 Merge "Add theme style flag to WallpaperColors" into oc-dr1-dev
am: 8b94ef697e

Change-Id: Ic63c9dc9963846afd2ab854630d56512059609d9
2017-07-10 16:58:46 +00:00
Julia Reynolds
c65071d625 Merge "Limit the number of notis an app can enqueue" into oc-dr1-dev 2017-07-10 16:55:01 +00:00
Dianne Hackborn
3e99f654fb Fix issue #34471029: Don't allow audio use from background apps.
This is becoming a common pattern (keeping track of which processes
are cached and not allowing them to do stuff in that state), so I
am turning this in to a general mechanism for monitoring this state
through the activity manager's IUidObserver.  Now we can just have
AudoService implement its own IUidObserver to get this state and
update which uids it is blocking.

This required making some changes to uid change reports so that
the integer is now a bit mask instead of an enumerations, but that
is what it was already turning in to anyway.  (This gets rid of
the crazy GONE_IDLE constant that we'd needed to add before because
it wasn't a bit mask).

Eventually the power manager should be changed to be told about
these changes to cached state instead of listening to every proc
state change, but we'll do that later, it is more disruption than
I want to take for now.  However, while working on this, I noticed
that the power manager had regressed in the cached uids it would
actually block, because the activity manager was no longer telling
it about all uids that are idle.  (I think this happened when I had
to change the default idle state of UidRecord to true.)  So I am
adding a bit of new code to keep track of what idle state we last
reported to observers, to make sure we tell it about newly created
uids that are idle but have never actually become active.

Test: runtest -c com.android.server.am.ActivityManagerServiceTest frameworks-services

Change-Id: I7bfd46bacadd4cab2a69f40e6e52afb4e67b456a
2017-07-10 17:24:20 +01:00
Makoto Onuki
4556b7b8e5 Add "-g" option to run GC to "am dumpheap".
Bug: 62144301
Test: manual test
Change-Id: I187e3acc3c3a97e6799192ab10b1bf16c7fee02f
2017-07-10 08:49:53 -07:00
TreeHugger Robot
b2f9ab3347 Merge "Allow splits to declare a classloader type." 2017-07-10 15:01:52 +00:00
TreeHugger Robot
330ca71a95 Merge "Allow setup apps to colorize notifications." 2017-07-10 15:01:07 +00:00
Narayan Kamath
506b3db322 Merge "SharedPreferencesImpl: Avoid pointless allocation during apply." 2017-07-10 14:25:54 +00:00
Julia Reynolds
6ad0aecf99 Limit the number of notis an app can enqueue
In addition to the number they can post. Also decrease
the number of posts per second to 5, but allow finished
progress notifications through.

Fixes: 63173849
Fixes: 63167456
Test: runtests systemui-notification & simultaneously
downloading 5 files.
Change-Id: I0c8ea35b3d9d38b000ea5fe383515e1d5a26bac7
2017-07-10 09:42:24 -04:00