OSDN Git Service

android-x86/frameworks-base.git
9 years agoMerge "Consider channel index masks when calculating channel counts." into mnc-dev
Paul Mclean [Thu, 6 Aug 2015 18:59:06 +0000 (18:59 +0000)]
Merge "Consider channel index masks when calculating channel counts." into mnc-dev

9 years agoMerge "Add a (hidden) mapping for REMOTE_SUBMIX device types for CTS test." into...
Paul Mclean [Thu, 6 Aug 2015 18:58:33 +0000 (18:58 +0000)]
Merge "Add a (hidden) mapping for REMOTE_SUBMIX device types for CTS test." into mnc-dev

9 years agoMerge "Update anchor background on the correct view in PopupWindow" into mnc-dev
Alan Viverette [Thu, 6 Aug 2015 17:48:22 +0000 (17:48 +0000)]
Merge "Update anchor background on the correct view in PopupWindow" into mnc-dev

9 years agoMerge "Fix issue #22843150: fragment transaction crash from onRequestPermisssionResul...
Dianne Hackborn [Thu, 6 Aug 2015 16:48:34 +0000 (16:48 +0000)]
Merge "Fix issue #22843150: fragment transaction crash from onRequestPermisssionResult" into mnc-dev

9 years agoUpdate anchor background on the correct view in PopupWindow
Alan Viverette [Thu, 6 Aug 2015 16:36:47 +0000 (12:36 -0400)]
Update anchor background on the correct view in PopupWindow

We were always setting the background of the decor view when the
"above anchor" state changed, rather than the background view.

Bug: 22970244
Change-Id: I3cd7202767ee47cb415736bb3c07369801abccd8

9 years agoMerge "Avoid changing internal state of shared drawable" into mnc-dev
Chet Haase [Thu, 6 Aug 2015 16:23:20 +0000 (16:23 +0000)]
Merge "Avoid changing internal state of shared drawable" into mnc-dev

9 years agoAdd a (hidden) mapping for REMOTE_SUBMIX device types for CTS test.
Paul McLean [Thu, 6 Aug 2015 15:35:55 +0000 (09:35 -0600)]
Add a (hidden) mapping for REMOTE_SUBMIX device types for CTS test.

Bug: 22792346
Change-Id: I8a10eb68368ede4baa0d2fd0d71cfff2fced4b75

9 years agoMerge "Update documentation of DevicePolicyManager intents." into mnc-dev
Alan Treadway [Thu, 6 Aug 2015 15:47:34 +0000 (15:47 +0000)]
Merge "Update documentation of DevicePolicyManager intents." into mnc-dev

9 years agoUpdate documentation of DevicePolicyManager intents.
Alan Treadway [Tue, 28 Jul 2015 10:49:35 +0000 (11:49 +0100)]
Update documentation of DevicePolicyManager intents.

Add additional information about the intentions of result codes in
device-owner and profile-owner launch intents, in alignment with
changes made in http://ag/732321.

Bug: 21063241
Change-Id: I0e0a931739cee5f46e8fc7622fe1de49e26dcb0a

9 years agoAvoid changing internal state of shared drawable
Chet Haase [Thu, 6 Aug 2015 04:44:42 +0000 (21:44 -0700)]
Avoid changing internal state of shared drawable

An optimization in ImageView nulled out the internal bitmap of a cached
internal BitmapDrawable object created to wrap a bitmap set on the ImageView.
However, apps can get ahold of that cached object via Drawable.getBitmap(),
resulting in having the state of that object they may be using changing out
from under them.

The change is to null out the cached object when getDrawable() is called, to avoid
leaking internal state that we may change.
That way, the app can continue to use that object if they want to, but we are no longer
relying on it internally, and will create a new one when needed.

Issue #22930646  [1P Regression from L] ImageView is blanked out in Activity in Google Express

Change-Id: Ic86cb93be4897b6ba247c1fabcda507e4ba01300

9 years agoMerge "Make the NullVibrator really null." into mnc-dev
Michael Wright [Thu, 6 Aug 2015 13:52:34 +0000 (13:52 +0000)]
Merge "Make the NullVibrator really null." into mnc-dev

9 years agoMerge "Don't dispatch when non-interactive and the display is off." into mnc-dev
Michael Wright [Thu, 6 Aug 2015 13:50:37 +0000 (13:50 +0000)]
Merge "Don't dispatch when non-interactive and the display is off." into mnc-dev

9 years agoMerge "Store ringer mode on entering DND mode so it can be restored on exit." into...
Julia Reynolds [Thu, 6 Aug 2015 13:41:01 +0000 (13:41 +0000)]
Merge "Store ringer mode on entering DND mode so it can be restored on exit." into mnc-dev

9 years agoMerge "Import translations. DO NOT MERGE" into mnc-dev
Geoff Mendal [Thu, 6 Aug 2015 04:12:38 +0000 (04:12 +0000)]
Merge "Import translations. DO NOT MERGE" into mnc-dev

9 years agoMerge "Pass connection configuration when setting wifi info" into mnc-dev
Mitchell Wills [Thu, 6 Aug 2015 02:23:44 +0000 (02:23 +0000)]
Merge "Pass connection configuration when setting wifi info" into mnc-dev

9 years agoImport translations. DO NOT MERGE
Geoff Mendal [Thu, 6 Aug 2015 00:54:19 +0000 (17:54 -0700)]
Import translations. DO NOT MERGE

Auto-generated-cl: translation import

Bug: 22842106
Change-Id: I473bc0dc200e1eec3bd0f907526fcf808ee86e36

9 years agoMerge "Removing tethering overlay for mcc202-mnc05 (VF Greece)." into mnc-dev
Amit Mahajan [Wed, 5 Aug 2015 23:09:58 +0000 (23:09 +0000)]
Merge "Removing tethering overlay for mcc202-mnc05 (VF Greece)." into mnc-dev

9 years agoMerge "Disable fingerprint when remotely reset by DPM" into mnc-dev
Jim Miller [Wed, 5 Aug 2015 22:47:57 +0000 (22:47 +0000)]
Merge "Disable fingerprint when remotely reset by DPM" into mnc-dev

9 years agoPass connection configuration when setting wifi info
Mitchell Wills [Mon, 3 Aug 2015 16:46:08 +0000 (09:46 -0700)]
Pass connection configuration when setting wifi info

This allows the both the ssid and connection info to be verified when
updating wifi info.

Bug: 22797622
Change-Id: I82d771a299e17469683516c6b1077cb260981812

9 years agoMerge "Correctly hide setConnectionService" into mnc-dev
Yorke Lee [Wed, 5 Aug 2015 22:13:07 +0000 (22:13 +0000)]
Merge "Correctly hide setConnectionService" into mnc-dev

9 years agoFix issue #22843150: fragment transaction crash from onRequestPermisssionResult
Dianne Hackborn [Wed, 5 Aug 2015 22:01:28 +0000 (15:01 -0700)]
Fix issue #22843150: fragment transaction crash from onRequestPermisssionResult

Add new Activity callback to tell it when its saved state has
been invalidated.

The problem is that delivering the permission result does not go
through a path where the compatibility code can see it first to
mark its fragment manager as no longer having saved state.  So this
new callback gives it a place to do that.

Change-Id: I5a4a185d9c746bae1afb5c588aba82c8daccf079

9 years agoMerge changes I85106f37,I7db398aa into mnc-dev
Deepanshu Gupta [Wed, 5 Aug 2015 21:11:40 +0000 (21:11 +0000)]
Merge changes I85106f37,I7db398aa into mnc-dev

* changes:
  Make getInt in BridgeTypedArray accept empty String.
  Fix layout mirroring.

9 years agoMerge "Documenting behavior of returning a 0-length array for formats, channels,...
Paul Mclean [Wed, 5 Aug 2015 20:50:29 +0000 (20:50 +0000)]
Merge "Documenting behavior of returning a 0-length array for formats, channels, rates queries for analog devices." into mnc-dev

9 years agoDisable fingerprint when remotely reset by DPM
Jim Miller [Wed, 5 Aug 2015 20:03:21 +0000 (13:03 -0700)]
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

9 years agoDocumenting behavior of returning a 0-length array for formats,
Paul McLean [Fri, 31 Jul 2015 15:28:22 +0000 (09:28 -0600)]
Documenting behavior of returning a 0-length array for formats,
channels, rates queries for analog devices.

Bug: 22729461
Change-Id: I3cb1d586f6264e3627cbb0261a3b2c74ca51cf6b

9 years agoMerge "MidiManager: use ConcurrentHashMap" into mnc-dev
Phil Burk [Wed, 5 Aug 2015 19:43:21 +0000 (19:43 +0000)]
Merge "MidiManager: use ConcurrentHashMap" into mnc-dev

9 years agoMerge "Keep OverScroller.SplineOverScroller state consistent." into mnc-dev
Vladislav Kaznacheev [Wed, 5 Aug 2015 19:34:38 +0000 (19:34 +0000)]
Merge "Keep OverScroller.SplineOverScroller state consistent." into mnc-dev

9 years agoRemoving tethering overlay for mcc202-mnc05 (VF Greece).
Amit Mahajan [Wed, 5 Aug 2015 18:11:56 +0000 (11:11 -0700)]
Removing tethering overlay for mcc202-mnc05 (VF Greece).

Bug: 22942869
Change-Id: I1d80ab3a66f7e1cd8e497b0d4236f80b0a126228

9 years agoMerge "Reduce log spam for the ease of debugging Bug 22857361." into mnc-dev
Yohei Yukawa [Wed, 5 Aug 2015 17:59:23 +0000 (17:59 +0000)]
Merge "Reduce log spam for the ease of debugging Bug 22857361." into mnc-dev

9 years agoImplement Bluetooth settings factory reset (2/5)
Ajay Panicker [Tue, 28 Jul 2015 23:52:09 +0000 (16:52 -0700)]
Implement Bluetooth settings factory reset (2/5)

Implemented the factory reset function to be used to reset all bluetooth
settings on device to factory default

Bug: 16161518

9 years agoMerge "Fix app ops regressions introduced by the per UID policy change" into mnc-dev
Svetoslav Ganov [Wed, 5 Aug 2015 17:22:42 +0000 (17:22 +0000)]
Merge "Fix app ops regressions introduced by the per UID policy change" into mnc-dev

9 years agoMerge "Fix incorrect default wifi power draw values" into mnc-dev
Mitchell Wills [Wed, 5 Aug 2015 16:59:23 +0000 (16:59 +0000)]
Merge "Fix incorrect default wifi power draw values" into mnc-dev

9 years agoMerge "Update javadoc for EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE" into mnc-dev
Rubin Xu [Wed, 5 Aug 2015 16:55:50 +0000 (16:55 +0000)]
Merge "Update javadoc for EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE" into mnc-dev

9 years agoMerge "READ_SMS allows getLine1Number() [1/3]" into mnc-dev
Makoto Onuki [Wed, 5 Aug 2015 16:55:35 +0000 (16:55 +0000)]
Merge "READ_SMS allows getLine1Number() [1/3]" into mnc-dev

9 years agoUpdate javadoc for EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE
Rubin Xu [Wed, 5 Aug 2015 15:29:13 +0000 (16:29 +0100)]
Update javadoc for EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE

Starting from M, this extra is also supported in NFC bump provisioning.

Bug: 22914251
Change-Id: I835d12918c5de4ff782245def6565eeb0f052934

9 years agoMerge "NPE occured when trying to parcel voice features." into mnc-dev
Niels Egberts [Wed, 5 Aug 2015 15:57:55 +0000 (15:57 +0000)]
Merge "NPE occured when trying to parcel voice features." into mnc-dev

9 years agoConsider channel index masks when calculating channel counts.
Paul McLean [Tue, 4 Aug 2015 19:57:29 +0000 (13:57 -0600)]
Consider channel index masks when calculating channel counts.

Bug: 22874806
Change-Id: I04b74f5939bb81350d9e37b9629f8bbc242bffe7

9 years agoNPE occured when trying to parcel voice features.
Niels Egberts [Wed, 5 Aug 2015 14:41:18 +0000 (15:41 +0100)]
NPE occured when trying to parcel voice features.

The default features member should be an empty list instead of null.

Bug: 22404239
Change-Id: Ia39982f17fd3b3cd0f3556435170aed2fac14fb8

9 years agoMerge "Revert "Revert "Permissions: GET_ACCOUNTS permission cleanup""" into mnc-dev
Ian Pedowitz [Wed, 5 Aug 2015 14:34:13 +0000 (14:34 +0000)]
Merge "Revert "Revert "Permissions: GET_ACCOUNTS permission cleanup""" into mnc-dev

9 years agoRevert "Revert "Permissions: GET_ACCOUNTS permission cleanup""
Ian Pedowitz [Wed, 5 Aug 2015 14:23:43 +0000 (14:23 +0000)]
Revert "Revert "Permissions: GET_ACCOUNTS permission cleanup""

This reverts commit 845d14db9066c3262f270237b52e315aa71508b2.

Bug: 22942480
Bug: 22902898
Change-Id: If2d0e11594284414953c3dd45475fc7ba3366295

9 years agoStore ringer mode on entering DND mode so it can be restored on exit.
Julia Reynolds [Fri, 31 Jul 2015 13:49:55 +0000 (09:49 -0400)]
Store ringer mode on entering DND mode so it can be restored on exit.

Store the value in Settings now, so it's not lost on reboot.
Bug: 22338093

Change-Id: Icc843ef2bf735c23aabf9ceddd82283d51424220

9 years agoMerge "Fix NOT_RESTRICTED network capability and enforce it." into mnc-dev
Paul Jensen [Wed, 5 Aug 2015 10:03:47 +0000 (10:03 +0000)]
Merge "Fix NOT_RESTRICTED network capability and enforce it." into mnc-dev

9 years agoReduce log spam for the ease of debugging Bug 22857361.
Yohei Yukawa [Wed, 5 Aug 2015 05:11:11 +0000 (22:11 -0700)]
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

9 years agoMerge "Create a special CONSTRAINED font bucket in frameworks." into mnc-dev
Roozbeh Pournader [Wed, 5 Aug 2015 03:04:58 +0000 (03:04 +0000)]
Merge "Create a special CONSTRAINED font bucket in frameworks." into mnc-dev

9 years agoFix app ops regressions introduced by the per UID policy change
Svetoslav [Wed, 5 Aug 2015 02:03:40 +0000 (19:03 -0700)]
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

9 years agoMerge "Boot loop when SSID has non UTF-8 character in the name" into mnc-dev
xin He [Wed, 5 Aug 2015 01:10:34 +0000 (01:10 +0000)]
Merge "Boot loop when SSID has non UTF-8 character in the name" into mnc-dev

9 years agoMerge "Unregister the existing callback when MediaProjection stops" into mnc-dev
Jae Seo [Wed, 5 Aug 2015 00:07:11 +0000 (00:07 +0000)]
Merge "Unregister the existing callback when MediaProjection stops" into mnc-dev

9 years agoCreate a special CONSTRAINED font bucket in frameworks.
Roozbeh Pournader [Tue, 4 Aug 2015 17:17:08 +0000 (10:17 -0700)]
Create a special CONSTRAINED font bucket in frameworks.

This is a temporary font profile to get razor and razorg (Nexus 7,
2013 version). It's not tested thoroughly, and should not be used for
any other devices.

The CONSTRAINED profile removes Bamum, Lisu, Mandaic, Mongolian, New
Tai Lue, Syriac, Tibetan, and Vai fonts from razor[g] devices, and
switches the CJK fonts to the limited pre-Lollipop fonts.

Bug: 22929087
Change-Id: I58c1693ee45e54b429013029d236617834446811

9 years agoMerge "Fix moving of apps into legacy ASEC." into mnc-dev
Jeff Sharkey [Tue, 4 Aug 2015 23:27:43 +0000 (23:27 +0000)]
Merge "Fix moving of apps into legacy ASEC." into mnc-dev

9 years agoCorrectly hide setConnectionService
Yorke Lee [Tue, 4 Aug 2015 23:07:19 +0000 (16:07 -0700)]
Correctly hide setConnectionService

Bug: 22957023
Change-Id: Ia3bd74f2fcc9f9dd5c9298f4505c18ee652436be

9 years agoMerge "Make ResourceKey always use non-null configuration override." into mnc-dev
Filip Gruszczynski [Tue, 4 Aug 2015 23:02:19 +0000 (23:02 +0000)]
Merge "Make ResourceKey always use non-null configuration override." into mnc-dev

9 years agoMidiManager: use ConcurrentHashMap
Phil Burk [Tue, 4 Aug 2015 22:38:55 +0000 (15:38 -0700)]
MidiManager: use ConcurrentHashMap

So that adding and removing device listeners is thread-safe.

Bug: 22909752
Change-Id: I1369ab53c865b54e6e5eb8ea3e8d437fdd1d7197
Signed-off-by: Phil Burk <philburk@google.com>
9 years agoMake ResourceKey always use non-null configuration override.
Filip Gruszczynski [Tue, 4 Aug 2015 21:46:33 +0000 (14:46 -0700)]
Make ResourceKey always use non-null configuration override.

We don't differentiate between null conifguration and
Configuration.EMPTY, but if ResourceKey uses both, it will produce
different hashes and won't be equal. This CL makes ResourceKey always
hold a non null reference to the Configuration object.

We started delivering the configuration overrides in
Ib2c7be0b427f5ce05e7a362bcdd496ddbc9164f0, which changed behavior from
using always null, to using both null and Conifguration.EMPTY for empty
confgiuration. Now we will switch to using only one value, which is
Configuration.EMPTY.

Bug: 22620824
Change-Id: I090fd90ac21a6b3ebc7f2974a91dd7c861af10d7

9 years agoDon't dispatch when non-interactive and the display is off.
Michael Wright [Tue, 4 Aug 2015 22:03:03 +0000 (23:03 +0100)]
Don't dispatch when non-interactive and the display is off.

We generally dispatch while the display is off and we're dozing,
under the assumption that the dozing window is controlling the
display state and wants the events as they come in. Unfortunately,
it's possible that we're dozing but something other than the dozing
component has focus, which leads to dropped and cancelled events.
This was preventing media events from being propogated to the media
session under a number of scenarios, so for now we'll just prevent
dispatching entirely while the display is off and the device is in a
non-interactive state. Going forward we should figure out a better
solution so that doze components can continue to receiving input
events throughout their lifecycle, regardless of the display state.

Bug: 22422588
Change-Id: Ia38bd81245234743e84548841d6478f75a6b8775

9 years agoMerge "Charge apps for wifi tx time while scanning" into mnc-dev
Mitchell Wills [Tue, 4 Aug 2015 21:55:46 +0000 (21:55 +0000)]
Merge "Charge apps for wifi tx time while scanning" into mnc-dev

9 years agoCharge apps for wifi tx time while scanning
Mitchell Wills [Thu, 30 Jul 2015 00:47:44 +0000 (17:47 -0700)]
Charge apps for wifi tx time while scanning

Bug: 22955562
Change-Id: Ie2c6ab65e7b592272e1cad120ac606fcfd6ea677

9 years agoKeep OverScroller.SplineOverScroller state consistent.
Vladislav Kaznacheev [Tue, 4 Aug 2015 17:57:04 +0000 (10:57 -0700)]
Keep OverScroller.SplineOverScroller state consistent.

Currently update() bails out early if it is called
too soon after mStartTime has been set. In this case
mCurrentPosition remains holding an obsolete value
from a previous animation. This causes some strange
behavior (see the referenced bug).

This patch makes sure that mCurrentPosition is
updated every time that mStart is updated.

Bug: 22950559
Change-Id: I07b92f30ebe29856f4e04dc19a4820123713fd7e

9 years agoMark missed calls as read in calllog restore(2/2)
Roshan Pius [Tue, 4 Aug 2015 20:23:03 +0000 (13:23 -0700)]
Mark missed calls as read in calllog restore(2/2)

When missed calls are restored by CalllogBackupAgent using the addCall
API of CallLog provider, we were setting the IS_READ flag to 0 which
resulted in user getting a missed call notifications for all missed
calls after restore.
Adding a new addCall API signature which can specify the value to be put in the
IS_READ field when a call is added to the calllog provider. This will be
used by the CallLogBackupAgent to mark all restored missed calls as
read.

BUG: 22908952
Change-Id: Iee3bea09fbdefef09c7eb6c6c61728cb4d94d9e7

9 years agoMerge "AudioService: check for audio device connection success" into mnc-dev
Jean-Michel Trivi [Tue, 4 Aug 2015 20:45:18 +0000 (20:45 +0000)]
Merge "AudioService: check for audio device connection success" into mnc-dev

9 years agoUnregister the existing callback when MediaProjection stops
Jae Seo [Tue, 4 Aug 2015 18:12:13 +0000 (11:12 -0700)]
Unregister the existing callback when MediaProjection stops

Also removed the unnecessary lock in binderDied.

Bug: 22812934
Change-Id: Ief8856276dbd45a4afa632e51df18bd7d60e6bb1

9 years agoMerge "Ensure per package and per UID state share same package settings." into mnc-dev
Svetoslav Ganov [Tue, 4 Aug 2015 20:21:44 +0000 (20:21 +0000)]
Merge "Ensure per package and per UID state share same package settings." into mnc-dev

9 years agoMerge "Revert "Do not forceLayout when window is resized"" into mnc-dev
Yohei Yukawa [Tue, 4 Aug 2015 19:51:20 +0000 (19:51 +0000)]
Merge "Revert "Do not forceLayout when window is resized"" into mnc-dev

9 years agoMerge "UsbDeviceManager: fix b/21429947 regression (try #2)" into mnc-dev
Nick Kralevich [Tue, 4 Aug 2015 19:46:06 +0000 (19:46 +0000)]
Merge "UsbDeviceManager: fix b/21429947 regression (try #2)" into mnc-dev

9 years agoMerge "Fix crash in kModeProcessNoContext" into mnc-dev
John Reck [Tue, 4 Aug 2015 19:38:15 +0000 (19:38 +0000)]
Merge "Fix crash in kModeProcessNoContext" into mnc-dev

9 years agoMake getInt in BridgeTypedArray accept empty String.
Deepanshu Gupta [Tue, 4 Aug 2015 18:57:10 +0000 (11:57 -0700)]
Make getInt in BridgeTypedArray accept empty String.

The XML editor already warns about the empty strings in places where an
int value is required. There's no need to show another warning for it in
the rendering panel. Also, the rendering might have also failed when the
empty string is encountered. Try an continue the rendering, because no
rendering state is really bad.

Change-Id: I85106f37e4462f237e85f0b065b4ce8a4bfabf4d

9 years agoFix layout mirroring.
Deepanshu Gupta [Tue, 4 Aug 2015 18:56:44 +0000 (11:56 -0700)]
Fix layout mirroring.

Change-Id: I7db398aa2d11dac1210e84922138f78f0c23bb9b

9 years agoMerge "Include dnd status in bugreports." into mnc-dev
Julia Reynolds [Tue, 4 Aug 2015 18:27:13 +0000 (18:27 +0000)]
Merge "Include dnd status in bugreports." into mnc-dev

9 years agoFix crash in kModeProcessNoContext
John Reck [Tue, 4 Aug 2015 18:17:39 +0000 (11:17 -0700)]
Fix crash in kModeProcessNoContext

Bug: 22931143
Change-Id: I9897a28b1edd006aee67ae2343874ad92bbd15a0

9 years agoEnsure per package and per UID state share same package settings.
Svet Ganov [Tue, 4 Aug 2015 18:13:44 +0000 (11:13 -0700)]
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

9 years agoUsbDeviceManager: fix b/21429947 regression (try #2)
Nick Kralevich [Thu, 30 Jul 2015 23:29:57 +0000 (16:29 -0700)]
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

9 years agoMerge "Remove spurious syncmanager wake-ups" into mnc-dev
Matthew Williams [Tue, 4 Aug 2015 17:35:48 +0000 (17:35 +0000)]
Merge "Remove spurious syncmanager wake-ups" into mnc-dev

9 years agoFix incorrect default wifi power draw values
Mitchell Wills [Thu, 30 Jul 2015 17:46:05 +0000 (10:46 -0700)]
Fix incorrect default wifi power draw values

Bug: 22848679
Change-Id: Ief4e3e05b051b93efbe30fdc8903cce6765d2ed8

9 years agoRevert "Permissions: GET_ACCOUNTS permission cleanup"
Ian Pedowitz [Tue, 4 Aug 2015 14:47:37 +0000 (07:47 -0700)]
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

9 years agoMerge "Fail silently if a process trys to launch an acitvity for background user...
Wale Ogunwale [Tue, 4 Aug 2015 14:38:04 +0000 (14:38 +0000)]
Merge "Fail silently if a process trys to launch an acitvity for background user" into mnc-dev

9 years agoMerge "QS: Allow Flashlight Tile to handle reset state" into mnc-dev
Jason Monk [Tue, 4 Aug 2015 13:43:21 +0000 (13:43 +0000)]
Merge "QS: Allow Flashlight Tile to handle reset state" into mnc-dev

9 years agoFix NOT_RESTRICTED network capability and enforce it.
Paul Jensen [Fri, 24 Jul 2015 19:57:11 +0000 (15:57 -0400)]
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

9 years agoReset the pointer to the Bluetooth GATT service
Pavlin Radoslavov [Tue, 4 Aug 2015 00:44:47 +0000 (17:44 -0700)]
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

9 years agoFix moving of apps into legacy ASEC.
Jeff Sharkey [Mon, 3 Aug 2015 16:31:33 +0000 (09:31 -0700)]
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

9 years agoMerge "BatteryStats: Add debug logging to find source of b/22716723" into mnc-dev
Adam Lesinski [Tue, 4 Aug 2015 01:26:27 +0000 (01:26 +0000)]
Merge "BatteryStats: Add debug logging to find source of b/22716723" into mnc-dev

9 years agoRemove spurious syncmanager wake-ups
Matthew Williams [Mon, 3 Aug 2015 22:56:36 +0000 (15:56 -0700)]
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

9 years agoMerge "Fix issue #22860466: viapi security bug - rubber stamping in nested VIs" into...
Dianne Hackborn [Tue, 4 Aug 2015 01:07:36 +0000 (01:07 +0000)]
Merge "Fix issue #22860466: viapi security bug - rubber stamping in nested VIs" into mnc-dev

9 years agoMerge "Make default selection for contact sharing to "Checked"." into mnc-dev
Prem Kumar [Tue, 4 Aug 2015 00:41:46 +0000 (00:41 +0000)]
Merge "Make default selection for contact sharing to "Checked"." into mnc-dev

9 years agoMerge "Set broadcast nextReceiver correctly when package is disabled" into mnc-dev
Wale Ogunwale [Tue, 4 Aug 2015 00:33:48 +0000 (00:33 +0000)]
Merge "Set broadcast nextReceiver correctly when package is disabled" into mnc-dev

9 years agoFix issue #22860466: viapi security bug - rubber stamping in nested VIs
Dianne Hackborn [Tue, 4 Aug 2015 00:14:46 +0000 (17:14 -0700)]
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

9 years agoSet broadcast nextReceiver correctly when package is disabled
Wale Ogunwale [Mon, 3 Aug 2015 22:21:44 +0000 (15:21 -0700)]
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

9 years agoAudioService: check for audio device connection success
Jean-Michel Trivi [Tue, 4 Aug 2015 00:26:01 +0000 (17:26 -0700)]
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

9 years agoMerge "Disable skipping frames on empty damage" into mnc-dev
John Reck [Mon, 3 Aug 2015 23:33:13 +0000 (23:33 +0000)]
Merge "Disable skipping frames on empty damage" into mnc-dev

9 years agoMerge "Notify settings URI change without a lock held" into mnc-dev
Svetoslav Ganov [Mon, 3 Aug 2015 23:15:16 +0000 (23:15 +0000)]
Merge "Notify settings URI change without a lock held" into mnc-dev

9 years agoMerge "Fix issue #22912704: "android.process.acore has stopped" dialog keeps popping...
Dianne Hackborn [Mon, 3 Aug 2015 23:10:07 +0000 (23:10 +0000)]
Merge "Fix issue #22912704: "android.process.acore has stopped" dialog keeps popping up" into mnc-dev

9 years agoNotify settings URI change without a lock held
Svetoslav [Mon, 3 Aug 2015 23:02:52 +0000 (16:02 -0700)]
Notify settings URI change without a lock held

bug:22469552

Change-Id: Ie4a42ceef07e3a8e593fe2b1374420239242ce7b

9 years agoFail silently if a process trys to launch an acitvity for background user
Wale Ogunwale [Mon, 3 Aug 2015 22:56:49 +0000 (15:56 -0700)]
Fail silently if a process trys to launch an acitvity for background user

Doing this so we don't break current apps. In the future we should
properly position the activity in the stack (i.e. behind all current
user activity/task) and not change the positioning of stacks.

Bug: 21801163
Bug: 13507605
Bug: 22929608
Change-Id: I979b6288e66f5b2ec2a6f22cb8d416e5c68109bd

9 years agoMerge "Yell loudly about undefined behind in Bitmap, but work anyway" into mnc-dev
John Reck [Mon, 3 Aug 2015 22:50:25 +0000 (22:50 +0000)]
Merge "Yell loudly about undefined behind in Bitmap, but work anyway" into mnc-dev

9 years agoDisable skipping frames on empty damage
John Reck [Mon, 3 Aug 2015 22:34:52 +0000 (15:34 -0700)]
Disable skipping frames on empty damage

Bug: 22592975

Optimization added in MNC is not quite correct, occasionally
it will fail to repaint when it was supposed to leading
to buffer corruption. Disable the optimization for now.

Change-Id: I34dfdfb357eda298198043ded7335d4588a003fd

9 years agoBatteryStats: Add debug logging to find source of b/22716723
Adam Lesinski [Mon, 3 Aug 2015 21:37:38 +0000 (14:37 -0700)]
BatteryStats: Add debug logging to find source of b/22716723

Bug:22716723
Change-Id: I97b940b702666b393555622d034e1c694b1e346a

9 years agoMerge "Avoid deadlock by broadcasting outside lock." into mnc-dev
Jeff Sharkey [Mon, 3 Aug 2015 22:32:36 +0000 (22:32 +0000)]
Merge "Avoid deadlock by broadcasting outside lock." into mnc-dev

9 years agoFix issue #22912704: "android.process.acore has stopped" dialog keeps popping up
Dianne Hackborn [Mon, 3 Aug 2015 22:28:28 +0000 (15:28 -0700)]
Fix issue #22912704: "android.process.acore has stopped" dialog keeps popping up

Slice 'em up!

Change-Id: Ibba3af7ec5b7f92e6d5e55a57aa838a7f7f936e1

9 years agoREAD_SMS allows getLine1Number() [1/3]
Makoto Onuki [Mon, 3 Aug 2015 22:10:57 +0000 (15:10 -0700)]
READ_SMS allows getLine1Number() [1/3]

Bug 22862050

Change-Id: I45dba41423dd3313984c93a6e674f37410fb3050

9 years agoAvoid deadlock by broadcasting outside lock.
Jeff Sharkey [Mon, 3 Aug 2015 21:41:13 +0000 (14:41 -0700)]
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

9 years agoMerge "Restore session params "no decoration" flag" into mnc-dev
Diego Perez [Mon, 3 Aug 2015 21:33:24 +0000 (21:33 +0000)]
Merge "Restore session params "no decoration" flag" into mnc-dev

9 years agoMerge changes Ib5f53f3b,I7debf3ee,Ic494ee7f,Ia8d223ae,Iff7dbbf6 into mnc-dev
Deepanshu Gupta [Mon, 3 Aug 2015 21:27:50 +0000 (21:27 +0000)]
Merge changes Ib5f53f3b,I7debf3ee,Ic494ee7f,Ia8d223ae,Iff7dbbf6 into mnc-dev

* changes:
  Revert to using AppTheme for LayoutLib tests.
  Fix Matrix_Delegate.native_getValues()
  Update test image for upated nav icons.
  Fix typo: s/FullScreen/Fullscreen/ in LayoutLib.
  Fix bugs introduced in 78aa664.