This avoids issues with the encoder's own definition of __inline,
which conflicts with headers brought in by string.h in glibc.
Change-Id: I9e3fbf8d892529940ea67a46e67a9abe71d9c5fa
How to reproduce:
1) Lock the screen.
2) Open the Phone options menu by long pressing the power
button.
3) Tap "Power off" to display the confirmation dialog.
4) Repeat step 2 and 3 a few times (without closing the
confirmation dialog.
Each time the confirmation dialog is displayed, a new
instance is created. A stack of confirmation dialogs are
created on the screen.
This is fixed by making sure the previous dialog is
dismissed before launching a new dialog.
Change-Id: I6b6c61ccc56364b66eed3528019f761e75bbe268
If an activity has bound servicesor content providers,
updateLruProcessInternalLocked will be called recursively with
the oomAdj flag set, resulting in several recalculations of oomAdj
with unchanged data. Doing it at the end of the top level call to
updateLruProcessInternalLocked should be sufficient.
Change-Id: I95e27011e1d3519f256a9bd756cbb18d43e8db29
With SDK 10.6 without _DARWIN_UNLIMITED_STREAMS aapt sometimes fails
right away with the error "Too many open files" when calling fopen().
Change-Id: Ifa7bd8a9530d706aa47f98be8186f1aefe943d76
The Java implementation of writing the RPC response header
calculates the length of the header including the 4 bytes
specifying the header length but the native implementation
excludes the 4 bytes specifying the length from the header
length.
The native implementation has been aligned to the Java impl.
Change-Id: I325bf272a63152d8fded4cf4e51a906b5a9bfe19
Add .DS_Store to the list of ignored files that are silently
ignored (other dot-files are ignored but aapt emits a "(skipping <x>)"
message.)
Also, add a "!" prefix to the *~ pattern for Emacs/Vim/Gedit backup
files.
Finally, move the !*.scc pattern up in front of the .* pattern, such
that it doesn't match the earlier .* pattern (which is verbose, unlike
!*.scc).
Change-Id: Id3e96490f1802486aea8c58366d43e9d413971b8
dumpPowerState method shows the current power manger service state but,
BUTTON_BRIGHT_BIT is omitted.
Add a routine of checking BUTTON_BRIGHT_BIT
Signed-off-by: jaiyoung.park <jaiyoung.park@lge.com>
Change-Id: I00484fb384963bafdc58ce89b3251a1f5585d992
Issue Description:
When do monkey test on some applications, there is big probability get ANR issue. one example is as following:
adb shell monkey -p com.google.android.street -v 500000
Root Cause:
situation 1. InputDispatcher Thread calls findTouchedWindowTargetsLocked routine, there is a AMOTION_EVENT_ACTION_DOWN event
and it can find a splittable touched window for this event , then mTouchState.split set to true.
situation 2. WMS Thread calls setInputWindows routine and all TouchedWindows associated with mTouchState are removed ,
mTouchState.split status still keep true.
situation 3. InputDispatcher Thread calls findTouchedWindowTargetsLocked routine, there is a AMOTION_EVENT_ACTION_POINTER_DOWN event
and it can find found touched window, exit window loop in following code :
if (windowInfo->visible) {
if (! (flags & InputWindowInfo::FLAG_NOT_TOUCHABLE)) {
isTouchModal = (flags & (InputWindowInfo::FLAG_NOT_FOCUSABLE
| InputWindowInfo::FLAG_NOT_TOUCH_MODAL)) == 0;
if (isTouchModal || windowInfo->touchableRegionContainsPoint(x, y)) {
if (! screenWasOff
|| (flags & InputWindowInfo::FLAG_TOUCHABLE_WHEN_WAKING)) {
newTouchedWindowHandle = windowHandle;
}
break; // found touched window, exit window loop
}
}
situation 4. The following code will have problem after situation 3 in below conditions:
newTouchedWindowHandle doesn't support split , isSplit is true ( last time touched window is splittable )
mTempTouchState.getFirstForegroundWindowHandle will always return NULL due to situation 2
// Figure out whether splitting will be allowed for this window.
if (newTouchedWindowHandle != NULL
&& newTouchedWindowHandle->getInfo()->supportsSplitTouch()) {
// New window supports splitting.
isSplit = true;
} else if (isSplit) {
// New window does not support splitting but we have already split events.
// Assign the pointer to the first foreground window we find.
// (May be NULL which is why we put this code block before the next check.)
newTouchedWindowHandle = mTempTouchState.getFirstForegroundWindowHandle();
}
The window says it does not want to support splitting, so the touches should go to one of the previously split windows except
that there are none, which result to "goto Unresponsive" in findtouchedWindowTargetsLocked routine.
This is not the correct behavior because the user did actually touch something.
situation 5. InputDispatcher Thread will call dispatchOnce repeated to try to dispatch this AMOTION_EVENT_ACTION_POINTER_DOWN event,
then ANR timeout ( 5000ms ) will be exceeded after several times "goto Unresponsive"in findtouchedWindowTargetsLocked routine.
Solution:
In situation 4 we should drop the touch. If the newly touched window was splittable then we wouldn't drop the touch.
It's only when the newly touched window was not splittable where we will drop the touch.
Change-Id: Iab2c06ce0597ac77eb886ccd9d84646c86723bdb
Author: Jeffrey Brown <jeffbrown@android.com>
Author: Erjun Ding <erjunx.ding@intel.com>
Author: Zhenghua Wang <zhenghua.wang@intel.com>
Author: Jack Ren <jack.ren@intel.com>
Author: Bruce Beare <bruce.j.beare@intel.com>
This fixes cases where x was a large number, causing fPart to
exceed the 32 bit signed integer range (while fitting in an
unsigned 32 bit integer), making the table index a negative
number.
Change-Id: I674047db65f89148a93d218c138b42cd8305f80e
After skipping * with "token++", the length should decrease by 1 as
well.
(merged from 996b073e813ba1a22a13282ccdebb664f14ba898)
Change-Id: Ie6232ef603bb31e25e03b926e6c1bb92ac34902d
If length of the string being showed on Toast is short (less than 8 chars),
it is aligned to left rather than to center.
Added attribute android:layout_gravity="center_horizontal" on the TextView where Toast's message are shown to fix issue.
Change-Id: I77669fd8a11d1ec8f6b082348eb818671ce158bb
Signed-off-by: Taeho Kim <jyte82@gmail.com>
AAPT has a fixed built-in list of files and directories
to ignore when parsing resource files. Over the years we
always had developers requiring specific patterns.
If the env var ANDROID_AAPT_IGNORE is set, it is parsed
to find which file/directory patterns to ignore.
Otherwise a default is used that matches the current behavior.
Added a command-line option for it:
aapt di --ignore-assets "foo*:*.blah"
SDK Bug: 5343 24067
Change-Id: Ia4caa2a8188c8c1df143f884e459b8182645995f