120525 Commits

Author SHA1 Message Date
riddle_hsu
7f1e3f3e93 [ActivityManager] Prevent potential deadlock from system error dialog and InputMethodManager.
Sympton:
When application crash in a special timing and system server's InputMethodManager is binding, deadlock may occur.

Root Cause:
Thread(1): When using InputMethodManager in system server, it will lock mH(handler) of InputMethodManager,
and sometimes it will call to InputMethodManagerService::showCurrentInputLocked and will call bindService at some condition,
then it will also lock ActivityManagerService.
Thread(2): When an application crashed, it will lock ActivityManager when showing crash dialog, inside the dialog,
it will call setEnabled of Button and lock mH of InputMethodManager.setEnable of TextView will lock IMM's handler.
So the deadlock happened as the flow: (2) lock AMS -> (1)lock mH -> (2)wait mH -> (1) wait AMS

Solution:
Reduce nested lock of error dialog: post message to let (2) lock mH after release AMS lock.

Change-Id: Id85c29406236db3b5fca9655fde1fcaf0afd1337
2014-07-08 04:30:19 +08:00
Brian Carlstrom
52a154febb Merge "Remove" 2014-07-07 17:50:18 +00:00
Brian Carlstrom
87f597465c Remove
(cherry picked from commit 9881203920c8445e9a4bdd9e4a90ba0014f34c5e)

Change-Id: Ib40823b7c03af4c71da902b0e5c504e074cf0dd9
2014-07-07 11:31:47 -07:00
Narayan Kamath
501bb0a5e4 Merge "Fix issue when converting fil->tl." 2014-07-04 08:02:36 +00:00
Narayan Kamath
fec5106c8e Fix issue when converting fil->tl.
We should call ResourceTable::getLocales directly,
and not AssetManager::getLocales. The latter will convert
"tl" to "fil" so we'll end up thinking we have resources
for "fil" when we don't really have any.

bug: 15873165

Change-Id: I9753e4608aaecede328a40ee1f3ee6b016d0dedc
2014-07-07 09:51:01 +01:00
henry.uh_chen
42856eb4f1 [Bitmap] Add null pointer protection in Bitmap_sameAs()
Symptom: SkBitmap::getAddr(int, int) may return NULL due to unrecognized config 
(ex: kRLE_Index8_Config). This will cause memcmp method to crash. Since bm0 and 
bm1 both have pixel data() (have passed NULL == getPixels() check), those 2 
bitmaps should be valid (only unrecognized), we return JNI_FALSE to warn user 
those 2 unrecognized config bitmaps may be different.


Change-Id: I6970c27de412110a3035d0a783112c4cd3ebc35b
2014-07-03 12:44:47 +00:00
henry.uh_chen
3a1bffa835 [HWUI] Fix invisible views are still shown in popup window
Symptom: Invisible views are still shown in popup window

Root Cause: glClear isn't called if there is no draw command

Solution: Even if there is no draw command, it still calls glClear
          by startFrame().

Reproduce steps: App set one view in a popup window to invisible,
                 it will be still visible.

Change-Id: I36bc7b752434ad388fbb80ea63341ac778f48d35
2014-07-03 10:14:15 +00:00
henry.uh_chen
20adb6ce4d [HWUI]: fix residual line on FrameBuffer
Symptom: If app applies animation to enlarge a bitmap, there will be an residual
         line on the screen

Root Cause: On platform which has Tile Rendering implementation (ex. Qualcomm
            CPU), startTiling() call will restrict the framebuffer region which
            GPU can affect. So the expansion of clear region by 1 will not take
            effect if startTiling region is not expanded.

Solution: Expand the startTiling region by 1, too.

Reproduce steps: Apply animation to enlarge (and then shrink) a bitmap icon.

Change-Id: I7b4a59e180daa29dbe909d9e11f4093ae1d7396f
2014-07-03 09:58:31 +00:00
Narayan Kamath
358a3f7168 Merge "fix AudioTrack and AudioRecord JNI" 2014-07-02 20:52:49 +00:00
Eric Laurent
90d0b9e1bb fix AudioTrack and AudioRecord JNI
AudioTrack and AudioRecord JNI should not cast
jshortArray to jbyteArray. This appeared to work with Dalvik
but causes data corruption with ART.

(cherry picked from commit 9d02848e902d04417df616354db3a18c03e639b7)

Change-Id: Ie36624d3ea06042373c64edced4b5e30b7b1ee86
2014-07-04 09:37:28 +01:00
Narayan Kamath
759e0d6a7a Merge "Fix LocalePicker locale filtering." 2014-07-04 08:02:36 +00:00
Narayan Kamath
80b574199c Fix LocalePicker locale filtering.
This was broken by commit b27c137087ee92674 which
removed a badly phrased check. Prior to that commit,
there was a check that excluded locales whose toString()
length was not 5.

This change reinstates that check in a less roundabout
way, by excluding BCP-47 tags that don't have a country
subtag.

bug: 16038949

Change-Id: Ic24b1df87b2e2ce47d9ae04c7759088721f27b4f
2014-07-03 13:31:42 +01:00
Nick Kralevich
42b74e231d Merge "Typo in method name: Clone" 2014-07-02 20:51:20 +00:00
Nick Kralevich
ca2df28678 Merge "Fix typo in the exception message." 2014-07-02 20:52:43 +00:00
Nick Kralevich
a347ece5a7 Merge "Fix typo in comment of FragmentTransaction" 2014-07-03 01:32:01 +00:00
Nick Kralevich
ce25948325 Merge "Added missing brace." 2014-07-03 01:32:01 +00:00
Nick Kralevich
77491ac00c Merge "Correct typo in doc comment" 2014-07-02 20:52:43 +00:00
Nick Kralevich
a2e4ce2b7c Merge "Fix typo - issue 56671" 2014-07-03 01:32:01 +00:00
Nick Kralevich
8b333467fe Merge "fix trivial typo: s/meansure/measure" 2014-07-03 01:32:01 +00:00
Nick Kralevich
a6336747a4 Merge "Fix a copy/paste typo in ViewPropertyAnimator" 2014-07-02 20:52:43 +00:00
Nick Kralevich
63af727b4b Merge "Fix Issue 59989" 2014-07-02 20:52:43 +00:00
Nick Kralevich
b70888d455 Merge "Fix a typo in a javadoc comment" 2014-07-02 20:52:43 +00:00
Nick Kralevich
c9eff23b44 Merge "Fix typo in DevicePolicyManager documentation" 2014-07-03 01:32:01 +00:00
Brian Duff
a6e9dd3f9a Merge "Fix a typo in NumberPicker javadoc." 2014-07-02 20:51:20 +00:00
Nick Kralevich
3b345a6f91 Merge "Fix javadoc typo in Message.java: "arg1" -> "arg2"" 2014-07-02 20:51:20 +00:00
Nick Kralevich
eb822cecdb Merge "Typo fix in permission string" 2014-07-03 01:32:01 +00:00
Robin Lee
74803e559c Merge "Make misc config directory during user creation" 2014-07-02 20:49:53 +00:00
Brian Carlstrom
b85afb38e8 Merge "Make dex2oat heap size product configurable [frameworks/base]" 2014-07-08 22:56:31 +00:00
Brian Carlstrom
6d77eb99bf Make dex2oat heap size product configurable [frameworks/base]
Bug: 15919420
Change-Id: I9b7b4f60826fc9b0cc6bb3765ceaa36542425006
2014-07-08 15:05:41 -07:00
Stephen Hines
70a3c55864 Merge "Adds support for multi-input kernels to Frameworks/Base/RS." 2014-07-07 17:50:18 +00:00
Robert Greenwalt
912700fca8 Merge "Add Telefonica/Movistar specific APN details for dun" 2014-07-07 19:33:32 +00:00
Albert
b2df39a709 Add Telefonica/Movistar specific APN details for dun
Movistar Spain needs to add a specific APN to offer tethering
in their devices.

Change-Id: I5554ff98a5ac4c5f33b9af0083e1fac8305c9e13
Signed-off-by: Albert <alberto.crespell@gmail.com>
2014-07-08 06:56:08 +02:00
Chris Wailes
949610653f Adds support for multi-input kernels to Frameworks/Base/RS.
* Added a new JNI call to pass arrays of Allocations to the RS runtime.
* Added a new version of ForEach that takes an array of Allocations.
* Added some casts to disambiguate existing calls to forEach.

Change-Id: I46d2834c37075b2a2407fd8b010546818a4540d1
2014-07-07 12:27:21 -07:00
Craig Mautner
ef2e76675a Merge "[ActivityManager] Avoid keeping restarting home when only home activity exists." 2014-07-02 20:49:53 +00:00
Craig Mautner
c66da9d606 Merge "[ActivityManager] Prevent kill a restarted process again." 2014-07-06 03:24:06 +00:00
riddle_hsu
3145b24902 [ActivityManager] Avoid keeping restarting home when only home activity exists.
Root Cause:
When there is only home activity existed,
updating home apk will call forceStopPackageLocked to finish the activity.
Then activity history becomes empty, then home will be launched,
but its package is still target to close that results a loop.

Solution:
If home activity has been force-stopped, do not stop the same home activity again.

Change-Id: Icff12028d407873c2e6f50a06bcad231b908ccbd
2014-07-04 17:01:56 +08:00
riddle_hsu
a4f1f8a239 [ActivityManager] Prevent kill a restarted process again.
Root Cause:
Use removeTask with flag ActivityManager.REMOVE_TASK_KILL_PROCESS will set waitingToKill = "remove task"
to the target process when its setSchedGroup is not BG_NONINTERACTIVE.
Later the target process may be killed when applying oom-adj due to setSchedGroup has changed to BG_NONINTERACTIVE.
If the process is needed to restart, the process record will be resued.
Then the restarted process may be killed again because its waitingToKill is not null.

Solution:
Clean waitingToKill when process is dead.

Change-Id: I5ffb5388127f4221da4c700d3f1c224f7ca6e7b2
2014-07-04 12:19:41 +08:00
Craig Mautner
5acdd0f67d Merge "[ActivityManager] Ensure alive process is not killedByAm." 2014-07-02 20:52:43 +00:00
riddle_hsu
abc69e93d6 [ActivityManager] Ensure alive process is not killedByAm.
Symptom: Unable to kill by Am again and will be skipped updating its oom adj.

Root Cause:
A restarted process will reuse original process record.
The flag killedByAm will keep previous state.

Solution:
Reset the flag killedByAm to false when the process is started.

Note: Found another similiar patch If95137d91939cc44882ad2813131bcde0edd0c1b


Change-Id: I59a86648ca8d0aed4c489d92751af120aae5ef90
2014-07-04 13:33:19 +00:00
Narayan Kamath
104da1e495 Merge "Fix broken assumptions in LocalePicker." 2014-07-01 17:57:26 +00:00
Narayan Kamath
3fa99ec77e Merge "Remove bogus 2 char limit for locales and countries." 2014-07-01 17:52:00 +00:00
Narayan Kamath
6e84f8c1b9 Merge "Fix native crashes when APKs can't be opened." 2014-07-01 17:48:27 +00:00
Narayan Kamath
f56399f6ab Merge "Fall back to "tl" if "fil" is absent." 2014-07-01 17:48:27 +00:00
Narayan Kamath
e4345dbd2a Fall back to "tl" if "fil" is absent.
For JB-MR1, there was a hack that used "tl" where
we really meant "fil" because ICU didn't have localizations
for "fil". This has now been fixed, and we now support 3 letter
language codes for AAPT so we can use "fil" where required.

For the benefit of apps that need to target older platforms,
we fall back to "tl" if the app has assets for "tl" and the
resource locale is "fil".

See bugs 7291355, 7207176 and 8049507 for more context.

Change-Id: I1ac8502525f99b40f9091d5efd2df33518d47a41
2014-07-02 10:53:43 +01:00
Brian Carlstrom
a6e06889fc Merge "Add profiler type options" 2014-07-01 14:58:13 +00:00
Nick Kralevich
9b1a7d4570 Merge "Allow different SELinux policies for third party apps." 2014-07-01 19:16:01 +00:00
Robert Craig
83b54ecab7 Allow different SELinux policies for third party apps.
Prior support forced all third party apps
to be resolved against the default stanza
of the mac_permissions.xml file when assigning
seinfo labels. This meant that all third party
apps, in effect, were untrusted regardless of
cert and therefore received the same selinux domain.
This also had the unfortunate side effect of forcing
certain third party apps into the wrong domains
because of shared userid requests among apps.

This patch removes that restriction and instead
allows all apps, regardless of location, to be
matched against the full mac_permissions.xml
policy file. This then allows all apps signed
with known good certs to receive the same selinux
domains of other apps with whom they share trust.

Change-Id: Iba569c046135c0e81140faf6296c5da26a243037
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2014-07-01 13:53:11 -07:00
Marco Nelissen
db816cef0d Merge "Make sure we clean up" 2014-07-01 14:59:07 +00:00
Narayan Kamath
37151b5032 Remove bogus 2 char limit for locales and countries.
Locale settings are persisted to system properties
and not to system settings, so the values read here
are used pretty much everywhere.

bug: 15873165
bug: 10090157

Change-Id: Ie7cda166439112c615afbd38253cf4fbb5791242
2014-07-01 13:50:18 +01:00
Narayan Kamath
b27c137087 Fix broken assumptions in LocalePicker.
This code assumed that the locale is always 5 chars in
length and was of the form xx-YY. This is not necessarily
true. The language can be 3 letters in length and the locale
might have a script and variant.

Also cleans up several nasty pieces of code and eliminates
unnecessary array copies and improves readability by using
idiomatic java.

bug: 15873165
bug: 10090157

Change-Id: Iab1cfd7b78e5772b1245654f2153caf63a96033d
2014-07-01 11:12:24 +01:00