Configuration.hardKeyboardHidden should be set to
HARDKEYBOARDHIDDEN_YES when no keyboard is present or when it is
disabled. The code in PhoneWindowManager.adjustConfigurationLw
does the right thing. It also takes care of setting keyboardHidden
correctly when only a soft keyboard is available.
So it turns out that all we need to do to disable the hard keyboard
is to set Configuration.keyboard to KEYBOARD_NOKEYS *before* asking
the policy to adjust the configuration.
Bug: 3406101
Change-Id: I3519d02af30d8068198cb3d6b8fdde601c2fe8b4
If the app doesn't have that permission, just mask out the bits.
Also makes the systemUiVisibility field visible in hierarchyviewer.
Change-Id: Ic3d3a3aed96b5c6448832755b4b2e6175117e5be
We were still destroying an ANativeWindow's buffer pretty soon
after it was removed from the window manager. This time
we really wait for the ISurace to go away.
Change-Id: I329273fedaeef76ee92836f6180c2c3808389330
This changes the ANativeWindow API and the two implementations to reset
the window's crop rectangle to be uncropped when the window's buffer
geometry is changed.
Bug: 3359604
Change-Id: I64283dc8382ae687787ec0bebe6a5d5b4a0dcd6b
* changes:
Make keyguard also ask to turn the back button off, now that it is controlled separately.
Allow independent control of the back and the other navigation buttons.
Allow the status bar disable flags to be used as View's system ui visibility fields.
The framework had started using the LayoutInflator's factory
for itself, which breaks apps that want to use it. Add a hack for
the framework to insert its own private factory.
Also fix a deadlock in the system process.
Change-Id: Iaf80186a5d7e4029faf89e968e184abdaabe514a
* Added changeEncryptionPassword() to the MountService.
* Update LockPatternUtils to call changeEncryptionPassword()
when the password is changed.
Note we only require the new password to change the
encryption password.
Bug: 3382129
Change-Id: I26a7e919e325e75e22fa4290da0a8b1b57b55a80
...gallery while attaching picture to gmail message
In various places we could block switching the IME target incorrectly.
Change-Id: I7e647fb35f4ea6f2e39eb7efd911420ea9ee64fa
Or at least make it better. Now if we get a failure locking the surface,
we mark to do a full relayout pass later to try to get a new good surface.
Also fix some bugs in how activity manager was classifying processes for
their OOM adjustment to make better choices in what to kill.
Change-Id: I8e4aa86744211ba7693f9828291d8bbf2698274f
When task switching while dialog windows were up, the exit animation
wouldn't be seen. The animation needs to force Z-order its windows
to the top.
Also fix a bug where the lock screen fade-out was immediately
Z-ordering the wallpaper to the bottom if the activity behind was
not on top of the wallpaper.
Change-Id: Icd45cd8ccfff9829822c1682931413246eb9601b
As the comment says this causes problems if the connection
is handling errors. This removes the optimization for now.
Bug: 3386481
Change-Id: I6cb00abe8b1949e9b79b4906a6bdab5872b5054d
We were doubly-decreasing the task's activity count, so when selected
from recent tasks it would re-launch the last Intent rather than
switching to its current state.
Change-Id: I6e58c930a0755ae0142604d42b5cd2c668a2b492
- Fix for crash when detaching from window
- Potential fix for occasional IllegalStateException when updating List based widgets
Change-Id: I3d3f2bb691552a1136111043db686c4926b510c6
Cherripick from master CL 79833, 79417, 78864, 80332, 87500
Add new audio mode and recording source for audio communications
other than telelphony.
The audio mode MODE_IN_CALL signals the system the device a phone
call is currently underway. There was no way for audio video
chat or VoIP applications to signal a call is underway, but not
using the telephony resources. This change introduces a new mode
to address this. Changes in other parts of the system (java
and native) are required to take this new mode into account.
The generic AudioPolicyManager is updated to not use its phone
state variable directly, but to use two new convenience methods,
isInCall() and isStateInCall(int) instead.
Add a recording source used to designate a recording stream for
voice communications such as VoIP.
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.
SIP calls should set the audio mode to MODE_IN_COMMUNICATION,
Audio mode MODE_IN_CALL is reserved for telephony.
SIP: Enable built-in echo canceler if available.
1. Always initialize AudioRecord with VOICE_COMMUNICATION.
2. If echo canceler is available, disable our echo suppressor.
Note that this CL is intentionally not correcting the
getAudioSourceMax() return value in MediaRecorder.java as the
new source is hidden here.
Change-Id: Ie68cd03c50553101aa2ad838fe9459b2cf151bc8
The touch screen sometimes reports more than 10 pointers even though that's
all we asked for. When this happens, we start dropping events with more
than 10 pointers. This confuses applications and causes them to crash.
Raised the limit to 16 pointers.
Bug: 3331247
The default behavior was to identify all touch devices as touch screens.
External devices that are plugged in are more likely to be touch pads
not attached to a screen. Changed the default to be a touch pad
and renamed some internal constants to avoid confusion.
A certain mouse happens to also behave like a touch pad. That caused
problems because we would see multiple concurrent traces of motion events
coming from the same input device so we would batch them up.
Added code to ensure that we don't batch events unless they come from
the same *source* in addition to coming from the same *device*.
Due to batching or misbehaving drivers, it's possible for the set of
pointer ids to be different from what we expect when it comes time to
split motion events across windows. As a result, we can generate motion
events with 0 pointers. When we try to deliver those events, we cause
an error in the InputTransport so we tear down the InputChannel and kill
the application.
Added code to check out assumption about pointer ids and drop the
event gracefully instead.
Patched up the tests to take into account the change in default behavior
for identifying touch screens and touch pads.
Change-Id: Ic364bd4cb4cc6335d4a1213a26d6bdadc7e33505
Generally we never want to lock a buffer for write access if it is at
the "head" on the surfaceflinger side. The only exception (1) is when
the buffer is not currently in use AND there is at least one queued
buffer -- in which case, SurfaceFlinger will never use said buffer
anymore, because on the next composition around, it will be able to
retire the first queued buffer.
The logic above relies on SurfaceFlinger always retiring
and locking a buffer before composition -- unfortunately this
didn't happen during a screenshot.
This could leave us in a situation where a buffer is locked by the
application for write, and used by SurfaceFlinger for texturing,
causing a hang.
Here, we fix this issue by never assuming the exception (1), it was
intended as an optimization allowing ANativeWindow::lockBuffer() to
return sooner and was justified when most of SF composition was
done in software. The actual buffer locking is now ensured by
gralloc. We could have handled screenshots in a similar way to
a regular composition, but it could have caused glitches on screen,
essentially, taking a screenshot could cause to skip a frame.
now that we removed the notion of a "inUse" buffer in surfaceflinger
a lot of code can be simplified / removed.
noteworthy, the whole concept of "unlockClient" wrt. "compositionComplete"
is also gone.
We used to guarantee that a layer in SurfaceFlinger would never be
destroyed before all references (to its ISurface) on the client
side would be released. At some point, this guarantee got
relaxed to allow to free gralloc resources sooner. This last
change was incorrect, because:
- in implementations with reference-counting the gralloc resources
wouldn't be released anyways, until all the mapping were gone
- in implementations without ref counting, the client side
would most likely crash or do something bad
- it also caused the SharedBufferStack slot to be reallocated
to another surface, which could be problematic if the client
continued to use the surface after the window manager destroyed it.
So, we essentially reinstate the guarantee that layers won't be
destroyed until after all references to their ISurface are
released.
NOTE: This doesn't entirely fix 3306150 because there is another
problem there where the Browser continues to use a surface after it
has been destroyed.
also improve SurfaceFlinger 'dumpsys' log
list the purgatory, which shows windows that have been closed,
but for which the client still has references.
we were not clearing the screen entirely, which caused garbage when
the screen wasn't entirely covered by windows.
Change-Id: Ia7aa13c36a8a314e0e8427d419b16b9aa2165ddf
we make sure to call compositionComplete after everytime we do
composition with the GPU (even for the screenshot case), which is
where the buffer locks are released.
Change-Id: I450430d1e4d1ee9ce1023970642378c42cdcfa4c