4297 Commits

Author SHA1 Message Date
Jeff Davidson
11008a78b8 Don't enforce control permission when preparing consented VPN.
If a VPN app requests to be prepared and has already obtained user
consent, there is no need to additionally enforce the control
permission. We only need to enforce the control permission when a VPN
is first being prepared, where such a preparation would bypass user
consent.

Also ensure that in this case, the VPN being prepared matches the
calling app. Otherwise an app could prepare another pre-consented VPN,
which is not particularly dangerous but is likely unexpected.

Finally, remove misleading comment in ConnectivityService#prepareVpn.
This method IS called from VpnService.prepare(), not only from
system-privileged apps.

Bug: 18442887
Change-Id: Ic3227c6c1c74312697f0576d3811b06692a4edff
2014-11-21 12:56:29 -08:00
Jae Seo
7edaf55aab Merge "TIF: fix setSurface() logic" into lmp-mr1-dev 2014-11-20 18:51:32 +00:00
Dianne Hackborn
d9968438bc Merge "Fix issue with call backs from media process." into lmp-mr1-dev 2014-11-20 18:29:15 +00:00
RoboErik
ac4af18bbb Merge "Handle volume events on master volume devices correctly" into lmp-mr1-dev 2014-11-20 17:59:14 +00:00
Wonsik Kim
59d3669512 Merge "TIF: set audio gain properly" into lmp-mr1-dev 2014-11-20 07:04:25 +00:00
Wonsik Kim
102670f16a TIF: fix setSurface() logic
Bug: 18457632
Change-Id: I8c25a355c71b5f820a1599fd365e5ae62a9a5eeb
2014-11-20 15:09:13 +09:00
Wale Ogunwale
70273e05b2 Merge "Stop activity onVisibleBehindCanceled()" into lmp-mr1-dev 2014-11-20 01:46:28 +00:00
Wonsik Kim
71dfa96f53 TIF: set audio gain properly
Bug: 18392706
Change-Id: I56c21c156a54e7d6dcf787f6b3ab4b901843b922
2014-11-20 09:54:36 +09:00
Wale Ogunwale
1f4c02bb18 Stop activity onVisibleBehindCanceled()
Once an activity is no longer visible behind and has released
its background resources, it is added to the list of activities
that can be stopped, but not actually stopped until the next
major event (like another activity starting). We now schedule
the idle processing once the background resources have been
released so the activity can be stopped as soon as possible.

Bug: 18191707
Change-Id: I472eee949c1a78b4d944454463f03c90e7d2618b
2014-11-19 16:25:51 -08:00
Dianne Hackborn
ff17024e58 Fix issue with call backs from media process.
All but a few lines of this is for issue #16013164, which allowed
apps to do some operations as the media uid by having it call
back to them to open a file.  The problem here is with the tempory
identity stuff in the activity manager, allowing us to make the open
call as the original caller...  ideally we should figure out a way
to just get rid of all of that, but the solution here is actually
easier (even though it doesn't look it) -- we now hand a token over
to the openFile() call that it can use when doing permission checks
to say "yes I would like the check to be against whoever is responsible
for the open".  This allows us to do the uid remapping for only this
one specific set of permission checks, and nothing else.

Also fix issue #17487348: Isolated services can access system services
they shouldn't be able to.  Don't send any system service IBinder objects
down for the first initialization of an isolated process.

Change-Id: I3c70e16e0899d7eef0bae458e83958b41ed2b75e
2014-11-19 14:29:10 -08:00
Andres Morales
6722598ef3 Merge "Add a checksum to FRP partition" into lmp-mr1-dev 2014-11-19 18:09:53 +00:00
Jinsuk Kim
9899b663f4 Merge "CEC: Use thread-safe version for avr info" into lmp-mr1-dev 2014-11-19 00:25:43 +00:00
Jinsuk Kim
86a1e5a16e CEC: Use thread-safe version for avr info
getSystemAudioMode() should have used the thread-safe method
to get the information of the connected AVR.

Bug: 18426137

Change-Id: Ib3edff97337b5960160dd39d551fbfbbfdfce93b
2014-11-19 09:12:21 +09:00
Jeff Sharkey
d6447bbc88 Merge "Speed up GrantUri.hashCode()." into lmp-mr1-dev 2014-11-19 00:09:51 +00:00
Christopher Tate
04eb368d03 Merge "Prevent some alarm pathologies" into lmp-mr1-dev 2014-11-18 23:49:54 +00:00
Andres Morales
2830130770 Add a checksum to FRP partition
It will be hard to mandate the contents
of the FRP partition out of factory. Further, for upgrading
units, it would require that OEMs format the partition and then store
a bit saying that they've done so. This adds another attack vector.
Now defeating FRP means either compromising the FRP partition
OR wherever the OEMs decide to store that bit.

This patch adds a checksum to the FRP partition. If the checksum
is not valid, the partition is wiped - disabling OEM unlock.

This ensures that no matter what data comes on the partition, we will 
always disable OEM unlock by default. It also allows OEMs to not have to
worry about initializing the partition, as it happens automatically. 

Bug: 18322021
Change-Id: Ib30782baa771591c30ea95054d3b83f36fc08cc2
2014-11-18 22:52:58 +00:00
Marco Nelissen
6104fb2862 Merge "Use stream type if set by user" into lmp-mr1-dev 2014-11-18 22:20:05 +00:00
Jeff Sharkey
3597b55d12 Speed up GrantUri.hashCode().
It's used as a key for all outstanding permission grants, so let's
keep it fast.

Bug: 18381401
Change-Id: I4db8dba13302b98f33aacfa3e9acd9a394541cd0
2014-11-18 14:04:18 -08:00
Christopher Tate
498c6cbd78 Prevent some alarm pathologies
* Sanity-check the recurrence interval.  Some buggy apps pass seconds
  where the API expects milliseconds, with the result that the device
  pins the CPU at 100% trying to deliver alarm broadcasts every 60 ms
  or what have you.  The minimum recurrence is now 1 minute.

* Sanity-check alarms being scheduled for the immediate future.  As
  with the above this will catch people trying to schedule alarms
  in a spammy way that keeps the device from entering low-power state.
  The minimum futurity of a new alarm is now 5 seconds.

Bug 17495168

Change-Id: If8ff7d88da48960532ac21a0ba20094af9912603
2014-11-18 12:00:58 -08:00
Marco Nelissen
1c066306c6 Use stream type if set by user
Bug: 18426086
Change-Id: I0df390ddb850f8e2a02e24296f2a0d39f5718839
2014-11-18 11:28:28 -08:00
RoboErik
519c7744b5 Handle volume events on master volume devices correctly
We weren't passing volume events to the master volume correctly on
devices that only use a master volume. This fix checks if the device
only has a master volume and adjusts the master volume instead of the
stream's volume if that's the case.

bug:18305790
Change-Id: Iec35e0a7dc59e6d73c9dfc88da324660bb15b1f3
2014-11-18 11:00:34 -08:00
Alan Viverette
d0c73f49b7 Don't ignore accessibility overlays during visibility computation
Just don't use then to compute unaccounted space. This is a partial
revert of commit 9538eea5ff6f8e2183ced81b5b8eac60b0e774ea.

Change-Id: Ie2e29c8934da8ef707d20db1333abd4e240cd213
2014-11-18 10:25:04 -08:00
Wonsik Kim
b683e6e4c7 TIF: fix NPE for TvInputHardwareManager
Bug: 18365836
Change-Id: I270fac7c73ad8e7225b523a8ec517157310509dc
2014-11-18 12:00:54 +09:00
Lorenzo Colitti
e9f7e65c40 Merge "Populate 464xlat LinkProperties only when the interface comes up." into lmp-mr1-dev 2014-11-18 00:25:53 +00:00
xinhe
a8e6d6fd99 Merge "air plane mode only send to the owner through the quick setting" into lmp-mr1-dev 2014-11-17 22:18:11 +00:00
Jeff Davidson
9a1da68bf7 Expose a SystemApi method to prepare a VPN without consent.
This is NOT designed to be called normally. Most apps (even
system-privileged ones) should request user consent before launching a
VPN. However, it is needed to support flows where consent can be
obtained through other means external to the VPN flow itself.

The API requires a system-privileged permission, CONTROL_VPN.

Bug: 18327583
Change-Id: I1bcdcf0fb5707faeb861ec4535e7ccffea369ae7
2014-11-17 21:03:10 +00:00
Jeff Davidson
e0cb56b02e Merge "Enforce VPN control "permission" with an actual permission." into lmp-mr1-dev 2014-11-17 21:02:10 +00:00
xinhe
98e25fc377 air plane mode only send to the owner through the quick setting
It should send to all the uesers as it behaves in setting

Bug:18353278
Change-Id: Ib46a97e30bfba73dd78fab0c8139d6ccb7ad210f
2014-11-17 11:35:01 -08:00
Wale Ogunwale
465e996776 Merge "Consolidated processing of package boardcasts in AM service." into lmp-mr1-dev 2014-11-17 19:27:08 +00:00
Jorim Jaggi
da5a28635a Merge "Always set correct policy visibility" into lmp-mr1-dev 2014-11-17 19:20:13 +00:00
Dianne Hackborn
76919595f4 Merge "Issue #17551667: Voice interaction service should be disabled..." into lmp-mr1-dev 2014-11-17 18:33:10 +00:00
Jorim Jaggi
235607589c Always set correct policy visibility
Windows without a surface didn't get the correct policy visibility
applied after dismissing lockscreen. Thus, when launching something
from lockscreen, home activity was hidden but never set to visible
again. Before executing the transition to home, we didn't consider
home as a wallpaper target because it was still invisible, and thus
we picked the wrong transition.

Always applying policy visibility when lockscreen changes fixes this
outdated state.

Bug: 18369599
Change-Id: I2933eaf0ab55fe31cb382c46c411033e33a756e0
2014-11-17 19:15:22 +01:00
Jeff Sharkey
9c76a7b3e8 Merge changes Id7f9fb53,I897d7ee8 into lmp-mr1-dev
* changes:
  Prevent user ID reuse until after reboot.
  Warn user when build fingerprints differ.
2014-11-17 17:28:54 +00:00
Prashant Malani
4d269ba320 am fb26a2c8: Merge "Don\'t animate screen brightness if there is a pending off transition" into lmp-sprout-dev
* commit 'fb26a2c80b988118983251caf36492f2ae39559c':
  Don't animate screen brightness if there is a pending off transition
2014-11-15 09:56:57 +00:00
Prashant Malani
fb26a2c80b Merge "Don't animate screen brightness if there is a pending off transition" into lmp-sprout-dev 2014-11-15 09:46:33 +00:00
Chong Zhang
1c814b5c61 Merge "implement HDMI-like demo mode for remote display" into lmp-mr1-dev 2014-11-15 02:25:33 +00:00
Chong Zhang
ae6119ffce implement HDMI-like demo mode for remote display
adding the following two system properties to control remote
display rotation and device orientation lock:

"persist.demo.rotationlock"=true|false
"persist.demo.remoterotation"=landscape|portrait

Bug: 18317603
Change-Id: Id5fe115f895c6a0e72563036b9a98ff3b5037763
2014-11-14 16:39:15 -08:00
Jeff Sharkey
6eb093909c Prevent user ID reuse until after reboot.
We're still seeing rare cases where a device struggles to create a
new user, probably because of a subtle bug in the FUSE daemon.  To
work around this, only allow user IDs reuse after reboot.

Bug: 8302014
Change-Id: Id7f9fb539c6d6d1ff3d47d941af1d9e6b93eca03
2014-11-14 15:58:01 -08:00
Winson Chung
1c903b4e11 Merge "Fixing regression in screen pinning button visibility. (Bug 18390050)" into lmp-mr1-dev 2014-11-14 23:30:37 +00:00
Jinsuk Kim
553aeed9c9 Merge "CEC: Buffer messages coming from unknown device" into lmp-mr1-dev 2014-11-14 22:52:57 +00:00
Jeff Sharkey
2cffc7dafd Warn user when build fingerprints differ.
We're now shipping devices with several partitions which may end up
mismatched, causing subtle runtime issues.  To help manufacturers and
users catch this case, show wanring when we detected mismatched
fingerprints.

Bug: 18357469
Change-Id: I897d7ee8cbf3b8042d3d7d282afab277d242ed3f
2014-11-14 14:28:06 -08:00
Wale Ogunwale
0a41a57802 Consolidated processing of package boardcasts in AM service.
Bug: 18230409
Change-Id: Idc048eb6cfece792b1cdc651146fba965f874430
2014-11-14 13:35:10 -08:00
Jeff Sharkey
84998e2858 Merge "Reduce spammy PackageManager critical logs." into lmp-mr1-dev 2014-11-14 21:06:47 +00:00
Jeff Sharkey
17fe99ac01 Merge "Fix NPE in DropBoxManagerService.dump()" into lmp-mr1-dev 2014-11-14 21:06:22 +00:00
Jeff Sharkey
aea5c6e33d Reduce spammy PackageManager critical logs.
Bug: 18390552
Change-Id: I66e34e6ebf3f644f8585056b9701b7f4582d777e
2014-11-14 11:41:18 -08:00
Winson Chung
86677c9a51 Fixing regression in screen pinning button visibility. (Bug 18390050) 2014-11-14 11:30:53 -08:00
Dianne Hackborn
c0e4aaad1e Issue #17551667: Voice interaction service should be disabled...
...by default on Svelte devices

Also make sure the voice_recognizers feature is not enabled on
low-ram devices, with a new facility for platform feature
declarations to say they should be ignored on low ram devices.

Change-Id: I833c04b12e0e566dd682ed20adb0985c677a696f
2014-11-14 11:05:08 -08:00
Ye Wen
8b69c28b7d Merge "Delay connecting to MmsService until APIs are called for imms" into lmp-mr1-dev 2014-11-14 17:22:12 +00:00
Craig Mautner
135ae6dc3b am 33d92c56: Use package name as custom resolver process name
* commit '33d92c56781f6058c9e682737a06c41f3a2d2f3a':
  Use package name as custom resolver process name
2014-11-14 16:31:20 +00:00
Craig Mautner
33d92c5678 Use package name as custom resolver process name
The process name was being assigned null. This meant that after the
process attached we weren't matching the name in
ActivityStackSupervisor.attachApplicationLocked(). That meant missing
the call to realStartActivityLocked() and then the resolver didn't
start until window manager timed out and resumeTopActivity was
called five seconds later.

Fixes bug 18301267.

Change-Id: If3721caeebb309c6054150b2f707e3d6e38a74d2
2014-11-14 15:09:54 +00:00