1070 Commits

Author SHA1 Message Date
Christopher Tate
ca8bce51f9 Fix typo in protected broadcast decls
Bug 26471149

Change-Id: I4332fd9adc52d3bd2f6ee0ce3718bf844f1f9843
2016-01-08 15:39:14 -08:00
Andy Hung
867b339660 Merge "Add setMasterMono and getMasterMono" 2016-01-08 23:17:56 +00:00
Andy Hung
f04b84d4c6 Add setMasterMono and getMasterMono
Bug: 15283594
Bug: 22700363
Change-Id: I5d0552938ec2a54be4450512974d92ff8c77b1e9
2016-01-08 14:02:47 -08:00
Felipe Leme
f3fa0f8fc6 Added new API for URI permissions management.
The new methods are:

- getGrantedUriPermissions(String packageName)
- clearGrantedUriPermissions(String packageName)

These methods will be used by the Settings app to allow users to clear
the URI permissions granted to an application.

BUG: 26447975

Change-Id: I6867402e42b3d6fd03050ec57b73973ccd8a17af
2016-01-07 16:02:58 -08:00
Michal Karpinski
226940ed85 Modifying Shell to accomodate remote bugreports
After receiving android.intent.action.REMOTE_BUGREPORT_FINISHED
in newly created RemoteBugreportReceiver, Shell will generate URI
to the bugreport zip file and send the broadcast
android.intent.action.REMOTE_BUGREPORT_DISPATCH.

Bug: 26152603
Change-Id: I058d626e021b488c9347b45467a4e3505134e79c
2016-01-07 20:02:13 +00:00
Julia Reynolds
9a25da192e Send less unnecessary broadcasts.
Protect the broadcasts we do send.

Change-Id: I440a7accfc4509512063b663c0418a29f06ef09e
2016-01-06 16:43:59 -05:00
Svetoslav Ganov
a7ca3e73bf Merge "Remove FLASHLIGHT permission" 2016-01-05 00:06:03 +00:00
Andre Eisenbach
09bc4e0b7e Protect android.bluetooth.intent.DISCOVERABLE_TIMEOUT
Bug: 26347910
Change-Id: I61b211c3f32c9e79c40c2b07798dd9cb6d82df22
2016-01-04 21:26:57 +00:00
Svetoslav Ganov
1463cebd77 Remove FLASHLIGHT permission
This permissions is not protecting access to the flashlight.
Anyone can use the latter via CameraManager.setTorchMode().

bug:26383626

Change-Id: I44c6395b5a0f80c1c539cffe61715b29b401a775
2016-01-04 12:19:45 -08:00
Jason Monk
d5a204f16e Better service management for QS 3rd party tiles
Better wrapper around the service that will handle rebinding
when it dies, binding when it becomes available, and forwarding
along all messages to the service once it binds.

Also better handling of too many services at a time.  Will only
ever bind to at most 3 tiles and will manage which ones are most
important to show based on pending clicks, last update, etc.

Change-Id: I5f4da0bc751f7eb25baa32e5c0bb9f1bc418f5bb
2016-01-04 14:46:11 -05:00
Jeff Sharkey
96e2035223 Merge "Roll back some broadcasts." 2015-12-16 16:25:11 +00:00
Jeff Sharkey
a050e127bb Roll back some broadcasts.
Bug: 26219971, 26219772
Change-Id: Ic45691419f8fcd1b472a380f09408caf29d3c13d
2015-12-16 09:23:58 -07:00
Jeff Sharkey
63b0318e4b Merge "Protect some more broadcasts." 2015-12-15 01:06:20 +00:00
Jeff Sharkey
4267eacc3b Protect some more broadcasts.
Bug: 26144973
Change-Id: Ic05bca52913ee5545719f0f24bed5b359f31259f
2015-12-14 18:03:04 -07:00
Svetoslav Ganov
edd137b9b9 Merge "Change signature|system permissions to signature|privileged" am: cfed01af4b
am: 3dee9db651

* commit '3dee9db6516fd97d7db3641fc81533cc3553fde8':
  Change signature|system permissions to signature|privileged
2015-12-14 10:43:21 -08:00
Svetoslav Ganov
3dee9db651 Merge "Change signature|system permissions to signature|privileged"
am: cfed01af4b

* commit 'cfed01af4bea6ff9025c31fbe3ed973f47529484':
  Change signature|system permissions to signature|privileged
2015-12-14 10:08:07 -08:00
Yury Zhauniarovich
381e0a4177 Change signature|system permissions to signature|privileged
Permission protection level changed from signature|system,
which is deprecated to signature|privileged.

Change-Id: I697723221617f8c12255d6911d34cd1bf96eff8b
Signed-off-by: Yury Zhauniarovich <y.zhalnerovich@gmail.com>
2015-12-13 20:01:03 +03:00
Felipe Leme
7fff4a1794 Protect android.intent.action.BUGREPORT_STARTED.
This intent is sent by dumpstate when launched with the -P (progress) option.

BUG: 25794470
Change-Id: I6b6265f85f366db3dfca758d90be83c9e3736d7c
2015-12-09 11:55:08 -08:00
Svet Ganov
2acf063da0 Ephemeral cookie API
Add APIs for an ephemeral app to set a cookie which is a small
peice of data cached longer than the app itself. This is useful
for avoiding the user to login every time they use the ephemeral
app. The cookie is stored after an ephemeral app is uninstalled.
Normal apps or ephemeral apps upgraded to full apps can also use
these APIs with the difference that once they are uninstalled
the cookie is deleted.

The cookie size defaults to 16KB and is configurable by a global
settings which can be adjusted via gservices. Also eviction policy
is time based with a default of one month and is configurable by
a global setting which can be adjusted via gservices. If the cert
of the app cahnges (when ephemeral is installed, uninstalled and
installed again) the cooke is wiped to prevent data leaks.

This cahange also adds an API for apps to know whether they run in
an ephemeral mode since it this mode some APIs will not be available.
Another API exposed by this change is private for the system and
exposes all ephemeral apps - installed and uninstalled. Only the
system can call this API. When an ephemeral app is uninstalled the
system stores its name, icon, and permissions. When the app is
reinstalled or a full version is installed the permissions are
propagated.

Change-Id: Id4a73a7750bfbabda0bfcb9bf9018d2062e94367
2015-12-08 19:17:15 +00:00
Jeff Sharkey
39a275b398 Better protection for system broadcast intents.
When the system sends broadcast intents, it's in a very authoritative
position, and many apps blindly trust the sender.  This is why we've
historically had the concept of "protected broadcasts" which can only
be sent by the system.

However, it's far too easy to send new broadcasts from the system
without adding them to the protected list.  This CL adds logic to help
catch those cases.  Currently it just logs the error and continues
sending the broadcast.

Based on boot analysis of a typical device, add 36 new protected
broadcasts.

Bug: 24571095
Change-Id: Ie2cc6b0b2026e67c64730af897e4eb3e0e8404f1
2015-12-07 15:38:37 -07:00
Rubin Xu
0a29ecd8a5 Introduce quiet mode state to managed profile users
Quiet mode means the user will be free from visual and audio interruptions
from apps inside the managed profile, including notifications, widgets and
others. This CL adds the underlying state bit to users and exposes various
APIs to control and query the quiet mode state.

Bug: 22541941
Change-Id: If5f8e5a897843050e83b6ec26cb39561098f12b9
2015-12-07 18:17:46 +00:00
Keun-young Park
b88dd9412e Merge "allow locking UI mode and block launching car dock for automotive" 2015-12-03 21:31:23 +00:00
keunyoung
a771049b2e allow locking UI mode and block launching car dock for automotive
- add config to lock UI mode change: When this is enabled,
  request to change car mode will be ignored. Apps can check
  the config using UiModeManager.isUiModeLocked()
- add config to lock day / night mode: When this is enabled,
  apps cannot change day / night mode without having
  MODIFY_DAY_NIGHT_MODE permission.
  Apps can check the config using UiModeManager.isNightModeLocked()
- add config to disable car dock intent launch for home key
  and mode change
- All new configs have default values which keeps the current behavior.
  Car products should override the configs to get desirable behavior.

bug: 22700993
Change-Id: Ic0e58f3428151e0b1c19a2e9a7d6ded32ff962a6
2015-12-03 13:05:35 -08:00
Chris Wren
cf7021e827 Merge "Notification Assistant API" 2015-12-03 19:23:33 +00:00
Chris Wren
9fa689f8b6 Notification Assistant API
This API allows a single assistant on the device to help the
user manage their notification stream by taking actions on
individual notifications:

  - modifying their priority up or down when they are posted
  - possibly changing if and how the notification interrupts the user
  - adding annotations under notifications

Bug: 22455414
Change-Id: Idf47972bb71c83f1dc1c9ec68a6fa92ac4fc522f
2015-12-03 13:45:10 -05:00
Neil Fuller
568f4de11a Merge "Fix @code escapes" 2015-12-03 09:44:01 +00:00
Keun-young Park
aa8b1c35ad Merge "Revert "allow locking UI mode and block launching car dock for automotive"" 2015-12-03 02:11:20 +00:00
Keun-young Park
3b741e03b3 Revert "allow locking UI mode and block launching car dock for automotive"
This reverts commit 1746369a6bcd1a7219e94366b3774bfdfff08fc6.

Change-Id: I4989e99b8f648145d0dbfe18e557102939e7d1e3
2015-12-03 02:11:00 +00:00
Keun-young Park
ef3ca438c9 Merge "allow locking UI mode and block launching car dock for automotive" 2015-12-03 01:45:12 +00:00
Chong Zhang
8e4f4b3d94 Add permission to prevent third-parth apps from querying OOM scores
bug: 25853091
Change-Id: Ic1cdbf155e1e930405773fd078dfc57fda2d9afa
2015-12-02 12:20:30 -08:00
Neil Fuller
71fbb81b14 Fix @code escapes
The body of {@code} must not be HTML escaped. This is one of
several changes that fix the source in conjunction with a
doclava fix.

Bug: 25757239
Change-Id: Ib38a0fa2dd2a3d68e467f78a812071e763d7e881
2015-12-02 14:24:11 +00:00
Filip Gruszczynski
64cdc1458b Remove dock divider surface when it's not visible.
We achieve the removal by notifying System UI about the visibility of
the dock divider. This way System UI can change visibility of the root
view, which in turn will cause the WMS to destroy or create the surface
as necessary.

Bug: 25844096
Bug: 25683717

Change-Id: Idbc33368db697a059af49106dfadb80c3d7d06c1
2015-11-30 15:21:48 -08:00
Nick Kralevich
a3ecf45fd9 AndroidManifest.xml: More protected broadcasts
Make the following broadcasts protected:

  android.intent.action.PRE_BOOT_COMPLETED
  android.intent.action.USER_INITIALIZE

Bug: 25022002
Change-Id: Ic36e29c51b930e4d7367688ab837c6a40d74ec23
2015-11-25 09:09:47 -08:00
Fyodor Kupolov
7f35036c95 Merge "Added a placeholder home activity for system user" 2015-11-19 23:52:45 +00:00
Fyodor Kupolov
c40e244b4a Added a placeholder home activity for system user
Standard launcher can be uninstalled for system user. A low priority
placeholder home activity is used to make sure the system can always
boot. By default the component is disabled for all users, and is only enabled
for the system user at boot time.

Bug: 25726710
Change-Id: I97eed02c9e2bbd69a737cc1d203110bed837b803
2015-11-19 13:04:35 -08:00
Jason Monk
bbadff8603 Add Quick Settings API
It is a little bit limited right now, but it contains
the lifecycle of a tile getting added/removed, and
listening/not listening and clicks.

SysUI side will need some cleanup later on.

Change-Id: I4db803c8a271f8bf44f2ef710517969a84a95cf0
2015-11-19 14:57:11 -05:00
keunyoung
1746369a6b allow locking UI mode and block launching car dock for automotive
- add config to lock UI mode change: When this is enabled,
  request to change car mode will be ignored. Apps can check
  the config using UiModeManager.isUiModeLocked()
- add config to lock day / night mode: When this is enabled,
  apps cannot change day / night mode without having
  MODIFY_DAY_NIGHT_MODE permission.
  Apps can check the config using UiModeManager.isNightModeLocked()
- add config to disable car dock intent launch for home key
  and mode change
- All new configs have default values which keeps the current behavior.
  Car products should override the configs to get desirable behavior.

bug: 22700993
Change-Id: I351fc53163575d2f523c2d6e886befdb69a5a0c6
2015-11-13 13:11:52 -08:00
Jeff Sharkey
f9fc6d6cc0 More file-based encryption work.
Add granular StorageManager APIs for key creation/destruction and
unlocking/locking.  Start passing through an opaque token as part
of the unlock command, but leave it empty for now.  We now have a
separate "prepare" method that sanity checks that user directories
are correctly setup.

Define a handful of system properties used for marking devices that
should be operating in FBE mode, and if they're emulating FBE.  Wire
a command to "sm", but persisting will come later.

Start using new "encryptionAware" flag on apps previously marked with
coreApp flag, which were apps running in the legacy CryptKeeper
model.  Small tweaks to handle non-encryptionAware voice interaction
services.  Switch PackageManager to consult StorageManager about the
unlocked state of a user.

Bug: 22358539
Change-Id: Ic2865f9b81c10ea39369c441422f7427a3c3c3d6
2015-11-11 10:47:23 -08:00
Svetoslav Ganov
aad093b675 Merge "Allow verifier to grant permissions" into mnc-dr-dev am: cfa233eefb am: 22d7f4c2ed am: 6423c0a29b
am: bd4168540f

* commit 'bd4168540f009c71af1242e5b7866146c8724d6f':
  Allow verifier to grant permissions
2015-11-02 20:00:13 +00:00
Svetoslav Ganov
22d7f4c2ed Merge "Allow verifier to grant permissions" into mnc-dr-dev
am: cfa233eefb

* commit 'cfa233eefb5b77c96a3239a5a51f381a7f0722c9':
  Allow verifier to grant permissions
2015-11-02 19:38:22 +00:00
Svetoslav
7bddf5aa06 Allow verifier to grant permissions
bug:25329324

Change-Id: I2ac01a983ad812df7725a0499a8d9b470a7ea481
2015-10-29 17:02:43 -07:00
John Reck
0529672a8c resolve merge conflicts of a1b8d77ca3 to master.
Change-Id: Ia78c6d31687542dfaba20b177e774333cfb1edb5
2015-10-29 09:05:53 -07:00
Svetoslav Ganov
35151fbc8b Merge "Make SYSTEM_ALERT_WINDOW development permission" into mnc-dr-dev
am: 2658cb002a

* commit '2658cb002abae9341c9a82bfeaed764ba5bf97c8':
  Make SYSTEM_ALERT_WINDOW development permission
2015-10-29 01:16:46 +00:00
Svetoslav Ganov
2658cb002a Merge "Make SYSTEM_ALERT_WINDOW development permission" into mnc-dr-dev 2015-10-29 01:10:46 +00:00
Svetoslav
01af6a42a6 Make SYSTEM_ALERT_WINDOW development permission
bug:25329324

Change-Id: I0086464846bab9424764dd0d726692d96a0f1207
2015-10-27 18:12:06 -07:00
Paul Jensen
b6d8f81b10 Merge "Remove dead ACTION_DATA_CONNECTION_CONNECTED_TO_PROVISIONING_APN" 2015-10-26 15:15:33 +00:00
Lorenzo Colitti
67fb3d7358 Merge "Reinstate CHANGE_NETWORK_STATE as a normal permission." into mnc-dr-dev am: 809dcade99 am: bdc458048a am: bb8f652372
am: 8ecad265b6

* commit '8ecad265b6db57f78dd142e974057c91f69489ed':
  Reinstate CHANGE_NETWORK_STATE as a normal permission.
2015-10-22 06:33:09 +00:00
Lorenzo Colitti
bdc458048a Merge "Reinstate CHANGE_NETWORK_STATE as a normal permission." into mnc-dr-dev
am: 809dcade99

* commit '809dcade9906001f6aa51a68aa783e20bb1d7c0d':
  Reinstate CHANGE_NETWORK_STATE as a normal permission.
2015-10-22 06:18:43 +00:00
Lorenzo Colitti
809dcade99 Merge "Reinstate CHANGE_NETWORK_STATE as a normal permission." into mnc-dr-dev 2015-10-22 06:15:05 +00:00
Lorenzo Colitti
d542705066 Reinstate CHANGE_NETWORK_STATE as a normal permission.
This is a partial revert of http://ag/738523 , but not a full
revert because M apps that have gone through the WRITE_SETTINGS
route to obtain permission to change network state should
continue to have permission to do so.

Specifically:

1. Change the protection level of CHANGE_NETWORK_STATE back from
   "signature|preinstalled|appop|pre23" to "normal". This allows
   apps that declare CHANGE_NETWORK_STATE in their manifest to
   acquire it, even if they target the M SDK or above.
2. Change the ConnectivityManager permission checks so that they
   first check CHANGE_NETWORK_STATE, and then ask Settings
   if the app has the WRITE_SETTINGS runtime permission.
3. Slightly simplify the code in the Settings provider code that
   deals specifically with the ability to change network state.
4. Make the ConnectivityService permissions checks use the
   ConnectivityManager code to avoid code duplication.
5. Update the ConnectivityManager public Javadoc to list both
   CHANGE_NETWORK_STATE and WRITE_SETTINGS.

Bug: 21588539
Bug: 23597341
Change-Id: Ic06a26517c95f9ad94183f6d126fd0de45de346e
2015-10-22 08:33:45 +09:00