The public API is not supposed to require the BACKUP permission in order
for an application to restore its own last-known-good backup data. However,
as currently implemented, BackupManager.requestRestore() [the public API
in question] depends on private Backup Manager methods that *do* enforce
that permission. The net result is that the method cannot be successfully
used by third party applications: it will throw an exception if attempted.
This CL restructures the permission checking involved.
First, the underlying beginRestoreSession() operation can now be passed a
'null' transport name; if this is done, then the restore session is begun
on whatever the currently-active transport is. Looking up the name of the
active transport is one of the permission-guarded actions that was required
with the initial implementation.
Second, a package name can now be passed to beginRestoreSession(). If
this is done, then the restore session can only be used to perform a
single-package restore of that one application. The BACKUP permission is
not required if the caller is tying the restore to its own package name.
In combination, these changes permit BackupManager.requestRestore() to
function without the calling app needing to hold any special permission.
The no-permission case is intentionally quite narrow: the caller must
hold the permission unless they both (a) pass 'null' for the transport
name, thereby accepting whatever the currently active transport is, and
(b) pass their own package name to restrict the restore session only
to their own app.
External bug http://code.google.com/p/android/issues/detail?id=10094
Internal bug 3197202
Change-Id: Ibc9d652323f2da03727d850f991b4096af6520d2
the per-connection state assumed the main sensorservice
lock was held during access. This is however not true while
pre-processing the events just before sending them to clients.
Therefore, there was a small window during which this state
could be modified while being used.
we now have an internal lock that protects this state.
Change-Id: I594680f20f09d6a4f1f38f093a1d3f650dcef1be
We now decide whether to use a bitmap background based on whether the
window's drawing is hardware accelerated. To do this, there is a new
"state_accelerated" that state list drawables can be parameterized on,
and the standard window background uses this to select a solid color
or bitmap drawable as appropriate.
Introduces a little hackery to have wm preview windows pretend like
they are hardware accelerated even if they aren't, so the preview looks
closer to the actual app.
Also Add a DialogWhenLarge variation for the light theme.
Change-Id: I215a79d5df65ba3eed52ab363cade9d8218a6588
Bug: 3186000
- By this change, there will be no need to find new applicable IME in Settings application
- This change handles the edge case that there is something wrong with the current IME
Change-Id: Idb42b6184ac135370064b967305faa81f1b382b2
Update the platform-independent audio policy manager to pass the
nature of the audio recording source to the audio policy client
interface through the AudioPolicyClientInterface::setParameters()
method.
Change-Id: I6b4fd0f8a3acea0d7d30bbad98edd1977dc012bf
The audio HAL does not always handle properly simultaneous input and output stream
state changes. This happens in particular when starting video record because output
stream starts and stops while input is active.
Temporary disable the video record jingle the time the audio HAL issues are solved.
Change-Id: I3b923d81af543a335deae9e22d7f396bb5791d91
- Re-revert the change https://android-git.corp.google.com/g/#q,78962,n,z
*** If you want to see the diff between reverted change and new change, please see the diff between patch set 1 and the latest patch set
- TODO: Add a public function "switchToLastInputMethod"
Change-Id: Ic85d54b3b68e47a22360acaeb81202a366a34586
We only recorded the last received event (which is needed when a sensor
is activated on a connection) when there was some connection active.
This should fix an issue where sometimes the light sensor doesn't
return an event whent activated.
we also didn't need to hold the main lock while dispatching events
to clients.
Change-Id: I6c6386c040051ce205e3c0516c678e0603fa45e1
This change removes an optimization from SurfaceFlinger that skipped
composition when it got window updates that had an empty dirty region.
This optimization caused problems because it would skip the hwcomposer
set call, which could leave the window's previous frame buffer bound to
an overlay plane. When the application subsequently dequeued and tried
to lock its next buffer (which would be the buffer currently bound to
the overlay), the lock call would block until the next hwcomposer set
call (which may never happen).
Change-Id: I563b626a1d52c1f30eb82489eae0ceb4edc79936
Bug: 3138752
Initial state should be unknown or we miss the first connected change.
Don't send a disconnected msg when changing network types.
Filter out redundent disconnects.
Add some logging.
bug:3060742
Change-Id: Idc797c1276b7417337a91ed60b12b1bf392d57c0
Add a recording source used to designate a recording stream for
voice communications such as VoIP.
Change-Id: I4091d67069b1a0170c1a5ca5e6acd51eb0aa08f9
If the memory card is not inserted (or removed) from
the phone the shut down process is very long. It
takes almost 24 seconds. For the phone with memory
card the averige is 5-6 seconds
Make sure to send onShutDownComplete even if an SD
card is not mounted and no unmount is done.
Change-Id: I0e79b82e294a971f5e7144cdd3cc16b7ff414b9c
the increased maximum rate is needed for proper gyro integration, current gyro
parts can sample at up to 800Hz
Change-Id: Ide75f6d5bc7a0fdafeb2dafd72db39e7afb9e794
Refactored ViewRoot, NativeActivity and related classes to tell the
dispatcher whether an input event was actually handled by the application.
This will be used to move more of the global default key processing
into the system server instead of the application.
Change-Id: If06b98b6f45c543e5ac5b1eae2b3baf9371fba28
For possible future changes to android.view.animation.Animation to tie
into StrictMode's animation annotations on violations.
Change-Id: I3a23fa9bd5edb0500586bb0e341f83f998b28ae7
Addresses these bugs:
3061847 - With no headers, PreferenceActivity crashes
2888426 - minor typo in DevicePolicyManagerService.ActiveAdmin.writeToXml()
3159155 - IllegalStateException:"Can not perform this action after
onSaveInstanceState" while dismissing a DialogFragment
3155995 - PopupWindow.showAtLocation does not respect LayoutParams
Also tweak the new fragment APIs to use abstract classes instead of
interfaces as base classes.
Change-Id: I9c0b4337fe0e304b737b5f7c2762762372bb3020
Who knew there were so many Loopers in the system server?
This adds dropbox logging for the activity manager thread, policy
thread, and window manager thread.
The goal's to catch more stuttering.
Change-Id: I999a6ff4a955f0ef549b12a38796b843ade5fe66