OSDN Git Service

android-x86/frameworks-base.git
10 years agoMerge "generateProjectThumbnail can fail to close output stream"
Elliott Hughes [Fri, 11 Apr 2014 17:37:54 +0000 (17:37 +0000)]
Merge "generateProjectThumbnail can fail to close output stream"

10 years agoMerge "Add additional languages to be accepted by the NumberPicker input filter"
Elliott Hughes [Fri, 11 Apr 2014 17:30:09 +0000 (17:30 +0000)]
Merge "Add additional languages to be accepted by the NumberPicker input filter"

10 years agoMerge "Add explicit close of Scanner input"
Elliott Hughes [Fri, 11 Apr 2014 17:14:39 +0000 (17:14 +0000)]
Merge "Add explicit close of Scanner input"

10 years agoMerge "Dual zygote cleanup."
Narayan Kamath [Fri, 11 Apr 2014 08:24:52 +0000 (08:24 +0000)]
Merge "Dual zygote cleanup."

10 years agoMerge "Removed android.debug.JNITest from preloaded-classes"
Narayan Kamath [Thu, 10 Apr 2014 11:18:28 +0000 (11:18 +0000)]
Merge "Removed android.debug.JNITest from preloaded-classes"

10 years agoDual zygote cleanup.
Narayan Kamath [Thu, 10 Apr 2014 11:13:06 +0000 (12:13 +0100)]
Dual zygote cleanup.

- Use different process names for the 32 / 64 bit zygote.
- Pass command line arguments correctly. The first unmatched
  argument must be passed through to the java main class.

Change-Id: I952ebbdbba941f118d992354b9bd0ada2dade417

10 years agoMerge "System services detect and register app CPU ABIs"
Narayan Kamath [Thu, 10 Apr 2014 09:20:21 +0000 (09:20 +0000)]
Merge "System services detect and register app CPU ABIs"

10 years agoMerge "Re-implement native library search and copies."
Narayan Kamath [Thu, 10 Apr 2014 09:19:38 +0000 (09:19 +0000)]
Merge "Re-implement native library search and copies."

10 years agoSystem services detect and register app CPU ABIs
Ramin Zaghi [Tue, 1 Apr 2014 14:02:29 +0000 (15:02 +0100)]
System services detect and register app CPU ABIs

This patch uses the NativeLibraryHelper class to
match native libraries in an .apk package with
those listed in 'ro.cpu.abilist' property.
The result is stored in packages.xml and the
ApplicationInfo class.

This information will be used by the ActivityManager
to decide which zygote to use to launch the given
app.

Change-Id: I3ec3d050996d8f4621f286ca331b9ad47ea26fa0

10 years agoRe-implement native library search and copies.
Ramin Zaghi [Fri, 28 Feb 2014 15:03:19 +0000 (15:03 +0000)]
Re-implement native library search and copies.

We now use a two step approach :

- First we look through the list of shared libraries in an
  APK, and choose an ABI based on the (priority)  list of ABIs
  a given device supports.
- Then we look through the list of shared libraries and copy
  all shared libraries that match the ABI we've selected.

This fixes a long-standing bug where we would sometimes copy
a mixture of different ABIs to the device, and also allows us
to clearly pick an ABI to run an app with.

The code in NativeLibraryHelper has been refactored so that all
file name validation & matching logic is done in a single place
(NativeLibrariesIterator). This allows us to avoid a lot of
redundant logic and straightens out a few corner cases (for eg.
where the abi determination & copying logic do not agree on
what files to skip).

bug: https://code.google.com/p/android/issues/detail?id=65053
bug: 13647418

Change-Id: I34d08353f24115b0f6b800a7eda3ac427fa25fef
Co-Authored-By: Zhenghua Wang <zhenghua.wang0923@gmail.com>
Co-Authored-By: Ramin Zaghi <ramin.zaghi@arm.com>
Co-Authored-By: Narayan Kamath <narayan@google.com>
10 years agoMerge "jni: liblog reading error API incorrect"
Mark Salyzyn [Wed, 9 Apr 2014 16:07:47 +0000 (16:07 +0000)]
Merge "jni: liblog reading error API incorrect"

10 years agoMerge "Allow connections to multiple zygotes."
Narayan Kamath [Wed, 9 Apr 2014 14:12:22 +0000 (14:12 +0000)]
Merge "Allow connections to multiple zygotes."

10 years agoAllow connections to multiple zygotes.
Narayan Kamath [Thu, 3 Apr 2014 19:15:15 +0000 (20:15 +0100)]
Allow connections to multiple zygotes.

Adds a new String argument "abi" to Process.start.
This method will now query the zygotes to
determine what ABIs the primary and the secondary
zygote support (the secondary is optional) and dispatch
a fork request over the right zygote connection.

Both zygotes are assumed to be active at all points.

Change-Id: I460319b4481ff1c1666e8172223691820658a35c

10 years agoMerge "Make zygotes aware of their supported ABIs."
Narayan Kamath [Wed, 9 Apr 2014 13:55:55 +0000 (13:55 +0000)]
Merge "Make zygotes aware of their supported ABIs."

10 years agoMerge "Clean up argc / argv processing for runtime args."
Narayan Kamath [Wed, 9 Apr 2014 13:55:54 +0000 (13:55 +0000)]
Merge "Clean up argc / argv processing for runtime args."

10 years agoMake zygotes aware of their supported ABIs.
Narayan Kamath [Mon, 7 Apr 2014 12:56:15 +0000 (13:56 +0100)]
Make zygotes aware of their supported ABIs.

Query system properties for the list of ABIs and pass
it as a command line argument to ZygoteInit.

Also add a new Zygote command that returns this list of
ABIs to peers.

Change-Id: I68034c6f63fa626911122579a011a0a25a8cda94

10 years agoClean up argc / argv processing for runtime args.
Narayan Kamath [Mon, 7 Apr 2014 11:44:58 +0000 (12:44 +0100)]
Clean up argc / argv processing for runtime args.

- Make copies of argc, argv before argv is potentially
  overwritten with the process name.
- Allow multiple command line arguments to be passed to
  ZygoteInit (this is required for some of the 64 bit
  zygote work).
- Add an explanatory comment about how these argments
  are processed.

Change-Id: I752be69c5c0f97ed17d1a3dded19f46ee00929b0

10 years agoMerge "Don't allow MemoryFiles of negative length."
Narayan Kamath [Wed, 9 Apr 2014 09:07:29 +0000 (09:07 +0000)]
Merge "Don't allow MemoryFiles of negative length."

10 years agojni: liblog reading error API incorrect
Mark Salyzyn [Tue, 8 Apr 2014 22:21:50 +0000 (15:21 -0700)]
jni: liblog reading error API incorrect

- return value contains -errno on error.

Bug: 13907124
Change-Id: I91f12db5749fac2ae8ed5b0f033d4eaf83e666f5

10 years agoDon't allow MemoryFiles of negative length.
Narayan Kamath [Tue, 8 Apr 2014 15:10:52 +0000 (16:10 +0100)]
Don't allow MemoryFiles of negative length.

Prevents us from converting a (signed) jint into an
(unsigned) size_t and having horrible things happen.

Change-Id: I0f04e2eb9852ae7fc49b435fd0974f56e86751a4

10 years agoMerge "[ActivityManager] Reduce report ANR on wrong activity."
Craig Mautner [Mon, 7 Apr 2014 22:10:47 +0000 (22:10 +0000)]
Merge "[ActivityManager] Reduce report ANR on wrong activity."

10 years ago[ActivityManager] Reduce report ANR on wrong activity.
riddle_hsu [Mon, 7 Apr 2014 18:44:03 +0000 (02:44 +0800)]
[ActivityManager] Reduce report ANR on wrong activity.

Symptom: ANR report on wrong activity.

Root Cause:
  KK changed resume behavior that will not update focus when only resume,
if the activity blocked, it may report ANR on previous focus.
  By original concept, it will try to correct the ANR target,
but the stack of waiting(waitingVisible=true) activity may
different with current top stack.
  If it gets key dispatch timeout, mResumedActivity and mPausingActivity
of its stack will be null becuase it is not top stack.
Then it is unable to change ANR target to the real no response activity.

Solution:
 Use focused stack to get the real culprit.

Reproduce steps:
1.Launch an Activity X from launcher, press home key.
2.Launch X from launcher again, X blocks(sleeps 15sec) in onResume, press back key in the beginning of blocking duration.
3.ANR dialog shows launcher is no response.

Change-Id: I99416ad91e349096f995990f2240a97616fbaf28

10 years agoMerge "Always call super.onCreate(). Always."
Nick Kralevich [Fri, 4 Apr 2014 23:18:45 +0000 (23:18 +0000)]
Merge "Always call super.onCreate().  Always."

10 years agoAlways call super.onCreate(). Always.
Christopher Tate [Wed, 12 Feb 2014 21:14:10 +0000 (13:14 -0800)]
Always call super.onCreate().  Always.

Bug 12991134

(cherrypick of commit 9d6376a1d88ab5b3a41ee4400e3aaa4c4ee69e2a)

Change-Id: Ife16ef93408253e3318a06dc0206ab4b88c7f367

10 years agoMerge "Marquee text RTL improvements"
Raph Levien [Thu, 3 Apr 2014 15:50:28 +0000 (15:50 +0000)]
Merge "Marquee text RTL improvements"

10 years agoMerge "Remove ProcessState::mArgc,mArgV,mArgLen"
Narayan Kamath [Thu, 3 Apr 2014 13:59:37 +0000 (13:59 +0000)]
Merge "Remove ProcessState::mArgc,mArgV,mArgLen"

10 years agoRemove ProcessState::mArgc,mArgV,mArgLen
Narayan Kamath [Fri, 28 Mar 2014 13:39:21 +0000 (13:39 +0000)]
Remove ProcessState::mArgc,mArgV,mArgLen

These look like historical oddities, and weren't really being
used for anything useful.

Process:setArgV0 was being called by android.util.Process, but
that functionality can be moved directly into the implementation
of that class.

bug: 13647418

Change-Id: I216c8f8a4c065f0cf3a61f19f9e32decd26f93f6

10 years agoMerge "Update ViewRootImpl for 64bit functor type."
Ben Murdoch [Thu, 3 Apr 2014 09:48:43 +0000 (09:48 +0000)]
Merge "Update ViewRootImpl for 64bit functor type."

10 years agoMerge "Use default visibility for Snapshot::getLocalClip."
Ben Cheng [Wed, 2 Apr 2014 20:50:59 +0000 (20:50 +0000)]
Merge "Use default visibility for Snapshot::getLocalClip."

10 years agoUse default visibility for Snapshot::getLocalClip.
Ben Cheng [Wed, 2 Apr 2014 19:45:57 +0000 (12:45 -0700)]
Use default visibility for Snapshot::getLocalClip.

The method is in libhwui.so but used by libandroid_runtime.so
(via android_view_GLES20Canvas.cpp). If the compiler decides not to
inline this method, the linker won't be able to resolve the dependency
when it has hidden visibility.

The problem is found when testing GCC 4.9.

Change-Id: I3b4d096c7767f0bef0796886dfb2c5ba2ecff48c

10 years agoUpdate ViewRootImpl for 64bit functor type.
Ben Murdoch [Wed, 2 Apr 2014 13:41:41 +0000 (14:41 +0100)]
Update ViewRootImpl for 64bit functor type.

Change-Id: Ie9020f0276c58ebf0977e4aef725fbc26aaf67b2

10 years agoMerge "Move zygote startup logic to the frameworks."
Narayan Kamath [Wed, 2 Apr 2014 10:29:55 +0000 (10:29 +0000)]
Merge "Move zygote startup logic to the frameworks."

10 years agoMove zygote startup logic to the frameworks.
Narayan Kamath [Mon, 31 Mar 2014 12:41:26 +0000 (13:41 +0100)]
Move zygote startup logic to the frameworks.

The Zygote class is now in com.android.internal.os. It is
responsible for the vast majority of work before and after
the call to fork(). It calls back into the Runtime via
the new dalvik.system.ZygoteHooks class to allow the Runtime
to perform pre fork cleanup and post fork initialization.

The native code in Zygote.cpp is a direct and straightforward
port of the existing code in art. Most differences are
superficial, for example :
- We use C style logging (ALOGE) instead of stream based
  logging.
- We call env->FatalError() instead of using LOG(FATAL)

Change-Id: Ia101fb2af12d23894fe57e4134d2bc6d142e5059

10 years agoMerge "Fix RenderScriptGL setSurfaceTexture problem"
Jason Sams [Mon, 31 Mar 2014 23:21:42 +0000 (23:21 +0000)]
Merge "Fix RenderScriptGL setSurfaceTexture problem"

10 years agoMerge "Change when the SELinux relabel of /data/data occurs."
Nick Kralevich [Mon, 31 Mar 2014 20:09:31 +0000 (20:09 +0000)]
Merge "Change when the SELinux relabel of /data/data occurs."

10 years agoMerge "Improve detail message for X509TrustManagerExtensions argument validation"
Brian Carlstrom [Mon, 31 Mar 2014 19:49:34 +0000 (19:49 +0000)]
Merge "Improve detail message for X509TrustManagerExtensions argument validation"

10 years agoImprove detail message for X509TrustManagerExtensions argument validation
Brian Carlstrom [Mon, 31 Mar 2014 18:20:51 +0000 (11:20 -0700)]
Improve detail message for X509TrustManagerExtensions argument validation

Bug: 13728564
Change-Id: I03d08babcdc0d11baff5e76a339b4285e92edee8

10 years agoMerge "Don't make isSafeMode a field on the Zygote class."
Narayan Kamath [Mon, 31 Mar 2014 12:32:49 +0000 (12:32 +0000)]
Merge "Don't make isSafeMode a field on the Zygote class."

10 years agoDon't make isSafeMode a field on the Zygote class.
Narayan Kamath [Fri, 28 Mar 2014 13:10:41 +0000 (13:10 +0000)]
Don't make isSafeMode a field on the Zygote class.

This field is written and read exclusively by the system server,
and should therefore belong to the SystemServer class.

Change-Id: I2708a9a45c0c9cd1a6f563e8cc5844bd8c424bf7

10 years agoMerge "Cast CallMethod's size_t parameters to jint"
Narayan Kamath [Mon, 31 Mar 2014 09:37:32 +0000 (09:37 +0000)]
Merge "Cast CallMethod's size_t parameters to jint"

10 years agoFix RenderScriptGL setSurfaceTexture problem
Xiaofei Wan [Mon, 31 Mar 2014 06:26:20 +0000 (14:26 +0800)]
Fix RenderScriptGL setSurfaceTexture problem

rsnContextSetSurfaceTexture() has no implementation in rs-jni, use nContextSetSurface() in setSurfaceTexture().

Change-Id: I066432575c9e74f21ea3a3776628b572b6e31377
Signed-off-by: Xiaofei Wan <xiaofei.wan@intel.com>
10 years agoMerge "GlobalActions: Fix Airplane Mode on/off issue"
Wink Saville [Sun, 30 Mar 2014 00:15:22 +0000 (00:15 +0000)]
Merge "GlobalActions: Fix Airplane Mode on/off issue"

10 years agoGlobalActions: Fix Airplane Mode on/off issue
nagarw [Thu, 20 Feb 2014 11:40:46 +0000 (17:10 +0530)]
GlobalActions: Fix Airplane Mode on/off issue

Issue: Unable to turn off Airplane mode from power button
       after phone reboot

Fix: Initialize mHasTelephony before the PhoneStateListener is
     registered to the TelephonyManager so that correct value
     of mHasTelephony is reflected when onServiceStateChanged
     callback is called.

Bug: 13697360
Change-Id: Ide8afd9c16ea90b98b5912dbff440c5fd67b178d

10 years agoMerge "Mark constructor as accessible in LayoutInflater."
Jeff Hao [Fri, 28 Mar 2014 21:41:20 +0000 (21:41 +0000)]
Merge "Mark constructor as accessible in LayoutInflater."

10 years agoMerge "[ActivityManager] Fix a bug: unable to start activity after starting activitie...
Craig Mautner [Fri, 28 Mar 2014 20:27:32 +0000 (20:27 +0000)]
Merge "[ActivityManager] Fix a bug: unable to start activity after starting activities during screen off."

10 years agoMerge "Add support for additional international keyboard mappings"
Michael Wright [Fri, 28 Mar 2014 20:26:08 +0000 (20:26 +0000)]
Merge "Add support for additional international keyboard mappings"

10 years agoMerge "DO NOT MERGE - [ActivityManager] Ensure consistency behavior when a background...
Craig Mautner [Fri, 28 Mar 2014 20:23:34 +0000 (20:23 +0000)]
Merge "DO NOT MERGE - [ActivityManager] Ensure consistency behavior when a background activity brings another existed activity to front."

10 years agoMark constructor as accessible in LayoutInflater.
Jeff Hao [Fri, 28 Mar 2014 18:33:53 +0000 (11:33 -0700)]
Mark constructor as accessible in LayoutInflater.

Needed to bypass new access checks for fields, methods, and
constructors.

Change-Id: I8ff0b44a6cb4f4af1c72734bca366d8b89528030

10 years agoMerge "Remove duplicate call disconnect codes."
Anders Kristensen [Fri, 28 Mar 2014 17:19:57 +0000 (17:19 +0000)]
Merge "Remove duplicate call disconnect codes."

10 years agoChange when the SELinux relabel of /data/data occurs.
Robert Craig [Thu, 27 Mar 2014 14:00:58 +0000 (10:00 -0400)]
Change when the SELinux relabel of /data/data occurs.

Perform the relabel of the /data/data/<pkg> directories
when the app is being scanned by the PMS. The impetus
for this change was that the data directories of forward
locked apps were receiving the wrong label during an
OTA. Because the PMS doesn't actually scan forward locked
apps til later in the boot process, the prior restorecon
call was actually applying the default label of
system_data_file for all such apps. By performing a
restorecon on each individual app as they are entered into
the PMS we can handle them correctly. This mechanism also
allows us to pass down the seinfo tag as part of the
restorecon call which drops our need to rely on the contents
of packages.list.

Change-Id: Ie440cba2c96f0907458086348197e1506d31c1b6
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
10 years agoMerge "Reduce warning verbosity in aapt"
Adam Lesinski [Thu, 27 Mar 2014 20:55:14 +0000 (20:55 +0000)]
Merge "Reduce warning verbosity in aapt"

10 years agoMerge "Do not show Home behind full screen activity"
Craig Mautner [Thu, 27 Mar 2014 20:01:11 +0000 (20:01 +0000)]
Merge "Do not show Home behind full screen activity"

10 years agoMerge "app_process: use LOCAL_MULTILIB := both"
Colin Cross [Thu, 27 Mar 2014 17:26:07 +0000 (17:26 +0000)]
Merge "app_process: use LOCAL_MULTILIB := both"

10 years agoapp_process: use LOCAL_MULTILIB := both
Colin Cross [Thu, 27 Mar 2014 17:20:29 +0000 (10:20 -0700)]
app_process: use LOCAL_MULTILIB := both

Use LOCAL_MULTILIB := both to build app_process64 instead of
duplicating the build rule.

Also causes PRODUCT_PACKAGES := app_process to install both
versions on 64-bit platforms, as the module names for both
app_process and app_process64 are now app_process.

Change-Id: Ia3c3265d15475771b0cae8bace53b8fbf351c186

10 years agoAdd support for additional international keyboard mappings
Olivier Gay [Thu, 27 Mar 2014 16:21:01 +0000 (17:21 +0100)]
Add support for additional international keyboard mappings

Add kcm mapping files for Arabic, Greek, Hebrew, Lithuanian
and Spanish (Latin).

Change-Id: I35cb2a4d6e016c6f565fba05710ba1626452fe68
Signed-off-by: Olivier Gay <ogay@logitech.com>
Signed-off-by: Manuel Carthoblaz <mcarthob@logitech.com>
Signed-off-by: Mathieu Meisser <mmeisser@logitech.com>
10 years agoMerge "AArch64: Make frameworks/base code more portable"
Narayan Kamath [Thu, 27 Mar 2014 12:30:53 +0000 (12:30 +0000)]
Merge "AArch64: Make frameworks/base code more portable"

10 years agoAArch64: Make frameworks/base code more portable
Ashok Bhat [Tue, 25 Mar 2014 20:51:35 +0000 (20:51 +0000)]
AArch64: Make frameworks/base code more portable

Changes in this patch include

[x] Use %zu for size_t, %zd for ssize_t

[x] Some minor changes have been done to conform with
    standard JNI practice (e.g. use of jint instead of int
    in JNI function prototypes)

Change-Id: Id1aaa7894a7d0b85ac7ecd7b2bfd8cc40374261f
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Craig Barber <craig.barber@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
10 years agoDo not show Home behind full screen activity
Yevgen Pronenko [Fri, 14 Mar 2014 10:57:06 +0000 (11:57 +0100)]
Do not show Home behind full screen activity

When ensureActivitiesVisibleLocked goes through foreground activity
stack and reaches non-fullscreen activity, it sets showHomeBehindStack
variable to true.

If there is a fullscreen activity behind, showHomeBehindStack remains
unchanged, which causes Home application to be displayed anyway.
In this case user will see a fullscreen activity and Home activity
simultaneously.

To fix the issue we set showHomeBehindStack to false when we reach
fullscreen activity in the activity stack.

This was made visible by the following commit:
446ef1de8d373c1b017df8d19ebf9a47811fb402

Change-Id: I535c1283a4e26f5cf606375b837d4b7195324af0

10 years agoMerge "CertificateChainValidator: initialize TrustManagerFactory"
Kenny Root [Wed, 26 Mar 2014 22:51:52 +0000 (22:51 +0000)]
Merge "CertificateChainValidator: initialize TrustManagerFactory"

10 years agoMerge "jni: 64-bit compile issue"
Mark Salyzyn [Wed, 26 Mar 2014 19:52:11 +0000 (19:52 +0000)]
Merge "jni: 64-bit compile issue"

10 years agojni: 64-bit compile issue
Mark Salyzyn [Thu, 20 Mar 2014 19:09:01 +0000 (12:09 -0700)]
jni: 64-bit compile issue

- switch to PRId64
- some unused parameter warning suppression

Change-Id: Ia36bd1a247bb6e866a6b1050ab1362ebc9d31786

10 years agoMerge "Note libselinux dependency on packages.list format changes."
Nick Kralevich [Wed, 26 Mar 2014 15:41:14 +0000 (15:41 +0000)]
Merge "Note libselinux dependency on packages.list format changes."

10 years agoCertificateChainValidator: initialize TrustManagerFactory
Kenny Root [Wed, 26 Mar 2014 15:40:43 +0000 (08:40 -0700)]
CertificateChainValidator: initialize TrustManagerFactory

Need to call TrustManagerFactory#init before use. I suspect this class
isn't used anywhere since this hasn't caused a problem yet.

Change-Id: I17425d0bba4795d71960062361a755830abba7de

10 years agoNote libselinux dependency on packages.list format changes.
Stephen Smalley [Wed, 26 Mar 2014 13:19:12 +0000 (09:19 -0400)]
Note libselinux dependency on packages.list format changes.

Change-Id: I3c34a86f5706c4fca826a8634936131e4e4fc297
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
10 years agoDO NOT MERGE - [ActivityManager] Ensure consistency behavior when a background activi...
riddle_hsu [Wed, 26 Mar 2014 12:43:17 +0000 (20:43 +0800)]
DO NOT MERGE - [ActivityManager] Ensure consistency behavior when a background activity brings another existed activity to front.

Symptom: ANR occurs on previous activity.
Root Cause:
In KK, when a background activity starts another existed background activity (bring to front),
if current focused stack is not the same as the stack of target starting activity,
it will still resume the top of target stack, even the top activity on the target stack may not the same as target activity.
And it will result incorrect focus, press back key will send to previous stack's top then popup ANR on previous activity:
"Reason: Waiting because no window has focus but there is a focused application".

By original code comment, it looks 'bring to front' should not happen in this issue case.
// If the target task is not in the front, then we need
// to bring it to the front...  except...  well, with
// SINGLE_TASK_LAUNCH it's not entirely clear.  We'd like
// to have the same behavior as if a new instance was
// being started, which means not bringing it to the front
// if the caller is not itself in the front.

If the caller and target are in the same stask, it will just deliver new intent without changing task order (the same behavior as JellyBean).
So the patch concept is just to avoid to use target stack to resume top when caller and target are in different stack.

Solution: Do not allow to resume another stack top if non-top activity try to bring existed activity to front.
It may not be a good solution, just a reminder for the issue case.

Reproduce steps:
Assume A, B, C are different app tasks.
When the application stack is like:
  Top C
      B
      A

 #Case 1: Home is foreground
  A starts B with NEW_TASK, C will resume, focus still stays at Home, and window order does not update.
  Then press back key or volumn key will result ANR on Home.

 #Case 2: App is foreground (Resumed activity is C)
  A starts Home, Home will resume, focus still stays at C, and window order does did not update.
  Then press back key or volumn key will result ANR on C.

Change-Id: If05070123b248e2335791e43a4d4ddee6db11d84

10 years agoMerge "Solve three memory leaks related to PatchCache"
Chris Craik [Tue, 25 Mar 2014 20:11:33 +0000 (20:11 +0000)]
Merge "Solve three memory leaks related to PatchCache"

10 years agoMarquee text RTL improvements
Michael Lekman [Wed, 11 Jan 2012 13:27:52 +0000 (14:27 +0100)]
Marquee text RTL improvements

Changed marquee text to scroll according to
the reading direction. Arabic text will
show the right edge and scroll towards
the left edge and vice versa for Latin.

Corrected marquee flicker when scroll animation
finished. The ghost scroll's x position was cast
to int and it made the text flicker when
marquee stops.

Ghost part didn't display for RTL languages.
Added multiplication with
getParagraphDirection to negate the ghost
offset.

Change-Id: I689039118df01a62f73ef0079c857fea1bfcc5a0

10 years agoMerge "Use X509ExtendedTrustManager and not Conscrypt"
Kenny Root [Tue, 25 Mar 2014 17:06:54 +0000 (17:06 +0000)]
Merge "Use X509ExtendedTrustManager and not Conscrypt"

10 years agoMerge "Don't wait for finishing animation when second display is disconnected"
Craig Mautner [Tue, 25 Mar 2014 17:01:27 +0000 (17:01 +0000)]
Merge "Don't wait for finishing animation when second display is disconnected"

10 years agoMerge "Fix scaleNinePatch."
Narayan Kamath [Tue, 25 Mar 2014 13:56:51 +0000 (13:56 +0000)]
Merge "Fix scaleNinePatch."

10 years agoCast CallMethod's size_t parameters to jint
Ashok Bhat [Wed, 5 Mar 2014 15:23:13 +0000 (15:23 +0000)]
Cast CallMethod's size_t parameters to jint

This will avoid problems caused by automatic type
promotion of parameters when passed to a variadic function.

Change-Id: I9340cf4bc3afcb84ebb2843d2aaa1e832b0df7f4
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
10 years agoDon't wait for finishing animation when second display is disconnected
Koji Fukui [Fri, 14 Mar 2014 12:20:21 +0000 (21:20 +0900)]
Don't wait for finishing animation when second display is disconnected

Basically WindowManagerService wait for finishing animation when
a window is removed. But when second display is disconnected, windows
on second display can't be shown even if animation is waited for.
On the contrary, it keeps on waiting for finishing the animation
in special case.

With this fix windows are immediately removed without waiting for
animation when second display is disconnected.

Change-Id: I1354c193c04db394a21a11c174e10c8e7da17a0e

10 years agoSolve three memory leaks related to PatchCache
Jens Gulin [Tue, 4 Feb 2014 16:38:02 +0000 (17:38 +0100)]
Solve three memory leaks related to PatchCache

A Patch can be fairly large, holding bitmap data, but
is also frequently leaked which adds to the severity.
The feature is used in many important processes such
as Home, SystemUI and Chrome.

The following leaks are solved:

1. The Patch itself was not always freed.
PatchCache::removeDeferred() can mark patches to be
cared for by PatchCache::clearGarbage(). But
mCache.remove() would only destroy the container
and the pointer, not the Patch object itself.

2. The vertices stored in the Patch at Patch::createMesh()
would always leak. The empty/default destructor in Patch
would not properly destroy "vertices" since it's just a
pointer.

3. A BufferBlock that's added to the mFreeBlocks
in PatchCache could leak. The leak happened when a
patch later needed the entire free block, because the
object was removed from the list but never deleted
in PatchCache::setupMesh().

Change-Id: I41e60824479230b67426fc546d3dbff294c8891f

10 years agoUse X509ExtendedTrustManager and not Conscrypt
Kenny Root [Mon, 24 Mar 2014 17:18:18 +0000 (10:18 -0700)]
Use X509ExtendedTrustManager and not Conscrypt

This allows the new X509ExtendedTrustManager to be used instead of
Conscrypt directly.

Bug: 13103812
Change-Id: I736f475342395f26657f2371828a6d3a0065a50a

10 years agoRemoved android.debug.JNITest from preloaded-classes
Ashok Bhat [Thu, 20 Mar 2014 10:37:33 +0000 (10:37 +0000)]
Removed android.debug.JNITest from preloaded-classes

android.debug.JNITest class no longer exists in this
project. This patch updates preloaded-classes accordingly
to avoid spurious warning during boot.

Change-Id: Ia4a5a1858f6c87fbc594a623adb95454334361ea
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
10 years agoReduce warning verbosity in aapt
Adam Lesinski [Fri, 21 Mar 2014 01:04:57 +0000 (18:04 -0700)]
Reduce warning verbosity in aapt

- Attributed source of problems to the correct file.
- Only verify string localizations against valid
  locales.
Bug:13140015
Change-Id: I9dabc5efa0510649caee8af0c8ebb803d6f48269

10 years agoMerge "Set ScreenshotSurface secure if any secure content is shown."
Craig Mautner [Mon, 24 Mar 2014 14:31:38 +0000 (14:31 +0000)]
Merge "Set ScreenshotSurface secure if any secure content is shown."

10 years agoFix scaleNinePatch.
Narayan Kamath [Tue, 11 Mar 2014 16:50:30 +0000 (16:50 +0000)]
Fix scaleNinePatch.

Use yDivs for yDivs, and not xDivs.

bug: 13394494

(cherry picked from commit 42a51ae8812bccde7ff370cc2688f7955e489ad4)

Change-Id: Ia0a7d701a170945216ab247a483e7f972b6fe17e

10 years agoMerge "Adjust to the change in the private SSLParameterImpl API."
Alex Klyubin [Fri, 21 Mar 2014 18:36:07 +0000 (18:36 +0000)]
Merge "Adjust to the change in the private SSLParameterImpl API."

10 years agoAdjust to the change in the private SSLParameterImpl API.
Alex Klyubin [Fri, 21 Mar 2014 18:13:50 +0000 (11:13 -0700)]
Adjust to the change in the private SSLParameterImpl API.

Conscrypt's SSLParameterImpl getDefaultTrustManager was renamed to
getDefaultX509TrustManager.

Bug: 13563574
Change-Id: I601c651d631f5a2e4a04d21941186553988e5286

10 years ago[ActivityManager] Fix a bug: unable to start activity after starting activities durin...
leo_hsu [Fri, 21 Mar 2014 04:27:16 +0000 (12:27 +0800)]
[ActivityManager] Fix a bug: unable to start activity after starting activities during screen off.

Symptom: Unable to start any activity.
Root Cause: ActivityStack.mPausingActivity() points to a destroyed activity of a died process, so that ActivityStackSupervisor.allPausedActivitiesComplete() always returns false.
Solution: Set mPausingActivity to null in ActivityStack.cleanUpActivityLocked().
Reproduce steps:
    a. Turn screen off.
    b. A background service starts an activity X (in process X).
    c. A background service starts a no-history activity Y (in process Y), but the main thread of Y was blocked.
    d. A background service starts Y 3~4 times --> this causes am_failed_to_pause on X.
    e. Main thread of Y is freed finally --> this causes Y crash for android.view.WindowManager$BadTokenException.
    f. Turn screen on, X is shown on screen, but neither back key nor home key can work because mPausingActivity is Y.

Change-Id: I320b3db407e2d4cc745c8ca22a6e548742234242

10 years agoMerge "bootanimation: build 32-bit if 64-bit gl libraries are not available"
Colin Cross [Thu, 20 Mar 2014 17:28:11 +0000 (17:28 +0000)]
Merge "bootanimation: build 32-bit if 64-bit gl libraries are not available"

10 years agoMerge "Don't register methods when there's nothing to register."
Narayan Kamath [Thu, 20 Mar 2014 10:08:37 +0000 (10:08 +0000)]
Merge "Don't register methods when there's nothing to register."

10 years agoSet ScreenshotSurface secure if any secure content is shown.
Minoru Aoi [Thu, 13 Mar 2014 03:00:34 +0000 (12:00 +0900)]
Set ScreenshotSurface secure if any secure content is shown.

The screenrecord command can record secure content during rotation.
This is because the ScreenshotSurface surface for rotation animation
is not set secure even though its screenshot contains secure content.

Change-Id: I5a70be71ddfc26de4230e7d4fe547210c2154210

10 years agoMerge "Prevent Lockscreen album art from activating FLAG_KEEP_SCREEN_ON"
Chris Craik [Thu, 20 Mar 2014 02:19:53 +0000 (02:19 +0000)]
Merge "Prevent Lockscreen album art from activating FLAG_KEEP_SCREEN_ON"

10 years agoMerge "Get rid of noise during boot."
Nick Kralevich [Thu, 20 Mar 2014 01:37:38 +0000 (01:37 +0000)]
Merge "Get rid of noise during boot."

10 years agoGet rid of noise during boot.
Dianne Hackborn [Thu, 20 Mar 2014 00:49:09 +0000 (17:49 -0700)]
Get rid of noise during boot.

This log is not an error, it is a warning, don't spam a stack
crawl when it happens.

Change-Id: I6038e3625cc0c16af9e54887b5e7ec451d9f864d

10 years agoMerge "build app_process64 on 64-bit targets"
Colin Cross [Thu, 20 Mar 2014 01:14:43 +0000 (01:14 +0000)]
Merge "build app_process64 on 64-bit targets"

10 years agobootanimation: build 32-bit if 64-bit gl libraries are not available
Colin Cross [Thu, 20 Mar 2014 01:09:01 +0000 (18:09 -0700)]
bootanimation: build 32-bit if 64-bit gl libraries are not available

Set LOCAL_32_BIT_ONLY if TARGET_32_BIT_SURFACEFLINGER is set.

Change-Id: I76396cc9fe3fe45d1e98a44bf911d6e70922555a

10 years agobuild app_process64 on 64-bit targets
Colin Cross [Thu, 20 Mar 2014 00:47:39 +0000 (17:47 -0700)]
build app_process64 on 64-bit targets

On 64-bit platforms builds two copies of app_process, the 32-bit
app_process and 64-bit app_process64.

Change-Id: I59d739b5df398ad0bd040c954c57640ff7ab3e72

10 years agoMerge "mediaeditor shouldn't depend on audioflinger."
Glenn Kasten [Wed, 19 Mar 2014 21:02:38 +0000 (21:02 +0000)]
Merge "mediaeditor shouldn't depend on audioflinger."

10 years agoMerge "Fix 64 bit compile failures in renderscript"
Glenn Kasten [Wed, 19 Mar 2014 21:01:57 +0000 (21:01 +0000)]
Merge "Fix 64 bit compile failures in renderscript"

10 years agoMerge "Allow PMS to restorecon directories under /data."
Nick Kralevich [Wed, 19 Mar 2014 20:17:40 +0000 (20:17 +0000)]
Merge "Allow PMS to restorecon directories under /data."

10 years agoMerge "androidfw: resolve 64-bit build issues"
Mark Salyzyn [Wed, 19 Mar 2014 19:36:51 +0000 (19:36 +0000)]
Merge "androidfw: resolve 64-bit build issues"

10 years agoMerge "PacProcessor should be 32 bit only."
Glenn Kasten [Wed, 19 Mar 2014 19:34:07 +0000 (19:34 +0000)]
Merge "PacProcessor should be 32 bit only."

10 years agoandroidfw: resolve 64-bit build issues
Mark Salyzyn [Wed, 19 Mar 2014 18:00:06 +0000 (11:00 -0700)]
androidfw: resolve 64-bit build issues

- uid_t/gid_t cast to unsigned long
- unused argument warnings
- tab and space requirements

Change-Id: Ib446d8165b9082be02edb55e6b71fd1a03ea3431

10 years agomediaeditor shouldn't depend on audioflinger.
Narayan Kamath [Wed, 19 Mar 2014 11:41:32 +0000 (11:41 +0000)]
mediaeditor shouldn't depend on audioflinger.

Change-Id: I7e1b999b03a3ee5eff2e10a460f64abeba16ba90

10 years agoAllow PMS to restorecon directories under /data.
Robert Craig [Tue, 4 Mar 2014 16:57:23 +0000 (11:57 -0500)]
Allow PMS to restorecon directories under /data.

This change applies a relabel to both /data/data and
/data/user directories on boot. Not every boot will
apply this relabeling however. The appropriate
seapp_contexts is hashed and compared to
/data/system/seapp_hash to decide if the relabel
should occur.

Change-Id: I05e8b438950ddb908e46c9168ea6ee601e6d674f
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
10 years agoFix 64 bit compile failures in renderscript
Narayan Kamath [Wed, 19 Mar 2014 10:15:51 +0000 (10:15 +0000)]
Fix 64 bit compile failures in renderscript

Use uintptr_t for pointers (and not uint32_t) and
also don't assume that size_t is 32 bits wide.

Also uses java longs for passing pointers across
JNI boundaries.

Change-Id: Ie52bd8ae967fbddc911eda3a43cc799d53bbce66

10 years agoDon't register methods when there's nothing to register.
Narayan Kamath [Wed, 19 Mar 2014 14:13:27 +0000 (14:13 +0000)]
Don't register methods when there's nothing to register.

Change-Id: I6d0233f79bb90089426d702b4076ec5750e82475