Commit Graph

862 Commits

Author SHA1 Message Date
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
Hall Liu
54ab6b91a8 Merge "Check for location access on TelephonyRegistry" am: 871202da2f am: cf59665a75
am: 56e6bd2cd1

Change-Id: If9989e10138a4fe923439c919807ca745d616043
2018-02-02 08:12:32 +00:00
Tyler Gunn
e2a66df86c Merge "Add call recording tone support." am: 8d5b08c430 am: eb74233ff9
am: 29d94726be

Change-Id: I67496b63f6a7f6362faed8c6a8cbff7cd665876c
2018-02-02 08:02:44 +00:00
Jungshik Shin
e6f493c15e Add Osage and Chakma fonts to fonts.xml
Bug: 62420016, 62419886
Test: https://en.wikipedia.org/wiki/Osage_alphabet#Unicode
Test: https://en.wikipedia.org/wiki/Chakma_alphabet#Unicode
Change-Id: I056fa35be015732ea0c57ce20a200c7c8edfc1cc
2018-02-01 15:52:58 -08:00
Hall Liu
871202da2f Merge "Check for location access on TelephonyRegistry" 2018-02-01 23:05:22 +00:00
Hall Liu
8d584f0a91 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: Ib4c8c6a9765f504823016e538dd46768d1032792
2018-02-01 01:00:52 +00:00
Emilie Roberts
3abea7fe3f Add Ctrl-Alt-Backspace to Back mapping
Android devices with a physical keyboard connected may not have a
way to execute the "Back Behaviour" without using a touchscreen
or pointer. This adds a ctrl-alt-backspace mapping to the
back behaviour, similar to TalkBalk.

Use cases include Pixel C, accessibility situations where
touchscreens are not convenient or feasible, or other phones/tablets
with a hardware keyboard attached and keyboard only interaction is
desired.

Previous to http://ag/3540362, ESC provided this functionality.

Bug: 71907807
Test: Manual testing on Marlin
Change-Id: I5015a17add26824a40e5eac1bced8e9ca7b98efa
2018-01-31 18:53:58 +00:00
Emilie Roberts
16d42def25 Remove ESC key fallback mapping
The escape key has a fallback "back" behaviour. On ChromeOS
or tablets with bluetooth/attached keyboards, pressing the ESC
key can unexpectedly close applications. This removes the
fallback mapping so that ESC does nothing.

Bug: 71907807
Test: Manual testing on Marlin
Change-Id: I747f0bd743ec117e6ae47fae527600a3ab5690ba
2018-01-31 16:46:46 +00:00
Tyler Gunn
acdb686635 Add call recording tone support.
Adding carrier configuration option to specify whether the carrier requires
the incall recording tone be played.
Added phone account extra used in Telephony to communicate this to
Telecom.
Added permission pregrant for Telecom for MODIFY_AUDIO_ROUTING; this is
needed as Telecom listening to the AudioRecordingConfiguration callback
from the audio framework.  It needs the permission so that it can be
informed of the package names of recording apps.

Test: Manually enabled for local carrier and confirmed that recording
tone plays to remote party when a recording app is started on the device.
Bug: 64138141

Change-Id: I1ab521b79cbeeb4ff4dcbf83de7c17c539637bdc
2018-01-30 11:38:54 -08:00
Paul Duffin
2a9cd14900 Merge "Conditionally remove android.test.base from bootclasspath" 2018-01-30 11:20:50 +00:00
Alison Cichowlas
76f0ccb5f1 Revert "Security model for moving sharesheet to systemui"
This reverts commit 88f3d4dbe1.

Bug: 72554856
Test: repro instructions in bug
2018-01-29 16:34:33 -05:00
Paul Duffin
a3b692113c Conditionally remove android.test.base from bootclasspath
This makes the runtime handling of the android.test.base library
conditional based on a build flag REMOVE_ATB_FROM_BCP.

When REMOVE_ATB_FROM_BCP=true:
* The framework-atb-backward-compatibility is added to the
  bootclasspath instead of android.test.base.
* Any APK that targets pre-P (or has a dependency on android.test.runner)
  has android.test.base added to their library list.

Otherwise:
* The android.test.base library is added to the bootclasspath.
* Any APK that explicitly specifies that it depends on the
  android.test.base library has the library removed as the classes
  are available at runtime.

Added android.test.base to platform libraries so it can be used when
not on the bootclasspath.

Tested both cases by building with or without the build flag, flashing,
setting up, adding an account, adding a trusted place.

Also, tested that all combinations of REMOVE_ATB_FROM_BCP and
REMOVE_OAHL_FROM_BCP work.

adb install -r -g out/target/product/marlin/testcases/FrameworksCoreTests/FrameworksCoreTests.apk
adb shell am instrument -w -e class android.content.pm.PackageBackwardCompatibilityTest,android.content.pm.AndroidTestRunnerSplitUpdaterTest,android.content.pm.OrgApacheHttpLegacyUpdaterTest,android.content.pm.RemoveUnnecessaryOrgApacheHttpLegacyLibraryTest,android.content.pm.RemoveUnnecessaryAndroidTestBaseLibraryTest,android.content.pm.AndroidTestBaseUpdaterTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

Bug: 30188076
Test: as above
Change-Id: I4b9d8a5bed6787cd334c2b13a458bbc0efc3f3b6
2018-01-29 11:48:44 +00:00
Selim Cinek
2627d72e61 Launching Notification animations inline
Using the new control mechanism introduced in order
to coordinate notification launches and smoothly
transform the notification into the launching window.

Bug: 69168591
Test: add notification, launch it
Change-Id: Ib2d671c65f276ec596a2f07edf64d65bf27a2882
2018-01-24 23:29:28 +00:00
Geoffrey Pitsch
d997d191ed Merge "Security model for moving sharesheet to systemui" 2018-01-24 17:33:59 +00:00
Yuichiro Hanada
c1415f3e3c Add new refresh key constant.
Bug: 64149858
Bug: 64662317
Test: Builds and manual tests with Chromebook.

Change-Id: I865d657ee7d78b5e45f642e786d26a65a14f49e1
2018-01-24 09:11:49 +09:00
Geoffrey Pitsch
88f3d4dbe1 Security model for moving sharesheet to systemui
ResolverActivity (still in frameworks) now requests a "permission token"
that it hands to a stubbed system ui activity ChooserActivity.

This permission token allows an app (SysUI) with the signed permission
"START_ACTIVITY_AS_CALLER" to call
ActivityManagerService#startActivityAsCaller. Permission tokens are a
one-time use, limited-time offer.

Test: runtest systemui && manual testing
Bug: 69850752
Change-Id: I3600e1a8ff9eea7397f5f59853423c79b6401f98
2018-01-23 10:23:55 -05:00
Yi Jin
974e56f141 Enable incidentd.rc also add dump and usage_stats permission to statsd
so it bypass incidentd's permission check

Test: manual
Change-Id: I65b501fe46f66f9f62fedfcfc75aa17f29fc1076
2018-01-22 14:41:19 -08:00
Svet Ganov
82f09bcf93 No camera for idle uids - framework
If a UID is idle (being in the background for more than
cartain amount of time) it should not be able to use the
camera. If the UID becomes idle we generate an eror and
close the cameras for this UID. If an app in an idle UID
tries to use the camera we immediately generate an error.
Since apps already should handle these errors it is safe
to apply this policy to all apps to protect user privacy.

Test: Pass - cts-tradefed run cts -m CtsCameraTestCases
      Added - CameraTest#testCameraAccessForIdleUid

Change-Id: If6ad1662f2af6592b6aca1aeee4bd481389b5e00
2018-01-21 02:55:49 -08:00
Yi Jin
d1238e7b50 Merge "Fix permissions problems of incidentd." 2018-01-19 23:27:32 +00:00
TreeHugger Robot
1d2ddf8ede Merge "Put contacts/calendar providers in except-idle whitelist" 2018-01-18 17:41:35 +00:00
Yi Jin
4bab3a191a Fix permissions problems of incidentd.
Test: manual
Change-Id: I4ee0d1f2349ee1a25a422cabf1b5b87c612710d2
2018-01-17 19:16:49 -08:00
Makoto Onuki
fb26332380 Put contacts/calendar providers in except-idle whitelist
Bug: 71911050
Test: Boot and dumpsys deviceidle
Change-Id: I544b660583c2752dadec920305b33b5a8557ce61
2018-01-17 13:23:50 -08:00
Jorim Jaggi
33a701a55c Remote animations (app-controlled animations)
Adds the ability for another app to control an entire app
transition. It does so by creating an ActivityOptions object that
contains a RemoteAnimationAdapter object that describes how the
animation should be run: Along of some meta-data, this object
contains a callback that gets invoked from WM when the transition
is ready to be started.

Window manager supplies a list of RemoteAnimationApps into the
callback. Each app contains information about the app as well as
the animation leash. The controlling app can modify the leash like
any other surface, including the possibility to synchronize
updating the leash's surface properties with a frame to be drawn
using the Transaction.deferUntil API.

When the animation is done, the app can invoke the finished
callback to get WM out of the animating state, which will also
clean up any closing apps.

We use a timeout of 2000ms such that a buggy controlling app can
not break window manager forever (duration subject to change).

Test: go/wm-smoke
Test: RemoteAnimationControllerTest

Bug: 64674361
Change-Id: I34e0c9a91b28badebac74896f95c6390f1b947ab
2018-01-17 15:12:19 +01:00
Yao Chen
0f2171041e make statsd run in its own uid
+ Assign permission android.permission.STATSCOMPANION to statsd
+ Fixes in StatsCompanionService to allow statsd to get uid mapping

Test: manual
Change-Id: I3e6ca79eefed7f93a4588578c156321c4c278fd3
2018-01-11 11:58:10 -08:00
Jeff Sharkey
4a539441d8 Start using new reserved disk GID.
We recently created a new GID that can be granted to critical system
processes, so that the system is usable enough for the user to free
up disk space used by abusive apps.

Define a permission for the GID so we can grant it to system apps,
and add the GID to core apps needed for system stability.  (The list
was mostly derived from filling a disk and seeing what caused the
device to fall over.)

Test: builds, boots
Bug: 62024591
Change-Id: Icdf471ed3bed4eeb8c01f1d39f0b40c1ea098396
2018-01-07 19:40:29 -07:00
TreeHugger Robot
b743b067e5 Merge "Don't record audio if UID is idle - core framework" 2017-12-26 03:39:42 +00:00