1476 Commits

Author SHA1 Message Date
Eugene Susla
cf00adebec API for notification listener for Companioon apps
Test: 1. Trigger the confitrmation dialog.
Ensure it looks exactly like the one from settings.
2. Call an API without associating the appa first
Ensure exception is thrown with a message mentioning the need to associate 1st
Change-Id: I94d4116e1988db869ed445ae3fd018c50590e3f4
2017-04-14 19:01:53 -07:00
Andrew Scull
e52a1bfede Merge "Service for OEM lock management." into oc-dev 2017-04-14 11:31:06 +00:00
TreeHugger Robot
2a30085e5c Merge "Add ACTION_ACCOUNT_REMOVED to Account Manager." into oc-dev 2017-04-14 03:53:52 +00:00
TreeHugger Robot
b2eb818a7d Merge "TIF: add helper methods for making a channel browsable." into oc-dev 2017-04-13 21:23:48 +00:00
Dmitry Dementyev
a461e30053 Add ACTION_ACCOUNT_REMOVED to Account Manager.
AccountManagerService sends an intent with the action when account of any type is removed or renamed.

Test: manual, APCT.
Bug: 37280078

Change-Id: I53b1bb9d6cde1edba5c37ecf3e4e13d748b19005
2017-04-13 21:10:50 +00:00
Dongwon Kang
2e7f5ce709 TIF: add helper methods for making a channel browsable.
Test: build and manually tested with a local app.
Bug: 36395259, Bug: 36097352
Change-Id: I512ed6f4da21af01445fdbcd2f200a681c5dde19
2017-04-12 20:55:22 -07:00
Christopher Tate
ee3b42af3f Introduce PACKAGE_FIRST_ADDED broadcast
When an app first appears on a device, this new broadcast is issued
including to manifest receivers.  The more general PACKAGE_ADDED
broadcast continues to be issued for both first install and updates,
but is not delivered to manifest receivers of apps that target O+.

Bug 37219124
Test: manual

Change-Id: I59b0a0b0dce96a909076b41280771f63e59584be
2017-04-12 16:14:17 -07:00
Conrad Chen
307bec8572 Merge "TIF: add TvInputManager methods to notify apps" into oc-dev 2017-04-12 00:25:37 +00:00
Conrad Chen
558acf96db TIF: add TvInputManager methods to notify apps
Adds TvInputManager methods to notify apps with protected broadcasts
for:
1. Disabling browsable state of preview and watch next programs.
2. Adding preview programs to watch next programs.

Test: build and verify manually to check if notifications are
      broadcasted.
Bug: 35881266

Change-Id: I20fd5b63f42b2c74277315bbbd251b71c649e5c1
2017-04-11 12:03:04 -07:00
Chad Brubaker
1d99079ef4 Fix READ_PHONE_NUMBERS label
Change-Id: If4a254092168d9f7b133a58b59dd946f64cefdae
Fixes:37207265
Test: builds
2017-04-10 10:48:35 -07:00
Lorenzo Colitti
ab19a04855 Add NETWORK_STACK permission
Add a new permission that only allows other system services to call
networking related methods.  This permission is intended to prevent
other apps from calling these methods that might leave networking
services in intermediate states.

Bug: 36538042
Test: build, run wifi unit tests, boots, wifi connects
Change-Id: Icba6ad5280e9a8863bd1c706ca34b7add8de5294
(cherry picked from commit fa84050a7e51e2a6643ea242b43f16cd6e3114dd)
2017-04-07 05:37:21 +00:00
Casey Burkhardt
ecb5b5ccc3 Merge "Revise Accessibility button chooser intent/permissions" into oc-dev 2017-04-07 02:40:14 +00:00
Casey Burkhardt
afe3ef1b36 Revise Accessibility button chooser intent/permissions
1) Switch AccessibilityButtonChooserActivity to non-exported
2) Update AccessibilityButtonChooserActivity's intent action to
   be CTS-compliant
3) Switches to correct permission to validate a click of the
   accessibility button originated from the status bar service

Bug: 36866328
Bug: 36976440
Test: Manual / Created app to validate launch protection
Change-Id: Ifcd5e8dbbe683dc99bb900a5870a9ba374fbd5d4
2017-04-06 11:39:26 -07:00
Kang Li
38a6da6473 Add a service to rank apps for ResolverActivity.
bug: 36952725,30982298

Test: used PTP before and after this fix.

Change-Id: I5b249af2dd0d9fe32d1e524e8d2675c863e92b5b
2017-04-06 18:08:14 +00:00
Chad Brubaker
941e9e2b38 Merge "Allow permissions to be runtime-only." into oc-dev 2017-04-06 16:44:11 +00:00
Kang Li
b24399547c Merge "Revert "Add a service to rank apps for ResolverActivity."" into oc-dev 2017-04-05 19:50:10 +00:00
Kang Li
c88749fb5a Revert "Add a service to rank apps for ResolverActivity."
This reverts commit 90370e0b2497deba9382ab7ff1539b6849df8139.

b: 36952725

Change-Id: Ifa8f182c707cdbbc989b1f61630f7a8fa856d32d
2017-04-05 19:44:02 +00:00
Conrad Chen
9105beacb3 TIF: protect PARENTAL_CONTROLS_ENABLED_CHANGED broadcast
Test: build and test manually to see if warnings are eliminated
Bug: 36898338
Change-Id: Ifea0844926677fad24f7df2ade31cd299099b639
2017-04-04 17:21:38 -07:00
Chad Brubaker
a5d70a17eb Allow permissions to be runtime-only.
This adds the new runtime protection level flag that if set means
the permission can only be granted to apps that target runtime
permissions (>= M).

ANSWER_PHONE_CALLS has also been made runtime-only.

Bug: 30932767
Test: cts-tradefed run commandAndExit cts-dev -m CtsPermission2TestCases
Change-Id: I42b30414c808730f2d5961ca31b6e3db740b8cf7
2017-04-04 12:27:42 -07:00
Kang Li
6df90fa53b Merge "Add a service to rank apps for ResolverActivity." into oc-dev 2017-04-04 17:42:32 +00:00
Kang Li
90370e0b24 Add a service to rank apps for ResolverActivity.
bug: 30982298
Test: manual - shared images in Camera, texts in Messenger, and webpages
in Chrome.

Change-Id: If335c269ca54145839ad8fd4b3f9b93a74b550f8
(cherry picked from commit 35b9e3015565850e9de963e4bda1be227825df5d)
2017-04-03 23:44:59 +00:00
Chad Brubaker
aef012234e Expose framework activities to Instant Apps
Bug: 36864579
Test: Instant apps can use choosers and account picker
Change-Id: Ie8d3a019ffc91497a314b2c9d5a09f6ca5b0ba9f
2017-04-03 21:51:35 +00:00
Andrew Scull
3b8b46f3a4 Service for OEM lock management.
The new service separates OEM lock management from the implementation.
Currently, a user restriction (DISALLOW_OEM_UNLOCK) and the persistent
data block have been used to implement OEM lock management. In future,
other implemention will be used e.g. a secure element.

The new API also allows for a signature to be passed when changing
whether the device is allowed to be OEM unlocked by the carrier which
can be used for cryptographic protection of the flag.

Bug: 34766843
Test: gts-tradefed run gts -m GtsOemLockServiceTestCases -t com.google.android.oemlock.gts.OemLockServiceTest
Test: cts-tradefed run cts -m CtsPermission2TestCases -t android.permission2.cts.PrivappPermissionsTest
Change-Id: I01660d7605d297f273d43436ca03d64ff611b6cf
2017-04-03 19:10:59 +01:00
Chad Brubaker
0c1651f289 Rename READ_PHONE_NUMBER to READ_PHONE_NUMBERS
Bug: 35853790
Test: make -j128 checkbuild
Test: cts-tradefed run commandAndExit cts-dev -m CtsPermission2TestCases
Change-Id: I11d374cbbb6c2deaf74ac784ff995bd182fe9157
2017-03-31 11:20:02 -07:00
Sudheer Shanka
218190a3c9 Change namespace of ACTION_REQUEST_SHUTDOWN.
Fixes: 36644580
Test: cts-tradefed run singleCommand cts-dev -m CtsSignatureTestCases -t android.signature.cts.IntentTest
      and Device power-off works
Change-Id: I63f461157a63305cd08c5dc42293730be4eb657f
2017-03-30 18:53:29 -07:00
Ta-wei Yen
a302ac69e4 Rename ACTION_VOICEMAIL_SMS_RECEIVED
Hidden API should not use the android.* namespace.

This CL also make SHOW_VOICEMAIL_NOTIFICATION protected broadcast.

Change-Id: I9e5459632d0e826274fd60a4cfbf73c0ea87d29f
Fixes:35269913
Fixes: 36201216
Test: CtsSignatureTestCases
2017-03-28 19:16:13 +00:00
Phil Weaver
668c34444d Merge "Fix permission checking for a11y volume." 2017-03-28 03:58:16 +00:00
Peter Qiu
a5b543ec11 Merge "hotspot2: register Passpoint related intents as protected broadcast" am: 97bdedf655 am: 61f58f0676
am: 8e94d9e32d

Change-Id: Ib293b1fed8a7d5101987d50742cdde66dc670d43
2017-03-28 00:09:06 +00:00
Peter Qiu
8e94d9e32d Merge "hotspot2: register Passpoint related intents as protected broadcast" am: 97bdedf655
am: 61f58f0676

Change-Id: I924befd6d9a1fb1e6bdb257bc6d662172d2354d9
2017-03-28 00:03:03 +00:00
Peter Qiu
61f58f0676 Merge "hotspot2: register Passpoint related intents as protected broadcast"
am: 97bdedf655

Change-Id: I06d54b99006d631c5792f823e9ae7da1703a201d
2017-03-27 23:54:37 +00:00
Peter Qiu
cb9ad34e66 hotspot2: register Passpoint related intents as protected broadcast
These intents should only be broadcast by the System Service, so
register them as protected broadcast.

Bug: 36655814
Test: Build with go/aog/355397, verify in logcat that no non-protected
      broadcast error gets thrown when
      android.net.wifi.action.PASSPOINT_OSU_PROVIDERS_LIST intent
      is broadcasted

Change-Id: I57849d0decef407624cac380a0f12f5428e0f1de
2017-03-27 15:10:04 -07:00
Phil Weaver
f1a9aff962 Fix permission checking for a11y volume.
Adding new permission for changing accessibility volume
to allow system UI to change it. Also providing audio
manager with a whitelist of bound accessibility service
uids so it can allow servics to change the volume.

Bug: 36569297
Test: Adding CTS test in linked CL.
Change-Id: I4f327e3a251fc3780c5957f41217c2ef5bb8b16e
2017-03-27 14:59:26 -07:00
Lorenzo Colitti
b43504e85c Merge "Make CONNECTIVITY_USE_RESTRICTED_NETWORKS @SystemApi." am: a1e206a335 am: 37afaac70d
am: d042c3f400

Change-Id: Ic8a35c9f2d9de0b36cb7ab3f8227f0bc298d672f
2017-03-27 19:27:43 +00:00
Lorenzo Colitti
d042c3f400 Merge "Make CONNECTIVITY_USE_RESTRICTED_NETWORKS @SystemApi." am: a1e206a335
am: 37afaac70d

Change-Id: Id576f61f3ac7d1de828c870ffaf4d6ab3e1e2568
2017-03-27 19:21:19 +00:00
Lorenzo Colitti
37afaac70d Merge "Make CONNECTIVITY_USE_RESTRICTED_NETWORKS @SystemApi."
am: a1e206a335

Change-Id: I71fabdff9deb0f7ba40a545090bd09ddc66994a8
2017-03-27 19:16:17 +00:00
Casey Burkhardt
5e8b980c5d Target selection for Accessibility button
Allows for selecting a single accessibility service or feature
to be triggered by the accessibility button in the navigation bar

Bug: 34720082
Test: Manual
Change-Id: I320febede0398b1eff38a87d4db31fd7dfc53062
2017-03-24 19:17:12 -07:00
Lorenzo Colitti
87b59632e7 Make CONNECTIVITY_USE_RESTRICTED_NETWORKS @SystemApi.
Fix: 34721574
Test: builds, apicheck passes
Change-Id: If921f265c02ffb57d5ac717f924f91f664dd991f
2017-03-23 16:11:30 +09:00
Makoto Onuki
4120ee3d44 Add ACTION_USER_RESTRICTIONS_CHANGED to protetced-broadcast.
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsDevicePolicyManagerTestCases -t 'com.android.cts.devicepolicy.UserRestrictionsTest#testUserRestrictions_deviceOwnerOnly'
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsDevicePolicyManagerTestCases -t 'com.android.cts.devicepolicy.UserRestrictionsTest#testUserRestrictions_primaryProfileOwnerOnly'
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsDevicePolicyManagerTestCases -t 'com.android.cts.devicepolicy.UserRestrictionsTest#testUserRestrictions_secondaryProfileOwnerOnly'

Bug: 36355208
Change-Id: I7a002c1f796a3d1f6241577e6284a8e74bb96749
2017-03-22 17:50:45 -07:00
TreeHugger Robot
ac9e6f7453 Merge "Implement runtime account update notifications." 2017-03-22 02:19:28 +00:00
Fyodor Kupolov
d225f0bfd5 Support expiration of preloaded file cache
When device is provisioned, we delete all files from /data/preloads
except file_cache. We should do best effort to keep file_cache during
the first config_keepPreloadsMinDays. After that,
persist.sys.preloads.file_cache_expired is set to 1, which indicates
that cache can be deleted when additional storage space is requested.

Bug: 34690396
Test: Manual + RetailDemoModeServiceTest
Change-Id: Ie584a9dd6689bcc5e6b3cb448e95dfe5f73d2eeb
2017-03-21 16:51:25 -07:00
Dmitry Dementyev
8882d881f9 Implement runtime account update notifications.
Test: manual, cts.
Change-Id: Iaf9fe4814c3d3c2ca2dca0a5bfa0f997e060bfeb
2017-03-21 15:54:00 -07:00
Calin Juravle
91d40f1baa Set pm.BackgroundDexOptService as the source of true
The real dexopt maintainance job is
com.android.server.pm.BackgroundDexOptService, and not
com.android.server.BackgroundDexOptJobService

Partial revert of commit 096d304ae3d85c1bfcda1a1d9cd4eb13d0815500.

Test: manual inspection
Bug: 36140426
Change-Id: I983ac91117f107282095fa7eefdbce08e0dcfce3
2017-03-15 18:55:25 -07:00
Ajay Panicker
ab96721a57 resolve merge conflicts of 4b39c15da0f5 to nyc-mr2-dev-plus-aosp
Change-Id: I7567db6d1fbb9f8a8b5e29c3e24cdff6508c4b6f
2017-03-14 14:01:57 -07:00
Marie Janssen
4b39c15da0 Merge commit 'faf40708836c34936932c67f47ed39ef4b85de03' into manual_merge_faf40708836c am: 4034a9a96a am: 89d2b46a4a
am: c1a5939026

Change-Id: I50df57c208542d35bc72851fa37e47731bbd9965
2017-03-14 19:29:50 +00:00
Marie Janssen
89d2b46a4a Merge commit 'faf40708836c34936932c67f47ed39ef4b85de03' into manual_merge_faf40708836c
am: 4034a9a96a

Change-Id: Ie63f9d24ab37c5465b250d2b9b60efdf736b4d60
2017-03-14 19:16:47 +00:00
Marie Janssen
4034a9a96a Merge commit 'faf40708836c34936932c67f47ed39ef4b85de03' into manual_merge_faf40708836c
Change-Id: I2b9aeca138aefb0579b3be8014b3f0bf49d99764
2017-03-14 10:09:52 -07:00
TreeHugger Robot
bd7ae7df28 Merge "Basic accessibility support for picture-in-picture" 2017-03-11 01:52:51 +00:00
Phil Weaver
f00cd14f17 Basic accessibility support for picture-in-picture
Exposing actions from the PIP InputConsumer to accessibility,
stripping all actions from a covered PIP app, and adding the
InputConsumer's actions on the PIP app's root view.

We were also using an "undefined" accessibility ID to mean
three different things: a root view, a host view of a virtual
view hierarchy, and a truly undefined view. I've introduced
new values for cases where the id could be defined.

Also gathering all window IDs into one place to reduce the
chance of collisions.

Bug: 34773134
Test: In progress. Current cts passes.
Change-Id: I97269741a292cf406272bf02359c76c396f84640
2017-03-10 15:35:30 -08:00
Marie Janssen
4763c1b5ca Merge "Protect Bluetooth OPP ACCEPT and DECLINE broadcast" 2017-03-10 22:03:58 +00:00
Maurice Lam
95628d6d25 Merge "Add permission to show notification during setup" 2017-03-10 21:14:58 +00:00