Also extend API to accept a "count" argument of exactly how many
bytes to copy, and return the actual number of copied bytes.
Improve docs.
Test: bit FrameworksCoreTests:android.os.FileUtilsTest
Test: vogar --mode app_process --benchmark frameworks/base/core/tests/benchmarks/src/android/os/FileUtilsBenchmark.java
Bug: 71932978
Change-Id: I8d255e4f97462838c02a8ecb6d2d221188c4eff0
This reverts commit 860b8ba719.
The original change that was reverted contained a bug that allowed an
http view/browsable intent used to query for browsers to be considered
as a candidate for instant apps. This was resulting in an attempt to
bind to the instant app resolver while holding a lock on mPackages.
This change ensures that PMS doesn't bind while checking for the browser
status of a package in both the instant app filtering code and by adding
the FLAG_IGNORE_EPHEMERAL to the canonical browser intent.
Reason for revert: Applying fix
Change-Id: I4896b3a15416a11fdc3f6c191e552c4ce8963623
Fixes: 63117034
Fixes: 71916178
Test: Manual using test app at google_experimental/users/patb/InstantAppsInP
Test: atest android.appsecurity.cts.EphemeralTest passes after modification
We use the approach of outsetting the stack bounds and then
insetting windows which don't have surfaceInsets by said outsets.
Test: Manual. go/wm-smoke
Bug: 72657549
Change-Id: I9ac7e13ec696f88f02794175d0d44ac870f91d33
In order to not spam users with warning toasts, add a boolean flag
that guards the displaying of a warning message about hidden API
usage and is set after the first time a message is shown.
Bug: 64382372
Test: manual
Change-Id: If7ea995ddf4727a15eccf55dad42ef7775b1fc91
This reverts commit 5564f880db.
Reason for revert: Resolve merge conflict for another revert (ag/3537193)
Bug: 72710855
Change-Id: Id7c3a3993a45c588ee4668d7486d67d764541b1e
This CL switches order of onSaveInstanceState and onStop
callbacks for app that target P+. Now activity state will
be saved after onStop.
Bug: 68763258
Test: Manual
Change-Id: If0410cbfe7920bfff9e3b9fd8879646c5622cb33
This change removes deprecated classes and constants that were not
renamed from ephemeral to instant prior to O. There were no
consumers of these APIs as correctly named alternatives existed and were
referenced in docs. No known consumers of these APIs exist on user
builds.
Fixes: 38137176
Fixes: 38121489
Test: manual; builds and instant apps launch
Change-Id: I982f8a6edc5668dd42cea65e52a1433ec8d6f8ef
When trying to listen to slices without permission before hand, it
would previously crash. Now it works properly with the grant dialog
and whatnot.
Test: uiservicestests
Bug: 68751119
Change-Id: I3aedab9c75ac8486026723dea5c93ee950995295
We need this so that Settings can check if an app is
restricted by admin from using metered data.
Bug: 63700027
Test: manual
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
Change-Id: I9a2ea9c458b0f10a3c3c6edcbe82da9eccaa51c3
Because onStop is guaranteed to be called when activity goes away
and onSaveInstanceState is always called before onStop (starting
with Honeycomb), we can execute these two callbacks together.
This CL consolidates all call points to stop the activity and
moves them to callActivityOnStop, which will also take care of
saving instance state.
Bug: 68325009
Bug: 68763258
Test: Manual
Change-Id: I1062c6be28581a7de7961babd55664640aaae359
Bug: 63117034
Change-Id: Ie3818e913e8e1077f60434a626bc606c0b5015ab
Test: Manual using test app at google_experimental/users/patb/InstantAppsInP
Test: atest android.appsecurity.cts.EphemeralTest passes after modification