This CL was created by running
m api-stubs-docs-update-current-api
Test: CtsIcuTestCases
Bug: 125283072
Change-Id: If60da6b9f0eeed09397b52b4150e98175f1c62d4
This reverts commit 1600c5a6152d0e643d6eab1896f798ec5d9a2439.
Reason for revert: Rolling forward for Q-Finalization
Bug: 129975435
Change-Id: I1ffb8162cb5e6f386fd3c417fabfd4298ef86ffd
JapaneseCalendar.CURRENT_ERA is final static int, and the developer
may mis-use and could have wrong expectation on this API, since
1. New emperor in Japan could result in a new era, but old Android device
still provides an outdated "current" era.
2. Developer may expect its value depending on system time. However,
given it's a static final int,
Android could intiailize the value at boot with an incorrect time,
and thus results in incorrect era. Thus, on Android, The value is
always hard-coded.
Bug: 131893534
Test: make
Change-Id: I16ea841975dd8e913409c884123003f842c55bb8
This reverts commit f6ed8afa405dfae445a16f7433e4d8a9f20115b9.
Reason for revert: QT SDK Finalization. Will be merged again on/after May 13th
Bug: 129975435
Change-Id: If94098b7cc9cf75cf9782d2b70e01881f9c40430
Based on feedback from developers, they need to query these columns
on the general "Files" table, so we need to promote them to the
general "MediaColumns" common interface to make them available.
Bug: 130254706
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: I66afa14799ae42deea519d121177b2c8469889ab
To let developers focus on specific concrete storage devices in Q,
we need a volume name that can be used to point at the primary
external storage device. We had been using VOLUME_EXTERNAL for that,
but we've heard that certain apps are making deep assumptions that
media item IDs are globally unique across all volumes.
Thus these changes merge all volumes back into a single underlying
database, and VOLUME_EXTERNAL works with all of the currently
attached volumes. The new VOLUME_PRIMARY name can be used to focus
on the primary storage device when desired.
When developers try inserting items directly into VOLUME_EXTERNAL,
we gracefully assume they meant VOLUME_PRIMARY.
Bug: 128451765
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: I682ff6e9aaab4f5315a46c9825313a438548c7e6
Internal feedback asked for more documentation, and feedback from
external teams (at least Photos and Camera) was the ability to store
files at arbitrary directory depths.
We now offer a single PATH column, which gives callers more precise
control over file placement. The old DIRECTORY columns remain
intact for now, and are temporarily accepted to support apps
developing against the preview SDKs.
Bug: 127657692, 123967243
Test: atest MediaProviderTests
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: Icd90d7c89d066d4ab68aa2f543ccc6fbc3b4f596
Cleans up location APIs by removing old deprecated APIs (deprecated
since API 24) and adding nullability annotations everywhere.
Bug:126698813,126701422,126702274
Test: built
Change-Id: I6caf7f9778100bb3eee53178c25ce1694fb2d395
If they were null, then the Parcelable would fail to work.
Bug: 126726802
Test: manual
Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014
Exempt-From-Owner-Approval: Trivial API annotations
We've been advised that the current API design strategy is to
implement new APIs in the support library, and leave the core OS to
be bare minimal APIs.
Bug: 126636931
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I9488f0fd789bab08cd376f86056badcbcfb6cc2e
Make the following modifications to APIs and required permissions.
Move the following APIs from checking coarse permission to fine
permission (except for apps targeting pre-Q):
TelephonyManager.getCellLocation()
(deprecated) TelephonyManager.getNeighboringCellInfo()
TelephonyManager.getAllCellInfo()
TelephonyManager.requestCellInfoUpdate()
PhoneStateListener#onCellLocationChanged
PhoneStateListener#onCellInfoChanged
Start checking for fine permission on the following APIs:
(Note -- these will only be logged, not denied until a future CL)
TelephonyManager.requestNetworkScan()
TelephonyScanManager.requestNetworkScan()
NetworkScanCallback#onResults
Start checking for coarse permission on the following APIs:
(Note -- these will only be logged, not denied until a future CL)
TelephonyManager#getAvailableNetworks
TelephonyManager#getServiceStateForSubscriber and #getServiceState
PhoneStateListener#onServiceStateChanged
Bug: 116258458
Test: manual via testapps
Change-Id: I45326ddacbcf538da50ca544d67eed12cf0c0861
The Extensible Metadata Platform (XMP) standard is widely used to
annotate useful information about audio, video, and image files, so
this change starts indexing certain widely-useful fields.
For example, the "document ID" concept is designed to uniquely
identify media items regardless of renaming or trivial metadata
edits over time. And "original document ID" gives a clean way of
identifying a chain of derivative works.
Finally, the "format" attribute can be used to specify a richer MIME
type that may not be recognizable from a file extension alone.
While we're making changes here, remove several APIs that we've
realized aren't needed for Q, such as "trashing."
Bug: 120791890
Test: atest MediaProviderTests
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I0361dd857aed4c2e2f533685478db1c558a97564
This lets us run experiments that need to know the reason for the wake
up in addition to the time and latency.
Bug: 122949636
Test: manually turning the device on and off, looking at the logs
Change-Id: I38429c3387a289010e1a2696ad351ffbe568413b
See the bug for the full context, but the short version is that this
class is difficult to use properly, has a number of questionable
methods, ignores the provider system, and largely exists to support
functionality for which there are now standard APIs.
Test: make docs
Change-Id: I3b155b23bba41a72f20c149986318b75fa6d2eb0
Fixes: 112031620
The new format is described in tools/metalava/FORMAT.md.
Fixes: 116589402 Switch signature files over to the v2 format
Fixes: 112626813 Drop "synchronized" modifier from the signature format
Fixes: 122358225 Omit overriding methods that only differ in final [...]
Fixes: 73088715 API Review: Need doclava to output nullability
Fixes: 79739773 API Review: Metalava enforcing constants are constant
Exempt-From-Owner-Approval: Large-scale tooling change
Test: make sdk, make update-api, make checkapi
Change-Id: Ia248aece5250e84e47c815c601133b698bf644c2
The new format is described in tools/metalava/FORMAT.md.
Fixes: 116589402 Switch signature files over to the v2 format
Fixes: 112626813 Drop "synchronized" modifier from the signature format
Fixes: 122358225 Omit overriding methods that only differ in final [...]
Fixes: 73088715 API Review: Need doclava to output nullability
Fixes: 79739773 API Review: Metalava enforcing constants are constant
Exempt-From-Owner-Approval: Large-scale tooling change
Test: make sdk, make update-api, make checkapi
Change-Id: I8314f4e7099fa92e4f8ed7d283ccf836cc9a84a0
Merged-In: Ia248aece5250e84e47c815c601133b698bf644c2
Keep the old methods around for code that expects to find them with
the ContentResolver type.
Bug: 120846329
Test: manual
Change-Id: Id9c10525e63ecc8fbf9a249bfe7a5de755a0ceb4
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