Commit Graph

693 Commits

Author SHA1 Message Date
Bill Yi
9a594602c1 Import translations. DO NOT MERGE
Change-Id: Ib8b8e10bc7035fe194fee520776e3aca9fcf2123
Auto-generated-cl: translation import
2018-05-02 10:18:42 -07:00
Mathew Inwood
e6e0603f8f Merge "Enforce permission when disabling API checks." into pi-dev am: 87f521ffe9
am: 6614f28da7

Change-Id: Iab6854adff71f3a89fc0b937a9be5f791ecab0f5
2018-04-23 01:24:45 -07:00
Mathew Inwood
6614f28da7 Merge "Enforce permission when disabling API checks." into pi-dev
am: 87f521ffe9

Change-Id: I9b87207cc9e337f1d3b293be7d9982f83381f5e6
2018-04-23 01:16:42 -07:00
Bill Yi
b8fc9fbfed Import translations. DO NOT MERGE
Change-Id: If3be4f9f8b73b97e84d30d2135385d152c3dcd2f
Auto-generated-cl: translation import
2018-04-21 00:01:33 -07:00
Mathew Inwood
5f1f29a97a Enforce permission when disabling API checks.
Add a new internal permission required to disable hidden API checks using
"am instrument". Grant this permission to the shell.

Test: $ adb shell am instrument --no-hidden-api-checks mypackage/.MainInstrumentation
Bug: 64382372

Change-Id: I193dba412560f17810ad0c67c733a1eec15fa7b7
2018-04-19 10:08:39 +01:00
Bill Yi
4232d8440e Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: I06dbe1dfd8098c454295925a57df4e1ac7a41d7e
2018-04-15 21:48:28 -07:00
Bill Yi
2a6f10e1a3 Import translations. DO NOT MERGE
Change-Id: I5e131097e7b40f499ec303f264149a694bcf03a1
Auto-generated-cl: translation import
2018-04-15 21:41:43 -07:00
Bill Yi
f3fef75aec Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: Ic5c3b8a83e48276c715b767d5a0cb9b61debe0b9
2018-04-13 04:13:26 -07:00
Nicolas Geoffray
b19c2e7451 Merge "Exempt tests for hidden APIs." into pi-dev am: 0e675bd901
am: 03ba2d9241

Change-Id: I0e4517312cac9b37537eee55eafd811aff531ea8
2018-04-10 10:11:10 -07:00
Nicolas Geoffray
03ba2d9241 Merge "Exempt tests for hidden APIs." into pi-dev
am: 0e675bd901

Change-Id: I012a1ce8483f5fdddf60cfd33ea4303d72455fca
2018-04-10 09:56:52 -07:00
TreeHugger Robot
0e675bd901 Merge "Exempt tests for hidden APIs." into pi-dev 2018-04-10 16:34:05 +00:00
Nicolas Geoffray
b0284fb5de Exempt tests for hidden APIs.
Bug: 64382372
Bug: 74963051
Test: m
Change-Id: I5234dd6230f2bdd6ffccbf12b25a02d929d20161
2018-04-06 14:54:39 +01:00
Bill Yi
d5732b48d8 Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: I01e238c2e50777eb025e8ba17f9e7a5fa056adc9
2018-04-06 05:04:06 -07:00
Bill Yi
7899f37af0 Import translations. DO NOT MERGE
Change-Id: I0cce19168c70d2d12c0299d0e75cfdb99d7bfa3d
Auto-generated-cl: translation import
2018-04-04 07:59:15 -07:00
Bill Yi
1118d7f503 Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: Iba86b12b7727eb9bfd90ded06bef2d692bf07268
2018-03-31 10:08:50 -07:00
Winson Chung
8c4fe094ad Merge "Merge "Allow the shell to start task overlay activities." into pi-dev am: 3785417848" into pi-dev-plus-aosp
am: 6e377c93c8

Change-Id: Id63ed878fece5499e264c6fae17e638f636e9a40
2018-03-20 23:08:32 +00:00
Winson Chung
10c3747a58 Merge "Allow the shell to start task overlay activities." into pi-dev
am: 3785417848

Change-Id: I5ceb2668aa3fa6f3b1a874a84d5dfa5325fa27e1
2018-03-20 21:23:45 +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
Bill Yi
699a8a1700 Import translations. DO NOT MERGE
Change-Id: Ied6b956b35a4b8be9e6ef5e6e52e3b6756ef3bbe
Auto-generated-cl: translation import
2018-03-16 23:45:34 -07:00
Dianne Hackborn
a31cb855f0 Merge "Fix issue #62342672: API Review: OPSTR_ACTIVATE_VPN SystemApi" into pi-dev
am: bf5387edd8

Change-Id: I713dedd3d5dc0c15031823191939979d3a169ae2
2018-03-14 03:14:45 +00:00
Dianne Hackborn
bf1b57d856 Fix issue #62342672: API Review: OPSTR_ACTIVATE_VPN SystemApi
Add a new platform-only permission for being able to change
app ops mode, so nothing outside of the platform can do this.

Bug: 62342672
Test: Booted, ran, settings works, shell works, apps install
Change-Id: I372e649c019a8f9b95919ff0da6f56612d7061c2
2018-03-13 14:51:30 -07:00
Dianne Hackborn
e1d41bd8fa Merge "Fix issue #72116995: Add permission guarding Service#startForeground" into pi-dev
am: 16268a69d6

Change-Id: I6ef5335e391eb9259ae0dfbf4f88032ad1d2bad4
2018-03-07 00:14:27 +00:00
Michael West
d9c83159d0 Merge "Add set-time and set-timezone shell cmds to alarm service" into pi-dev
am: 0d155259be

Change-Id: I57521b0a5a467825cbe09e98fc52a491da90bc98
2018-03-06 23:52:42 +00:00
Dianne Hackborn
16268a69d6 Merge "Fix issue #72116995: Add permission guarding Service#startForeground" into pi-dev 2018-03-06 23:04:16 +00:00
Michael West
0d155259be Merge "Add set-time and set-timezone shell cmds to alarm service" into pi-dev 2018-03-06 22:41:40 +00:00
Bill Yi
9d5b768598 Import translations. DO NOT MERGE
Change-Id: I5954a1c6109b00913d5bc221c37f0532a57779d9
Auto-generated-cl: translation import
2018-03-06 11:14:25 -08:00
Dianne Hackborn
dd027b3ab2 Fix issue #72116995: Add permission guarding Service#startForeground
Now requires permission if targeting P.

Note that this is a separate permission from the existing one
that is required for instant apps to use foreground services.  The
reason for this is that their semantics are different (the instant
apps permission is associated with an app op for control over what
the app is allowed, while the regular app permission is just a
normal permission that is always granted and only there for
auditing of apps), and there are probably going to be cases where
a developer will want to use a foreground service in the full
version of their app but not as an instant app.

Bug: 72116995
Test: atest CtsAppTestCases
Change-Id: I883c9515c307ed8e39f0bf888c4045944c8183ac
2018-03-05 16:59:21 -08: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
Anton Hansson
ab6ec61251 frameworks/base: Set LOCAL_SDK_VERSION where possible.
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.

Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.

Test: make relevant packages
Bug: 73535841
Change-Id: I4233b9091d9066c4fa69f3d24aaf367ea500f760
2018-02-28 15:13:23 +00:00
Bill Yi
46e37f5ebe Import translations. DO NOT MERGE
Change-Id: I521f23607bf345ff51627adaf460e4128db8eb4b
Auto-generated-cl: translation import
2018-02-26 14:38:22 -08:00
Wale Ogunwale
b93008770b Merge "Give shell CONTROL_KEYGUARD permission." 2018-02-23 00:15:30 +00:00
Wale Ogunwale
3d088810c9 Give shell CONTROL_KEYGUARD permission.
Follow-up to ag/3614843 where we started to enforce the permission in
window manager.

Bug: 67109817
Test: builds
Change-Id: Id5712d2ed4c537da3a443f9c51aa15e3c84d670b
2018-02-22 12:36:55 -08:00
Jeff Sharkey
f2c32815ae Merge "Bugreport SAF provider isn't "advanced."" 2018-02-22 20:19:25 +00:00
Jeff Sharkey
ecff5dc68b Bugreport SAF provider isn't "advanced."
UX churn over the years has turned FLAG_ADVANCED into "show internal
storage" which means it's super confusing.

When the Bugreport SAF provider is enabled, just show it.

Test: sure
Bug: 32540478
Change-Id: Id11278c27da8f5f1d1346b208d85b5db59a9e174
2018-02-22 09:41:17 -07:00
Bill Yi
a9c05e4dae Import translations. DO NOT MERGE
Change-Id: I5b822189f2a536e571345a6f761015f0f56a19b3
Auto-generated-cl: translation import
2018-02-22 02:56:20 -08: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
TreeHugger Robot
8dddeb98f5 Merge "Revert "Fix issue #72116995: Add permission guarding Service#startForeground"" 2018-02-12 19:47:35 +00:00
Ian Pedowitz
0b4add68db Revert "Fix issue #72116995: Add permission guarding Service#startForeground"
This reverts commit a9da85fde4.

Reason for revert: b/73224471

Bug: 73224471
Bug: 72116995
Change-Id: I1485305f40d47fdb138cb1e484c329cf20892a6b
2018-02-12 16:12:33 +00:00
Baisheng Zheng
20b5dec9d3 Merge "Add dedicated signature permissions to platform manifest and shell manifest which could enable/disable BT and Wifi state on watch" 2018-02-12 01:34:00 +00:00
baisheng
f62d869ea5 Add dedicated signature permissions to platform manifest and shell manifest which could enable/disable BT and Wifi state on watch
Skip Bluetooth consent UI if running on shell, also fix a typo in log message.

Test: Manual test running `adb root; adb shell service call bluetooth_manager 6` and see if BT is on without consent UI.
Bug: 69872231
Change-Id: Ie513794a7fc13041259fd84734bfc651495ba5cf
2018-02-11 15:03:19 +08:00
Dianne Hackborn
a9da85fde4 Fix issue #72116995: Add permission guarding Service#startForeground
Now requires permission if targeting P.

Note that this is a separate permission from the existing one
that is required for instant apps to use foreground services.  The
reason for this is that their semantics are different (the instant
apps permission is associated with an app op for control over what
the app is allowed, while the regular app permission is just a
normal permission that is always granted and only there for
auditing of apps), and there are probably going to be cases where
a developer will want to use a foreground service in the full
version of their app but not as an instant app.

Bug: 72116995
Test: atest CtsAppTestCases
Change-Id: I95afb7185742b82c525e775ca20bb36015510b43
2018-02-07 14:02:02 -08:00
Dianne Hackborn
c2cbc0727a Revert "Fix issue #72116995: Add permission guarding Service#startForeground"
This reverts commit 994b5ad737.

Waiting for Chrome prebuilt.

Test: NA
Bug: 72116995
Change-Id: Ifcfea94ddefda27267640283038c9d0f933ea1d8
2018-01-25 10:43:28 -08:00
Dianne Hackborn
994b5ad737 Fix issue #72116995: Add permission guarding Service#startForeground
Now requires permission if targeting P.

Note that this is a separate permission from the existing one
that is required for instant apps to use foreground services.  The
reason for this is that their semantics are different (the instant
apps permission is associated with an app op for control over what
the app is allowed, while the regular app permission is just a
normal permission that is always granted and only there for
auditing of apps), and there are probably going to be cases where
a developer will want to use a foreground service in the full
version of their app but not as an instant app.

Bug: 72116995
Test: atest CtsAppTestCases
Change-Id: If5a79e7ed5ab9e0edc77410315eb4d2df8ac850b
2018-01-24 17:58:24 +00: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
TreeHugger Robot
57eb943585 Merge "Don't record audio if UID is idle - framework" 2018-01-20 04:09:35 +00:00
TreeHugger Robot
0116f7cbe4 Merge "No sensor access to idle UIDs - framework" 2018-01-20 01:37:29 +00:00
Svet Ganov
c1006a335f Don't record audio if UID is idle - framework
To protect user's privacy if a UID is in an idle state we allow
recording but report silence (all zeros in the byte array) and once
the process goes in an active state we report the real mic data.
This avoids the race between the app being notified aboout its
lifecycle and the audio system being notified about the state
of a UID.

Test: Added - AudioRecordTest#testRecordNoDataForIdleUids
      Passing - cts-tradefed run cts-dev -m CtsMediaTestCases
             -t android.media.cts.AudioRecordTest

bug:63938985

Change-Id: I8b0a0889c4aee07f4e1d3c7e4cee0821f2f8cd91
2018-01-18 00:21:33 -08:00
Bill Yi
1e0bf63b44 Import translations. DO NOT MERGE
Change-Id: I6b13005d123462b08911d4fec5600311fccf9dee
Auto-generated-cl: translation import
2018-01-17 22:25:01 -08:00
Svet Ganov
8bd1395881 No sensor access to idle UIDs - framework
Idle UIDs are ones that were in the background for long enough time.
Currently such apps can access sensor data even though they have no
user perceptible components running. This affects the user's privacy
since an app in the background can use sensor data to infer location,
activity, habbits, etc.

The goal is to restrict sensor access for all apps in the ecosystem
regardless of target SDK which means the solution should be backwards
compatible. At the high level the sesnor service observes UID state
changes and applies policy like this:

Continuous sensors: for sensros in this reporting mode when the UID
goes in the background we will stop dispatching events. Once the UID
goes active we will start reporting the events. While this is an
app visible behavior change we would rather do that vs delivering
fake events.

Flush events: there is no change in behavior based on the UID state.
Hence, idle apps can request a flush and would get the completion
callback. From an app perspective flushing works at any point.

Trigger events: for sensors in this reporting mode when the UID
goes in the background we will not report any trigger events. From
an app perspective the sensor just did not pick up any events.

On-change events: for sensors in this reporting mode when the UID
goes in the background we will not report any change events. From
an app perspective the sensor just did not pick up any events.

Wake locks: since UIDs in idle state cannot acquire wakelocks we
will not be grabbing a wakelock on behalf of apps in that state.

Test: Added - SensorTest#testSanitizedContinuousEventsUidIdle
      Added - SensorTest#testBatchAndFlushUidIdle
      Pass - cts-tradefed run cts-dev -m CtsSensorTestCases

bug:63938985

Change-Id: Iee73dc034f5fe7fbea789a3b60db4290757c5052
2018-01-16 21:43:35 -08:00
Lucas Dupin
e1daf52b92 Merge "Allow custom keyguard "prompt reason"" 2018-01-13 01:13:26 +00:00