120394 Commits

Author SHA1 Message Date
Leo Hsu
5073145f85 Fix a bug: unable to start activity when AM is killing the process.
Symptom: No activity was started for startActivity, low repro rate.
Root Cause: Starting activity on a process which was killed by ActivityManagerService.killUnneededProcessLocked() and before receiving AppDeathRecipient of it.
Solution: Choose the flow of starting a new process if ProcessRecord.killedByAm is true.

Change-Id: Ida2639b0fb4631222fc92d65aadc9fd2da637b45
2014-08-12 13:47:23 +08:00
Adam Powell
dafcc61078 Merge "Don't unnecessarily set LayoutParams on children" 2014-08-08 20:41:34 +00:00
Piotr Jastrzebski
07291cccc0 Merge "Remove memory leak." 2014-08-07 18:51:06 +00:00
Piotr Jastrzebski
1a68b079d7 Remove memory leak.
Call EndIteration in endIteration to free memory allocated for cookie in
StartIteration.

Change-Id: I3d58a461c2f3676565cfd7922dc6d8d5c35feae9
2014-08-11 08:20:35 +01:00
Calin Juravle
94f3e47da5 Merge "Fix the instruction set for dex file during (re)moving ops." 2014-08-07 18:42:30 +00:00
Calin Juravle
219b535673 Fix the instruction set for dex file during (re)moving ops.
This complements https://android-review.googlesource.com/#/c/103231/
where the instruction set was mapped just for comptilation. The same
should have been done for move,remove and getSize.

The list of dex code ISAs is alo de-duped.

Bug: 16185267
Change-Id: I8fe453a800812e382e8f41b5f7922997aa9c18a9
2014-08-08 18:45:28 +01:00
Calin Juravle
2f4cf2cfd1 Pass the name of the native bridge library to the runtime
Bug: 16843953
Change-Id: Ia0f57a9b3e30a74fe4e93eb4453f841c1ef512eb
2014-08-08 18:45:19 +01:00
Calin Juravle
3d274434c7 Merge "Pass the name of the native bridge library to the runtime" 2014-08-07 18:51:06 +00:00
Calin Juravle
7f93572650 Merge "Use native ISA for dex code (in case there's a NativeBridge)" 2014-08-07 09:28:10 +00:00
Calin Juravle
576c384ed8 Use native ISA for dex code (in case there's a NativeBridge)
In the presence of a native bridge it is more efficient to compile the
dex directly to the native ISA than to use the shared library ISA as a
reference.

This can be achieve by configuring the readonly system properties to map
between the .so ISA and the desired dex code .ISA (e.g.
ro.dalvik.vm.isa.ISA1=ISA2).

Bug: 16185267

Change-Id: I50baa7b37e1465b9adf72d6f6b96f526a08d59c7
2014-08-06 19:28:28 +01:00
Brian Carlstrom
8b8c718cbb Merge "Make system use patchoat to relocate during runtime." 2014-08-05 00:30:25 +00:00
Alex Light
1995d12d26 Make system use patchoat to relocate during runtime.
Make PackageManagerService aware of patchoat and make it use it when
appropriate.

Bug: 15358152

Change-Id: Ibe92d8b55a24bbf718b0416a21b76e5df7a2de26
2014-08-05 10:22:10 -07:00
Mathieu Chartier
7782c6b381 Merge "Fix JNI error in exception reporting." 2014-08-05 00:20:48 +00:00
Mathieu Chartier
cf6775eece Fix JNI error in exception reporting.
There was a JNI error where when you got an OOM and called
report_exception, it would call two NewStringUTF in a row without
checking the return values. This could mean that the first one
threw a new OOME and the second one would cause a JNI error when
it also attempted to throw an OOME with a pending OOME.

Bug: 16843627
Change-Id: Ie4f9f9a5f8b7993cd3655d42a6718c0a5e1199f8
2014-08-06 13:41:19 -07:00
Brian Carlstrom
20bac14e52 Merge changes I69c064b0,I1972c5af
* changes:
  Move image classes options from art to AndroidRuntime [frameworks/base]
  Disable compilation based on vold.decrypt. [frameworks/base]
2014-08-01 08:22:51 +00:00
Brian Carlstrom
1de3c633dc Merge "Move from dalvik.vm.image-dex2oat-flags to dalvik.vm.dex2oat-filter [frameworks/base]" 2014-08-01 02:02:23 +00:00
Brian Carlstrom
108166c749 Move image classes options from art to AndroidRuntime [frameworks/base]
Bug: 15165413
Change-Id: I69c064b05f62a2e8a3801dc924f5b032dedc8e51
2014-07-31 14:27:29 -07:00
Brian Carlstrom
f60d3a4702 Move from dalvik.vm.image-dex2oat-flags to dalvik.vm.dex2oat-filter [frameworks/base]
This will allow us to conditionally change the compiler-filter based on other properties.

Bug: 15165413
Change-Id: I1676987c69a3cad4217dc4b56465ef3ae886122a
2014-07-31 14:27:29 -07:00
Brian Carlstrom
4fd561637a Disable compilation based on vold.decrypt. [frameworks/base]
Bug: 15165413
Change-Id: I1972c5af5f392c2ed247888ef33c03e9ffe4d588
2014-07-31 14:27:29 -07:00
John Reck
8c57cead83 Merge "[View] Clear Hardware-Layers before system destroys HardwareRenderer​." 2014-07-29 22:52:28 +00:00
Craig Mautner
4895bf78ff Merge "Fix a bug that the RecentTask list of other’s may show up to non-primary users." 2014-07-29 21:36:05 +00:00
Eunae Kim
26ac40305a Fix a bug that the RecentTask list of other’s may show up to non-primary users.
When switching to a newly created user, the user may face this bug when he opens the RecentTask screen.
A possible bug scenario is described as follows:
A user id of a removed user may be recycled when created a new user.
However, mRecentTasks is not correctly controlled so that old information may still remain and be possibly mapped to wrong user.
This patch prevents this bug by explicitly removing old information in mRecentTasks when removing existing user.

Change-Id: I1874dbd604598a5d740ae1e034981e21214c15c6
Signed-off-by: Eunae Kim <eunae.kim@lge.com>
2014-07-31 13:58:53 +09:00
Craig Mautner
6a58309e73 Merge "[ActivityManager] Prevent coredump file may not complete for testing." 2014-07-30 19:31:16 +00:00
riddle_hsu
8062b9534f [ActivityManager] Prevent coredump file may not complete for testing.
Sympton:
During testing, skip kill native crash process manually because it will continue to die by default.

Root Cause:
Large process may take some time to do coredump.In auto test, crash process will be killed immediately that results incomplete coredump file.

Solution:
If the tester (IActivityController) will handle app crash event,
Do not kill native crashed process if the rom is debuggable.

Change-Id: Ia360af147d694125d440e5ba2f958c4759a50494
2014-07-31 03:53:04 +00:00
Craig Mautner
905fe15ea0 Merge "[ActivityManager] Avoid mistaking visibility by finishing task." 2014-07-30 19:31:16 +00:00
riddle_hsu
1df4d9f8c7 [ActivityManager] Avoid mistaking visibility by finishing task.
Sympton:
Next activity only adds to history but does not launch/resume then results ANR.

Root Cause:
In a rare timing, some windows are switched at the same time,
it will cause some finishing records on the top temporarily,
then set startIt to false that skip to resume the real top activty.

Solution:
If all activities in a task are finishing, do not use it to check.
The behavior/checking is the same concept as in JellyBean:
            // If starting in an existing task, find where that is...
            boolean startIt = true;
            for (int i = NH-1; i >= 0; i--) {
                ActivityRecord p = mHistory.get(i);
                if (p.finishing) { // <--
                    continue;
                }

Change-Id: I9d81a7b5182400c52e173da23eee61c74692beee
2014-07-31 00:26:51 +08:00
Narayan Kamath
bd855367c4 Merge "Don't assume languages are 2 letter codes." 2014-07-29 22:52:28 +00:00
Narayan Kamath
fd138cd81a Don't assume languages are 2 letter codes.
Also, note that this method never worked. Locale
settings were stored with underscores (like Locale.toString)
but matched against AssetManager.getLocales() which
returned language-tag like output.

bug: 10090157
Change-Id: I36ffea6e39ff7d1907b2787f8fd4545c24d326a8
2014-07-31 13:10:20 +01:00
Narayan Kamath
bb97753bc5 Merge "Switch TextUtils over to new ICU API." 2014-07-29 22:52:28 +00:00
Narayan Kamath
08b3516984 Switch TextUtils over to new ICU API.
.. and use Locale.getScript() instead of ICU.getScript.

bug: 15876704
Change-Id: Idf9462d8ef568dbc88c95e65a971184952e97872
2014-07-31 11:29:44 +00:00
henry.uh_chen
a199720190 [View] Clear Hardware-Layers before system destroys HardwareRenderer​.
Symptom: Sometimes HardwareLayer display is corrupted.

Root Cause: In some cases, ViewRootImpl destroys HardwareRenderer​ without
clearing HardwareLayers in the view hirarchy. If the system trims memory fully
and kill the glContext at the same time, HardwareLayer may corrupt.

Solution: Clear Hardware-Layers before system destroys HardwareRenderer​.

Reproduce steps: Modify the cache's trim memory mechanism to make it easier to
trim fully, HardwareLayers implemented in app will easily be corrupted.
Modification of the cache is not required but make it easier to reproduce.

Change-Id: If57c802cdacf8dc37cbbcc199e74f9482834f981
2014-07-25 18:07:24 +08:00
Tim Murray
8224edb94f Merge "Update makefile for clang host build." 2014-07-23 18:45:08 +00:00
Chris Craik
215ecb93e9 Merge "Restore untrusted glStencilMask value on resume after functor" 2014-07-22 20:34:45 +00:00
Chris Craik
c47aba2a77 Restore untrusted glStencilMask value on resume after functor
Fixes an issue where the stencil buffer is corrupted
(used in overdraw debugging, path clipping) when used in
conjunction with a HW accelerated WebView.

bug:15023700
bug:16465551

Change-Id: If201b503931380f7107a34e9a9a2f877a50f72b1
2014-07-22 23:19:02 +00:00
Chris Craik
bfb349e242 Merge "[Bitmap] Add null pointer protection in Bitmap_sameAs()" 2014-07-22 16:35:00 +00:00
Chris Craik
50a2d6339c Merge "[HWUI] Fix invisible views are still shown in popup window" 2014-07-22 16:35:00 +00:00
Tim Murray
132ed0f2b4 Update makefile for clang host build.
bug 16172793

Change-Id: If7484c5dbcccce7d925bec97bff0a3e4c30e9434
2014-07-17 16:37:42 -07:00
Neil Fuller
fc6346d461 Merge "Rewriting android.text.format.Time without the native _tz functions" 2014-07-17 22:36:58 +00:00
Neil Fuller
d7f0849b8c Rewriting android.text.format.Time without the native _tz functions
Bug: 15765976
Change-Id: I666b72ecf9da8a9dcfb97cc503006b415909a558
2014-07-22 15:06:16 +01:00
Craig Mautner
02fd104f30 Merge "Skip broadcasting to a receiver if the receiver seems to be dead" 2014-07-17 23:22:21 +00:00
Koji Fukui
63909886b2 Skip broadcasting to a receiver if the receiver seems to be dead
If an application that has a broadcast receiver is killed
during broadcasting, thread variable of ProcessRecord becomes null
so that IIntentReceiver#performReceive() is called
in BroadcastQueue#performReceiveLocked(). But if binder driver has not
noticed the death of the application yet, it can't throw
DeadObjectException. After that, binder driver notices. But it can't
notify DeadObjectException to the caller because performReceive() is
async call. So broadcasting keeps on waiting for finishing
performReceive() until timeout.

This change checks the death of the application before calling
performReceive() and skips broadcasting to the receiver
if the application has already died.

Change-Id: Ifa02b8b1a7e7b6fd314de90fedff5b7a5326825d
2014-07-21 09:53:05 +02:00
Yohann Roussel
3bdbf644d6 Merge "Add support.multidex tests app for an update bug." 2014-07-17 22:37:43 +00:00
Narayan Kamath
e242111c5d Merge "Remove copy of Locale.adjustLanguageCode." 2014-07-17 22:36:58 +00:00
Narayan Kamath
1d31a5f824 Remove copy of Locale.adjustLanguageCode.
Change-Id: Iba8c67890f95d50fadcd1245dc083d646fe6bcc1
2014-07-18 16:09:36 +01:00
Chris Craik
152d9e6128 Merge "[HWUI]: fix residual line on FrameBuffer" 2014-07-17 18:05:27 +00:00
Craig Mautner
2e7b2521f1 Merge "[ActivityManager]: Update home process when home activity resumed" 2014-07-16 16:25:15 +00:00
louis_chang
73fd117c65 [ActivityManager]: Update home process when home activity resumed
Symptom:
  When switch between two home activities, the home process might not be updated to the correct one. In that case, the home activity might be killed easily.

Root Cause:
  The home process is updated only when a home activity is newly created or being restarted. ActivityManager did not update the home process when simply resume a home activity.

Solution:
  Update home process when home activity resumed

Reproduce Steps:
  1. Install a launcher application, such as Apex Launcher
  2. Press home key to change to Apex Launcher by "Just once" option
  3. Press home key to switch back to original home activity by "Just once" option.
     (The home process is still the Apex Launcher's process because ActivityManager does not update the home process when resuming the original home activity.)

Change-Id: I046279ca7ba851a283ee67ea19202890f7b3f343
2014-07-16 17:16:34 +00:00
Yohann Roussel
2f00e62d96 Add support.multidex tests app for an update bug.
The failing scenario is
- install v1
- run
- update to v2
- update to v3
- run
last run was failing with initial multidex library versions because
it's still running on v1 extracted secondary dex files.

(cherry picked from commit 05e2a94c8b510131f43a686f5188d4c0f2a5eebd)

Change-Id: Ibb5d16642b127ee4c0baddc4f6ba461c11d25f90
2014-07-16 12:54:56 +02:00
Craig Mautner
d543c3e113 Merge "[ActivityManager] Do not finish root activity when reset task" 2014-07-15 20:36:09 +00:00
louis_chang
f87b219539 [ActivityManager] Do not finish root activity when reset task
Symptom:
The root activity not always located at index 0 of the task.
For example, the index 1 activity will become the new root
when the original root activity (at index 0) finished.
The new root activity might be finished unexpectedly before
the original root activity actually destroyed.

Solution:
Check frontOfTask to avoid finishing the root activity unexpectedly

Change-Id: I623ab97e9c95c83b3cfe7c9dfc151a291a391ea4
2014-07-16 18:15:35 +08:00