159117 Commits

Author SHA1 Message Date
Narayan Kamath
0ea4e7b581 Delete general sounding "CharArrayBuffers" class.
Move the code to the only point of use. Preparatory work for
decoupling apache-http from the frameworks.

Change-Id: Ieee54bb725cbac19d0c7513867635df6fbcf2b49
2014-11-27 13:52:11 +00:00
Narayan Kamath
14e28134c4 Merge "Delete unused class from android.net.http." 2014-11-27 12:58:33 +00:00
Narayan Kamath
3ec2def9a3 Delete unused class from android.net.http.
Foundation for moving a lot of these classes out of the frameworks
and @removing these APIs.

Change-Id: I590cdd2867b923533de189ec956b4dd3f82efa46
2014-11-27 12:52:48 +00:00
riddle_hsu
105add8d1a [ActivityManager] Prevent provider from been created twice.
Root Cause:
If a process which contains provider is starting but not
from accessing provider, e.g. service/activity/receiver,
its providers' will be created during handleBindApplication.
And before the process complete publish provider to
ActivityManagerService, if there is an access call to
process provider before the process completes publishing
providers to ActivityManagerService, then the providers
will be created again.


Solution:
Don't schedule install provider if the provider record
already exist and will be published later.

Change-Id: Ic200ceae042c014c86e7edee0acd013b513af334
2014-11-27 05:16:17 +00:00
tingna_sung
4f65ca0f76 Fix pointer index out of range exception
Avoid pointer index out of range error if return value is -1 of
findPointerIndex() when there is no data available for that pointer
identifier.

Change-Id: I2a08f04c678164e220852094baa124ba157e2e42
Signed-off-by: tingna_sung <tingna_sung@htc.com>
2014-11-27 08:32:14 +08:00
Mathieu Meisser
ad66d7d2c1 Add keylayout for Logitech RedHawk Gamepad
Change-Id: Iad03de3384052b360d6b9d887ca9540de68cd21e
2014-11-27 00:46:01 +01:00
Olawale Ogunwale
87c5f36210 Merge "Fix bad exclude region in landscape" 2014-11-26 23:13:59 +00:00
Kazuki Nakayama
609cb91c9c Reset killedByAm flag at attachApplicationLocked
ActivityManager reuses a process record object that killed
by him under some situation. That reused process record inherits
a killedByAm flag unexpectedly.
The killedByAm flag must be reset otherwise ActivityManager can't
judge the process can be killed or not.

Change-Id: If95137d91939cc44882ad2813131bcde0edd0c1b
2014-11-26 15:07:33 -08:00
louis_chang
33bae1f496 [ActivityManager] Fix NPE when start activity
Symptom:
NPE occurs in line 1184 (resultStack.sendActivityResultLocked)
because resultStack is null.

Root cause:
When starting activity with FLAG_ACTIVITY_FORWARD_RESULT flag,
the resultRecord could be updated, but the resultStack is not
updated as well. In that case, the resultStack is still be
null. The exception will occurs if the activity is not
granted to launch due to permission denied.

Solution:
Update resultStack when resultRecord updates.

Change-Id: I91634e4f713c2e8dbd1a71f358a8fd9beed83ec7
2014-11-26 14:22:29 -08:00
dcashman
fe8afa99a7 Prevent EntropyMixer from registering with service manager.
EntropyMixer is designed to be triggered in two ways, as either the
result of a self-set timer or of one of three system broadcasts.  It is not
meant to be triggered in any other way, so exposing it via servicemanager
is undesirable.

Bug: 18106000

Cherry-pick of commit: 9287e0dd272b85b475e33bcbd7d868517a0f98f9

Change-Id: I9aeb35e7ffde75090f4234ea193514fb883b1425
2014-11-26 13:50:30 -08:00
Craig Mautner
200496b571 Merge "ANR caused by incorrect cleanup in BroadcastQueue." 2014-11-26 21:43:59 +00:00
Guobin Zhang
04d0bb6e93 ANR caused by incorrect cleanup in BroadcastQueue.
Two broadcasts could be sent to the same app simultaneously:
one foreground, one background. For example, LOCALE_CHANGED
and PACKAGE_CHANGED are delievered to com.android.vending
at the same time.
1. AMS started new vending process to handle LOCALE_CHANGED.
   And set app.curReceiver = LOCALE_CHANGED.
2. Before LOCALE_CHANGED is handled by vending process,
   PACKAGE_CHANGED was delievered to vending process too.
   AMS set app.curReceiver = PACKAGE_CHANGED. Bad!
3. Vending process finished handling LOCALE_CHANGED.
   AMS clear app.curReceiver = NULL. Bad!
   And Vending process  killed itself without handling
   PACKAGE_CHANGED.
4. AMS known vending process has died, but didn't know that
   BgBroadcastQueue was still waiting for finish message
   for PACKAGE_CHANGED.
At last, BgBroadcastQueue reported ANR for PACKAGE_CHANGED.

This patch adds protection before clearing app.curReceiver,
only set to NULL if the finishing receiver = app.curReceiver
So handleAppDied would know that PACKAGE_CHANGED was not
finished yet, it will abort the broadcast and continue.

Change-Id: Ic4f31b35e21823d4a3c27712391ecbede213a494
Signed-off-by: Guobin Zhang <guobin.zhang@intel.com>
2014-11-26 13:23:30 -08:00
Elliott Hughes
8e1bbfe0f1 Mention ProGuard in the JNI documentation.
Change-Id: I7822ec1eca0290eba1f4b08eca6794b41172d606
2014-11-26 10:51:37 -08:00
Jeff Sharkey
b802cd6767 Merge "APK still has privileged flag after being moved from "/system/priv-app"" 2014-11-26 18:35:11 +00:00
Ignacio Solla
c67b21fa3f Merge "[WebView] Allow the WebView to be compiled against the system SDK." 2014-11-26 18:31:01 +00:00
Conley Owens
69d28437d3 Merge "RRO tests: fix potential NPE" 2014-11-26 17:57:09 +00:00
Conley Owens
ed23786cc5 Merge "RRO tests: adapt tests to split apks" 2014-11-26 17:56:48 +00:00
Craig Mautner
a7a999816f Merge "Fix Presentation window is removed on stack change" 2014-11-26 17:53:00 +00:00
Craig Mautner
17fc8574e5 Merge "Sync focus stack frame and layer with focus app." 2014-11-26 17:43:30 +00:00
Craig Mautner
aed35d6b57 Merge "Not include fullscreen opaque window on screenshot" 2014-11-26 17:37:37 +00:00
Craig Mautner
e76484721e Merge "Measure absolute value of pointer motion distance" 2014-11-26 17:26:47 +00:00
Kenny Root
564ec716f4 Merge "Track change to Conscrypt" 2014-11-26 17:09:40 +00:00
Kenny Root
9d2d6b6b4b Track change to Conscrypt
Change-Id: I8814fd0720acf09332927f184fdd9b2cdac4f413
2014-11-26 09:08:40 -08:00
Narayan Kamath
fdbef4081d Merge "Start MountService before performBootDexOpt" 2014-11-26 10:59:29 +00:00
Akira Numata
76bf60ead8 APK still has privileged flag after being moved from "/system/priv-app"
When an app is moved from "/system/priv-app" to another location
during OTA update, the privileged flag should be removed.

Change-Id: I7713382db34697f7b68283dbbbd25a1349cbecdb
2014-11-26 06:58:04 +00:00
Kenji Sugimoto
827bb445d1 Fix NullPointerException in ListView
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
2014-11-26 06:56:10 +00:00
tingna_sung
0735697c9d Fix Presentation window is removed on stack change
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>
2014-11-26 13:46:21 +08:00
tingna_sung
b31cced065 Sync focus stack frame and layer with focus app.
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>
2014-11-26 05:34:06 +00:00
tingna_sung
a901f57580 Not include fullscreen opaque window on screenshot
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>
2014-11-26 04:11:34 +00:00
tingna_sung
f2ad1a442b Measure absolute value of pointer motion distance
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>
2014-11-26 11:28:39 +08:00
tingna_sung
5664546fc1 Fix bad exclude region in landscape
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>
2014-11-26 03:21:16 +00:00
Sangkyu Lee
f76d36f96b Prevent calling GL functions with an invalid surface
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
2014-11-26 09:59:39 +09:00
Chris Craik
af5bd75b3d Merge "Enable stencil clipping within clearLayerRegions" 2014-11-25 23:56:33 +00:00
Elliott Hughes
2657717f97 Merge "We have POSIX clocks." 2014-11-25 23:17:59 +00:00
Elliott Hughes
42c569224a We have POSIX clocks.
Change-Id: I70f82074f8c14a26c4ed7eb912ddf6d7da44c168
2014-11-25 15:11:59 -08:00
Ignacio Solla
ea1d90f5da [WebView] Allow the WebView to be compiled against the system SDK.
BUG:18152150
Change-Id: Ifd6dcac17663631058d895c61bb6e8018c5aeecc
2014-11-25 17:03:49 +00:00
tiger_huang
1b33b49723 Prevent showing immersive confirmation unexpectedly
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
2014-11-25 12:29:37 +00:00
Sangkyu Lee
c56c7013e3 Avoid overwriting EGL14.EGL_NO_SURFACE
(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
2014-11-25 10:45:19 +09:00
chh
fc54573373 Merge "Remove unused variables and functions, don't warn about unused parameters" 2014-11-25 00:37:12 +00:00
Chih-hung Hsieh
481c4b641e Merge "Fix class vs. struct mismatch" 2014-11-25 00:20:03 +00:00
Bernhard Rosenkränzer
99d61edfda Fix class vs. struct mismatch
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>
2014-11-24 16:18:15 -08:00
Chih-hung Hsieh
613d20668a Merge "Fix unused variables." 2014-11-24 23:53:36 +00:00
Bernhard Rosenkränzer
9c1c90e92e Fix unused variables.
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>
2014-11-24 15:42:11 -08:00
Chih-hung Hsieh
38cc84dece Merge "Remove unused variable" 2014-11-24 22:15:42 +00:00
Chih-Hung Hsieh
e57b3991d8 Merge "Remove unused function" 2014-11-24 20:15:13 +00:00
Chih-Hung Hsieh
70363cc576 Remove unused function
Remove an unused static function clang complains about

Change-Id: Id5875960e9f93348c7a3a912f42b5f457af2cdc0
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
2014-11-24 11:52:43 -08:00
Narayan Kamath
32ed090f5a Merge "Stop using DATE_FORMAT from settings." 2014-11-24 16:14:33 +00:00
Narayan Kamath
1d84709cf4 Merge "Stop reading Settings.System.DATE_FORMAT." 2014-11-24 16:10:02 +00:00
Narayan Kamath
f91f06a599 Stop reading Settings.System.DATE_FORMAT.
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
2014-11-24 16:05:19 +00:00
Dohyun Lee
adc0d9da86 Enable stencil clipping within clearLayerRegions
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>
2014-11-24 21:08:15 +09:00