Remove the obsolete getNeighboringCell API for callers
targeting Q or higher SDK. This API was fully
superceded by getAllCellInfo in KitKat, and
maintaining it results in battery drain because calls
to this API resulted in unrestricted modem calls.
For legacy support, this API now routes to the newer
CellInfo mechanism, which stems the battery drain but
further emphasizes the redundancy. Thus, removing this
is the best possible outcome for maintainers, users and
OEMs.
Bug: 62490173
Test: compilation; atest CtsPermissionTestCasesSdk28
Change-Id: I8aa806bfcad2ceefc9dfbff58c0ce48d5a3cab5b
As part of finalizing an SDK, we need to ensure that no new APIs are
marked @Deprecated, since they're typically cleanup that someone
forgot to finish.
Someone forgot to replace Slice.getTimestamp() with Slice.getLong().
Bug: 77588754
Test: builds, boots
Exempt-From-Owner-Approval: SDK finalization
Change-Id: Ic0ec91a43d161a69c1e840c42046ad500b7aeca0
The addition of hasUnwantedCapability was late in the release
cycle and does not simplify the API enough to be worth it. The
recommendation is, in a future release, to do something more
complete: not just add something like addUnwantedCapability, but
also deprecate all the NET_CAPABILITY_NOT_xxx constants and add
opposite NET_CAPABILITY_xxx constants for use with it.
Fix: 77601789
Test: builds, boots
Test: atest android.net.cts.NetworkRequestTest
Test: atest android.net.cts.ConnectivityManagerTest
Change-Id: Ib98fb01da4a4a0bae464787b589ad88f45002eb8
The saveLayer APIs are restored from @removed but will treat input
as ALL_SAVE_FLAGS and generate exceptions on newer API levels.
We internally used these calls in one situation that now use a
different @hide API to support the previous behavior until we
refactor that code.
Partial revert of "Remove deprecated android.graphics.Canvas APIs"
This reverts commit 7b837616ae88cbdaf12600cee23b5188e5531937.
Bug: 77276963
Bug: 73777445
Test: CtsGraphicsTestCases
Change-Id: I7acd4ffd5ac41a58d2be8b48cf50119c2b896708
Bug: 76448408
Test: Ib8782ff10072c81a5ed2a1031a70475fffee7ccf
- Use "is" prefix for booleans instead of "get"
- Reverse "require" and "unpremultiplied" for a more natural sound
- Add "Required" to "Mutable" methods
- Add "Enabled" to "DecodeAsAlphaMask" methods
Change-Id: I644ddccd37898d89609e4534ece4ea70f74587c4
Bug: 76448408
Bug: 73537624
Test: Ib40d65c68a6c709b6456f2145ad8a5557a941494
setResize is two verbs, and "resize" implies we're changing the size of
an existing object. In truth, the method specifies the desired size. So
rename setResize(int, int) to setTargetSize, which clearly specifies the
behavior.
Rename setResize(int sampleSize) to setSampleSize.
Hide getSampledSize, which looks too similar to the newly named
setSampleSize. In addition, b/76448408 suggests hiding it. It isn't
really necessary anyway, since a client can just call setSampleSize - no
need to query and call setTargetSize manually.
Since there is no way for a client to know that a RAW image couldn't be
decoded to the desired size (could previously be done with
getSampledSize), make setSampleSize do the extra scaling. This is a
better API anyway.
Change-Id: I84c29fdc6bdfb999a7f712fdc069304ae9676ba6
Bug: 73788969
Test: I501e8b76aacd785cb994165ab01dc1b39fea3a1c
Move them into ImageDecoder.DecodeException, which is where they are
actually used. This also provides some more context, so that the prefix
"ERROR_" is no longer necessary, fixing the redundancy/awkwardness in
ERROR_SOURCE_ERROR. Further rename that to SOURCE_MALFORMED_DATA, which
is more descriptive, and does not imply a Java Error.
Change-Id: Ied17ad343650f9c33d9a35b0f9d00ccc22264bd6
Bug: 73788969
Test: If9e27a6ce2604128a619bc4843d62711f94b4d87
Add a new Exception subclass that contains information about the type of
error, and the original Exception, if any. Remove the old
IncompleteException class. If the decode creates a partial image, pass
the information up to Java, where we create the new Exception and pass
it to the callback and/or throw it. Rewrite nDecodeBitmap to always take
the ImageDecoder as a parameter for this callback, and simply use a
boolean to determine whether to call onPostProcess
Check for exceptions in some overlooked cases in native code, and
route to the new type.
Remove FIXME to avoid parsing the whole image. In my limited testing,
it didn't seem to speed anything up, and this should be called in a
background thread anyway. Parsing now also ensures that we've read the
stream when we can have a chance to handle the exception from the right
place.
Remove fixme for b/70626068, which has been marked as WontFix.
Add a TestApi for testing an Exception thrown by an InputStream.
Remove onPartialImage from hiddenapi-light-greylist.txt to fix the build
error this change introduces. onPartialImage was erroneously added to
the list.
Change-Id: I12f69857328e63c993bd669412b06addeb6a74f1
Bug: 73788928
Test: I1606cbb4e71579160ffaef12c1ed738fad882cd1
This will allow Kotlin developers to treat the setters as properties.
Part of the motivation for the rename is that "getAsAlphaMask" sounds
like it returns an alpha mask itself. Rename both to
_etDecodeAsAlphaMask.
Change-Id: I8f9b04f8381840490b662c3bcd37a95442af8110
Bug: 73529437
Test: I60fbee6d3610070413e8c46f363ec3c19c2e7c52
Allow setting AnimatedImageDrawable's loop count in xml. Use
"repeatCount" to match the existing attr used by other objects, and
change the Java api from "loop" to "repeat".
Cache the repeat count in the State object for the situation where we
inflate but are waiting on a theme, so that when we get a src we can
apply the existing repeat count.
Change-Id: Ie723fe9a40c64dd0e1e8fd7b5d5cf81e5c5ccd0d
Callbacks as the second parameter is more Kotlin friendly.
Bug: 73751206
Test: cts-tradefed run commandAndExit cts-dev --module CtsOsTestCases --test android.os.cts.StrictModeTest
Change-Id: Ib9c9469be1b81dc65e74c9e303f474c54a43b18b
Now that we have a nice Clock abstraction, we can use it to represent
a clock backed by an NTP fix. (This makes testing logic much easier
to write.)
We now rely completely on NetworkTimeUpdateService to keep our NTP
fix up to date, instead of trying to refresh in the middle of
critical paths which could trigger random ANRs.
Add internal FallbackClock to make it easier to handle missing NTP
fixes. Add internal SimpleClock to let implementers focus on single
millis() method.
Test: bit FrameworksNetTests:com.android.server.net.NetworkStatsServiceTest
Test: bit FrameworksServicesTests:com.android.server.NetworkPolicyManagerServiceTest
Bug: 69714690, 72320957
Change-Id: Ic32cdcbe093d08b73b0e4b23d6910b23ea8e1968
Exempt-From-Owner-Approval: approved in previous PS
Context:
Updated the API according to API council feedback. Marked it as
@Removed and keep it for a while for Launcher. But now Launcher
prebuilt is updated, we are safe to remove it.
Test: Build
BUG: 71818127
Change-Id: I33fec12addf7031bfbcd86bce9e636c31d0ea4d3
the feedback from API council
trySetQuietModeEnabled will be kept for a while until next
Launcher prebuilt is dropped.
FIXES: 71818127
Test: Build
Change-Id: I3d4fd64862c7d924b8da630522a30a3899676b4b
This removes all android.test.mock from the main android.jar.
This change is being done now rather than wait until they can all be
removed together because the code base is a moving target. Doing this
change minimizes the window during which other developers could either
revert the previous changes that make this possible or add new code that
relies on the android.test.mock classes being in android.jar and so
would require yet more changes.
Bug: 30188076
Test: make checkbuild
Change-Id: I3d31e4528c99e2e297aaec9c4b657bdd305bd464
The anchors are, in practice, always Views, but they may end up
being virtual views in the future, so we should have this done
right.
Also cleaning up picture in picture mode. I don't know why I made
it a separate boolean when I already had the boolean properties.
Bug: 70730136
Test: A11y unit tests and CTS
Change-Id: I916ec066dff12fab8b586371452b728af6be1271
When emitting a method or field, verify that we're able to reference
all mentioned types. This ensures that we don't accidentally
reference undefined classes/interfaces.
Test: manual inspection of API files
Bug: 69791141
Change-Id: I84e0c87fe83daa118661f61dbdf17b58ea5282d4
android.net.PskKeyManager was @remove'd in Android O (API Level 26)
which means it may still be available on Android O platform, but is
not part of its public API. This commit deletes this class from
future platform versions.
The reasoning for the removal of this class is that:
1. it is incompatible with TLS 1.3, and
2. TLS-PSK cannot be exposed as a standalone primitive in a safe by
default way. There is no way for such primitive to ensure that
it is used with a shared secret which is not hard-coded into the
app or is otherwise publicly known.
Test: make
Test: Run a test app which uses PskKeyManager -- the app crashes
because the class is not found
Bug: 34722996
Change-Id: I5f9a1a1784004b1387ef756eadf8fa06796c96bc
The @removed docs tag means that a particular API should be considered
as removed from the API surface area that it otherwise would have been
exposed through.
This set of CLs is fixing a bug where we @removed had been treated as
always removing from the public API.
Bug: 62341924
Test: make -j32 update-api
Change-Id: I336b2df4804e947a0b93a12269d6e7c5594eef7e
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
EVICT_CE_KEY was @removed before API freeze
now removing it entirely.
Bug: 37663081
Test: compiles
Change-Id: I9ab318196cfe2da601be65b26a3b579f2f4bad82
Video based badging is not going out in O. Hide video-terminology
constants.
Bug: 37687077
Test: make update-api;
Change-Id: Ibd3a732be11bcd0f6b1077943a34b77f7c971ee3
Test: adb shell am instrument -e class android.net.NetworkRecommendationProviderTest -w com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Test: Built & ran
Bug: 37357264
Change-Id: I6d55fbad87b11c99e7ddac07cfaa82efeee33187
The abbreviation is not in common use. Also remove FBE from
documentation as it also isn't used elsewhere.
Test: Build success
Bug: 37621349
Change-Id: Icf19be5e96e71dcd45aa7cac8f58b05b6d77d02b
Make ContentResolver the first parameter.
Bug: 37419379
Test: android.content.cts.ClipboardManagerTest
Change-Id: I3f7772e8ddc93eec0e930b62c722a145f9e6f0fa