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
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
Don't getApplicationContext if we already have an application.
Test: launch a monodroid app
Change-Id: I0c1558463053de3db0f1cd4693088e7c639ce5fa
Fixes: 63666480
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
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
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
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
The LowpanService implementation can be found at:
platform/frameworks/opt/net/lowpan/service
Bug: b/33073713
Change-Id: Ibca9c452492bf171bd2c30efdb44ddb472494c3b
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
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
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