1094 Commits

Author SHA1 Message Date
Adam Powell
e7c74cc96e Revert "Pinning components in ChooserActivity"
This reverts commit ec6bc41e1835804533fd21b3ef8047ecd893bcfd.

Bug 26842512

Change-Id: I9fc775d21081885d0e26fca4ade412a18da45b7c
2016-01-28 09:04:20 -08:00
Adam Powell
ec6bc41e18 Pinning components in ChooserActivity
Move ChooserActivity to SystemUI. This is a safer place for it to live
and still be able to persist data to storage.

Add a context menu to long press for chooser targets allowing users to
'pin' a target component from an app. This causes it to sort to the
front of the list so that a user's favorite apps are always available
from share UIs, etc. Similarly, all ChooserTargets from a pinned
component receive an impossibly large boost for sorting so that they
will always appear first.

Bug 26791843

Change-Id: Ib4e603d9d4263403e98ce619287452ddab593044
2016-01-27 17:17:31 -08:00
Peng Xu
a35b5539a9 Dynamic Sensor Discovery Implementation
Defined the dynamic sensor meta data type and UUID of sensor, as well
as the broadcast intent that is related to dynamic sensor status
change.

Modify SensorManager, SystemSensorManager and the JNI layer to support
dynamic sensor discovery.

Added SensorNotificationService to notify apps that sensor connected
or disconnected via broadcast.

Change-Id: I28adfb005357d7e3983d65117d6865830c75027d
2016-01-27 16:37:22 -08:00
Sailesh Nepal
4665f49b9c Merge "Add new public API to allow call screening" 2016-01-27 22:16:59 +00:00
Sailesh Nepal
1bef339b88 Add new public API to allow call screening
This CL adds a new service that the default dialer can implement to
screen incoming calls.

If the service is implemented then Telecom uses it to decide if a call
should be shown to the user or rejected.

Note, I initially tried to simply extend InCallService instead of
creating a whole new service. The problem with this approach is that:
  - this breaks some in call services which show UI as soon as they are
    bound to
  - the in call service lifecycle is tightly coupled to adding and
    removing calls. Call screening happens before a call is added which
    makes it a bad fit to in call service
  - call screening is a function of only the default dialer's in call
    service but the existing code also binds to "controller" call
    services

For these reasons it seemed simpler to just create a new optional
service.

BUG: 22857261
Change-Id: I53f2ef93360e0af19b6ce45af21026be6cf3a7f3
2016-01-27 13:54:12 -08:00
Arunesh Mishra
a772e5fc06 SoundTrigger API improvements.
This CL implements the SoundTrigger API improvements as given in b/22860713. Only the java-level
parts are implemented in this CL.

Key changes include:

* Addition of a SoundTriggerManager/SoundTriggerDetector system API to manage
  the sound-trigger based sound models.
* Addition of a SoundTriggerService service that manages all sound models
  including voice (keyphrase) and sound-trigger based models.
* Includes logic to write sound-trigger based models to the database.
* VoiceInteractionManager service now uses SoundTriggerService instead of
  SoundTriggerHelper.

Bug: 22860713
Change-Id: I7b5c0ed80702527c4460372efeb5e542d3693a69
2016-01-27 12:49:20 -08:00
Carlos Valdivia
3cdbc806ff Merge "Permissions: Get rid of GET_ACCOUNTS" 2016-01-27 00:12:06 +00:00
Sailesh Nepal
58941094d4 Merge "Mark mised call notification as protected" 2016-01-26 21:48:58 +00:00
Rubin Xu
e6e907ea09 Merge "Show dialog when launching work apps is not possible." 2016-01-25 17:51:22 +00:00
Rubin Xu
f13c980169 Turn off profile by stopping the user.
Bug: 22541941
Change-Id: I713ab9b87f3dd1b7bd6206af137562d20a44d76d
2016-01-25 16:29:29 +00:00
Carlos Valdivia
918c55a67c Permissions: Get rid of GET_ACCOUNTS
Bug: 21901286

Change-Id: Id2c42f4d449a32c88078d80dcf952d15e67d536c
2016-01-24 14:57:03 -08:00
Sailesh Nepal
d1a28aa17b Mark mised call notification as protected
This CL marks the missed call notification as protected. This prevents
other apps from being able to broadcast it.

BUG: 22857261
Change-Id: I01ae992f2a5fe255f057c5aa28c5c47d34a0a093
2016-01-23 13:51:32 -08:00
Rubin Xu
58d2599832 Show dialog when launching work apps is not possible.
There are two cases when this could happen. First is when the work
profile is turned off by the user, and the second is when the profile
owner has suspened the package.

Bug: 22776761
Bug: 22541941
Change-Id: Ibc671e93f87dff0168bb7643494b9d6b45a1a7f9
2016-01-22 19:53:01 +00:00
Makoto Onuki
efd88c3beb Merge "Add missing system broadcast actions to the protected list." 2016-01-21 21:34:59 +00:00
Makoto Onuki
730a759254 Add missing system broadcast actions to the protected list.
Bug 26697573

Change-Id: I39e6b90b38c6e1dbe4978be1cb2a10d72b015cba
2016-01-21 12:17:14 -08:00
Andrei Stingaceanu
69d5ebc59e Suspend apps - broadcast intent and API
Send a protected broadcast to registered receivers only
when packages get suspended.

Bug: 22776761
Change-Id: I043053ed45bdc202ead18518a0c1e39cce47947c
2016-01-20 17:52:41 +00:00
Michal Karpinski
a8c8851caa Merge "DPM changes to support remote bugreports" 2016-01-18 10:00:55 +00:00
Amith Yamasani
12747879b0 User creation with an intent
New API for an app to request creating a new user with
a given user name and seed account information for the
SetupWizard to use when that user is switched into.

Also adds system APIs to read the seed account data from
UserManager.

Bug: 22776757
Change-Id: I0bc3f11ee19c15e0ee2a908c88d98b13296cc30d
2016-01-15 17:06:35 -08:00
Jaewan Kim
52632e21fa PIP: Use long press HOME for PIP on Android TV (2/2)
Bug: 25580820
Change-Id: Ic269132ec7de1e725989ad57a1ee205b3334e3bb
2016-01-15 09:29:34 -08:00
Michal Karpinski
3fc437e89b DPM changes to support remote bugreports
Bug: 22860136
Change-Id: If984318e421f511d9b0fc7138aacd36d5334698f
2016-01-14 11:00:22 +00:00
Dongwon Kang
ab064b3b36 Merge "Add a way for SystemUI to receive media resource (e.g. A/V codec) usage" 2016-01-13 18:21:00 +00:00
Dongwon Kang
2034a4c4c5 Add a way for SystemUI to receive media resource (e.g. A/V codec) usage
Bug: 26175834
Change-Id: If506a533c5c7b567e770217a9430bf68b539677a
2016-01-12 10:54:34 -08:00
Jeremy Klein
502658dd90 Merge "Add a TETHER_PRIVILEGED permission and use it where needed." 2016-01-11 19:10:22 +00:00
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
Jeremy Klein
d42209db96 Add a TETHER_PRIVILEGED permission and use it where needed.
BUG: 26247383
Change-Id: I73f7227d77926faa9081e83eccb83c8ddee33e08
2016-01-07 10:11:24 -08: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