1197 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Sudheer Shanka
eaa6c6b540 Update docs for DELETE_PACKAGES permission.
Bug: 28302564
Change-Id: I283b8a5490a189fc90f64aec3278b87a430c2623
2016-05-09 11:44:00 -07:00
Christopher Tate
27d92e4e39 Move the 'pretend idle jobs can run now' broadcast into AMS
It's a protected broadcast, so sending it directly from 'am' is
no longer an option.  This is needed for CTS as well as being
generally useful during app development.

Bug 28406044

Change-Id: I101915a8c6f19454330a8db2079a75023c112582
2016-05-06 11:25:11 -07:00
Ajay Panicker
2759e429d1 Protect TRANSFER_COMPLETE broadcast
Bug: 28621801
Change-Id: Ia90abd00694ae80000f59ee0a17826592fd2159b
2016-05-06 15:11:30 +00:00
Adam Powell
a75d4877af Merge "Have the Resolver/Chooser activities handle resize config changes" into nyc-dev 2016-05-05 16:04:07 +00:00
Adam Powell
46ef0579dd Have the Resolver/Chooser activities handle resize config changes
Both of these activities do additional work and look janky when
rebuilding for a config change, especially in the presence of
multiwindow. As neither of them use layouts or other resources that
vary based on configuration, mark them as handling the relevant config
changes.

Bug 27171954

Change-Id: I38df1d875bcb063d72316b586c4d3f8074c4fad9
2016-05-04 16:47:59 -07:00
TreeHugger Robot
441da79d8a Merge "Marking @SystemApi permissions @hide too." into nyc-dev 2016-05-04 20:50:16 +00:00
Ajay Panicker
2f78bf96d2 List the CONNECTION_STATE_CHANGED broadcast for MAP as protected
Bug: 28527879
Change-Id: Ifb2db87677e92022814bb9704c26009d249ac6ce
2016-05-03 11:24:13 -07:00
Ajay Panicker
65fad18461 List the SDP_RECORD broadcast as protected
Bug: 28257589
Change-Id: I97ef91fa3a7f7ef62fd96ca079e0a6d5a957bc71
2016-05-03 17:32:57 +00:00
Amit Mahajan
a895559a41 Marking @SystemApi permissions @hide too.
Bug: 28287631
Change-Id: Ie0375620689263ebafd6850f2261e090f09521b1
2016-05-02 14:45:46 -07:00
Makoto Onuki
4d36b3a8c5 ShortcutManager: finishing touches
- Change back the throttling quota to 10 calls / day
- Foreground apps are no longer throttled, and when an app comes to
foreground the call counter will be reset.
- When the system locale changes, reset throttling for all packages
for all users.
  See LocalService.onSystemLocaleChangedNoLock() for how it's performed.
  Because the reset must happen before any other apps have a chance to
  publish shortcuts, the logic is not straightforward.

- Added an internal API to reset the throttling upon inline-reply
from a notification.

- Stop supporting icons from "content:" URIs
- Improved javadoc on several APIs.

Also internal refactor needed to this:
- ShortcutUser.getAllPackages()/getAllLaunchers() are no longer
accessible to outer code to prevent accidentally adding/removing the
content.  Outer code should use forAllPackages() / forAllLaunchers().

Bug 27923857

Change-Id: I002511193d1d33718163bb1dabe77610bde58198
2016-05-02 12:02:19 -07:00
Rubin Xu
dae6beda7b Add back protected profile availibility broadcasts.
Bug: 27532254
Change-Id: Ifbf59f64358864cd1d48be5e797c45ec2744eac0
2016-04-25 18:47:36 +01:00
Carlos Valdivia
ffcba67bf9 Merge "Rename GET_PASSWORD_PRIVILEGED and make it signature." into nyc-dev 2016-04-22 22:51:51 +00:00
Carlos Valdivia
714bbd8539 Rename GET_PASSWORD_PRIVILEGED and make it signature.
Now named GET_PASSWORD. Now it is just a signature, not privileged.

Bug: 28295831
Change-Id: Ice93b527edced9546639b6c7096aad933c517548
2016-04-22 15:04:01 -07:00
Svet Ganov
ae0e03a9e0 Cleanup of the PackageInstaller API - Frameworks
The PackageInstaller app manages side-loading apps as well
as permission management. It should be updatable, hence
should rely on system APIs to talk to the platform. This
is the first step of defining an API boundary.

Change-Id: I9814eafd0b22ae03b4b847a7007cdbf14c9e5466
2016-04-22 14:18:32 -07:00
Sujith Ramakrishnan
b5b86c1100 Unbundle RemoteService on TV - part 3
- New service TVRemoteService triggered by SystemServer
- Provider service proxy and watcher for maintaining connections to unbundled
  services which have the BIND_TV_REMOTE_SERVICE permission.
- Shared library to facilitate connections between unbundled service and
  TVRemoteService.
- Unbundled service needs TV_VIRTUAL_REMOTE_CONTROLLER
  permission to be fully functional.

b/23792608

Change-Id: Ief5c6995883d1f7268a73bdd0c920c4c3f42cddb
2016-04-22 12:21:34 -07:00
Rubin Xu
b40667eccd Merge "Remove MANAGED_PROFILE_AVAILABILITY_CHANGED broadcast" into nyc-dev 2016-04-22 09:25:03 +00:00
Trevor Johns
59c9a93fc2 Merge changes from topic 'merge_docs_nyc-dev' into nyc-dev
* changes:
  Remove links to createAndInitializeUser() and createUser()
  Resolve merge conflicts of a5060ee to nyc-dev
2016-04-20 18:35:57 +00:00
Trevor Johns
682c24e228 Resolve merge conflicts of a5060ee to nyc-dev
This undoes the automerger skip which occured in
commit e740c84dc32180214a7fd157105d6c18d30408ee and
replays it as a standard (NOT -s ours) merge.

Change-Id: If5a47be26f73d6a0735c425cd66310a3e2a89086
2016-04-19 02:03:59 -07:00
Rubin Xu
19c2a57c24 Remove MANAGED_PROFILE_AVAILABILITY_CHANGED broadcast
Bug: 27532254
Change-Id: Iaca17355d3ec75fa09c36a5353f40d678cc2c812
2016-04-15 15:17:53 +01:00
Dan Sandler
732bd6cb27 Allow system apps to substitute a different app name in notifications.
This is a privileged permission and is only to be used by
the core OS and related packages whose names are confusing
or misleading when shown in notifications.

The user will always be able to see the true package name by
accessing the notification inspector (longpress or swipe
gesture on the notification row in SystemUI).

Fixes: 26517701
Change-Id: I2b021c9da0757b99df76399666af263668d88070
2016-04-14 13:48:03 +00:00
Jeff Sharkey
e9c752aa37 Another protected broadcast.
Bug: 28133722
Change-Id: I5fe8158a3c66168e1c5482711a487eba55876b73
2016-04-12 10:28:19 -06:00
Ruben Brunk
50e229f1f4 Merge "Add VrManager AIDL interface for use by system apps." into nyc-dev 2016-04-06 21:36:53 +00:00