Commit Graph

701 Commits

Author SHA1 Message Date
Philip P. Moltmann
6c644e620d Always review permissions before <M app is started the first time
This splits the
- review permissions
- individually control permissions
- consent to manage wireleess (wifi + bluetooth)
properties.

Almost all code cares only for the first and it is now always true.
Hence a lot of code can be simplified.

Bug: 110431654
Test: atest PermissionsHostTest
      started pre-M app
Change-Id: I733cd476ccd0bf5eaa59e9a9506db34f57c6baee
2018-07-24 11:45:34 -07:00
Bill Yi
962bed181f Import translations. DO NOT MERGE
Change-Id: I7fa6de95026c1eb22cf8284b27879371f81e1c3a
Auto-generated-cl: translation import
2018-07-22 07:20:35 -07:00
Suprabh Shukla
349f9a1ce3 Add SUSPEND_APPS permission to shell
Since this permission protects system apis, this is required for
instrumentation tests.

Test: atest com.google.android.suspendapps.gts.SuspendPackagesTest

Bug: 79773970
Change-Id: Ib283018c50cc19c3958bd61e2d19befbf2805cc5
2018-07-17 14:06:21 -07:00
Bill Yi
8fb963413f Import translations. DO NOT MERGE
Change-Id: Iceb272ffa664416b4eafe5eb32098d02e93a095d
Auto-generated-cl: translation import
2018-06-27 02:59:22 -07:00
Bill Yi
f3b6594370 Import translations. DO NOT MERGE
Change-Id: Ie0df2d2ccd6c07781d332a973e6401092598391a
Auto-generated-cl: translation import
2018-06-01 09:09:44 -07:00
TreeHugger Robot
4aca62556b Merge "Migrated various apps under frameworks/base/packages/Shell to androidx" 2018-05-23 01:53:23 +00:00
Bill Yi
f9379bef95 Import translations. DO NOT MERGE
Change-Id: I03dce717e8d00086e912229ac6fc7c40dfa16de2
Auto-generated-cl: translation import
2018-05-18 09:45:09 -07:00
Bill Yi
9a594602c1 Import translations. DO NOT MERGE
Change-Id: Ib8b8e10bc7035fe194fee520776e3aca9fcf2123
Auto-generated-cl: translation import
2018-05-02 10:18:42 -07:00
KOUSHIK PANUGANTI
e92135a6e9 Migrated various apps under frameworks/base/packages/Shell to androidx
Bug: 76692459
Test: make Shell
Change-Id: If11159cac1bd5aa61c46a346647b97a661abbf11
2018-04-23 17:31:10 -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