204 Commits

Author SHA1 Message Date
Mark Chien
58f6df7123 Merge "Remove deprecated entitlement API" am: 36459170a7 am: 6f86953a39
am: d9fbd454de

Change-Id: I6bb5611de8d45e9a5c17128ea38ba1bdd8f86ac2
2019-03-18 20:38:36 -07:00
Soonil Nagarkar
09a3ce7c44 Revert API removal
Bug: 128842115
Test: manual
Change-Id: Iff8e1a1c4c9dd6d089d0af6527bdd74ee38fa421
2019-03-18 13:53:33 -07:00
markchien
846e49943d Remove deprecated entitlement API
The deprecated entitlement APIs[1] is introduced in the Q
development cycle. It should be replaced by new APIs[2][3].

[1] https://android-review.googlesource.com/c/platform/frameworks/base/+/874220
[2] https://android-review.googlesource.com/c/platform/frameworks/base/+/920354
[3] https://android-review.googlesource.com/c/platform/frameworks/base/+/927513

Test: -build, flash, boot
bug: 126701557
bug: 126392011
Change-Id: I96487e9038c07363680a76db840994719d7ff768
2019-03-15 09:03:50 +00:00
TreeHugger Robot
9c5458edb7 Merge "Remove deprecated Settings APIs." 2019-03-14 17:06:04 +00:00
Soonil Nagarkar
a491b7abb1 Revert removal of GpsStatus APIs
Bug: 126698813
Test: manual
Change-Id: I174d3f4cd21259e59381fc79990005c644380065
2019-03-13 17:36:44 -07:00
Soonil Nagarkar
6dac9d1bf5 Remove deprecated Settings APIs.
Bug: 128348646
Test: manual
Change-Id: I40dbfc78ee983ffacc56a68d2c5ba2aefb16357f
2019-03-13 10:13:31 -07:00
Mark Chien
340107f508 Merge "Fix TetheringEntitlementValueListener related API" am: fbcc63d51f am: 16c5a5c6f4
am: 95ca226658

Change-Id: I9a1f7c9fa34b6f1e6104a8e5af4b6957e7aae3eb
2019-03-07 05:51:10 -08:00
markchien
9554abf9ed Fix TetheringEntitlementValueListener related API
Test: -build, flash, boot
      -atest FrameworksNetTests
bug: 126701557
bug: 126392011

Change-Id: I6dda10fbfe8ffaef71269617750a22563396f5ea
2019-03-07 13:33:21 +08:00
Soonil Nagarkar
00fe7e2d78 Remove deprecated GNSS APIs + add nullability
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
2019-03-05 16:38:45 -08:00
Jeff Sharkey
9e8f83db6d All Parcelable CREATOR fields are @NonNull.
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
2019-02-28 23:29:04 -07:00
Jeff Sharkey
a30e5c389f To be @Nullable or @NonNull, that is the question.
Bug: 126699288, 126699496, 126700389
Bug: 126700085, 126701638, 126702005, 126700497
Test: manual
Change-Id: Idcbc2722ddcf014a9e5cef14321b4e2ce30adf9c
2019-03-01 06:26:39 +00:00
Jeff Sharkey
d0d26958f4 Hide "Pending" APIs based on feedback.
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
2019-02-27 23:00:20 -07:00
Hall Liu
8c63ea5b54 Merge "Implement more location checks" am: a3aae9fe4b am: 8b98155789
am: 74c000a5ba

Change-Id: I3a75d4497453eb8284929e420f933332c792ef83
2019-02-13 17:16:08 -08:00
Hall Liu
ee313737e9 Implement more location checks
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
2019-02-13 11:07:37 -08:00
Jeff Sharkey
c62b0aca8c Start paving the way for XMP metadata.
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
2019-02-07 16:22:41 -07:00
Michael Wright
e3001042b6 Instrument wake up reasons.
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
2019-02-06 12:54:00 +00:00
John Reck
5cca8f250c Add continuous SKP capture test api
Bug: 122856066
Test: PictureCaptureDemo
Change-Id: Iaf3a4bc1c8a2c18c7dff635c5f1cf726b331f8bf
2019-01-22 13:13:06 -08:00
Tobias Thierer
3985258afd Merge "Deprecate SSLCertificateSocketFactory" am: f86156158c am: 6804819923
am: 37db9722a6

Change-Id: I8e716337b30fa802a5b07f8f16421ad3a499720e
2019-01-22 09:32:14 -08:00
Adam Vartanian
6caa816a63 Deprecate SSLCertificateSocketFactory
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
2019-01-21 11:10:57 +00:00
Tor Norbye
68ea0c3c13 Update signature files to the new format
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
2019-01-19 12:07:50 -08:00
Tor Norbye
8752dedb76 Update signature files to the new format
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
2019-01-19 07:22:55 -08:00
Jeff Sharkey
28d437142d This is a giant mess.
Bug: 120846329
Test: none
Change-Id: Ide0325d9f8e6accc961f456296125f3306aaca54
2018-12-13 10:03:06 -07:00
Jeff Sharkey
14101c709c People still need the old method signatures.
Keep the old methods around for code that expects to find them with
the ContentResolver type.

Bug: 120846329
Test: manual
Change-Id: Id9c10525e63ecc8fbf9a249bfe7a5de755a0ceb4
2018-12-11 13:55:48 -07:00
Nathan Harold
06b4e4692c Merge "Remove getNeighboringCell API" am: e164be3176 am: 66c63a4bbe
am: 473c9609a9

Change-Id: I176c4079bb2b487fde37738bf9b4e017b2fd10e9
2018-09-28 16:15:22 -07:00
Nathan Harold
493223bdf1 Remove getNeighboringCell API
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
2018-09-20 10:11:11 -07:00
Lorenzo Colitti
4d121ff87f Merge "Actually @hide unwanted capability methods." into pi-dev am: a09c06a6c1
am: dc86aaa112

Change-Id: I923e5377a1abe761217612452cbfdba752e53de2
2018-04-24 14:50:14 -07:00
Lorenzo Colitti
19c0ccaa8c Actually @hide unwanted capability methods.
Bug: 77601789
Test: builds, boots
Test: make doc-comment-check-docs
Change-Id: I7a913b83ab5110047d187564b3a1b0bbe1631942
2018-04-24 13:12:56 +09:00
Wale Ogunwale
cbb04c868d Merge "Clean up APIs before declaring API 28." into pi-dev am: fb10508cfa
am: b129fadef8

Change-Id: I9b8414b89138651f3b3132789cae59ad6780dbb6
2018-04-12 05:45:08 -07:00
Jeff Sharkey
3990ee1c9f Clean up APIs before declaring API 28.
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
2018-04-11 13:49:21 -06:00
Lorenzo Colitti
ce90c70b15 Remove unwanted capability code per API council feedback. am: 4c6f4a65b6
am: 142f57e261

Change-Id: I315788a9b7ada0858b74dcd599c897bcf04f6c80
2018-04-06 20:14:57 -07:00
Lorenzo Colitti
4c6f4a65b6 Remove unwanted capability code per API council feedback.
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
2018-04-06 23:02:51 +09:00
Leon Scroggins III
fc7f4c89ed Merge "Rename set/get-ConserveMemory" into pi-dev am: d2c218f78a
am: 844ecb325a

Change-Id: Ieb7c02b42c77230173688e493e3e2b5549279de1
2018-04-05 14:24:49 -07:00
TreeHugger Robot
d2c218f78a Merge "Rename set/get-ConserveMemory" into pi-dev 2018-04-05 20:44:58 +00:00
Leon Scroggins III
ac959199e5 Rename set/get-ConserveMemory
Bug: 76448408
Test: Ie83dbdeab5cc3dcd6bd56dd874412ed67eb52c02
Change-Id: I714b159bb70a48e5644801cc7fef8e32ee93896a
2018-04-04 19:58:30 -04:00
Derek Sollenberger
1aefca09eb Merge "Merge "Restore saveLayer APIs back into the public API." into pi-dev am: ffe1c2a266" into pi-dev-plus-aosp
am: c13bf77769

Change-Id: I1d93eb9fadc99f578e7162a6aae82d6eb612a3b8
2018-04-02 23:19:26 +00:00
Derek Sollenberger
2d4f01ba7f Restore saveLayer APIs back into the public API.
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
2018-03-30 14:40:04 -04:00
Leon Scroggins III
7466c1679a Rename getters and setters on ImageDecoder am: d62f27250a
am: 02b9f36f5a

Change-Id: I9048711149267eb20848e63a3f1f166d6f46e158
2018-03-30 14:50:57 +00:00
Leon Scroggins III
d62f27250a Rename getters and setters on ImageDecoder
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
2018-03-29 15:35:30 -04:00
Leon Scroggins
eb366a01ab Merge "Rename ImageDecoder.setResize" into pi-dev am: 6078631927
am: 07e1c83bad

Change-Id: I8d5bd9332d982cf953947d888afd25c566ca5460
2018-03-29 13:14:13 +00:00
Leon Scroggins III
64481195e1 Rename ImageDecoder.setResize
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
2018-03-28 11:24:12 -04:00
Derek Sollenberger
93e2e97d1b Merge "Remove deprecated android.graphics.Canvas APIs" into pi-dev am: 812e87ecba
am: d32b6e012a

Change-Id: I596d43c935516141b9c834c0af7441606d41a33a
2018-03-27 19:36:37 +00:00
TreeHugger Robot
812e87ecba Merge "Remove deprecated android.graphics.Canvas APIs" into pi-dev 2018-03-27 18:00:29 +00:00
Jeff Sharkey
4b565cc5c7 Merge "API council requested tweaks to JobInfo." into pi-dev am: a9975804a2
am: 120b8aa395

Change-Id: Ibf29247be5317945b5326b6cfc58f07263f20eb9
2018-03-27 16:56:36 +00:00
TreeHugger Robot
a9975804a2 Merge "API council requested tweaks to JobInfo." into pi-dev 2018-03-27 16:25:23 +00:00
Jeff Sharkey
8474ca0246 API council requested tweaks to JobInfo.
Split network estimates into separate download/upload values, and
add missing accessor methods.

Test: none
Bug: 74945408, 74032541, 74032817
Change-Id: I4c92b8a867690dc4f048701f13142655c3370958
2018-03-27 08:41:42 -06:00
Derek Sollenberger
7b837616ae Remove deprecated android.graphics.Canvas APIs
Bug: 73777445
Test: compile
Change-Id: Ie68f2fbe3c3be82f3c20529d535875d4cc204b7c
2018-03-27 14:36:50 +00:00
Jeff Sharkey
b5bbf4b2c3 Merge "API council requested tweaks to TrafficStats." into pi-dev am: 9a6bc76ee8
am: efae42a25d

Change-Id: I65c961a839a3b7404f753d3278c70bc50f918b7f
2018-03-27 04:41:54 +00:00
Jeff Sharkey
121d565b65 API council requested tweaks to TrafficStats.
Test: atest android.appsecurity.cts.AppSecurityTests#testAppFailAccessPrivateData
Bug: 71584606
Change-Id: I4be8a47d54a04f17cbaac735d543ff7d6370376d
2018-03-26 13:12:39 -06:00
Leon Scroggins
547a528421 Merge changes from topics "DecodeException_ERROR", "AID_autoStart", "onPartialImage" into pi-dev am: ceb14e015b
am: fbe597e850

Change-Id: I2a70864001a9e6cf21692bcbcb5c2cc81361f0bf
2018-03-23 00:57:54 +00:00
Leon Scroggins III
1564d3070f Re-write onPartialImage API am: 1d2bf2b846
am: 1a82348834

Change-Id: Icd8be0239571f543ae815f51d162eb1485567eec
2018-03-23 00:51:26 +00:00