Commit Graph

887 Commits

Author SHA1 Message Date
Sundong Ahn
1d0038a843 Merge "Build java.obex with java_sdk_library" am: ad769993a9
am: efb4ce221e

Change-Id: I31f65699193f026c7ed64a182b360791eee35608
2018-05-29 19:54:35 -07:00
Sundong Ahn
1c53cc161d Build java.obex with java_sdk_library
javax.obex is built with java_sdk_library and api files are added by
running "make update-api".
Remove java.obex is from platform.xml, since it will be generated
automatically by soong when the library is built with java_sdk_library.

Bug:77577799
Test: make -j
      make checkapi

Change-Id: Ib94955e62582ffbdfc7eb88cd0e494c61757c7aa
2018-05-30 00:19:01 +00:00
Jiyong Park
c73b9e9e17 Shared lib def for org.apache.http.legacy comes from java_sdk_library
org.apache.http.legacy is now built using java_sdk_library. Since the
share lib defintion file for the lib is automatically created and
installed, we don't need to have duplicated entry for the lib.

Bug: 77577799
Test: m -j
Test: adb shell cmd package list libraries shows an entry for
org.apache.http.legacy

Merged-In: I06b356c2ba08abc6c1cece81daf7c1773ed93ed0
Change-Id: I06b356c2ba08abc6c1cece81daf7c1773ed93ed0
(cherry picked from commit 49c0a86955)
2018-05-22 20:43:51 +09:00
Jiyong Park
0201dc3911 Shared lib def for org.apache.http.legacy comes from java_sdk_library
org.apache.http.legacy is now built using java_sdk_library. Since the
share lib defintion file for the lib is automatically created and
installed, we don't need to have duplicated entry for the lib.

Bug: 77577799
Test: m -j
Test: adb shell cmd package list libraries shows an entry for
org.apache.http.legacy

Merged-In: I06b356c2ba08abc6c1cece81daf7c1773ed93ed0
Change-Id: I06b356c2ba08abc6c1cece81daf7c1773ed93ed0
(cherry picked from commit 49c0a86955)
2018-05-22 20:16:14 +09:00
TreeHugger Robot
796fa51c8a Merge "Remap PS key to BUTTON_MODE on DS4 joystick" into pi-dev 2018-05-18 20:44:13 +00:00
Siarhei Vishniakou
867968530e Remap PS key to BUTTON_MODE on DS4 joystick
Currently, the PS key on the DS4 joystick maps to HOME, which means that
this key will not be delivered to apps. However, such apps as Remote
Play require access to this key for proper operation.

Map it to BUTTON_MODE here to allow the apps to handle it. Also, map the
touchpad click to BUTTON_1, which is a generic gamepad button.

The mapping to HOME is not specified in Android. By the Linux
spec, it is more correct to generate BUTTON_MODE for this button (even
though it is drawn slighly above the two sticks in the spec, and it is
physically located more in-line or slightly below these).
The historical reason for this mapping was the fact that
the touchpad generated a click, which meant that touchpad click was more
aligned with the Linux spec. In addition, on some other controllers,
this button actually has a "house" drawn on it, which
would make it consistent with "HOME", and it is currently mapped to
HOME. On this (and several others) joystick, however, there is no such
drawing, and BUTTON_MODE is appropriate.

In Q, this will be addressed by changing the branded buttons on other
controllers to also generate "BUTTON_MODE", and then changing the
Generic fallback mapping for BUTTON_MODE to HOME.

Bug: 79881694
Test: connected DS4 joystick. Made a test app that overrides
dispatchKeyEvent and dumps out every event to the logcat. Then pressed
every button to ensure that the keys are generated as expected. In the
long run, this will be tested in the CTS test
input.cts.tests.AsusGamepadTestCase.
Change-Id: I33e922a2c52582f44d65f20024d7dca1f9d05a5e
2018-05-17 09:39:04 -07:00
Kristian Monsen
a3c544195e Remove most sounds
TV system image has a lot of unused alarms and notifications that can
be removed.

Bug: 74444644
Test: Flash device and still works, used a test app to play default sounds
Change-Id: Ifd70aed418e328cee653948ee0584293aaa7702
2018-05-16 14:07:14 +02:00
Jeff Sharkey
936c0868f8 Merge "Protect usage data with OP_GET_USAGE_STATS." into pi-dev 2018-04-17 00:04:53 +00:00
Jeff Sharkey
6b64925737 Protect usage data with OP_GET_USAGE_STATS.
APIs that return package usage data (such as the new StatsManager)
must ensure that callers hold both the PACKAGE_USAGE_STATS permission
and the OP_GET_USAGE_STATS app-op.

Add noteOp() method that can be called from native code.

Also add missing security checks on command interface.

Bug: 77662908, 78121728
Test: builds, boots
Change-Id: Ie0d51e4baaacd9d7d36ba0c587ec91a870b9df17
2018-04-16 12:44:32 -06:00
Tyler Gunn
8a9ad362cd Add permission whitelist for EmergencyInfo app.
This is the "Emergency Info" screen available from the lock screen.
It requires the CALL_PRIVILEGED permission in order for it to be able to
place emergency calls.  This can occur if a user adds an emergency number
to their emergency contacts.

Test: make checkbuild
Bug: 76086838
Merged-In: I2cfc893f8e636790a837e0f71f9f42ea723c8e31
Change-Id: I2cfc893f8e636790a837e0f71f9f42ea723c8e31
(cherry picked from commit cdc555f489)
2018-04-16 15:12:46 +00:00
Tyler Gunn
f1e7cf499b Add permission whitelist for EmergencyInfo app.
This is the "Emergency Info" screen available from the lock screen.
It requires the CALL_PRIVILEGED permission in order for it to be able to
place emergency calls.  This can occur if a user adds an emergency number
to their emergency contacts.

Test: make checkbuild
Bug: 76086838
Change-Id: I76e8318c5c05bbbbdf02d2c6951f742c3bd67ea6
2018-04-11 11:05:32 -07:00
Siyamed Sinir
239d9d86d9 Merge "Change fonts.xml to add 34 new fonts in OTF." into pi-dev 2018-04-11 16:04:52 +00:00
Mathew Inwood
9d89543d48 Exempt platform-cert signed apps from hidden API checks.
This means that APKs signed with the platform cert are allowed to use
hidden APIs, even if they are not on the package whitelist, and if they are
not in the system image. It will also allow a number of packages to be
removed from the package whitelist.

Also remove all platform cert signed apps from the package whitelist, as
there is no longer any need for them to be in there.

Bug: 64382372
Test: device boots
Change-Id: Id805419918de51f946c1f592581bab36ae79de83
2018-04-04 17:49:48 +01:00
Nicolas Geoffray
117367a4ec Add com.android.development to the package whitelist.
bug: 77477866
Test: m
Change-Id: I9ac27dd3e7ee0d764d61ab9a8d2ae1065ce151e5
2018-04-03 16:51:56 +01:00
Marek Jeziorek
de02786532 Change fonts.xml to add 34 new fonts in OTF.
See the companion CL ( If78de54572a48551da0ab2fd5027ca8389d21988 )
for more details .

Bug: 74406309

Test: m fontchain_linter
Test: See If78de54572a48551da0ab2fd5027ca8389d21988 .

Change-Id: Ib3c827a32028af8fa6fe84203c7983ab45f65853
2018-04-02 16:29:40 +00:00
TreeHugger Robot
87c24a655b Merge "Whitelisting Launcher3 for hidden APIs" into pi-dev 2018-03-27 16:06:54 +00:00
TreeHugger Robot
e8c16570d4 Merge "Suppress key validation logs" into pi-dev 2018-03-27 12:18:22 +00:00
Sunny Goyal
b8e2fa707e Whitelisting Launcher3 for hidden APIs
Bug: 76169471
Test: N/A
Change-Id: I72d4ab22acec3ea5095d6f8fb9fe6ff11df097a8
2018-03-26 17:31:19 -07:00
Siarhei Vishniakou
ae911cb8ae Suppress key validation logs
If the validation of keylayouts / keycharmaps / keyconfigs succeeds, do
not log anything to reduce logspam. The "-q" argument was misplaced in
the original CL.

Bug: 35672363
Test: touch frameworks/base/data/keyboards/Vendor_045e_Product_028e.kl && m
Also, change the behaviour in tools/validatekeymaps/Main.cpp to always
ignore "-q", see that the logs come back.

Change-Id: I3cd2ef161942905c2d8ffce8fc93dd345868066d
2018-03-26 16:59:47 -07:00
Mathew Inwood
2e9ba053c1 Amend package whitelist.
Now that Antons cleanup of all packages is complete, we can generate this
whitelist from those packages that specify

  LOCAL_PRIVATE_PLATFORM_APIS := true

This is the resulting list of packages. This change also includes fixes to
the method; previously, packges that didn't specify any certificate may
have been exluded.

Test: Verify that device boots.
This is a cherry-pick of change I1f578322135274b80708d4bb7664f7732ac33cc7
from AOSP.

Bug: 64382372
Change-Id: Iada043cb85f9b3281893ed9a2828771b8f1ef045
2018-03-21 09:30:12 +00:00
Winson Chung
58fb749d42 Allow the shell to start task overlay activities.
- Fix issue with testFinishPipActivityWithTaskOverlay failing due to
  new permission check in the system

Bug: 71716434
Test: atest CtsActivityManagerDeviceTestCases:ActivityManagerPinnedStackTests#testFinishPipActivityWithTaskOverlay

Change-Id: Ifbcd6c182d928f5aa5372d2db9fa71a142dc8474
2018-03-19 18:48:15 -07:00
Mathew Inwood
25be36376b Amend package whitelist.
Now that Antons cleanup of all packages is complete, we can generate this
whitelist from those packages that specify

  LOCAL_PRIVATE_PLATFORM_APIS := true

This is the resulting list of packages. This change also includes fixes to
the method; previously, packges that didn't specify any certificate may
have been exluded.

Test: Verify that device boots.
Change-Id: I1f578322135274b80708d4bb7664f7732ac33cc7
2018-03-15 14:06:29 +00:00
David Brazdil
d32fc7d20a Add PrintRecommendationService to hidden API package whitelist
This app builds directly against the platform. Add it to the whitelist.

Bug: 64382372
Test: make
Test: device boots
Change-Id: I16574374d2c233221cd1305f031f78aca1947f05
(cherry picked from commit 06c8a439f7)
2018-03-14 11:27:52 +00:00
David Brazdil
06c8a439f7 Add PrintRecommendationService to hidden API package whitelist
This app builds directly against the platform. Add it to the whitelist.

Bug: 64382372
Test: make
Test: device boots
Change-Id: I16574374d2c233221cd1305f031f78aca1947f05
2018-03-13 16:14:03 +00:00
David Brazdil
2ed5548a61 Add PrintSpooler to system app whitelist
This app builds directly against the platform. Add it to the whitelist.

Bug: 64382372
Test: make
Test: device boots
Change-Id: Ia77df2db78adf62a525f08549d71360924f1a3f6
Merged-In: I4c308d93d66391da2d3691eb45e5d7b1c1fdd582
(cherry picked from commit f7e625c19c)
2018-03-12 13:19:47 +00:00
David Brazdil
f7e625c19c Add PrintSpooler to system app whitelist
This app builds directly against the platform. Add it to the whitelist.

Bug: 64382372
Test: make
Test: device boots
Change-Id: I4c308d93d66391da2d3691eb45e5d7b1c1fdd582
2018-03-09 13:45:37 +00:00
Jason Monk
23b73c45fb Merge "Remove BIND_SLICE" into pi-dev 2018-03-07 18:01:26 +00:00
Jason Monk
0f73c65958 Remove BIND_SLICE
Its not being used anymore and shouldn't be API.

Test: update-api
Fixes: 74240589
Change-Id: I27d8e3fa5e0570ff268e6160c683d7190c96ef9b
2018-03-06 18:39:15 +00:00
mswest46
3f4c99d3eb Add set-time and set-timezone shell cmds to alarm service
These commands allow a user to set the time and the timezone
from the shell. The shell now has signature|privileged
SET_TIME and SET_TIME_ZONE permissions.

Bug: 67751701
Test: manual - correctly sets the time and timezone from unrooted adb.
Change-Id: I1d2820fd7dadd8b1f3900c0592eb28210370ce88
2018-03-05 19:50:12 +00:00
Mathew Inwood
93d7d0e56e Merge "Populate hiddenapi whitelist." am: 2519de11c3 am: 37d670a083
am: ca7e42317f

Change-Id: I9549a42daaf469d286b92b249881838b3a50fab6
2018-02-22 19:26:19 +00:00
Mathew Inwood
2f09c3bc5b Populate hiddenapi whitelist.
This list of packages is derived from all packages in the tree that do not
specify LOCAL_SDK_VERSION in their Android.mk. It was done by:

1.  Modifying biuld/core/package_internal.mk to output a warning for all
    packages that do not specify LOCAL_SDK_VERSION, including some
    metadata about the target.

2.  Parsing the output fom the build, then filtering out those that specify
    a test certificate, or with LOCAL_MODULE_TAGS := tests, that depend
    on android.test.runner or whose name includes "Test"

3.  Look up the java package name of each & build the list from these.

Test: N/A, this change is a no-op while all system apps are excluded
from the checks.

BUG: 73244707

Change-Id: Ie3dcb1b4b83c32e93609bc58dc7a1cd513eeea64
2018-02-22 11:05:15 +00:00
Mathew Inwood
787c193ee5 Package whitelist for hiddenapi checks.
Some packages in the system image are not built against the SDK, so
enforcing hiddenapi checks for these will break them. Add a whitelist
for such packages.

For now, just add the contacts provider to the whitelist. The list will be
further populated later.

Test: Added test app package name to whitelist to verify.

Bug: 73244707

Merged-In: I94746b7f12dd9371d5068bb235eb853f63ee4d97
Change-Id: I1cbbd220c61b1b4b767c301f97096607ee902a7b
2018-02-22 11:05:14 +00:00
Hall Liu
017afff112 Merge "Check for location access on TelephonyRegistry" am: 31230bb193 am: f581580fdb
am: 9b31dd86da

Change-Id: Icd2feab82a9350fa2b6539617863ad91a44e5208
2018-02-22 00:43:12 +00:00
Hall Liu
31230bb193 Merge "Check for location access on TelephonyRegistry" 2018-02-21 22:42:08 +00:00
Mathew Inwood
4693a75eda Package whitelist for hiddenapi checks.
Some packages in the system image are not built against the SDK, so
enforcing hiddenapi checks for these will break them. Add a whitelist
for such packages.

For now, just add the contacts provider to the whitelist. The list will be
further populated later.

Test: Added test app package name to whitelist to verify.

Bug: 73244707
Change-Id: I94746b7f12dd9371d5068bb235eb853f63ee4d97
2018-02-21 12:50:45 +00:00
Svetoslav Ganov
2d20fb47f4 APIs to watch active op changes
System singed components can watch for starting/finishing of
long running app ops. Also protected the APIs to watch op mode
changes with a singature permission for the cross-uid use case.

Test: atest com.android.server.appops.AppOpsActiveWatcherTest

bug:64085448

Change-Id: Id7fe79ce1de4c5690b4f52786424ec5a5d9eb0fa
2018-02-16 18:29:04 -08:00
Holly Jiuyu Sun
052fbabc35 Public EuiccManager APIs.
Public EuiccManager and other related necessary files.
Mark EuiccCardManager and other related necessary files as @SystemApi.
Solve lint errors and warnings.

Bug: 35851809
Test: test on phone
Change-Id: I8a2c78804cae56b679d311d613edca5be4bc2522
Merged-In: I68853e134e1e31fa9b91a83af6c491a2a8cca971
2018-02-13 12:53:45 -08:00
Holly Jiuyu Sun
4f73b9c09a Public EuiccManager APIs.
Public EuiccManager and other related necessary files.
Mark EuiccCardManager and other related necessary files as @SystemApi.
Solve lint errors and warnings.

Bug: 35851809
Test: test on phone
Change-Id: I68853e134e1e31fa9b91a83af6c491a2a8cca971
2018-02-08 11:12:30 -08:00
Emilie Roberts
1ab70f3b37 Merge "Remove ESC key fallback mapping" 2018-02-07 22:03:38 +00:00
Emilie Roberts
b29243b64d Merge "Add Ctrl-Alt-Backspace to Back mapping" 2018-02-07 22:03:38 +00:00
Hall Liu
520b975ded Merge "Revert "Check for location access on TelephonyRegistry"" am: 39393f889a am: 772d17c263
am: 07e1d78346

Change-Id: I9ab304409e6f777593e6c927bb0d76b8f82038fc
2018-02-07 03:16:29 +00:00
Hall Liu
5fb337ff85 Check for location access on TelephonyRegistry
When sending outbound callbacks on CELL_INFO and CELL_LOCATION, check to
make sure that the user has authorized us and the receiving app to get
information on their location.

Bug: 69637693
Test: manual: telephony testapp
Change-Id: Iacfc894428b11a7ec973567d7a797eedb281355f
2018-02-06 14:01:47 -08:00
Hall Liu
39393f889a Merge "Revert "Check for location access on TelephonyRegistry"" 2018-02-06 21:15:42 +00:00
Hall Liu
3d30946e8e Revert "Check for location access on TelephonyRegistry"
This reverts commit 8d584f0a91.

Reason for revert: b/72967560

Change-Id: I9ca3c4a586e740a7b7d4cc5940ca8d4e4ebf3654
2018-02-06 18:13:36 +00:00
Jeff Sharkey
b49b3f1e57 Merge "Media process should run with "write" access." 2018-02-04 00:12:22 +00:00
Jeff Sharkey
86684240eb Media process should run with "write" access.
The WRITE_MEDIA_STORAGE permission had inadvertently been giving apps
the "default" view of storage.  This had worked for a long since,
since we also gave them the "sdcard_rw" permission, but a recent
security patch broke this for secondary users.

Apps holding this permission should have been mounted "write" all
along, and relied on that view to access storage devices.  This also
means they no longer need the "sdcard_rw" GID.

Test: builds, boots, secondary user media/camera works
Bug: 72732906, 71737806, 72224817
Change-Id: I5cd687a1e128024f33b4acd93c15e75192ed1c85
2018-02-03 15:33:04 -07:00
Treehugger Robot
0276f4290f Merge "Added permission for binding data service" 2018-02-03 04:40:06 +00:00
TreeHugger Robot
59c490f29b Merge "Renamed BIND_DATA_SERVICE to BIND_TELEPHONY_DATA_SERVICE" 2018-02-03 02:01:46 +00:00
Jack Yu
568b81ac3f Renamed BIND_DATA_SERVICE to BIND_TELEPHONY_DATA_SERVICE
Also grated the permission to the phone process.

Test: Manual
Bug: 64132030
Change-Id: I1fc82a4e8038b1b05b56dcfa43c0c94955967700
2018-02-02 22:04:43 +00:00
Jack Yu
87b6963740 Added permission for binding data service
This is to make sure only the system can bind the data service.

Test: Manual
Bug: 64132030
Merged-In: Iaf4e4a604396ec37c83516f1d1f163614ef23c3d
Change-Id: Iaf4e4a604396ec37c83516f1d1f163614ef23c3d
2018-02-02 13:52:20 -08:00