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
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
Temporarily revert ag/735253 until b/22902898 can be resolved with a
proper DMAgent prebuilt drop.
This reverts commit e7ed827a104ba005b93faa2edb3bc77f72b240ec.
Bug: 22902898
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
During error recovery, if the mBluetooth pointer is reset to null,
reset the mBluetoothGatt pointer as well.
Bug: 21756298
Change-Id: I26204ba47dd3c5465bb7de30cfa5dc0f07eee2fd
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
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
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
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
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
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
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
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
* 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.
Bug: 22214367
Previous releases would let the getters on a recycle()'d bitmap to still
work despite being firmly in undefined behavior per the documentation
on Bitmap#recycle().
As there are apps relying on this, yell very loudly about this behavior
in the log and give them a bit of time to fix it
Change-Id: I857be7e74cb217877973d9c6f03eb761d12fd056
These file types don't have "audio/" MIME type, so check for those
MIME types explicitly.
Bug: 22803550
Change-Id: Ia62f94ad4a19409d6a50462935de005bc572f93a
This fixes a bug where we were counting short PIN, patterns and
passwords as attempts. For devices with a device policy admin,
this would cause devices to get wiped after a short amount of
interaction with the UI.
Fixes bug 22844609
Change-Id: I7616b38d954f89d4a2cee23f9aec1b898041b1f2
Use AppTheme for all tests other than testExpand. AppTheme contains an
attribute needed by testArrayCheck. Also, since the AppTheme extends
Theme.Material.Light.DarkActionBar, other tests should be unaffected.
Also, update the golden image for the testArrayCheck.
Change-Id: Ib5f53f3b029c5aceef2b622e5ac63952d6b1972a