Commit Graph

134 Commits

Author SHA1 Message Date
David Brazdil
02175b7847 Merge "Add serialization methods to hidden API light greylist" into pi-dev 2018-03-27 16:55:18 +00:00
David Brazdil
357170b180 Add serialization methods to hidden API light greylist
This patch adds a build-time rule that adds all members with signatures:
  readObject(Ljava/io/ObjectInputStream;)V
  readObjectNoData()V
  readResolve()Ljava/lang/Object;
  serialVersionUID:J
  serialPersistentFields:[Ljava/io/ObjectStreamField
  writeObject(Ljava/io/ObjectOutputStream;)V
  writeReplace()Ljava/lang/Object;
to the hidden API light greylist. This is needed so that apps can retain
the ability to write their own serializers.

Bug: 64382372
Bug: 73255398
Test: make
Change-Id: I0103f47044e957bbff0a39230ff53562f3feddac
2018-03-27 16:54:53 +00:00
David Brazdil
6c786d362b Remove from hidden API light greylist
Bug: 76384058
Test: make
Change-Id: Ic10b82be24f9254f30b6bbb60bad4b9f090b0d9b
2018-03-26 11:54:43 +01:00
David Brazdil
19f7654e01 Add more hidden API uses to light greylist
From bug reports.

Bug: 64382372
Bug: 76350169
Bug: 76329535
Bug: 76329536
Bug: 76355229
Bug: 76350172
Bug: 76384058
Bug: 76350170
Test: make
Change-Id: Id5f99235d0abc1a8326ed254dd835c9ac05dc996
2018-03-26 10:03:46 +01:00
Nicolas Geoffray
3017136353 Merge "Greylist camera API used by CameraITS test" into pi-dev 2018-03-26 07:58:43 +00:00
Nicolas Geoffray
6b3e711eb4 Merge "Add APIs to light grey." into pi-dev 2018-03-26 07:53:38 +00:00
TreeHugger Robot
4f2e53fe48 Merge "Unhide ImsReasonInfo Constructor" into pi-dev 2018-03-24 01:12:49 +00:00
Kurt Marcinkiewicz
991b971acb Merge "Allow specifying a network for SNTP time sync" into pi-dev 2018-03-23 18:02:19 +00:00
David Brazdil
17cd5cbfed Greylist camera API used by CameraITS test
CameraITS CTS test returns the contents of hidden fields in several
android/hardware/camera2/ classes back to the host-side test driver.
These need to be greylisted for the test to succeed.

Bug: 64382372
Bug: 76163369
Test: follow instructions in cts/apps/CameraITS/CameraITS.pdf
Change-Id: I9cacd7422547a52f678a3b2d357f8998ff9664d7
2018-03-23 16:21:01 +00:00
Nicolas Geoffray
07645e1803 Add APIs to light grey.
bug: 76156911
bug: 76149913
Test: m
Change-Id: I77172d45110e3d5bb5ff2f79447210107b901c68
2018-03-23 15:08:06 +00:00
David Brazdil
bb8452e318 Add hidden API on light greylist
Used by a CTS test

Bug: 64382372
Bug: 76166763
Bug: 76117220
Test: atest CtsActivityManagerDeviceTestCases:DisplaySizeTest
Change-Id: I37ccb7bc820e467d1cc5fd7f3c0dc696b466ff32
2018-03-23 13:40:49 +00:00
TreeHugger Robot
a93efabc24 Merge "Allow apps to call startRecognition(UUID, Bundle, ComponentName, RecognitionConfig) via reflection" into pi-dev 2018-03-22 23:00:31 +00:00
Leon Scroggins
ceb14e015b Merge changes from topics "DecodeException_ERROR", "AID_autoStart", "onPartialImage" into pi-dev
* changes:
  Rename ImageDecoder.ERRORs
  Add the ability to autoStart AID from xml
  Re-write onPartialImage API
2018-03-22 21:53:05 +00:00
Philip P. Moltmann
1b926a7439 Allow apps to call startRecognition(UUID, Bundle, ComponentName, RecognitionConfig) via reflection
- We don't want to make this a @SystemAPI as this will change
- We need 1st party apps to call this on Pixel devices

Test: Built
Bug: 73829108
Change-Id: I6954767020811ea99ceec17fd17b790c4a1bc0db
2018-03-22 14:06:43 -07:00
Kurt Marcinkiewicz
dfdd82e84f Allow specifying a network for SNTP time sync
Permits syncing over a specific network instead of the default for
the process. This was causing an issue with Android Wear devices
paired with iOS where the default network is bluetooth
(see b/32663274).

This CL is in support of ag/3776564

Bug: 32663274

Test: adb shell am instrument -e class android.net.SntpClientTest -w \
com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

Change-Id: Ic9fc169cf75457810d4992121d85d7642e350b90
2018-03-22 13:43:25 -07:00
Mohamed Abdalkader
ca0c1ac304 Unhide ImsReasonInfo Constructor
Test: builds
Bug: 76033384
Change-Id: If1101b82f92e45cd417f34356545363f6f9bf322
2018-03-22 00:40:01 +00:00
TreeHugger Robot
4d6dc48d24 Merge changes I7f413e38,I20aba7e9 into pi-dev
* changes:
  Remove FlpHardwareProvider
  Create the stubs lib for com.android.location.provider
2018-03-22 00:29:38 +00:00
Leon Scroggins III
1d2bf2b846 Re-write onPartialImage API
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
2018-03-21 12:55:46 -04:00
David Brazdil
3a8ab3128c Add new hidden API uses to light greylist
From common apps.

Bug: 64382372
Bug: 74430927
Test: make
Change-Id: I81c38a78fcdc7c33f54cd25823b301ba29638019
2018-03-21 15:54:06 +00:00
David Brazdil
10977cd9bc More APIs on hidden API light greylist / vendor list
New scan after updates.

Bug: 64382372
Bug: 76062566
Test: make
Change-Id: Ia2c67222bddccb0b7f607ee0ce8951611a668dc3
2018-03-21 14:28:18 +00:00
Jiyong Park
4cc3a1c056 Remove FlpHardwareProvider
After Treble's FLP merge into GNSS HAL, the FlpHardwareProvider is just
an empty shell. Removing FusedLocation and/or Flp + Hardware classes
altogether.

Bug: 35726697
Test: m -j
Test: Open Google Map and then walk around. The dot moves as I walk.
Change-Id: I7f413e38b57424e8ebb9d7d14d94f145a48d10f8
2018-03-21 10:36:44 +09:00
David Brazdil
62794aa449 Add hidden API uses to light greylist
These are from CTS.

Bug: 64382372
Test: make
Change-Id: I1ee4b68b75b5ed78da524b744f74d8163d0bb7a5
2018-03-20 13:54:55 +00:00
TreeHugger Robot
02a4219cb7 Merge "Light greylist additions." into pi-dev 2018-03-19 17:08:45 +00:00
Mathew Inwood
c83c3015fc Light greylist additions.
Gathered from dogfood bugreports.

Test: m

Bug: 74940461
Change-Id: I08a450f987ae0e87ab6f7306e9d89a7ca3368f70
2018-03-19 14:43:17 +00:00
Sarah Edris
f4f9c05ba9 Whitelist FullBackupDataOutput
Bug: 74424953
Test: N/A
Change-Id: I3b0386fa004352ef32cb03ba2c53a53bd0f6e1f1
2018-03-19 14:24:41 +00:00
David Brazdil
1b1a43ed9c Add more hidden APIs on the light greylist
Uses reported by the public.

Bug: 64382372
Bug: 74524607
Bug: 74271830
Bug: 74498446
Bug: 74272004
Bug: 74322289
Bug: 74278847
Bug: 74175716
Bug: 74131602
Bug: 74357020
Bug: 74265544
Bug: 74130810
Bug: 74537180
Bug: 74496079
Bug: 74600951
Test: make
Change-Id: I884e76101bdd3d6b08a690810a5b4f5e09306980
2018-03-19 10:53:15 +00:00
David Brazdil
873d1d30d5 Add uses of hidden APIs from vendor apps
These will move into the dark greylist once we remove the UI toast.
Merge them with light greylist for now.

Bug: 64382372
Bug: 74589747
Bug: 74588266
Bug: 74586173
Bug: 74586969
Test: make
Change-Id: I8c1d3b67b763e8b14a66874705ba7165cf421e72
Merged-In: I5d0ec308a0187d67df6d9a4f0778c9285dc1e2af
2018-03-16 10:23:09 +00:00
David Brazdil
0a74062d57 Add uses on marlin to hidden API light greylist
Bug: 64382372
Test: make
Change-Id: I5640f1c377a8ae174696a4d95d4937e4813f680c
(cherry picked from commit fc1c87285d)
2018-03-15 18:12:04 +00:00
TreeHugger Robot
cd0a1d1c8d Merge "Add new hidden API." into pi-dev 2018-03-15 14:52:26 +00:00
David Brazdil
d06f1a748e Merge "Greylist DevicePolicyManager#setDefaultSmsApplication" into pi-dev 2018-03-15 13:06:15 +00:00
Nicolas Geoffray
fb5daf2239 Add new hidden API.
bug: 74938974
Test: m
Change-Id: Idc2f9c9f707ef813c792764334ec124583e4ca33
2018-03-15 12:49:11 +00:00
TreeHugger Robot
e1fde42407 Merge "Whitelist UsbPortStatus and UsbRequest members" into pi-dev 2018-03-15 12:41:17 +00:00
Artem Iglikov
422c43e9bd Whitelist UsbPortStatus and UsbRequest members
Bug: 74424953
Test: N/A
Change-Id: Idf0c71c16bb7d3747e00b357a88e03a27c10e9d6
2018-03-15 10:47:26 +00:00
Nicolas Geoffray
3a70deeb57 Add new APIs.
bug: 64382372
Test: m
Change-Id: I6be84f5d5062737dcdd51c60be5196ac2a2a5c4b
2018-03-15 08:59:22 +00:00
Christine Franks
f6589b3049 Greylist DevicePolicyManager#setDefaultSmsApplication
Bug: 73788187
Test: make -j100
Change-Id: Ic8f68c8af773625f11674810c52c6b05d746728b
2018-03-14 18:00:04 +00:00
Nicolas Geoffray
1de1b624b4 Add new set of APIs to light grey.
bug:64382372
Test: m
Change-Id: I2ba92e8a7c04dca9c77f8ce58c5b9e85726c52d8
(cherry picked from commit ba0be3aaed)
2018-03-14 13:09:29 +00:00
David Brazdil
76f8bfa43b Add more uses of hidden APIs into light greylist
Uses from tests and common apps.

Bug: 64382372
Bug: 73094390
Bug: 74575101
Bug: 74525273
Bug: 74340334
Test: make
Change-Id: I51ab73184b34b0240afccfebcb166687d14b94ae
2018-03-14 10:03:19 +00:00
David Brazdil
a045f53d4f Add more APIs on hidden API light greylist
Seen in use by apps.

Bug: 71501570
Test: make
Change-Id: Ia639444acb36d2124d6c9c5fed32827d6c9edcae
2018-03-12 19:33:02 +00:00
Artem Iglikov
aad361480b Merge "Whitelist UsbManager and UsbPortStatus apis" into pi-dev 2018-03-12 16:28:46 +00:00
Artem Iglikov
a2689a9a11 Whitelist UsbManager and UsbPortStatus apis
Bug: 74424953
Test: N/A
Change-Id: I8e96e3c81067a65430c58ab3f7fa2013a52d2be5
2018-03-12 13:29:26 +00:00
David Brazdil
0f41a7cf82 Add hidden API used by CTS to greylist
Hidden API uses detected during a run of CTS.

Bug: 64382372
Test: make
Test: run CTS, no 'dark greylist' uses
Change-Id: I7e1d4ddc731d35e427e2781f0a867db68c5f45ec
2018-03-12 10:15:46 +00:00
David Brazdil
e9c2ea158c Merge "Add more common hidden API uses into light greylist" into pi-dev 2018-03-10 11:52:12 +00:00
David Brazdil
7f4d7fe2e6 Add more common hidden API uses into light greylist
Used by common apps.

Bug: 64382372
Bug: 74433113
Test: make
Change-Id: I1011b287a3e796847d005dccab17af3b6dd7b4f5
2018-03-09 17:45:26 +00:00
David Brazdil
ed66844c36 Add known uses to hidden API light greylist
API uses from common apps.

Bug: 64382372
Bug: 74422232
Bug: 74340334
Bug: 74412301
Bug: 74392708
Bug: 74365557
Bug: 74386409
Bug: 73208915
Bug: 74323829
Test: make
Change-Id: I50b7be7d082a38359244e779bd885ec26164017b
2018-03-09 13:39:29 +00:00
David Brazdil
68e1c1dcf4 Whitelist all @SystemApi and @TestApi for hidden API
We used to greylist @SystemApi and @TestApi individually, but we should
allow all of them to be used. Run Doclava in a separate pass to generate
a list of private APIs, assuming that @SystemApi and @TestApi override
the @hide annotation.

Bug: 64382372
Bug: 74346885
Test: check generated files
Change-Id: Ie3726a294a4fdeb03fc8888878b013c9ad5bd04b
2018-03-08 14:54:56 +00:00
Mathew Inwood
f37f02460e Some more members for the light greylist.
Test: N/A

Bug: 74323509
Change-Id: I142b7f750470aa0cc49ff5f17866516014d615e6
2018-03-07 18:58:26 +00:00
TreeHugger Robot
99c5b70646 Merge "Add more APIs into hidden API light greylist" into pi-dev 2018-03-06 20:12:24 +00:00
Andrew Grieve
0fec93682e Expose Process.isIsolated()
Rather than have a process attempt to perform IO / IPC and check if it
fails, it makes much more sense to expose this getter.

My specific motivation for exposing this information more directly is to
be able to perform process-specific initialization logic in
Application.attachBaseContext():

https://cs.chromium.org/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java?rcl=ac2e180a1265f88dd4030bb35d69f5d0b2dc488d&l=54

Bug: 73343822
Test: Same code that's used in Chrome via reflection.
Change-Id: I1505962679da36ac42401230b204bff7b3376b73
2018-03-06 17:17:43 +00:00
David Brazdil
779787b727 Add more APIs into hidden API light greylist
Uses from dynamic analysis of ~1200 apps.

Bug: 64382372
Test: make
Change-Id: I1f508d37338f2c0825e8e9ae6fa9a98e3c2c4e52
2018-03-06 16:31:45 +00:00
TreeHugger Robot
e84c506fc3 Merge "Add new APIs to hidden API light greylist" into pi-dev 2018-03-06 15:42:52 +00:00