When an app is moved from "/system/priv-app" to another location
during OTA update, the privileged flag should be removed.
Change-Id: I7713382db34697f7b68283dbbbd25a1349cbecdb
There is a NullPointerException in `handleHorizontalFocusWithinListItem()`
because `selectedView.findFocus()` returns null and then there is no null
check when when the assigned variable `currentFocus` is used, although
`View.findFocus()` states that it may return null.
Change-Id: I6897027e9a2a238d9283e6b9f5146198989fcac0
If an activity show a Presentation window and this activity is moved
to bottom or top, thus this Presentation window will be removed from
its display window list, and no chance to be added back into window
container; It will cause the incorrect state that Presentation window
is lost from secondary display window list(displayContent.mWindows),
but still exist in app token's window list(appWindowToken.allAppWindows);
Moreover, once this activity resume again, Presentation window is not
shown because it's lost.
In this way, don't remove non-target display app windows due to only
target(or called default) display windows are removed temporarily and
re-sorted then added back into window list later.
Change-Id: I8960ce191f6c662455cba5a0a5e6a1ff9ef03ae1
Signed-off-by: tingna_sung <tingna_sung@htc.com>
Update focus stack frame/layer when focus app is changed to avoid
focus stack/layer isn't updated synchronously with focus app, it's
due to performLayoutAndPlaceSurfacesLocked() is not necessarily
called on focus app change; it will cause sending mismatching
TAP_OUTSIDE_STACK message if there is effectual incoming pointer
event, hence may also result in focus stack is changed again,
therefore erroneous focus app is set by ActivityManager at final.
Change-Id: Ia0ec9a543be887b51a3b29b3e62fdd471c15edf2
Signed-off-by: tingna_sung <tingna_sung@htc.com>
Extend the fullscreen meaning by adding opaque drawn check on
screenshot application; if there is a fullscreen window but not
opaque, we will continue finding behind windows; otherwise ending up
including behind windows. It's able to help avoiding capturing BLACK
screenshot bitmap.
Change-Id: I1c7e8f513c366688ea8001c3d0c799f3522f0ffd
Signed-off-by: tingna_sung <tingna_sung@htc.com>
If pointer is moving to the negative axis direction, pointer movement
distance will always less than pre-defined mMotionSlop, thus
TAP_OUTSIDE_STACK will have chance to be sent, will cause unnecessary
focus stack switch.
Change-Id: Ia4c066bebce250257c7361ef976907a0ca2c6461
Signed-off-by: tingna_sung <tingna_sung@htc.com>
Update DisplayContent.mBaseDisplayRect when device orientation is
changed, it avoids to set incorrect initial value of
mTouchExcludeRegion, that will cause result of calculated
mTouchExcludeRegion becomes an incorrect strange region on
landscape orientation.
Change-Id: I993864653edc2852f91abed7891e6631b4bae15a
Signed-off-by: tingna_sung <tingna_sung@htc.com>
When destroying CanvasContext, the surface can be invalid
state. So the surface should be updated to null prior to
destroying GL resources to ensure that GL functions
are not called with an invalid surface.
Some GL implementation makes an error if GL functions
are called with an invalid surface. (Adreno 3xx)
Change-Id: Ie6f6ea081ec931fc9df30b2c3ed066ec1ae9d294
By design, if the user presses the power key twice within 5 seconds
(panic), it will show immersive confirmation again at the next time
entering immersive mode.
But there is a bug on calculating the time between pressing the power
key. The time get from event.getDownTime() will stop when the device
is sleeping without being charged.
So here uses SystemClock.elapsedRealtime() instead.
https://code.google.com/p/android/issues/detail?id=80772
Change-Id: I4dca9dc260904f1c5b60464834781e2a82a9bcf4
(This is an update after the generator update.)
Both EGL14 and EGLExt have the same initialization codes for
EGL14.EGL_NO_SURFACE, EGL14.EGL_NO_CONTEXT and EGL14.EGL_NO_DISPLAY.
Since EGLExt is initialized later, they are overwritten by EGLExt's
initialization codes.
Therefore, EGL_NO_SURFACE returned by methods in EGL14 is not
actually EGL14.EGL_NO_SURFACE object and it makes several problems in
handling error cases.
For instance, "Let's fish" game application cannot be run on L.
To solve the problem, this patch makes EGL14.EGL_NO_SURFACE,
EGL14.EGL_NO_CONTEXT and EGL14.EGL_NO_DISPLAY initialized just once.
Change-Id: Icce878164ff0b715ad2b5a2cd038a9616c7cf1e9
Don't refer to classes as structs and view versa -- causes warnings in
clang (in code built with -Werror)
Change-Id: I4d7f461bcf6fe4e43a14ad2f28ee0e0ddea95abc
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
The return value of jniRegisterNativeMethods is checked only in
LOG_FATAL_IF, which defines to nothing in the LOG_NDEBUG
case.
Fake a use of the 'res' variable to shut off warnings when LOG_NDEBUG.
Change-Id: I8263610f327c56897f76796fe1fbc2b325b0559f
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Remove an unused static function clang complains about
Change-Id: Id5875960e9f93348c7a3a912f42b5f457af2cdc0
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Also, move over DateFormat.getInstance(SHORT) instead of
LocaleData.shortDateFormat4 (which forces 4 digit years).
Based on an analysis of git history, there seems to be no
real motiviation for using 4 digit years.
If anyone in the platform complains loudly, we could look at
using a skeleton pattern instead of just replacing 'y' with 'yy'.
If third party apps are affected, we could add a targetSdkversion
based check and revert to the old behaviour for older targetSdks.
bug: 18388178
bug: 18322220
Change-Id: Ieab2b41691958a2e668d382c5a6b3d9aaf741ed2
Previously stencil clipping within clearLayerRegions is disabled by commit
62d307c2402777d5e53b4590af5f32f8c55afd81. However, clearing whole layer
regions causes black-colored triangle regions when a TextView has
RotateAnimation because the draw within clearLayerRegions does not
affected by the current stencil clip.
Change-Id: Id32a0b16754b109905f833e063ebfa156bd953f2
Signed-off-by: Dohyun Lee <dohyun.lee@lge.com>
Some JNI functions ignore the JNI environment and class information, but
still take the parameters -- causing a build failure with clang (and gcc
with -Wextra enabled). Ignore this.
Change-Id: I049fcf65991b19d2416fce105699311803b43cfc
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
In case of the last stack of application move to back,
ONLY one stack within stack should move to back.
but stack itseft move to back.
Default bahavior of ActivityManager is that the stack will
go back within stack when the last stack of application move
to back. The stack is managed by DisplayContent of WindowManagerService
should be same but taking one more action that move stack itself.
Change-Id: If394ddf16b0fcda2ae3252e8f3b5336322ef6808
Signed-off-by: Seunghyun Lee <seunghyun85.lee@lge.com>
Remove unused variables and static functions clang complains about,
disable warnings about unused parameters (needed for clang and for gcc
with -Wextra enabled)
Change-Id: I76a22cd0158b3c7375c54e3d4d15bc1ac448591e
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>