Commit Graph

711 Commits

Author SHA1 Message Date
Benedict Wong
600d93f1de Add MANAGE_TEST_NETWORKS permission as @hide
This commit adds a new permission for test networks, granted to the
shell permission identity.

Bug: 124519473
Test: In-progress CTS tests
Change-Id: I995b93a66d283b9e37381b616843dd44dbafe319
2019-03-13 00:44:04 +00:00
Hai Zhang
f7e8368d31 Add OBSERVE_ROLE_HOLDERS permission to shell.
This allows testing relevant APIs in CTS tests. The listener itself
only gives the changed role name and user affected.

Bug: 125404675
Test: build
Merged-In: I5c979a26dae103ea1b633c2119c59363d8953aa2
Change-Id: I29ca1827e597d318cbd74ba3e70796c5853a9dc4
2019-02-26 16:55:35 -08:00
Xin Li
0e71b4f19b DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into
stage-aosp-master

Bug: 124234733
Change-Id: Ic4f67fde0835da0b1c363906cccef0d244e38393
2019-02-14 09:48:06 -08:00
Treehugger Robot
f5a0e41e18 Merge "Grant Shell ability to clear instant app" 2019-02-12 03:42:40 +00:00
Nandana Dutt
b2da22a0de Improvements to Bugreporting API.
* Add cancelBugreport method.
* Remove unused arguments to onFinished listener call.
* Publish the system service now that sepolicy for it
  is submitted.
* Use the new bugreportd service.

Test: boots
BUG:111441001
Change-Id: I12d72e0e1f4ca72d285fd02a3fc1a44f5c179885
2019-01-23 10:21:45 +00:00
Nandana Dutt
c8c77bc043 BugreportAPI : Connect listener to binder callbacks
BUG: 111441001
Test: builds
Test: interactive bugreport still works
Change-Id: Ie3f2328f558bb2de1dec2908c6ab13f5a17df115
2019-01-15 12:51:42 +00:00
Nandana Dutt
432f8c7b86 Add the new dumpstate listener methods to implementations
Add dummy implementations for status, error and finished callbacks.
Next step: wire these up end-to-end; change Shell's listener to be
BugreportManager.BugreportListener, and make it communicate with the
native service explicitly through the new system api.

BUG: 111441001
Test: Verified progress in interactive bugreport still works
Change-Id: Iad0bb7b23b04f6bc7e3b31e5071df42409c78684
2019-01-14 17:55:27 +00:00
chen xu
970d77913b new SystemAPI for preciseCallState and DisconnectCause
1. decouple disconnectCause and preciseDisconnectCuase from
 preciseCallState.
 2. expose preciseCallState to SystemAPI and expose
onPreciseCallStateChanged to System API
3. remove/hide ImsReasonInfo from PreciseDisconnectCuase
4. expose DiconnectCuase and PreciseDisconnectCause to System API
5. new onDisconnectCauseChanged API on PhoneStateListener for CS call
 and use ImsCallSessionListener for IMS call(imsreasonInfo)
6. add read_precise_phone_state to shell apk to enable GTS test

Bug: 119890559
Test: atest GtsGmscoreHostTestCases:TelephonyHostTest#testPhoneStateListener
Change-Id: If9256feff16b6bcaef1dfe194c2b0df2a48436b0
(cherry picked from commit 6a942d488a)
Merged-in: If9256feff16b6bcaef1dfe194c2b0df2a48436b0
2018-12-20 18:41:11 +00:00
Felipe Leme
4c192e9690 Added OWNERS to Shell and hook to make sure it's developed on AOSP.
Bug: none
Test: none

Change-Id: I1f6f554cf98c78d1ab8a1e820d485a37238230f5
2018-11-21 13:00:06 -08:00
Hai Zhang
bc0df49ed9 Add MANAGE_ROLE_HOLDERS permission to shell.
This change adds the MANAGE_ROLE_HOLDERS permission to shell, which
allows shell or code with Shell permission identity to use privileged
RoleManager APIs.

Bug: 110557011
Test: build
Change-Id: I6b8be9eec2a1dfb169536cfcda9d21cb802df327
2018-11-19 17:27:47 -08:00
Svet Ganov
2ffbacda3d Add owners to the Shell app
The Shell app has elevated privileges as it is used for development
and testing behind the USB debugging developer option. This change
adds owners file to control the changes to the Shell app and more
specifically to its manifest file to ensure only sensible singature
protection permissions are granted to the shell.

Test: manual

bug:80415658

Change-Id: Ic7a442320f052d3c698ed923f1a953e4bee646eb
2018-11-05 17:31:55 -08:00
Bill Yi
70c7b0702a Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: I018ce29f4ec3ae26715ae9ce66144a2c9222906f
2018-11-02 05:47:07 -07:00
Phil Weaver
1df928ff2b Grant shell permission to manage accessibility
Bug: 116118615
Test: make
Change-Id: I6caa663a09a9119cd62561ed746cd139025edf44
2018-10-12 15:48:34 -07:00
Michael Groover
1248e435a0 Add READ_PRIVILEGED_PHONE_STATE to used permissions
Bug: 110099294
Test: cts-tradefed run cts -m CtsTelephonyTestCases -t android.telephony.cts.TelephonyManagerTest
Change-Id: I13fec3d397c200ce92883883c96c07007e823efe
2018-10-08 11:29:03 -07:00
Nandana Dutt
7eaa2cbf51 Merge "Disable the buginfo dialog on AndroidTV" 2018-10-03 15:39:22 +00:00
Nandana Dutt
702587e787 Merge "Warn about sensitive bugreport contents." 2018-10-03 09:51:59 +00:00
Felipe Leme
ed5e51dbb2 Synchronize access to sNotificationBundle.
Otherwise Shell can crash due to ConcurrentModificationException

Test: atest BugreportReceiverTest
Test: manual verification

Fixes:116280360

Change-Id: I138acd43b313d2a7a9d945fb44a9d63e1ad798eb
Merged-In: I138acd43b313d2a7a9d945fb44a9d63e1ad798eb
(cherry picked from commit ee72fa19a9)
2018-10-02 11:39:42 +01:00
Jeff Sharkey
e70a61d56d Warn about sensitive bugreport contents.
We show this message when clicking a notification, but we also want
to alert users when they're picking files to attach/share.

Bug: 114711671
Test: manual
Change-Id: I23e249c93d6fa9cf960ef2a61d3fe769eb56ddf5
Merged-In: I23e249c93d6fa9cf960ef2a61d3fe769eb56ddf5
(cherry picked from commit 59137825eb)
2018-10-02 11:34:50 +01:00
Kristian Monsen
86f69db5c0 Disable the buginfo dialog on AndroidTV
Bug: 113033835
Test: Tested manually on Atom
Change-Id: If65997e28db7c0100018145f9313549494e41a2a
Merged-In: If65997e28db7c0100018145f9313549494e41a2a
(cherry picked from commit cb68d29f03f14b188ccc02b877161173b631685d)
(cherry picked from commit 01badb7874)
2018-10-02 11:31:27 +01:00
Sergii Piatakov
e8214d6696 Grant Shell ability to clear instant app
It already has grant to clear data of application, and instant
application is a subset of that.

This permission is needed for correct performing of the test:
`android.appsecurity.cts.InstantCookieHostTest#
testCookieUpdateAndRetrieval`.

Bug: 77849650
Test: run several times in a row (at least two), note that first time
      on the fresh DUT the result is always successful:
      cts-tradefed run commandAndExit cts-dev \
      -m CtsAppSecurityHostTestCases \
      -t android.appsecurity.cts.InstantCookieHostTest#testCookieUpdateAndRetrieval

Change-Id: I2d6080259e22ebfa40481213238f569e0988d271
Signed-off-by: Sergii Piatakov <sergii.piatakov@globallogic.com>
2018-10-02 09:53:23 +00:00
KOUSHIK PANUGANTI
ec8d258c60 Migrated various apps under frameworks/base/packages/Shell to androidx
Bug: 76692459
Test: make Shell
Change-Id: If11159cac1bd5aa61c46a346647b97a661abbf11
Merged-In: If11159cac1bd5aa61c46a346647b97a661abbf11
(cherry picked from commit e92135a6e9)
(cherry picked from commit 474df059db)
(cherry picked from commit e0efaddbeb)
2018-08-28 14:20:24 -07:00
Bill Yi
8e915dbc29 Import translations. DO NOT MERGE
Change-Id: I14c08f6f215dcb6edf1e5ffe62248c0302a9c82d
Auto-generated-cl: translation import
2018-08-04 01:57:32 -07:00
Bill Yi
31b17bcd8d Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: Ie0f93184e2d531e523fa029e7fb354d06fa1b199
2018-07-20 08:07:01 -07:00
Bill Yi
59fa5f30f1 Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: I85b178508c84cebb20aa94617295b7a73cbaf28e
2018-05-23 02:48:51 -07:00
Bill Yi
4de2538820 Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: Id52e0cc164ebb1c62710dfc81b4bf70d231e08fb
2018-05-20 15:13:14 -07:00
Bill Yi
7056fc67ef Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: I1c78c4dfe25ed25844f66e04ed962551f253fd3b
2018-04-28 08:18:48 -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
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
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
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
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
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
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