1468 Commits

Author SHA1 Message Date
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
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
Maurice Lam
132710e389 Add permission to show notification during setup
Add a priviledged permission NOTIFICATION_DURING_SETUP which together
with the existing Notification.EXTRA_ALLOW_DURING_SETUP will allow a
notification to be shown during setup.

Test: Added NotificationDataTest
Bug: 34705874
Change-Id: I7215acf4017ad897294c69abf63a7f2e5d556f31
2017-03-09 11:08:30 -08:00
Felipe Leme
640f30a776 Replaced auto-fill by autofill to keep it consistent with API style.
This change will affects 2 types of apps: autofill service implementations
and apps that use autofill APIs.

Since just the former is known to be used at the moment, we're not trying
to keep backward compatibility with the latter.

Bug: 35956626
Test: CtsAutoFillServiceTestCases pass
Test: android.provider.SettingsBackupTest pass

Change-Id: Ia720083508716deae9e887f9faa7ae7c5a82f471
2017-03-09 08:14:49 -08:00
Marie Janssen
71c52e6e30 Protect Bluetooth OPP ACCEPT and DECLINE broadcast
Non-system apps could send these, and accept OPP transfers without user
interaction.

Test: run POC code, see that it crashes instaed of accepting
Bug: 35258579
Change-Id: I37bf2e17b4d612258f9dbaa879727ac7c72e5969
2017-03-08 13:52:53 -08:00
Marie Janssen
52c8ba1ecf Protect Bluetooth OPP ACCEPT and DECLINE broadcast
Non-system apps could send these, and accept OPP transfers without user
interaction.

Test: run POC code, see that it crashes instaed of accepting
Bug: 35258579
Change-Id: I37bf2e17b4d612258f9dbaa879727ac7c72e5969
2017-03-08 10:17:12 -08:00
Chad Brubaker
e45606d6c6 Expose ACCESS_INSTANT_APPS to the verifier
The package verifier needs to be able to see Instant Apps in order to do
its job. It already sees them on first install so no new information
about what Instant Apps are installed is leaked.

Test: builds
Change-Id: I5d892b2d7aa820a9c0c00ac357f20a3210cf3395
2017-03-06 13:14:01 -08:00
TreeHugger Robot
fa18d7cd71 Merge "Remove SystemApi from android.permission.REQUEST_NETWORK_SCORES." 2017-03-01 23:34:39 +00:00
TreeHugger Robot
247a3c0132 Merge "Introduce ANSWER_PHONE_CALLS permission" 2017-03-01 01:10:20 +00:00
Sunny Goyal
6d7cb23236 Sending explicit broadcast to the launcher when a package is installed
Test: Manually tested on device and add CTS tests
Bug: 32920609
Change-Id: Ic23c077a469fb41d6c4e123d4bc022899f634198
2017-02-28 12:55:59 -08:00