961 Commits

Author SHA1 Message Date
David Brazdil
d3e4a4aead Merge changes from topic "hiddenapi-dark-grey" am: 3d93d8f323 am: 5c776dea7e
am: fa5ad5cb9b

Change-Id: I22668080195cc78f3ee2576f6094eeb524781c96
2018-09-07 03:43:20 -07:00
David Brazdil
a5249f9b0d Check in P dark greylist, use it for hidden API list generation am: 3cc74c71ef am: 38d2793a7d
am: a77f53d1e3

Change-Id: I42afed836a9e325cdf10585eb62aaf9cab35c5d2
2018-09-07 03:32:05 -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
Charles Chen
3b37d4d803 Merge "Fix WM input limitations on secondary displays (3/4)" 2018-09-06 11:26:44 +00: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
c5ef1e2589 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: I51bf94b736cae57780708a70947511c409a2dfb6
2018-08-31 12:20:15 +01:00
Philip P. Moltmann
4e615e6986 Factor some RestrictedLockUtils out of SettingLib
Also make the new lib only use system-apis.

This allows mainline module to use the new
RestrictedLockUtilsSettingLib.

Unfortunately the whole RestrictedLockUtils would have caused to much
new system-api. Hence it was split into RestrictedLockUtils and
RestrictedLockUtilsInternal. This caused a lot of trivial code changes.

Bug: 110953302
Test: Built
Change-Id: I693b3bf56f3be71f0790776e3aad5694717786ef
2018-08-30 11:59:29 -07:00
Mathew Inwood
98e9ad1645 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: I67c8b71ea535ebffb10bf577948bd4ccb8ca069d
2018-08-30 13:38:42 +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
Arthur Hung
39134b21d8 Fix WM input limitations on secondary displays (3/4)
One DisplayContent contains one InputMonitor now.
- Change setInputWindow of InputManagerService updated by displayId,
  so Window Handles in InputDispather can be updated by each DisplayContent.
- Only exist one focus in current state, reset it if in removed DisplayContent,
  will be updated by default display or focused display.
- Add displayId parameter for createInputConsumer and destroyInputConsumer,
  so InputConsumer from PIP, RecentApp and Wallpaper can be supported in multi-display.

Bug: 111363643
Test: atest WindowManagerSmokeTest ActivityManagerMultiDisplayTests
Test: atest com.android.server.wm.DisplayContentTests
Test: atest libinput_tests inputflinger_tests
Change-Id: I999c355be1789af5759f00206475d004e10116e3
2018-08-30 09:59:09 +00:00
Mathew Inwood
fa4ccace61 Merge "Add @UnsupportedAppUsage annotations" 2018-08-30 07:55:39 +00:00
Vishnu Nair
aeab1b8251 SF: Remove setFinalCrop impl 1/2
setFinalCrop functionality is reimplemented by creating a new bounds layer
and applying a crop on this layer. see ag/4625718

Test: go/wm-smoke

Change-Id: I3ffb6dc2e2afd5170f6c6dee9e928ed0600656b1
2018-08-29 08:37:38 -07:00
Mathew Inwood
c8344a1963 Merge "Add @UnsupportedAppUsage annotations" 2018-08-29 12:15:18 +00:00
TreeHugger Robot
1201c5b265 Merge "Remove IInputMethodManager.getEnabledInputMethodList() from greylist" 2018-08-29 08:46:34 +00:00
Jeff Sharkey
3d80a7d36a Merge "Clean/destroy app shared storage via installd." 2018-08-28 19:37:19 +00:00
Yohei Yukawa
40b5923302 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
Change-Id: Idf9fa866f73dbd151bb67f60dbd57041d9055a23
2018-08-28 12:05:41 -07:00
Nandana Dutt
5285dcb1ba Greylist CAPTURE_{SECURE_}VIDEO_OUTPUT permissions
These permissions are now signature only and have been
removed from the SDK. Add to light greylist.

BUG: 111131054
Test: make & verified generated file
out/target/common/obj/PACKAGING/hiddenapi-light-greylist.txt
contains the permissions.

Change-Id: I9ba89b42906a3e352184c9df9132cf1236271592
2018-08-28 16:06:03 +01:00
Nandana Dutt
0f7efd09bd Merge "Restrict READ_FRAME_BUFFER to signature only" 2018-08-28 14:54:28 +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
Mathew Inwood
d29a6353f1 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: I0a72458d66b6af515e1da68d449d9b166680c258
2018-08-28 14:13:51 +01:00
Jeff Sharkey
4e7a765855 Clean/destroy app shared storage via installd.
In P we moved destroying per-user shared storage into installd,
where it can iterate quickly over large sets of files.  This change
now moves cleaning/destroying of per-app shared storage data down into
installd, letting us greatly simplify the logic in PMS to no longer
require spinning up DefaultContainerService.  This also fixes an
obscure bug where DCS (which always runs as USER_SYSTEM) wasn't able
to clear shared storage for secondary users.

This also gives us the ability to target specific storage devices
by UUID, such as when the user has migrated their primary shared
storage to an adopted device.

We no longer distinguish between keeping or deleting OBB files
during various operations, since upcoming changes in the Q release
will mean OBB files are no longer shared between users, and they'll
now live inside a sandbox that will be fully cleared when the user
clears data.  (Going forward, apps should be using splits instead
of OBBs, so they're effectively deprecated.)

Uses newer "const" feature of AIDL to ensure constant values remain
consistent between native and Java code.

Bug: 111854851, 111838160
Test: atest android.appsecurity.cts.StorageHostTest#testCache
Change-Id: Ib90be155718a768da76110fbfcf010a471b37378
2018-08-27 20:42:47 +00:00
Yohei Yukawa
01c791539e Remove IInputMethodManager.{add,remove}Client() from greylist
Apps can never directly IInputMethodManager.{add,remove}Client() in a
meaningful way, because

 1. These Binder methods are implemented in InputMethodManagerService
    (IMMS) but unnecessarily exposed to application processes.  The
    only valid caller of these methods is WindowManagerService.
    Actually with my recent change [1], any incoming call of these
    methods from the application processes will always be rejected.

 2. The purpose of these callbacks is maintaining a per-process
    callback (IInputMethodClient) from each application process to
    IMMS.  Since WindowManagerService is responsible for dealing with
    this step, there is no reason for app developers to call these
    accidentally exposed hidden Binder methods.  If there was an
    application that was trying to call these methods via reflection,
    it must be trying to bypass caller verification of some other IME
    APIs by registering a fake IInputMethodClient callback.

 3. However, even if an application succeeded to register a fake
    IInputMethodClient to IMMS, IMMS still has additional verification
    IWindowManager.inputMethodClientHasFocus(IInputMethodClient),
    which cannot be spoofed with such a fake connection.

Therefore having these entries hiddenapi-light-greylist.txt must be
either a mistake or no-op.

 [1]: Ib9b588d11bd4017e431e3d494863987dd67384fc
      6efd55e7b592eb8b04554d6060754d45fe6b80bc

Bug: 112670859
Bug: 112722706
Test: compile
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Change-Id: I62aa27ceb97446059ce80b00a3369c81b1c70e23
2018-08-24 10:28:33 -07:00
TreeHugger Robot
54cf4aea9f Merge "Remove IInputMethod.attachToken(IBinder) from greylist" 2018-08-24 16:51:39 +00:00
TreeHugger Robot
1783d015c7 Merge "Remove camera light-grey list entries" 2018-08-24 16:36:21 +00:00
Yohei Yukawa
12ec075134 Remove IInputMethod.attachToken(IBinder) from greylist
Apps can never directly use IInputMethod.attachToken(IBinder) in a
meaningful way, because

 1. The real binder object is always instantiated in the IME process
    and its proxies will never be exposed to any other process except
    for the system server process.  Even if there was actually a real
    use of this method (via reflection), then the caller must have
    been the same IME process.

 2. However, InputMethodImpl.attachToken(IBinder) does nothing if it
    gets called twice for security reasons, because the fact it can be
    called only once is guaranteed in the protocol between IME and
    InputMethodManagerService. This means that even if an IME somehow
    called this Binder method via reflection, it must be either no-op
    (if it's a secondary call) or make itself useless (if it's the
    first call).

Therefore having this entry hiddenapi-light-greylist.txt must be
either a mistake or no-op.

Bug: 112722706
Test: compile
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Change-Id: Ie5e5b3a5f379c42cf2d5f681b556c60aeccee9f9
2018-08-24 09:36:15 -07:00
Neil Fuller
d6da4a1421 Merge "Track rename of org.kxml to com.android.org.kxml 2" am: 69a13aded0 am: e363bdc88a
am: faefa61c22

Change-Id: I099773e4ac5fb7c8bb8dfda44d936ae0a4c43d25
2018-08-24 05:51:23 -07:00
Neil Fuller
69a13aded0 Merge "Track rename of org.kxml to com.android.org.kxml 2" 2018-08-24 11:53:05 +00:00
Yin-Chia Yeh
b4045c0ba7 Remove camera light-grey list entries
Test: CTS/ITS/Camera app smoke test
Bug: 76163369
Change-Id: I540b1a0f934dfd0543d650d5040bc5c530d19086
2018-08-23 11:29:22 -07: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
Nandana Dutt
caa4203ee9 Restrict READ_FRAME_BUFFER to signature only
We want to restrict screen reading permissions
to signature only so only the platform and
apps signed with the platform key can access
the device screen.

Add @removed and @hide to the permission so that it's
not in the docs any more without breaking any existing
apps referring to the permissions.

Bug: 111131054
Test: manually tested screenshot & bugreport
Test: atest PermissionsHostTest
Test: make & verified generated file
out/target/common/obj/PACKAGING/hiddenapi-light-greylist.txt
contains READ_FRAME_BUFFER

Change-Id: I8294aff965e889335a495ab792f893957d39ec5d

Change-Id: I8294aff965e889335a495ab792f893957d39ec5d
2018-08-22 11:39:11 +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
1ca7b2f691 Merge "Remove @UnsupportedAppUsage annotations from generated code." 2018-08-21 17:58:02 +00:00
Mathew Inwood
d5a4b0e620 Merge "Add @UnsupportedAppUsage annotations" 2018-08-21 16:54:23 +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
d17eada4e1 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

Change-Id: Ib245a2f1457ced34d5b1a3248161fa4a211ba5e9
2018-08-21 17:27:10 +01:00
Mathew Inwood
71c65991cb 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: Ia06d9a50c456201dc7ecb960ff1a1563617777a5
2018-08-21 16:49:18 +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
Mathew Inwood
978c6e2190 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: Ic61019b1df85448a158fc2ba55c326353222c6b9
2018-08-21 15:58:55 +01:00
Mathew Inwood
8a8f138d1d Merge "Add @UnsupportedAppUsage annotations" 2018-08-21 13:40:29 +00:00
Neil Fuller
12a0f5ff79 Track rename of org.kxml to com.android.org.kxml 2
Update boot-image-profile.txt to track libcore class renames.

The class renames may have caused a regression in some
performance metrics, though overall boot time was unaffected.

There's no reason not to update the boot-image-profile.txt.

Metrics affected:
SystemServerTiming_StartUsageService_avg
SystemServerTiming_StartJobScheduler_avg
SystemServerTiming_StartJobScheduler_avg

Test: build only
Bug: 111055375
Bug: 112595254
Change-Id: Ia421cb5dfd46cd0661fe51d481e8fca6aa35b60f
2018-08-21 11:00:27 +01:00
Neil Fuller
93def8053d Merge "Track rename of org.kxml to com.android.org.kxml" am: dd64992fcd am: 66611eb170
am: 6d50ce0db7

Change-Id: Iae78151604927bb159c46ebe55f01986d6c5ab39
2018-08-20 11:52:26 -07:00
Neil Fuller
66611eb170 Merge "Track rename of org.kxml to com.android.org.kxml"
am: dd64992fcd

Change-Id: I8e6be0e9d55c07c4ed0283747457313661edbb64
2018-08-20 11:28:00 -07:00
Mathew Inwood
a24340805c Merge "Add @UnsupportedAppUsage annotations"
am: e84b5dc01f

Change-Id: I33432f9976ef4e41a35a3f6e78b274dc347d0ecc
2018-08-20 11:23:55 -07:00
Mathew Inwood
a4be791434 Merge "Add @UnsupportedAppUsage annotations" 2018-08-20 14:42:25 +00:00
Mathew Inwood
e5ad598d11 Add @UnsupportedAppUsage annotations
For packages:
  android.view.textservice
  android.view.textclassifier.logging
  android.view.textclassifier
  android.view.inputmethod
  android.view.autofill
  android.view.accessibility
  android.view

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: Ie4663ebd4640b2893e575e599582d2c9530da313
Merged-In: I4147b038ed7adf0311ee9918b44766f82a057eaf
2018-08-20 14:52:19 +01:00
Mathew Inwood
c185f08c4a Add @UnsupportedAppUsage annotations
For packages:
  com.android.internal
  com.android.internal.annotations
  com.android.internal.app
  com.android.internal.app.procstats
  com.android.internal.appwidget
  com.android.internal.backup
  com.android.internal.car
  com.android.internal.content
  com.android.internal.inputmethod
  com.android.internal.location
  com.android.internal.logging
  com.android.internal.midi
  com.android.internal.net
  com.android.internal.os
  com.android.internal.policy
  com.android.internal.statusbar
  com.android.internal.telecom
  com.android.internal.telephony.euicc
  com.android.internal.textservice
  com.android.internal.util
  com.android.internal.view
  com.android.internal.view.animation
  com.android.internal.view.menu
  com.android.internal.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: I1c2954c5a579f073017c1794fd2d200e0a471602
Merged-In: Ib31b52e6957869e5744dadbb35cb4584ef17187f
2018-08-20 14:28:54 +01:00
Mathew Inwood
af972c802d Add @UnsupportedAppUsage annotations
For packages:
  com.android.internal
  com.android.internal.annotations
  com.android.internal.app
  com.android.internal.app.procstats
  com.android.internal.appwidget
  com.android.internal.backup
  com.android.internal.car
  com.android.internal.content
  com.android.internal.inputmethod
  com.android.internal.location
  com.android.internal.logging
  com.android.internal.midi
  com.android.internal.net
  com.android.internal.os
  com.android.internal.policy
  com.android.internal.statusbar
  com.android.internal.telecom
  com.android.internal.telephony.euicc
  com.android.internal.textservice
  com.android.internal.util
  com.android.internal.view
  com.android.internal.view.animation
  com.android.internal.view.menu
  com.android.internal.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: Ib31b52e6957869e5744dadbb35cb4584ef17187f
2018-08-20 14:13:20 +01:00