1225 Commits

Author SHA1 Message Date
Ivan Podogov
0afe190af5 Rename the Bluetooth profile classes for HID Device role.
We already have BluetoothInputDevice class, so adding something
called BluetoothHidDevice seems confusing. On the other hand,
the new class is designed to connect to HID Host devices, so
naming it BluetoothInputHost makes sense and goes in line with
the existing BluetoothInputDevice.

The same goes for the new constant HID_DEVICE that is just as
confusing to have together with the INPUT_DEVICE one.

This CL also renames the "connection state changed" broadcast
(for the same reasons), declares it as an SDK constant, and also
adds some javadoc to it.

Note that BluetoothHidDeviceApp* classes remained unchanged, as
those correspond to the app that implements the Device (and
connects to the Host).

Test: make
Change-Id: I5075ca5b97db3c1dd403c2e9660eecc7380cffe2
2016-12-29 14:30:40 +00:00
Jack He
33f0cf1267 Merge "Protect broadcast emitted by Bluetooth mapmce and pbap profile"
am: 7dd909684f

Change-Id: Ib90b23ef7b4271e2adc8a3c66963aaeb5c70a66f
2016-12-02 04:49:39 +00:00
Jack He
1ac34e3657 Protect broadcast emitted by Bluetooth mapmce and pbap profile
Bug: 33281228
Test: mm -j 40
Change-Id: I273e9e3c02f431ba7006bcf5d230a6c30eb67843
2016-12-01 18:55:31 -08:00
Etan Cohen
6571007101 Merge "[NAN-AWARE] Rename NAN to Aware"
am: 74b1131cc8

Change-Id: I2e788e19a11f2709f2e542dbdc4b58433a3574bf
2016-11-06 03:13:31 +00:00
Etan Cohen
0849ded008 [NAN-AWARE] Rename NAN to Aware
~Rename only (and any reformatting needed to pass lint) - no
functional changes!

Remove android.net.wifi.nan.STATE_CHANGED from manifest:
redundant/remnant of an older configuration.

(cherry-pick of commit a61b9fb569153917a650f1d48efa20ba8846a9f3)

Bug: 32263750
Test: All unit tests and integration (sl4a) tests pass.
Merged-In: Ie4ff675fa61041e8fcf6a9bf9900ea835d0a7614
Change-Id: I4206d2fd722dc7dec9df4aee5c818101d7f9dccc
2016-11-05 09:41:38 -07:00
Svetoslav Ganov
ebdcd873ec Allow SetupWizard to do WiFi scans if location off am: b2457c3704
am: ff484bbfeb

Change-Id: I7f6cda2da22347375507a0364e976bbb01066ccc
2016-10-13 20:19:45 +00:00
Svetoslav Ganov
ff484bbfeb Allow SetupWizard to do WiFi scans if location off
am: b2457c3704

Change-Id: I3afe3d8628e8af5806b03b86ea5c866fd454cddd
2016-10-13 20:15:16 +00:00
Svetoslav Ganov
c573661f4c Allow SetupWizard to do WiFi scans if location off
Location permission is needed for apps to do WiFi scans
and if location is globally off no app can scan too. It
is possible that an OEM does not want location to be on
until the user agrees to that or a device owner can turn
location off before setup. As a result setup wizard
cannot show the WiFi networks preventing the user form
logging in. This change allows the setup wizard component
to perform WiFi scans even if location is globally off.

bug:29577364

Change-Id: I6b7c5dca76b8c8ee6051ea2dad3cec6879683524
2016-10-12 02:58:26 +00:00
Svetoslav Ganov
b2457c3704 Allow SetupWizard to do WiFi scans if location off
Location permission is needed for apps to do WiFi scans
and if location is globally off no app can scan too. It
is possible that an OEM does not want location to be on
until the user agrees to that or a device owner can turn
location off before setup. As a result setup wizard
cannot show the WiFi networks preventing the user form
logging in. This change allows the setup wizard component
to perform WiFi scans even if location is globally off.

bug:29577364

Change-Id: Ic56bfb7fb3818658a843d309b67ef37324045f67
2016-10-12 02:43:43 +00:00
Jack He
df2bc4958d List HF_INDICATORS_VALUE_CHANGED broadcast as protected am: 0bba1c620b
am: 4d74ff91aa

Change-Id: I44f5abb2476c10e8e7971ea1ff28832c66768fa8
2016-10-11 03:33:09 +00:00
Jack He
0bba1c620b List HF_INDICATORS_VALUE_CHANGED broadcast as protected
android.bluetooth.headset.action.HF_INDICATORS_VALUE_CHANGED
notification should be protected.

Bug: 32059227
Test: manual
Change-Id: I06d4a7e3aa3a5586eb09d2538b4b526a5d073f9a
(cherry picked from commit b798f79ba26e057531fb51e65824e0deee445f26)
2016-10-10 19:08:13 -07:00
Jack He
b798f79ba2 List HF_INDICATORS_VALUE_CHANGED broadcast as protected
android.bluetooth.headset.action.HF_INDICATORS_VALUE_CHANGED
notification should be protected.

Bug: 32059227
Test: manual
Change-Id: I06d4a7e3aa3a5586eb09d2538b4b526a5d073f9a
2016-10-10 21:24:55 +00:00
Etan Cohen
1a92c54559 [NAN] Register WIFI_NAN_STATE_CHANGED as protected broadcast am: 720d175757 am: 083f313756
am: a06821b2cf

Change-Id: I23d1aee5e8cf1134ea03e7a3b4f32fe931855f14
2016-09-30 21:14:30 +00:00
Etan Cohen
720d175757 [NAN] Register WIFI_NAN_STATE_CHANGED as protected broadcast
Broadcast can be registered protected (as in this CL) in which case they
are restricted to system apps. Broadcasts sent by the System Service must
be protected (so no one else can fake them).

The WIFI_NAN_STATE_CHANGED is sent by the System Service and no other apps
should be able to send them (e.g. to deny access to NAN to other apps).

(cherry-pick of commit b8ce87175e3a865feaad7c6aa49226f768729540)

Bug: 31811154
Test: build & run - enable/disable Wi-Fi to trigger bug
Change-Id: I77ea18291d68c38a63d64a75affc6b7ea114e549
2016-09-30 11:32:18 -07:00
Salvador Martinez
32a87ca7a9 Changed themes for core activities am: 7e2657c303
am: f3209d6c87

Change-Id: I1595ffd9a91137666e45792f8f980355ea622f50
2016-09-28 00:16:50 +00:00
Salvador Martinez
7e2657c303 Changed themes for core activities
Many activities in core were using the
material theme which would result in teal
colors on all devices. These themes have
all been changed to DeviceDefault so that
the color will be more suited to whatever
device the user has.

Test: Manual Inspection
Bug: 31623421
Change-Id: I6847023c4fb57a1c3384a1f8e483cd740229458f
2016-09-26 12:49:31 -07:00
Andre Eisenbach
031facb524 Merge "List btopp.intent.action.ACCEPT broadcast as protected" am: e2d9cc4bc9 am: c1777a853c
am: 7b9a3d7134

Change-Id: Id5f74592e87454f6bc5cf4aacb7e99383e38196c
2016-09-21 21:02:34 +00:00
Jack He
c82a4f4192 List btopp.intent.action.ACCEPT broadcast as protected
Bug: 31604112
Test: manual
Change-Id: Ic5ee837bb895fc5b39b6d1abdd91d8f1d33f62ae
2016-09-21 10:51:47 -07:00
Ajay Panicker
707b68c426 Protect REFRESH_BATCHED_SCAN broadcast
Bug: 29754520
Test: cherry-pick from internal tree
Change-Id: Id3f43d36db2c5f026a5d3a94e7370051d2e23e37
(cherry picked from commit 58dd0cd65e7ac9ca0c9ccbf42087baf2df751c61)
2016-09-21 17:38:08 +00:00
Sudheer Shanka
ad520f877f Allow apps with CREATE_USERS permission to create demo users. am: 234d1afd79
am: 0be41fc1a9

Change-Id: I9da0eedb106d61c7041df78d0b287e6f28fe3069
2016-08-30 18:05:51 +00:00
Mitchell Wills
722de5f9d0 DO NOT MERGE Manually merge commit 'f28778064383821ccf48c9570191f34a24aa513f' into nyc-mr1-dev-plus-aosp
Change-Id: I7cb1f97a5b931c2057a811d7947f47ad7320ef1c
2016-08-29 17:46:44 -07:00
Sudheer Shanka
234d1afd79 Allow apps with CREATE_USERS permission to create demo users.
Bug: 31092477
Test: adb shell am create-user --ephemeral --demo <user-name>
Change-Id: Ia08a50ec4371466c62cdc9f5391e298a666b5081
2016-08-29 10:49:03 -07:00
Etan Cohen
5f47bf2199 [NAN] Add master switch to enable/disable usage of NAN APIs.
Add master switch to enable/disable usage of NAN. Tie into Wi-Fi
state machine (to enable/disable based on Wi-Fi enable/disable).
Dispatch broadcasts when NAN status changes.

Bug: 27698011
Change-Id: Iea36388443ff8d0dc26a280220022c6bdba6a0c8
(cherry picked from commit d3137af10291ff888125de747d9ee05f73f3fd8e)
2016-08-26 13:20:37 -07:00
Svetoslav Ganov
eeeebd346a Only sync adapters with access can see an account - framework am: 5cb2973495
am: 721402e75a

Change-Id: I361b009afa6c6e658157e6e04bf88096e8331fd0
2016-08-24 02:08:19 +00:00
Svetoslav Ganov
5cb2973495 Only sync adapters with access can see an account - framework
It was possible for a sync adapter without accounts access to
see the account which it is supposed to sync which can be used to
identify the user. This change ensures that only sync adapters
with account access can run (which results in seeing the account),
otherwise we involve the user to approve access only to this account.

A sync adapter can access an account if one of these is true:
 - it is signed as the authenticator for this account
 - has the GET_ACCOUNTS permission
 - has an auth token for the account
 - it is a preinstalled app (system or privileged)

The main thing we need to figure out is if the extra prompts
for giving access to a sync adapter to the account create too
much friction.

bug:28163381

Change-Id: Ie083bb681b5a2aed81ca5f6a062193a175fad77e
2016-08-23 21:43:27 +00:00
Ajay Panicker
6c1035e0c5 Merge "Protect various Bluetooth broadcasts" am: 53ff75bb68 am: 779a1f096c
am: 2bad652e56

Change-Id: I342864675beb5083d67c3d74993995936a9af326
2016-08-18 22:42:18 +00:00
Ajay Panicker
779a1f096c Merge "Protect various Bluetooth broadcasts"
am: 53ff75bb68

Change-Id: Id4f77ea2092f9a04397fe596ed92f2f30a3235df
2016-08-18 22:32:09 +00:00
Ajay Panicker
1f5b786ad0 Protect various Bluetooth broadcasts
Bug: 30832954
Change-Id: I37e0b2ffab65c0703244917a4ade9bb8afbb5e6f
(cherry picked from commit 9a236066dbf604edfd5f873b4a3b94a200efd628)
2016-08-18 13:50:13 -07:00
Ajay Panicker
9a236066db Protect various Bluetooth broadcasts
Bug: 30832954
Change-Id: I37e0b2ffab65c0703244917a4ade9bb8afbb5e6f
2016-08-18 17:10:58 +00:00
Hugo Benichi
514da60fb6 Add CONNECTIVITY_USE_RESTRICTED_NETWORKS permission
This patch creates a new permission used by ConnectivityService to give
access to restricted networks without the NET_CAPABILITY_NOT_RESTRICTED
capability bit on.

Bug: 24497316
Change-Id: I5b6c8a9ef14395b2f1ab26cb17b24d7876ec79f1
2016-07-25 10:24:42 +09:00
Michael Wright
1c9977b762 Rename color transform to color mode and persist the value.
Also, standardize on a set of possible modes for the displays to
enter and separate the configuration of the color mode from the
configuration of the display mode.

Bug: 29044347

Change-Id: I6af0a7d1f11bc72d4cefc380f115c1fb00788864
2016-07-18 19:49:18 +01:00
Makoto Onuki
1030520822 Cache the default launcher.
Originally we always checked with PM for the default launcher,
which would take ~2ms.

Now we cache the result, and clears the cache when (any) preferred
activities change.

Bug 30126557

Change-Id: Iceef288cd372c8bb9b119aa493e5173d894f2302
2016-07-15 12:57:03 -07:00
Suprabh Shukla
dbbc7af063 Making timeouts configurable through Settings
Adding a global setting for timeouts used in retail demo mode.
Also renaming the protected intent ACTION_RESET_DEMO to reflect proper
owner package.

Bug: 29917613
Change-Id: I9a174503626ab28cceb5024a8e63d27612439b92
2016-07-07 14:12:14 -07:00
Ajay Panicker
58dd0cd65e Protect REFRESH_BATCHED_SCAN broadcast
Bug: 29754520
Change-Id: Id3f43d36db2c5f026a5d3a94e7370051d2e23e37
2016-06-28 23:20:37 +00:00
Pavel Zhamaitsiak
022b6fe928 Move IMS-related protected broadcasts to packages/services/Telephony
Bug: 29228175
Change-Id: I03bf54dde0ae1a40eda7fde655124a1d2a901442
2016-06-15 13:21:54 -07:00
Ricky Wai
84d2c0de2e resolve merge conflicts of 6f1ed20 to nyc-mr1-dev
Change-Id: I9fe1e50f99382cbd8cd90f77ef99d081b472bb81
2016-06-13 15:36:45 +01:00
Ricky Wai
6f1ed200b3 Merge "Disable quiet mode after UserManager.trySetQuietModeDisabled() is unlocked" into nyc-dev 2016-06-13 13:12:48 +00:00
Sudheer Shanka
a2ef5c89c0 Merge \"Reduce shell power over user management.\" into nyc-dev
am: 1b4124fc95

Change-Id: Ia54f3ad9a8594e101407db6b52b378ae8bec72a2
2016-06-10 21:39:22 +00:00
TreeHugger Robot
1b4124fc95 Merge "Reduce shell power over user management." into nyc-dev 2016-06-10 21:33:28 +00:00
Sudheer Shanka
f5cea03eb0 Reduce shell power over user management.
Remove MANAGE_USERS permission from shell and whitelist it for
some specific functionality.

Bug: 29189712
Change-Id: Ifb37448c091af91991964511e3efb1bb4dea1ff3
2016-06-10 13:05:18 -07:00
Svet Ganov
08504b5e0d Merge \"Protect the android.intent.action.CALL_PRIVILEGED broadcast\" into nyc-dev
am: c94872e940

Change-Id: I722d5bfbed781c28db5da59f303c2579123d8e6e
2016-06-09 22:52:26 +00:00
Svetoslav Ganov
c94872e940 Merge "Protect the android.intent.action.CALL_PRIVILEGED broadcast" into nyc-dev 2016-06-09 22:44:51 +00:00
Stuart Scott
aa587546ec Add UCE Service Down protected broadcast
bug:29173516
Change-Id: I1c5743962dbca9c482ce7d87f6fe570a3249f3fe
2016-06-09 12:58:31 -07:00
Ricky Wai
b1dd80bcfe Disable quiet mode after UserManager.trySetQuietModeDisabled() is unlocked
Bug: 29150970
Change-Id: Ie04cec116564147272896e4a5ca076bbc08e60b1
2016-06-09 17:08:52 +01:00
Svet Ganov
c69266dec6 Protect the android.intent.action.CALL_PRIVILEGED broadcast
bug:29178416

Change-Id: I5e8f1e5423d0dd59cc532a45142b2401f5e5a45b
2016-06-08 22:15:35 -07:00
Amith Yamasani
211b5b10f6 resolve merge conflicts of 718f321 to nyc-mr1-dev
Change-Id: I0021aa5be1822082d8ff026cafa8c8b6b56b90b5
2016-06-08 18:43:46 +00:00
Amith Yamasani
d2b21047c8 Add a separate read permission for oem unlock state
New privileged permission READ_OEM_UNLOCK_STATE added
for system privileged apps.

Changing the unlock state still requires the old
permission OEM_UNLOCK_STATE, which is signature protected.

Bug: 28953956
Change-Id: Iedd2ad1d2d1dc3ae91122d7c406e3ee623a47d61
2016-06-03 14:33:26 -07:00
Suprabh Shukla
4ec430e062 Adding Reset Demo Notification
RetailDemoMOdeService adds a notification which allows user to wipe
current session and start a fresh demo session.

Bug: 27280140
Change-Id: I59dd82d236287206a2ca747210b3423fdc62c185
2016-05-27 15:34:54 -07:00
Dianne Hackborn
a8e6f875bc Fix issue #28931042: wtf in system server
More broadcasts (from telephony) that should be protected.

Also put a little more information in the wtf message to
help determine where broadcasts from out of the system process
are coming from.

Change-Id: Ie3df25c883482ca54c7a7c5db57ca609950f5cbc
2016-05-24 15:35:27 -07:00
Sudheer Shanka
0e351a945b Merge "Update docs for DELETE_PACKAGES permission." into nyc-dev 2016-05-10 20:28:37 +00:00