679 Commits

Author SHA1 Message Date
Paul Duffin
1db651dd4c Re-add light-greylist entries incorrectly removed with icu entries
Commit 2e930e7a765ec6ebb075523a390ad625010f9e8a accidentally removed
some non-icu entries. The entries were added around the same time as
the ICU entries were removed and caused a conflict that appears to
have been incorrectly resolved.

This was tested by making and then manually checking that the generated
out/target/common/obj/PACKAGING/hiddenapi-light-greylist.txt contains
the new entries.

Bug: 117818301
Test: make checkbuild
Change-Id: Id6bacaab34caee9e7c278c6655ab462e0ee2a442
2018-11-12 14:54:28 +00:00
Paul Duffin
c6b17ad431 Merge "Remove android.icu.... classes from light grey list" 2018-11-09 13:24:17 +00:00
Janis Danisevskis
1864c95616 Remove legacy functions form IKeystoreService.aidl
In preparation for making the keystore service asynchronous we remove
redundant legacy functionality from the protocol.

This patch removes the functions get_pubkey, sign, verify, generate,
and import_key. Which have long been superseded by exportKey
(get_pubkey), begin/update/finish (sign, verify), generateKey
(generate), and importKey (import_key).

This patch also removes isOperationAuthorized.

Test: KeyStore CTS tests
Bug: 111443219
Change-Id: Ib3bd6f40b4e948e5ad6b2ef5278b18ff46201d71
2018-11-08 12:53:57 -08:00
vichang
93bf21dad4 Merge "Add some ICU 63 classes into boot image profile" 2018-11-08 19:23:30 +00:00
Victor Chang
6ea0cb0d65 Add some ICU 63 classes into boot image profile
Bug: 118748230
Test: systrace shows 70% improvement of initialize the class DateTimePatternGenerator$FormatParser
Change-Id: I0c29b7892ac57a49c1f93c8b759e547a5bb881cb
2018-11-08 16:33:23 +00:00
Paul Duffin
2e930e7a76 Remove android.icu.... classes from light grey list
Removes all the android.icu.... classes from the light grey lists as
they are now using UnsupportedAppUsage annotation.

This was tested by making and then manually checking that the generated
out/target/common/obj/PACKAGING/hiddenapi-light-greylist.txt was the
same (after sorting) before and after this change.

Test: see above
Bug: 117818301

Change-Id: Ib11d5462580b3698a8b810dc0138642252ec5f18
2018-11-08 15:22:02 +00:00
Adam Vartanian
07160ff7e5 Merge "Update API file for libcore additions" 2018-11-08 13:39:31 +00:00
David Brazdil
72c3f3ffd5 Add entries to hiddenapi light greylist
These are entries from P accidental whitelist which have been found
in use by static/dynamic analysis.

Test: m appcompat
Change-Id: Ifa269c8ba42d807e6bbe37d5122143921d00ec22
Merged-In: I473d2bc8a9b527cccdb103d527ce7613f4a6ac85
2018-11-07 14:41:41 +00:00
Adam Vartanian
3187dd3f5a Update API file for libcore additions
Bug: 110403421
Test: cts -m CtsLibcoreTestCases
Change-Id: I67937aba279a99963e4290ff1d11154040ba0f94
2018-11-05 15:59:30 +00:00
Paul Duffin
a0cb5388a5 Remove sun.... libcore classes from light grey/vendor lists
Removes all the sun... libcore classes from the light grey/vendor
lists as they are now using UnsupportedAppUsage annotation.

This was tested by making and then manually checking that the generated
out/target/common/obj/PACKAGING/hiddenapi-light-greylist.txt was the
same (after sorting) before and after this change.

Test: see above
Bug: 117818301
Change-Id: I8dadc9215e929c5047fdfe8241c430544e963c19
ge-Id: I2a9ed3fbfb0c703eafcf431b93f8a419c5ec83a3
2018-11-01 10:31:09 +00:00
Paul Duffin
86bfabf908 Remove java.... libcore classes from light grey/vendor lists
Removes all the java... libcore classes from the light grey/vendor
lists as they are now using UnsupportedAppUsage annotation.

This was tested by making and then manually checking that the generated
out/target/common/obj/PACKAGING/hiddenapi-light-greylist.txt was the
same (after sorting) before and after this change.

Test: see above
Bug: 117818301
Change-Id: I3ada072845b311fc89d864c45e40995f4d92dfef
2018-10-31 10:34:56 +00:00
Bill Yi
8b634e9191 Merge pie-platform-release to aosp-master - DO NOT MERGE
Change-Id: I695db52f5e22509401258e8b083e7650d401d993
2018-10-24 14:48:44 -07:00
Paul Duffin
c3bf3e4e14 Remove more libcore classes from light grey/vendor lists
Removes more libcore classes from the light grey/vendor lists as they
are now using UnsupportedAppUsage annotation.

Test: ensured that generated light grey list did not change
Bug: 117818301
Merged-In: I2e12bad6dcf648ae9dfed2cd5a3d2c7f2a01a506
Change-Id: I1361408eacae9b7320babec8ddc2afb10d08feaf
2018-10-22 13:12:15 +01:00
Andreas Gampe
22f69489db Framework: Remove some methods from boot image profile
Remove methods that currently cannot be compiled.

Bug: 76145463
Test: m
Change-Id: I956113b55796d0666db9dbfd387105a7d27b0868
2018-10-16 12:59:38 -07:00
Paul Duffin
7826c7afa3 Remove libcore/io members from light grey list
These members are now specified using the d.a.c.UnsupportedAppUsage
annotation on the members themselves.

Test: ensured that generated light grey list did not change
Bug: 117818301
Change-Id: I51c2f9544517b46d0b8821fbeb5b008342b99770
2018-10-16 14:30:18 +01:00
Mathew Inwood
50dea42729 Add new "max-sdk-p blacklist".
This will contain greylist entries accessible by apps with a
targetSdkVersion of less than Q. Currently empty, will be populated in
follow up CLs.

For now, these APIs are just merged into the light greylist at build time,
pending support in the runtime for implementing the correct runtime
behavior.

Also fix a bug in sort_api.sh so it deals with empty API lists
correctly.

Bug: 115609023
Test: m
Change-Id: I213874062f393f96d120648a934ae5ad7aba93af
2018-10-15 16:38:12 +01:00
David Brazdil
3590eb09ef Merge changes Icd51c4c7,I836ecb94
* changes:
  Add entries to hidden api greylist
  Add method to hidden api greylist
2018-10-11 15:35:58 +00:00
David Brazdil
a8d554380d Add entries to hidden api greylist
Bug: 115387204
Test: m appcompat
Change-Id: Icd51c4c7d446ea72211804fbb050f4fee742db17
2018-10-11 12:50:40 +01:00
David Brazdil
8a91d3f044 Add method to hidden api greylist
Bug: 114488777
Test: m appcompat
Change-Id: I836ecb947390f7fc6986f6848299375c7599fc97
2018-10-11 12:21:48 +01:00
Lorenzo Colitti
85eca488e5 Make setAirplaneMode @SystemApi for SetupWizard.
Expose ConnectivityManager#setAirplaneMode and the
NETWORK_SETUP_WIZARD permission so that SetupWizard can call
setAirplaneMode.

Delete setAirplaneMode from the greylist because the permissions
checks on it, since at least 2013, have been for a privileged
permission (CONNECTIVITY_INTERNAL) that normal apps don't have.

Test: m
Bug: 115302596
Change-Id: I28f24d32c4b4b386407e9e0e3514ea9f8854f4a8
2018-10-10 17:50:05 +09:00
Tyler Gunn
98b1ba015f Cleanup deprecated or removed telephony methods.
Mark previously deprecated TelephonyManager APIs as @remove; some of these
have valid public APIs; for now just calling the public APIs to give more
time for API consumers to transition over to the new methods.

Remove ITelephony AIDL calls for removed methods.

Removed ITelephony light greylist for removed methods; see bug for details.
There are public alternatives for most of the remove AIDL methods; a couple
of the subscription specific ones are not available directly but the
non-subscription specific versions should suffice.

Test: Compile/build/manual
Bug: 115776310
Change-Id: Iff4bf99b34b8e14d5a4dc1d2f4e4926880b6434c
2018-09-24 18:02:44 +00:00
Andreas Gampe
3238164883 Frameworks: Remove AsyncTask from preloaded-classes
Bug: 113624968
Test: m
Change-Id: I77be78138f13fdc6d3a26aea3f59d01ef0e745e8
2018-09-21 10:05:43 -07:00
David Brazdil
7394fbf22a Add entry to hidden API greylist
Bug: 114488777
Test: m appcompat
Change-Id: I8207503ab2904eb61e0f49e1fa317602d9fa145d
2018-09-19 05:34:44 +00:00
Andreas Gampe
5afc95c2c4 Update boot image profile to include Object.wait()
Bug: 116028959
Test: m
Test: inspect oatdump
Change-Id: I5aefa4e334d61cd24f110a35a0084d563a8aca63
2018-09-18 14:21:11 -07:00
David Brazdil
4f5f8f4192 Merge changes I66bbe8b5,Ie54677db
* changes:
  Add api to hidden API light grey
  Add new entries to hidden API light grey
2018-09-18 04:02:34 +00:00
Steven Moreland
6e9ce1a296 Merge "Revert "preloaded-classes: remove core HIDL libs"" 2018-09-17 23:40:39 +00:00
Steven Moreland
0c697ee37f Revert "preloaded-classes: remove core HIDL libs"
This reverts commit 766b425c27f128d507cc5101c01d7c4bf107dbca.

Appears to be the cause of a 14ms regression in wifi startup time in system server that could be offset here (and potentially other places) by keeping the preload in zygote. A local trial of five showed this revert to take it 111.2ms -> 108ms. The variance is likely too high for this to be significant, however, logically, in the short term, these libraries are being used, and so preloading makes sense. I'll leave further changes to this list to the owners of this list.

Test: boot walleye 5 times w/ and w/o this test, and find small gain in reverting this.
Reason for revert: b/115771598

Change-Id: Ia53dbe8b70900d6f04011b15cbdddf786378fc3b
2018-09-17 18:11:02 +00:00
Adam Vartanian
27eec4b376 Merge "Update greylist for Conscrypt update" 2018-09-17 12:36:50 +00:00
David Brazdil
2a706f89f5 Add api to hidden API light grey
Bug: 115409173
Test: m appcompat
Change-Id: I66bbe8b5cd1eed56c2dba74aac05f7a0baaff260
2018-09-15 03:49:58 +01:00
David Brazdil
8adc0a8877 Add new entries to hidden API light grey
Bug: 115479641
Test: m appcompat
Change-Id: Ie54677db0370ad1da8a5ed6253027a2e789ca5bc
2018-09-15 03:49:42 +01:00
Steven Moreland
82e3d2f066 Merge changes from topic "remove-hidl-boot-jars"
* changes:
  pm: Add hidl libraries to old class paths.
  preloaded-classes: remove core HIDL libs
2018-09-13 15:14:35 +00:00
Adam Vartanian
c3dc82878f Update greylist for Conscrypt update
Conscrypt has been refactored to eliminate the ConscryptSocketBase
class, so its greylisted methods no longer exist.

Test: make droid
Change-Id: Iffcfe529d960a397d0ced012f5a97de93dde69fa
2018-09-13 11:01:14 +01:00
Steven Moreland
766b425c27 preloaded-classes: remove core HIDL libs
These are being removed from boot jars.

Test: (sanity) boot device, no longer see 'Class not found for preloading'
Bug: 77307025
Change-Id: I854d3397ff362495ff392c2c4ea8594d1b2449bd
2018-09-12 09:17:53 -07:00
Yohei Yukawa
0a828f5f13 Remove IInputMethodManager.getEnabledInputMethodList() from greylist
App developers must never need to call this IPC method directly via
reflection.  The same functionality has been exposed as a public API
InputMethodManager#getEnabledInputMethodList() since its beggining.

Just for the record, this is what
InputMethodManager#getEnabledInputMethodList() is doing.

  public List<InputMethodInfo> getEnabledInputMethodList() {
      try {
          return mService.getEnabledInputMethodList();
      } catch (RemoteException e) {
          throw e.rethrowFromSystemServer();
      }
  }

Bug: 112722706
Test: compile
Merged-In: Idf9fa866f73dbd151bb67f60dbd57041d9055a23
Change-Id: Idf9fa866f73dbd151bb67f60dbd57041d9055a23
2018-09-11 13:48:02 -07:00
David Brazdil
4a55eebf26 Revert "Check in P dark greylist, use it for hidden API list generation"
This reverts commit 3cc74c71ef907a76547424aea6597f7b2907e9fb.
We saw app crashes due stricter classification of non-SDK APIs.

Bug: 115284625
Bug: 113881436
Test: phone boots

Change-Id: I689d0fbf66fabeffa5032e13f2f1f314c50b6cc5
2018-09-11 11:43:07 +01:00
Andreas Gampe
350694ad10 Framework: Ensure important fdsan function is compiled
Compile ForwardingOs fdsan-using functions. Follow-up to commit
5625660c650a0923d4c7f020f2eb7eef7d5962d4.

The function is relatively hot now, and importantly part of the
'abort' stack for fdsan issues.

Test: m
Change-Id: Iad9883b8fd85fc362bb3252739e3e3acc45373af
2018-09-10 21:27:20 +00:00
Andreas Gampe
5625660c65 Framework: Ensure important fdsan function is compiled
Compile IoUtils fdsan-using functions.

Test: m
Change-Id: If1f3d7fc57890309c15794cee5cd0f338cbd2bd8
2018-09-07 09:58:37 -07:00
David Brazdil
ae88d4e21e Ignore comment lines in hidden api lists
It is sometimes useful to add comments at the top of a source file. This
patch changes hidden API list generation to ignore lines beginning with
a hash.

Note that due to the sorting constraints on hidden API lists, comments
can be only at the top of the files.

Test: m appcompat
Change-Id: I1bc6fd44d1b1f10a5adc45093d7f7ed5a0c5a54f
2018-09-06 15:10:28 +01:00
David Brazdil
3cc74c71ef Check in P dark greylist, use it for hidden API list generation
We want to preserve the same semantics as P wrt dark greylist. This will
eventually become the "blacklist for target SDK >= P".

Bug: 113881436
Test: phone boots
Change-Id: I3bb72102e1d054eb0f2cae089ab633a0bc2bb276
2018-09-06 11:10:51 +01:00
Mathew Inwood
6ab42e28a9 Delete hiddenapi-p-light-greylist.
It's not used, and there is no reason to keep it now that P has been
pushed to AOSP.

Test: N/A
Change-Id: Ib025116032bdb215dba5b51de4c7ea8ad7dd10d5
Merged-In: I51bf94b736cae57780708a70947511c409a2dfb6
2018-08-31 13:38:38 +01:00
Mathew Inwood
71da3a1fe4 Add @UnsupportedAppUsage annotations
For all remaining unannotated code.

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I32861fa341a08f11a9c50c07a1ef7404dadf6bb6
Merged-In: I67c8b71ea535ebffb10bf577948bd4ccb8ca069d
2018-08-30 13:38:01 +01:00
Mathew Inwood
fa4ccace61 Merge "Add @UnsupportedAppUsage annotations" 2018-08-30 07:55:39 +00:00
Mathew Inwood
84e829dce6 Remove suspected false positives from light greylist.
These APIs are only seen to be used by code in java packages
com.android.server.* which corresponds to AOSP code that has been linked
into applications.

Linking system server code into apps like this is unlikely to work, and
should not be expected to work. It's likely that this has been done
accidentally, and the code is not actually used at runtime.

Bug: 112826823
Test: m
Change-Id: If4a3bbe8a0d1a81384b47b35cfcd9a0723be8273
Merged-In: I0a72458d66b6af515e1da68d449d9b166680c258
2018-08-28 14:32:31 +01:00
Neil Fuller
69a13aded0 Merge "Track rename of org.kxml to com.android.org.kxml 2" 2018-08-24 11:53:05 +00:00
Mathew Inwood
b4936a336b Add @UnsupportedAppUsage annotations
For packages:
  com.android.internal.telephony

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: Ib9bb9c8ba23a3305c8b72600fa5fd3109b4f6ee1
Merged-In: Ia06d9a50c456201dc7ecb960ff1a1563617777a5
2018-08-23 11:47:41 +01:00
Mathew Inwood
a838206e94 Add @UnsupportedAppUsage annotations
For packages:
  android.telephony
  android.telephony.cdma
  android.telephony.data
  android.telephony.euicc
  android.telephony.gsm
  android.telephony.ims
  android.telephony.ims.aidl
  android.telephony.ims.compat
  android.telephony.ims.compat.feature
  android.telephony.ims.compat.stub
  android.telephony.ims.feature
  android.telephony.ims.stub
  android.telephony.mbms
  android.telephony.mbms.vendor

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I02d900d6d0ec9a6b2172a71911fec61d04e4d235
Merged-In: I22547ac0ed384d74d61cfd51d20c140e392a597f
2018-08-23 09:37:53 +01:00
Mathew Inwood
30ea09ab75 Merge "Remove @UnsupportedAppUsage annotations from generated code." 2018-08-22 07:01:45 +00:00
Mathew Inwood
df82ab2de2 Merge "Add @UnsupportedAppUsage annotations" 2018-08-22 06:56:20 +00:00
Mathew Inwood
29ec6e6264 Remove @UnsupportedAppUsage annotations from generated code.
Revert back to using the greylist file for this code, since the annotations
would be lost next time the code is regenerated.

Bug: 110868826
Test: m

Merged-In: Ib245a2f1457ced34d5b1a3248161fa4a211ba5e9
Change-Id: Ib245a2f1457ced34d5b1a3248161fa4a211ba5e9
2018-08-21 17:27:35 +01:00
Mathew Inwood
a85f4eb6c6 Add @UnsupportedAppUsage annotations
For packages:
  android.widget

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: Idf7ccc7a850fa984ea16f91cdd70159087274e5c
Merged-In: Ic61019b1df85448a158fc2ba55c326353222c6b9
2018-08-21 16:08:34 +01:00