27741 Commits

Author SHA1 Message Date
Jim Miller
8ae1be1208 Disable fingerprint when remotely reset by DPM
When the device is lost or stolen, it's safer to
fall back to strong authentication (pin, pattern or
password).  This disables fingerprint like we do with
trust agents.

Fixes bug 21620081

Change-Id: I7bbe54be3721b2f160b783daeb3acbe434705046
2015-08-05 20:06:37 +00:00
Yohei Yukawa
db221acce2 Merge "Reduce log spam for the ease of debugging Bug 22857361." into mnc-dev 2015-08-05 17:59:23 +00:00
Svetoslav Ganov
e72377e17a Merge "Fix app ops regressions introduced by the per UID policy change" into mnc-dev 2015-08-05 17:22:42 +00:00
Ian Pedowitz
df5a661107 Merge "Revert "Revert "Permissions: GET_ACCOUNTS permission cleanup""" into mnc-dev 2015-08-05 14:34:13 +00:00
Ian Pedowitz
6cc066df7a Revert "Revert "Permissions: GET_ACCOUNTS permission cleanup""
This reverts commit 845d14db9066c3262f270237b52e315aa71508b2.

Bug: 22942480
Bug: 22902898
Change-Id: If2d0e11594284414953c3dd45475fc7ba3366295
2015-08-05 14:25:15 +00:00
Paul Jensen
dbc4edccfc Merge "Fix NOT_RESTRICTED network capability and enforce it." into mnc-dev 2015-08-05 10:03:47 +00:00
Yohei Yukawa
df5af484f8 Reduce log spam for the ease of debugging Bug 22857361.
Now InputMethodManagerService generates the following log
    Couldn't create dir.: /data/system/inputmethod
not only when it fails to create the directory but also when
/data/system/inputmethod already exists, which makes it
difficult for us to figure out the root cause of boot failure
on emulator environments (Bug 22857361).

With this CL, IMMS no longer shows the message when the
directory already exists.  Basically this is no risk change,
which changes only the condition to show the logging message.

Bug: 22857361
Change-Id: I09aaf501b19845c8309b09b57c23077f1757cd1a
2015-08-04 22:13:28 -07:00
Svetoslav
215b44a1c2 Fix app ops regressions introduced by the per UID policy change
1. Add a missing statement in the parsing code

2. Notify for all packages on UID ap op policy change

bug:22957162

Change-Id: Ic2bd5d07ef52be207e66b63ffe45fd8a456eb5a8
2015-08-04 19:06:41 -07:00
Jae Seo
2094a702b3 Merge "Unregister the existing callback when MediaProjection stops" into mnc-dev 2015-08-05 00:07:11 +00:00
Jeff Sharkey
0d6168835a Merge "Fix moving of apps into legacy ASEC." into mnc-dev 2015-08-04 23:27:43 +00:00
Jean-Michel Trivi
fc5a4bf0e1 Merge "AudioService: check for audio device connection success" into mnc-dev 2015-08-04 20:45:18 +00:00
Jae Seo
ac3f8e5534 Unregister the existing callback when MediaProjection stops
Also removed the unnecessary lock in binderDied.

Bug: 22812934
Change-Id: Ief8856276dbd45a4afa632e51df18bd7d60e6bb1
2015-08-04 13:30:56 -07:00
Svetoslav Ganov
ce68917c84 Merge "Ensure per package and per UID state share same package settings." into mnc-dev 2015-08-04 20:21:44 +00:00
Nick Kralevich
97b68bbe71 Merge "UsbDeviceManager: fix b/21429947 regression (try #2)" into mnc-dev 2015-08-04 19:46:06 +00:00
Julia Reynolds
35a1a2095c Merge "Include dnd status in bugreports." into mnc-dev 2015-08-04 18:27:13 +00:00
Svet Ganov
e7af1942ba Ensure per package and per UID state share same package settings.
When renaming a package during an OTA we were getting in a state
where the package setting mapped to the package UID was not the
same instance as the one we create for the new package mapped.
This leads to a drift between the permissions state for the package
and that state for the UID, resulting in broken for UID permission
checks as granted permissions were never appearing in the per UID
package setting.

bug:22928831

Change-Id: Ib0372632ec84a917304561fd94032cd09bb4c12f
2015-08-04 11:13:47 -07:00
Nick Kralevich
1a008c1ca0 UsbDeviceManager: fix b/21429947 regression (try #2)
As discussed in b/21429947 (commit
674019065bceb4150190bfb1aa63cda9de0a8560), MTP must always be
enabled, even if access to the underlying MTP data is disabled.
Otherwise, Android will not enumerate on the USB bus, and won't
receive notifications from the kernel about USB state changes. This
effectively prevents using MTP functionality on user builds, or
on userdebug/eng builds with adb turned off.

Always ensure that MTP is the default driver mode.

Move the DISALLOW_USB_FILE_TRANSFER filtering of mUsbDataUnlocked from
setting time to the time we post the sticky broadcast.

Remove isUsbDataUnlocked(). It essentially duplicates data in the sticky
broadcast.

Bug: 22447614
Bug: 21429947
Change-Id: I9d0d94cadbf6db6281ebd77bfb7162f9d06520c2
2015-08-04 10:36:37 -07:00
Matthew Williams
fad3c66381 Merge "Remove spurious syncmanager wake-ups" into mnc-dev 2015-08-04 17:35:48 +00:00
Ian Pedowitz
845d14db90 Revert "Permissions: GET_ACCOUNTS permission cleanup"
Temporarily revert ag/735253 until b/22902898 can be resolved with a
proper DMAgent prebuilt drop.

This reverts commit e7ed827a104ba005b93faa2edb3bc77f72b240ec.

Bug: 22902898
2015-08-04 07:47:37 -07:00
Paul Jensen
487ffe7d3d Fix NOT_RESTRICTED network capability and enforce it.
With this change:
1. NOT_RESTRICTED should be removed from NetworkRequests that bring up
   special restricted carrier networks (e.g. IMS, FOTA).
2. NetworkRequests without NOT_RESTRICTED require CONNECTIVITY_INTERNAL
   permission to register
3. Binding sockets to networks without NOT_RESTRICTED requires
   CONNECTIVITY_INTERNAL permission

Bug:21637535
Change-Id: I5991d39facaa6b690e969fe15dcbeec52e918321
2015-08-04 07:24:24 -04:00
Pavlin Radoslavov
29b8c4ab8a Reset the pointer to the Bluetooth GATT service
During error recovery, if the mBluetooth pointer is reset to null,
reset the mBluetoothGatt pointer as well.

Bug: 21756298
Change-Id: I26204ba47dd3c5465bb7de30cfa5dc0f07eee2fd
2015-08-04 04:31:12 +00:00
Jeff Sharkey
94dacb1218 Fix moving of apps into legacy ASEC.
Derive the correct current volume UUID for comparison, and only
check for cluster style installs when moving from internal storage.

Bug: 22616484
Change-Id: Idb6be2aa4aaa9b9f47ebbeeebd65c15a60d5d164
2015-08-03 18:28:06 -07:00
Matthew Williams
665d0140ef Remove spurious syncmanager wake-ups
BUG: 22287469
1) Fix SyncManager waking up every 2 hrs if there is nothing
to do.
2) Fix sync wake-up alarm not being properly updated if the new
alarm was in the future.
2a) Due to staus bar sync signal that were removed post-K
one of the wake-ups was for 30s in the future, removed this
@hide intent completely.
3) The SyncManager will still set a timeout alarm for 5mins after
the start of a sync. Leaving this in as to post to a handler is
less expensive but more complex, and the alarm update is
correctly working now.

Change-Id: If51c9dd68391ccaeb480a17eb5a1364c4afe4c2a
2015-08-03 18:15:12 -07:00
Dianne Hackborn
d9b0f8435b Merge "Fix issue #22860466: viapi security bug - rubber stamping in nested VIs" into mnc-dev 2015-08-04 01:07:36 +00:00
Wale Ogunwale
911bd0d3a5 Merge "Set broadcast nextReceiver correctly when package is disabled" into mnc-dev 2015-08-04 00:33:48 +00:00
Dianne Hackborn
fb81d09d35 Fix issue #22860466: viapi security bug - rubber stamping in nested VIs
Add new Activity.isVoiceInteractionRoot() API that an activity can use
to determine whether it is the root activity of a voice interaction
session started by the user's designated voice interaction service.

This is a special new API that apps must explicitly check, because as
with visual activities the model behind an activity should usually be
that it accomplishes its task by interacting with the user (implicitly
getting their approval) rather than trusting that whoever invoked it
is telling it to do what the user once.  In the voice world, however,
there are some cases where quick interactions want to allow for immediate
execution without further user involvement, so this API allows for that
without opening up security holes from other applications.

Change-Id: Ie02d2458f16cb0b12af825641bcf8beaf086931b
2015-08-03 17:33:38 -07:00
Wale Ogunwale
9a6e13c347 Set broadcast nextReceiver correctly when package is disabled
When we are cleaning up broadcat receivers due to a package been
disabled, it is possible to remove enough recievers to cause the
nextReceiver index to be greater than the size of recievers list.
We now set the nextReceiver to the size of the receiver list
(which means done processing) for this case.

Bug: 22874330
Change-Id: Ie151d1b5bff4c11533b3a8635fe5ee82eb21c13c
2015-08-04 00:29:45 +00:00
Jean-Michel Trivi
6d00e41145 AudioService: check for audio device connection success
When connecting/disconnecting and audio device, AudioService
  was assuming that the call was always successful through
  AudioSystem.setDeviceConnectionState(). In the case of the
  connection of a wired headset (mic + headphones), this also
  causes A2DP to not be used for media playback.
The connection can fail if the audio device being connected
  is not supported by the platform. But if this failure is
  not taken into account for DEVICE_OUT_WIRED_HEADSET or
  HEADPHONES, A2DP would still be avoided even when an A2DP
  device reconnects at boot.
The fix consists in executing the connection logic only when
  the connection was deemed successful. Nothing is altered
  on the disconnection code path, or the direct connection
  of A2DP.
The javadoc is updated in AudioSystem to indicate the return
  codes to take into account in setDeviceConnectionState().

Bug 22511833

Change-Id: I22f0d2c7d4ab4fb9ee1be2f248907f721596a16f
2015-08-03 17:26:01 -07:00
Dianne Hackborn
3011f645ab Merge "Fix issue #22912704: "android.process.acore has stopped" dialog keeps popping up" into mnc-dev 2015-08-03 23:10:07 +00:00
Jeff Sharkey
0faca96f93 Merge "Avoid deadlock by broadcasting outside lock." into mnc-dev 2015-08-03 22:32:36 +00:00
Dianne Hackborn
28ec27cbfa Fix issue #22912704: "android.process.acore has stopped" dialog keeps popping up
Slice 'em up!

Change-Id: Ibba3af7ec5b7f92e6d5e55a57aa838a7f7f936e1
2015-08-03 15:28:28 -07:00
Jeff Sharkey
abc3e85b3c Avoid deadlock by broadcasting outside lock.
We can end up in a rare tangled mess when sending broadcasts while
PackageManager is still trying to deal with scanAvailableAsecs().

Long-term solution is to make Environment.isExternalStorageEmulated()
more robust, but for now we just send these internal broadcasts
after we drop the MountService lock.

Bug: 22858403
Change-Id: I7b43865782f48a679882fd1675b7b961e1292df4
2015-08-03 14:41:13 -07:00
Wale Ogunwale
f85769797e Merge "Also consider task intent when trimming recent tasks" into mnc-dev 2015-08-03 20:31:31 +00:00
Svetoslav Ganov
87920455ae Merge "Fix NPE in AppOpsService" into mnc-dev 2015-08-03 19:41:34 +00:00
Svetoslav Ganov
0855357c4f Merge "User correct category for finding headless sync adapters" into mnc-dev 2015-08-03 19:41:15 +00:00
Svet Ganov
f3807aa572 Fix NPE in AppOpsService
bug:22802981

Change-Id: I73eee5ff9cf1603d8f30355554ef075aa14afd30
2015-08-02 10:14:48 -07:00
Wale Ogunwale
2ab53cf23e Also consider task intent when trimming recent tasks
7cbfcd88657ac7d5ab1baf8c964b669c9bd21e24 we stopped comparing
the tasks realActivity when trimming recent task. This led to
task with the same intent been duplicated in the recents list.
We now consider the task intent when deciding when to trim like
we did pre 510e554283d3dc250f836cd3e4abc36d87319333.

Bug: 22812470
Bug: 22564474
Bug: 18642190
Change-Id: I90b3ab9cf7a06b4691099f697e723d8a54def9fa
2015-08-02 00:30:23 +00:00
Svet Ganov
05069b96d0 User correct category for finding headless sync adapters
bug:22857409

Change-Id: Icc42f1af72c59fba3c60e1bcd558c621df70940a
2015-08-01 12:19:30 -07:00
Svetoslav Ganov
8dbd484850 Merge "Add per UID control to app ops." into mnc-dev 2015-08-01 02:28:02 +00:00
Svet Ganov
2af5708ab0 Add per UID control to app ops.
The app ops mananger service maintains a mapping from UID to
a list of packages where each package is mapped to a list of
non-default app op states (default states are inferred and
not stored). Hence, specifying the app op state for a UID
requires setting the app op for each package in the shared
UID.

This is problematic when installing new packages if there
is a non-default app op policy set for another already
installed package in the same UID as the app op for the new
package has to be updated to be in sync. The package installer
cannot do this as it is in another process and the app op
update will not be atomic. Therefore, the app ops manager
service has to support specifying app op policy on a per
UID basis.

We now have a UID state object that contains the per package
non-default app op states as well as the per uid non-default
app op states. If there is a UID policy specified then it
takes precedence over the per package one. Even further,
changing the uid policy updates the package policies in this
UID if the state is non-default. Changing a package app op
state also updates the app op state for the whole UID if
the per UID policy for this op is non-default. Clearing the
app op state for a package, clears the policy for the UID
as well.

bug:22802981

Change-Id: I78044906d9fcc6066abf07e706c2c88f3397d293
2015-07-31 17:45:27 -07:00
Filip Gruszczynski
00ab35783c Merge "Make enter reveal animation be zorder top." into mnc-dev 2015-07-31 22:31:22 +00:00
Dianne Hackborn
fb68b0ad34 Merge "Fix issue #21895842: Add is_assist_blocked to assist.ViewNode.NodeProperties" into mnc-dev 2015-07-31 22:29:34 +00:00
Jean-Michel Trivi
ffbdb8ad86 Merge "Fix that shutter sound does not play after ringer mode changes to vibrator" into mnc-dev 2015-07-31 22:18:35 +00:00
Dianne Hackborn
afb308d651 Fix issue #21895842: Add is_assist_blocked to assist.ViewNode.NodeProperties
Change-Id: I928882d42d0546cc6a12e803d96131beaba76d4e
2015-07-31 13:10:55 -07:00
Filip Gruszczynski
9e2cf5be18 Make enter reveal animation be zorder top.
This fixes the bug where launcher icons become temporarily visible when
home button is pressed while other activity is starting. By having the
starting activity's animation be zoder top, it will continue to be drawn
on top of the launcher until it animates away.

Bug: 22809202
Change-Id: If5e3c09b7a5df4537c355f94e986766f77ad4943
2015-07-31 19:38:22 +00:00
Wale Ogunwale
f7e00dbd08 Merge "Fixed issue with artifacts during scale-up transition animation" into mnc-dev 2015-07-31 18:45:08 +00:00
Dianne Hackborn
c1836bb0f1 Merge "Change MNC codename to just M." into mnc-dev 2015-07-31 17:11:58 +00:00
Sungmin Choi
841ed0a041 Fix that shutter sound does not play after ringer mode changes to vibrator
Reproduce sequence:

1. Change ring volume to vibration in Settings > Sound & notification
   > Ring volume using touch
2. Launch camera app
3. Capture, but cannot hear shutter sound
4. Even change ringtone to maximum, shutter sound is not played before reboot

Bug: 22589664
Change-Id: I90eb044eaf21f3b558bf050bf1d9f0b33ea4888b
2015-07-31 09:24:51 -07:00
Julia Reynolds
e6b53e6115 Include dnd status in bugreports.
Bug: 22868844
Change-Id: I7b64cd8e27d6ebf254150b68ac791f299a72d4b1
2015-07-31 09:25:10 -04:00
Rubin Xu
9a81a182df Merge "Don't always transfer device owner status to other users." into mnc-dev 2015-07-31 13:11:08 +00:00