Commit Graph

11616 Commits

Author SHA1 Message Date
TreeHugger Robot
ba85991139 Merge "Add TimeZoneRulesDataContract to system API" 2017-07-17 16:44:47 +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
Julia Reynolds
4db5955557 Allow setup apps to colorize notifications.
Fixes: 63147379
Test: runtest systemui-notification, core tests
Change-Id: I2077a9fd563826d978d0dc01be89dd0bbc09eebf
2017-07-10 09:17:39 -04:00
Narayan Kamath
35c11a740c SharedPreferencesImpl: Avoid pointless allocation during apply.
Test: make
Change-Id: I5ae03b5561b38e23af50764e17ac5ccfccc1b476
2017-07-10 10:15:26 +01:00
Lucas Dupin
4bd24f36c5 Add theme style flag to WallpaperColors
Theme colors should always be the same in sysui and launcher.
We're now sharing a hint HINT_SUPPORTS_DARK_THEME, to make sure
we're never out of sync.

Test: runtest -x tests/Internal/src/android/app/WallpaperColorsTest.java
Fixes: 63140091
Change-Id: Ibd196f540d77269df377804b0f4d4d0d20820067
2017-07-07 14:36:45 -07:00
Julia Reynolds
6b734d0478 Merge "Allow setup apps to colorize notifications." into oc-dr1-dev
am: e4101089bb

Change-Id: I14f8f499ac62ed47d40ca9b2a7bff0c79120dcd7
2017-07-07 19:31:57 +00:00
Julia Reynolds
e4101089bb Merge "Allow setup apps to colorize notifications." into oc-dr1-dev 2017-07-07 19:24:37 +00:00
Andrew Solovay
9715f06f3a Merge "docs: Described why ProgressDialog is now deprecated." into oc-dev am: 1cdf4244f4 am: bc4dc42887
am: 967bae0cf6

Change-Id: Ied39e43b0e3528984c086346f8e60fde99cb8def
2017-07-07 19:21:43 +00:00
Andrew Solovay
967bae0cf6 Merge "docs: Described why ProgressDialog is now deprecated." into oc-dev am: 1cdf4244f4
am: bc4dc42887

Change-Id: I96a162db5fc80ab578a206ca13bd193a33762a64
2017-07-07 19:15:29 +00:00
Andrew Solovay
465810c895 Merge "docs: Described why ProgressDialog is now deprecated." into oc-dev
am: 1cdf4244f4

Change-Id: I1c25c17f1f73e4006e3b0fa9479d5b0563c6be98
2017-07-07 19:09:39 +00:00
Andrew Solovay
bc4dc42887 Merge "docs: Described why ProgressDialog is now deprecated." into oc-dev
am: 1cdf4244f4

Change-Id: I295298edcd7f26df46edb71924fa63038a381619
2017-07-07 19:08:56 +00:00