summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmit Pundir <amit.pundir@linaro.org>2014-05-27 08:23:24 +0530
committerAmit Pundir <amit.pundir@linaro.org>2014-05-27 08:23:24 +0530
commit4a8c62e4abc4df664b9b540e16996c5f945b9d31 (patch)
treef357d819ca2159774b602e61a4c3452d0663d8a4
parent4a052bd1e75bb25e05374beb798af3c6f48dcff9 (diff)
parentba64d298bee228b8e27ea17fb31fbff4b4188304 (diff)
downloadbase-4a8c62e4abc4df664b9b540e16996c5f945b9d31.tar.gz
Merge masterlinaro-juno-master
* aosp/master: (22 commits) AudioService: fix cross deadlock in VolumeStreamState Increase start timeout for wrapped process Activity chooser "Always" button is not working Report runtime information to DDMS Fix NPE in PackageManagerService. Improve ABI handling for shared user ids. wallpaper: limit wallpaper width to sys.max_texture_size Fail if we're unable to agree on an ISA for shared UIDs. Extend support for nordic languages with Sami Change InputMessage.motion.pointerSize to a uint32_t. Remove "required" prefix from ABI fields. Use alpha channel instead of red in drawCachedGlyphBitmap Enable display list updates with zero delta time Add property for background GC type Move FLATTENED_PATTERN to inner class. app_process: change app_process a symlink of primary version Avoid supported ABI list containing "unknown". Wait for secondary zygote before bringing up the system_server. Init the static member when first used for CursorWindow. Check for null in LocalSocketImpl.SocketInputStream.available() ... Conflicts: cmds/app_process/Android.mk services/java/com/android/server/am/ActivityManagerService.java Change-Id: I101578ac814440a4d958be7cb2920fee571d5be4 Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
-rw-r--r--cmds/app_process/Android.mk23
-rw-r--r--core/java/android/app/WallpaperManager.java30
-rw-r--r--core/java/android/content/pm/ApplicationInfo.java8
-rw-r--r--core/java/android/database/CursorWindow.java15
-rw-r--r--core/java/android/ddm/DdmHandleHello.java22
-rw-r--r--core/java/android/net/LocalSocketImpl.java5
-rw-r--r--core/java/android/os/Build.java11
-rw-r--r--core/java/android/os/Process.java155
-rw-r--r--core/java/android/text/method/QwertyKeyListener.java2
-rw-r--r--core/java/android/view/HardwareRenderer.java4
-rw-r--r--core/java/com/android/internal/app/ResolverActivity.java3
-rw-r--r--core/java/com/android/internal/os/ZygoteInit.java39
-rw-r--r--core/jni/AndroidRuntime.cpp8
-rw-r--r--graphics/java/android/graphics/Rect.java16
-rw-r--r--libs/hwui/PixelBuffer.h19
-rw-r--r--libs/hwui/font/Font.cpp3
-rw-r--r--media/java/android/media/AudioService.java280
-rw-r--r--packages/InputDevices/res/raw/keyboard_layout_danish.kcm48
-rw-r--r--packages/InputDevices/res/raw/keyboard_layout_finnish.kcm91
-rw-r--r--packages/InputDevices/res/raw/keyboard_layout_latvian_qwerty.kcm362
-rw-r--r--packages/InputDevices/res/raw/keyboard_layout_norwegian.kcm48
-rw-r--r--packages/InputDevices/res/raw/keyboard_layout_swedish.kcm48
-rw-r--r--packages/InputDevices/res/values/strings.xml3
-rw-r--r--packages/InputDevices/res/xml/keyboard_layouts.xml4
-rw-r--r--services/input/InputDispatcher.cpp4
-rw-r--r--services/java/com/android/server/am/ActivityManagerService.java4
-rwxr-xr-xservices/java/com/android/server/pm/PackageManagerService.java141
-rw-r--r--services/java/com/android/server/pm/PackageSetting.java4
-rw-r--r--services/java/com/android/server/pm/PackageSettingBase.java12
-rw-r--r--services/java/com/android/server/pm/Settings.java46
30 files changed, 1034 insertions, 424 deletions
diff --git a/cmds/app_process/Android.mk b/cmds/app_process/Android.mk
index 2a3f337bc81b..74a2f7bea95a 100644
--- a/cmds/app_process/Android.mk
+++ b/cmds/app_process/Android.mk
@@ -1,6 +1,5 @@
LOCAL_PATH:= $(call my-dir)
-# 32-bit app_process
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
@@ -15,27 +14,13 @@ LOCAL_SHARED_LIBRARIES := \
LOCAL_MODULE:= app_process
LOCAL_MULTILIB := both
-LOCAL_MODULE_STEM_32 := app_process
+LOCAL_MODULE_STEM_32 := app_process32
LOCAL_MODULE_STEM_64 := app_process64
include $(BUILD_EXECUTABLE)
-ifneq ($(strip $(APP_PROCESS_LINK)),)
-SYMLINK := $(addprefix $(TARGET_OUT)/bin/, $(LOCAL_MODULE))
-$(SYMLINK): APP_PROCESS_BINARY := $(LOCAL_MODULE_STEM_64)
-$(SYMLINK): $(LOCAL_INSTALLED_MODULE) $(LOCAL_PATH)/Android.mk
- @echo "Symlink: $@ -> $(APP_PROCESS_BINARY)"
- @mkdir -p $(dir $@)
- @rm -rf $@
- $(hide) ln -sf $(APP_PROCESS_BINARY) $@
-
-ALL_DEFAULT_INSTALLED_MODULES += $(SYMLINK)
-
-# We need this so that the installed files could be picked up based on the
-# local module name
-ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \
- $(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(SYMLINKS)
-
-endif
+# Create a symlink from app_process to app_process32 or 64
+# depending on the target configuration.
+include $(BUILD_SYSTEM)/executable_prefer_symlink.mk
# Build a variant of app_process binary linked with ASan runtime.
# ARM-only at the moment.
diff --git a/core/java/android/app/WallpaperManager.java b/core/java/android/app/WallpaperManager.java
index c2bbff0e743a..62d791fe80fa 100644
--- a/core/java/android/app/WallpaperManager.java
+++ b/core/java/android/app/WallpaperManager.java
@@ -45,6 +45,7 @@ import android.os.Message;
import android.os.ParcelFileDescriptor;
import android.os.RemoteException;
import android.os.ServiceManager;
+import android.os.SystemProperties;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.WindowManager;
@@ -928,6 +929,35 @@ public class WallpaperManager {
*/
public void suggestDesiredDimensions(int minimumWidth, int minimumHeight) {
try {
+ /**
+ * The framework makes no attempt to limit the window size
+ * to the maximum texture size. Any window larger than this
+ * cannot be composited.
+ *
+ * Read maximum texture size from system property and scale down
+ * minimumWidth and minimumHeight accordingly.
+ */
+ int maximumTextureSize;
+ try {
+ maximumTextureSize = SystemProperties.getInt("sys.max_texture_size", 0);
+ } catch (Exception e) {
+ maximumTextureSize = 0;
+ }
+
+ if (maximumTextureSize > 0) {
+ if ((minimumWidth > maximumTextureSize) ||
+ (minimumHeight > maximumTextureSize)) {
+ float aspect = (float)minimumHeight / (float)minimumWidth;
+ if (minimumWidth > minimumHeight) {
+ minimumWidth = maximumTextureSize;
+ minimumHeight = (int)((minimumWidth * aspect) + 0.5);
+ } else {
+ minimumHeight = maximumTextureSize;
+ minimumWidth = (int)((minimumHeight / aspect) + 0.5);
+ }
+ }
+ }
+
if (sGlobals.mService == null) {
Log.w(TAG, "WallpaperService not running");
} else {
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java
index 1a1610d4648c..a23cd7fcf25b 100644
--- a/core/java/android/content/pm/ApplicationInfo.java
+++ b/core/java/android/content/pm/ApplicationInfo.java
@@ -447,7 +447,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
*
* {@hide}
*/
- public String requiredCpuAbi;
+ public String cpuAbi;
/**
* The kernel user-ID that has been assigned to this application;
@@ -579,7 +579,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
sourceDir = orig.sourceDir;
publicSourceDir = orig.publicSourceDir;
nativeLibraryDir = orig.nativeLibraryDir;
- requiredCpuAbi = orig.requiredCpuAbi;
+ cpuAbi = orig.cpuAbi;
resourceDirs = orig.resourceDirs;
seinfo = orig.seinfo;
sharedLibraryFiles = orig.sharedLibraryFiles;
@@ -620,7 +620,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
dest.writeString(sourceDir);
dest.writeString(publicSourceDir);
dest.writeString(nativeLibraryDir);
- dest.writeString(requiredCpuAbi);
+ dest.writeString(cpuAbi);
dest.writeStringArray(resourceDirs);
dest.writeString(seinfo);
dest.writeStringArray(sharedLibraryFiles);
@@ -660,7 +660,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
sourceDir = source.readString();
publicSourceDir = source.readString();
nativeLibraryDir = source.readString();
- requiredCpuAbi = source.readString();
+ cpuAbi = source.readString();
resourceDirs = source.readStringArray();
seinfo = source.readString();
sharedLibraryFiles = source.readStringArray();
diff --git a/core/java/android/database/CursorWindow.java b/core/java/android/database/CursorWindow.java
index 197e3ff3eda7..a75372ff6170 100644
--- a/core/java/android/database/CursorWindow.java
+++ b/core/java/android/database/CursorWindow.java
@@ -42,12 +42,8 @@ import android.util.LongSparseArray;
public class CursorWindow extends SQLiteClosable implements Parcelable {
private static final String STATS_TAG = "CursorWindowStats";
- /** The cursor window size. resource xml file specifies the value in kB.
- * convert it to bytes here by multiplying with 1024.
- */
- private static final int sCursorWindowSize =
- Resources.getSystem().getInteger(
- com.android.internal.R.integer.config_cursorWindowSize) * 1024;
+ // This static member will be evaluated when first used.
+ private static int sCursorWindowSize = -1;
/**
* The native CursorWindow object pointer. (FOR INTERNAL USE ONLY)
@@ -100,6 +96,13 @@ public class CursorWindow extends SQLiteClosable implements Parcelable {
public CursorWindow(String name) {
mStartPos = 0;
mName = name != null && name.length() != 0 ? name : "<unnamed>";
+ if (sCursorWindowSize < 0) {
+ /** The cursor window size. resource xml file specifies the value in kB.
+ * convert it to bytes here by multiplying with 1024.
+ */
+ sCursorWindowSize = Resources.getSystem().getInteger(
+ com.android.internal.R.integer.config_cursorWindowSize) * 1024;
+ }
mWindowPtr = nativeCreate(mName, sCursorWindowSize);
if (mWindowPtr == 0) {
throw new CursorWindowAllocationException("Cursor window allocation of " +
diff --git a/core/java/android/ddm/DdmHandleHello.java b/core/java/android/ddm/DdmHandleHello.java
index 220b40d64b3d..2dce4257da57 100644
--- a/core/java/android/ddm/DdmHandleHello.java
+++ b/core/java/android/ddm/DdmHandleHello.java
@@ -22,6 +22,7 @@ import org.apache.harmony.dalvik.ddmc.DdmServer;
import android.util.Log;
import android.os.Debug;
import android.os.UserHandle;
+import dalvik.system.VMRuntime;
import java.nio.ByteBuffer;
@@ -126,8 +127,21 @@ public class DdmHandleHello extends ChunkHandler {
// appName = "unknown";
String appName = DdmHandleAppName.getAppName();
- ByteBuffer out = ByteBuffer.allocate(20
- + vmIdent.length()*2 + appName.length()*2);
+ VMRuntime vmRuntime = VMRuntime.getRuntime();
+ String instructionSetDescription =
+ vmRuntime.is64Bit() ? "64-bit" : "32-bit";
+ String vmInstructionSet = vmRuntime.vmInstructionSet();
+ if (vmInstructionSet != null && vmInstructionSet.length() > 0) {
+ instructionSetDescription += " (" + vmInstructionSet + ")";
+ }
+ String vmFlags = "CheckJNI="
+ + (vmRuntime.isCheckJniEnabled() ? "true" : "false");
+
+ ByteBuffer out = ByteBuffer.allocate(28
+ + vmIdent.length() * 2
+ + appName.length() * 2
+ + instructionSetDescription.length() * 2
+ + vmFlags.length() * 2);
out.order(ChunkHandler.CHUNK_ORDER);
out.putInt(DdmServer.CLIENT_PROTOCOL_VERSION);
out.putInt(android.os.Process.myPid());
@@ -136,6 +150,10 @@ public class DdmHandleHello extends ChunkHandler {
putString(out, vmIdent);
putString(out, appName);
out.putInt(UserHandle.myUserId());
+ out.putInt(instructionSetDescription.length());
+ putString(out, instructionSetDescription);
+ out.putInt(vmFlags.length());
+ putString(out, vmFlags);
Chunk reply = new Chunk(CHUNK_HELO, out);
diff --git a/core/java/android/net/LocalSocketImpl.java b/core/java/android/net/LocalSocketImpl.java
index 643e8c275035..fa9f4790389f 100644
--- a/core/java/android/net/LocalSocketImpl.java
+++ b/core/java/android/net/LocalSocketImpl.java
@@ -56,7 +56,10 @@ class LocalSocketImpl
/** {@inheritDoc} */
@Override
public int available() throws IOException {
- return available_native(fd);
+ FileDescriptor myFd = fd;
+ if (myFd == null) throw new IOException("socket closed");
+
+ return available_native(myFd);
}
/** {@inheritDoc} */
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index 1bddc7ade314..a61c4f350cf0 100644
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -83,7 +83,8 @@ public class Build {
*
* @hide
*/
- public static final String[] SUPPORTED_ABIS = getString("ro.product.cpu.abilist").split(",");
+ public static final String[] SUPPORTED_ABIS = SystemProperties.get("ro.product.cpu.abilist")
+ .split(",");
/**
* An ordered list of <b>32 bit</b> ABIs supported by this device. The most preferred ABI
@@ -93,8 +94,8 @@ public class Build {
*
* @hide
*/
- public static final String[] SUPPORTED_32_BIT_ABIS = getString("ro.product.cpu.abilist32")
- .split(",");
+ public static final String[] SUPPORTED_32_BIT_ABIS =
+ SystemProperties.get("ro.product.cpu.abilist32").split(",");
/**
* An ordered list of <b>64 bit</b> ABIs supported by this device. The most preferred ABI
@@ -104,8 +105,8 @@ public class Build {
*
* @hide
*/
- public static final String[] SUPPORTED_64_BIT_ABIS = getString("ro.product.cpu.abilist64")
- .split(",");
+ public static final String[] SUPPORTED_64_BIT_ABIS =
+ SystemProperties.get("ro.product.cpu.abilist64").split(",");
/** Various version strings. */
diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java
index a4c4a879b4a5..28797cebde14 100644
--- a/core/java/android/os/Process.java
+++ b/core/java/android/os/Process.java
@@ -31,13 +31,17 @@ import java.util.Arrays;
import java.util.List;
/*package*/ class ZygoteStartFailedEx extends Exception {
- /**
- * Something prevented the zygote process startup from happening normally
- */
+ ZygoteStartFailedEx(String s) {
+ super(s);
+ }
- ZygoteStartFailedEx() {};
- ZygoteStartFailedEx(String s) {super(s);}
- ZygoteStartFailedEx(Throwable cause) {super(cause);}
+ ZygoteStartFailedEx(Throwable cause) {
+ super(cause);
+ }
+
+ ZygoteStartFailedEx(String s, Throwable cause) {
+ super(s, cause);
+ }
}
/**
@@ -46,9 +50,15 @@ import java.util.List;
public class Process {
private static final String LOG_TAG = "Process";
- private static final String ZYGOTE_SOCKET = "zygote";
+ /**
+ * @hide for internal use only.
+ */
+ public static final String ZYGOTE_SOCKET = "zygote";
- private static final String SECONDARY_ZYGOTE_SOCKET = "zygote_secondary";
+ /**
+ * @hide for internal use only.
+ */
+ public static final String SECONDARY_ZYGOTE_SOCKET = "zygote_secondary";
/**
* Defines the UID/GID under which system code runs.
@@ -338,8 +348,10 @@ public class Process {
/**
* State for communicating with the zygote process.
+ *
+ * @hide for internal use only.
*/
- static class ZygoteState {
+ public static class ZygoteState {
final LocalSocket socket;
final DataInputStream inputStream;
final BufferedWriter writer;
@@ -355,55 +367,26 @@ public class Process {
this.abiList = abiList;
}
- static ZygoteState connect(String socketAddress, int tries) throws ZygoteStartFailedEx {
- LocalSocket zygoteSocket = null;
+ public static ZygoteState connect(String socketAddress) throws IOException {
DataInputStream zygoteInputStream = null;
BufferedWriter zygoteWriter = null;
+ final LocalSocket zygoteSocket = new LocalSocket();
- /*
- * See bug #811181: Sometimes runtime can make it up before zygote.
- * Really, we'd like to do something better to avoid this condition,
- * but for now just wait a bit...
- *
- * TODO: This bug was filed in 2007. Get rid of this code. The zygote
- * forks the system_server so it shouldn't be possible for the zygote
- * socket to be brought up after the system_server is.
- */
- for (int i = 0; i < tries; i++) {
- if (i > 0) {
- try {
- Log.i(LOG_TAG, "Zygote not up yet, sleeping...");
- Thread.sleep(ZYGOTE_RETRY_MILLIS);
- } catch (InterruptedException ex) {
- throw new ZygoteStartFailedEx(ex);
- }
- }
+ try {
+ zygoteSocket.connect(new LocalSocketAddress(socketAddress,
+ LocalSocketAddress.Namespace.RESERVED));
- try {
- zygoteSocket = new LocalSocket();
- zygoteSocket.connect(new LocalSocketAddress(socketAddress,
- LocalSocketAddress.Namespace.RESERVED));
-
- zygoteInputStream = new DataInputStream(zygoteSocket.getInputStream());
-
- zygoteWriter = new BufferedWriter(new OutputStreamWriter(
- zygoteSocket.getOutputStream()), 256);
- break;
- } catch (IOException ex) {
- if (zygoteSocket != null) {
- try {
- zygoteSocket.close();
- } catch (IOException ex2) {
- Log.e(LOG_TAG,"I/O exception on close after exception", ex2);
- }
- }
+ zygoteInputStream = new DataInputStream(zygoteSocket.getInputStream());
- zygoteSocket = null;
+ zygoteWriter = new BufferedWriter(new OutputStreamWriter(
+ zygoteSocket.getOutputStream()), 256);
+ } catch (IOException ex) {
+ try {
+ zygoteSocket.close();
+ } catch (IOException ignore) {
}
- }
- if (zygoteSocket == null) {
- throw new ZygoteStartFailedEx("connect failed");
+ throw ex;
}
String abiListString = getAbiList(zygoteWriter, zygoteInputStream);
@@ -417,7 +400,7 @@ public class Process {
return abiList.contains(abi);
}
- void close() {
+ public void close() {
try {
socket.close();
} catch (IOException ex) {
@@ -503,27 +486,22 @@ public class Process {
* @throws ZygoteStartFailedEx if the query failed.
*/
private static String getAbiList(BufferedWriter writer, DataInputStream inputStream)
- throws ZygoteStartFailedEx {
- try {
-
- // Each query starts with the argument count (1 in this case)
- writer.write("1");
- // ... followed by a new-line.
- writer.newLine();
- // ... followed by our only argument.
- writer.write("--query-abi-list");
- writer.newLine();
- writer.flush();
-
- // The response is a length prefixed stream of ASCII bytes.
- int numBytes = inputStream.readInt();
- byte[] bytes = new byte[numBytes];
- inputStream.readFully(bytes);
-
- return new String(bytes, StandardCharsets.US_ASCII);
- } catch (IOException ioe) {
- throw new ZygoteStartFailedEx(ioe);
- }
+ throws IOException {
+ // Each query starts with the argument count (1 in this case)
+ writer.write("1");
+ // ... followed by a new-line.
+ writer.newLine();
+ // ... followed by our only argument.
+ writer.write("--query-abi-list");
+ writer.newLine();
+ writer.flush();
+
+ // The response is a length prefixed stream of ASCII bytes.
+ int numBytes = inputStream.readInt();
+ byte[] bytes = new byte[numBytes];
+ inputStream.readFully(bytes);
+
+ return new String(bytes, StandardCharsets.US_ASCII);
}
/**
@@ -677,30 +655,16 @@ public class Process {
}
/**
- * Returns the number of times we attempt a connection to the zygote. We
- * sleep for {@link #ZYGOTE_RETRY_MILLIS} milliseconds between each try.
- *
- * This could probably be removed, see TODO in {@code ZygoteState#connect}.
- */
- private static int getNumTries(ZygoteState state) {
- // Retry 10 times for the first connection to each zygote.
- if (state == null) {
- return 11;
- }
-
- // This means the connection has already been established, but subsequently
- // closed, possibly due to an IOException. We retry just once if that's the
- // case.
- return 1;
- }
-
- /**
* Tries to open socket to Zygote process if not already open. If
* already open, does nothing. May block and retry.
*/
private static ZygoteState openZygoteSocketIfNeeded(String abi) throws ZygoteStartFailedEx {
if (primaryZygoteState == null || primaryZygoteState.isClosed()) {
- primaryZygoteState = ZygoteState.connect(ZYGOTE_SOCKET, getNumTries(primaryZygoteState));
+ try {
+ primaryZygoteState = ZygoteState.connect(ZYGOTE_SOCKET);
+ } catch (IOException ioe) {
+ throw new ZygoteStartFailedEx("Error connecting to primary zygote", ioe);
+ }
}
if (primaryZygoteState.matches(abi)) {
@@ -709,8 +673,11 @@ public class Process {
// The primary zygote didn't match. Try the secondary.
if (secondaryZygoteState == null || secondaryZygoteState.isClosed()) {
- secondaryZygoteState = ZygoteState.connect(SECONDARY_ZYGOTE_SOCKET,
- getNumTries(secondaryZygoteState));
+ try {
+ secondaryZygoteState = ZygoteState.connect(SECONDARY_ZYGOTE_SOCKET);
+ } catch (IOException ioe) {
+ throw new ZygoteStartFailedEx("Error connecting to secondary zygote", ioe);
+ }
}
if (secondaryZygoteState.matches(abi)) {
diff --git a/core/java/android/text/method/QwertyKeyListener.java b/core/java/android/text/method/QwertyKeyListener.java
index 0bd46bc992a0..b17f5021f59f 100644
--- a/core/java/android/text/method/QwertyKeyListener.java
+++ b/core/java/android/text/method/QwertyKeyListener.java
@@ -115,7 +115,7 @@ public class QwertyKeyListener extends BaseKeyListener {
if (count > 0 && selStart == selEnd && selStart > 0) {
char c = content.charAt(selStart - 1);
- if (c == i || c == Character.toUpperCase(i) && view != null) {
+ if ((c == i || c == Character.toUpperCase(i)) && view != null) {
if (showCharacterPicker(view, content, c, false, count)) {
resetMetaState(content);
return true;
diff --git a/core/java/android/view/HardwareRenderer.java b/core/java/android/view/HardwareRenderer.java
index f09a1117e537..9097a6c2f46d 100644
--- a/core/java/android/view/HardwareRenderer.java
+++ b/core/java/android/view/HardwareRenderer.java
@@ -1555,10 +1555,6 @@ public abstract class HardwareRenderer {
}
private DisplayList buildDisplayList(View view, HardwareCanvas canvas) {
- if (mDrawDelta <= 0) {
- return view.mDisplayList;
- }
-
view.mRecreateDisplayList = (view.mPrivateFlags & View.PFLAG_INVALIDATED)
== View.PFLAG_INVALIDATED;
view.mPrivateFlags &= ~View.PFLAG_INVALIDATED;
diff --git a/core/java/com/android/internal/app/ResolverActivity.java b/core/java/com/android/internal/app/ResolverActivity.java
index 591267e51871..183dd05b9c5b 100644
--- a/core/java/com/android/internal/app/ResolverActivity.java
+++ b/core/java/com/android/internal/app/ResolverActivity.java
@@ -484,8 +484,7 @@ public class ResolverActivity extends AlertActivity implements AdapterView.OnIte
mList.clear();
if (mBaseResolveList != null) {
- currentResolveList = mBaseResolveList;
- mOrigResolveList = null;
+ currentResolveList = mOrigResolveList = mBaseResolveList;
} else {
currentResolveList = mOrigResolveList = mPm.queryIntentActivities(
mIntent, PackageManager.MATCH_DEFAULT_ONLY
diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java
index bee1391b534e..7d8066c1a585 100644
--- a/core/java/com/android/internal/os/ZygoteInit.java
+++ b/core/java/com/android/internal/os/ZygoteInit.java
@@ -23,6 +23,7 @@ import android.content.res.Resources;
import android.content.res.TypedArray;
import android.net.LocalServerSocket;
import android.opengl.EGL14;
+import android.os.Build;
import android.os.Debug;
import android.os.Process;
import android.os.SystemClock;
@@ -496,7 +497,7 @@ public class ZygoteInit {
/**
* Prepare the arguments and fork for the system server process.
*/
- private static boolean startSystemServer()
+ private static boolean startSystemServer(String abiList, String socketName)
throws MethodAndArgsCaller, RuntimeException {
long capabilities = posixCapabilitiesAsBits(
OsConstants.CAP_BLOCK_SUSPEND,
@@ -544,6 +545,10 @@ public class ZygoteInit {
/* For child process */
if (pid == 0) {
+ if (hasSecondZygote(abiList)) {
+ waitForSecondaryZygote(socketName);
+ }
+
handleSystemServerProcess(parsedArgs);
}
@@ -606,7 +611,7 @@ public class ZygoteInit {
Trace.setTracingEnabled(false);
if (startSystemServer) {
- startSystemServer();
+ startSystemServer(abiList, socketName);
}
Log.i(TAG, "Accepting command socket connections");
@@ -623,6 +628,36 @@ public class ZygoteInit {
}
/**
+ * Return {@code true} if this device configuration has another zygote.
+ *
+ * We determine this by comparing the device ABI list with this zygotes
+ * list. If this zygote supports all ABIs this device supports, there won't
+ * be another zygote.
+ */
+ private static boolean hasSecondZygote(String abiList) {
+ return !SystemProperties.get("ro.product.cpu.abilist").equals(abiList);
+ }
+
+ private static void waitForSecondaryZygote(String socketName) {
+ String otherZygoteName = Process.ZYGOTE_SOCKET.equals(socketName) ?
+ Process.SECONDARY_ZYGOTE_SOCKET : Process.ZYGOTE_SOCKET;
+ while (true) {
+ try {
+ final Process.ZygoteState zs = Process.ZygoteState.connect(otherZygoteName);
+ zs.close();
+ break;
+ } catch (IOException ioe) {
+ Log.w(TAG, "Got error connecting to zygote, retrying. msg= " + ioe.getMessage());
+ }
+
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException ie) {
+ }
+ }
+ }
+
+ /**
* Runs the zygote process's select loop. Accepts new connections as
* they happen, and reads commands from connections one spawn-request's
* worth at a time.
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index 362a54ec1a47..fc6cc81cc8ee 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -467,6 +467,7 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv)
char heapminfreeOptsBuf[sizeof("-XX:HeapMinFree=")-1 + PROPERTY_VALUE_MAX];
char heapmaxfreeOptsBuf[sizeof("-XX:HeapMaxFree=")-1 + PROPERTY_VALUE_MAX];
char gctypeOptsBuf[sizeof("-Xgc:")-1 + PROPERTY_VALUE_MAX];
+ char backgroundgcOptsBuf[sizeof("-XX:BackgroundGC=")-1 + PROPERTY_VALUE_MAX];
char heaptargetutilizationOptsBuf[sizeof("-XX:HeapTargetUtilization=")-1 + PROPERTY_VALUE_MAX];
char jitcodecachesizeOptsBuf[sizeof("-Xjitcodecachesize:")-1 + PROPERTY_VALUE_MAX];
char dalvikVmLibBuf[PROPERTY_VALUE_MAX];
@@ -620,6 +621,13 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv)
mOptions.add(opt);
}
+ strcpy(backgroundgcOptsBuf, "-XX:BackgroundGC=");
+ property_get("dalvik.vm.backgroundgctype", backgroundgcOptsBuf+sizeof("-XX:BackgroundGC=")-1, "");
+ if (backgroundgcOptsBuf[sizeof("-XX:BackgroundGC=")-1] != '\0') {
+ opt.optionString = backgroundgcOptsBuf;
+ mOptions.add(opt);
+ }
+
/*
* Enable or disable dexopt features, such as bytecode verification and
* calculation of register maps for precise GC.
diff --git a/graphics/java/android/graphics/Rect.java b/graphics/java/android/graphics/Rect.java
index 8b5609f9eb5d..437d2f485d44 100644
--- a/graphics/java/android/graphics/Rect.java
+++ b/graphics/java/android/graphics/Rect.java
@@ -36,9 +36,21 @@ public final class Rect implements Parcelable {
public int right;
public int bottom;
- private static final Pattern FLATTENED_PATTERN = Pattern.compile(
+ /**
+ * A helper class for flattened rectange pattern recognition. A separate
+ * class to avoid an initialization dependency on a regular expression
+ * causing Rect to not be initializable with an ahead-of-time compilation
+ * scheme.
+ */
+ private static final class UnflattenHelper {
+ private static final Pattern FLATTENED_PATTERN = Pattern.compile(
"(-?\\d+) (-?\\d+) (-?\\d+) (-?\\d+)");
+ static Matcher getMatcher(String str) {
+ return FLATTENED_PATTERN.matcher(str);
+ }
+ }
+
/**
* Create a new empty Rect. All coordinates are initialized to 0.
*/
@@ -152,7 +164,7 @@ public final class Rect implements Parcelable {
* or null if the string is not of that form.
*/
public static Rect unflattenFromString(String str) {
- Matcher matcher = FLATTENED_PATTERN.matcher(str);
+ Matcher matcher = UnflattenHelper.getMatcher(str);
if (!matcher.matches()) {
return null;
}
diff --git a/libs/hwui/PixelBuffer.h b/libs/hwui/PixelBuffer.h
index 9725a6162a2c..04225a20cfc2 100644
--- a/libs/hwui/PixelBuffer.h
+++ b/libs/hwui/PixelBuffer.h
@@ -175,6 +175,25 @@ public:
return 0;
}
+ /**
+ * Returns the alpha channel offset in the specified format.
+ *
+ * Supported formats:
+ * GL_ALPHA
+ * GL_RGBA
+ */
+ static uint32_t formatAlphaOffset(GLenum format) {
+ switch (format) {
+ case GL_ALPHA:
+ return 0;
+ case GL_RGBA:
+ return 3;
+ }
+
+ ALOGE("unsupported format: %d",format);
+ return 0;
+ }
+
protected:
/**
* Creates a new render buffer in the specified format and dimensions.
diff --git a/libs/hwui/font/Font.cpp b/libs/hwui/font/Font.cpp
index b49329834760..eb33cf1f3fdc 100644
--- a/libs/hwui/font/Font.cpp
+++ b/libs/hwui/font/Font.cpp
@@ -215,6 +215,7 @@ void Font::drawCachedGlyphBitmap(CachedGlyphInfo* glyph, int x, int y, uint8_t*
PixelBuffer* pixelBuffer = cacheTexture->getPixelBuffer();
uint32_t formatSize = PixelBuffer::formatSize(pixelBuffer->getFormat());
+ uint32_t alpha_channel_offset = PixelBuffer::formatAlphaOffset(pixelBuffer->getFormat());
uint32_t cacheWidth = cacheTexture->getWidth();
uint32_t srcStride = formatSize * cacheWidth;
uint32_t startY = glyph->mStartY * srcStride;
@@ -229,7 +230,7 @@ void Font::drawCachedGlyphBitmap(CachedGlyphInfo* glyph, int x, int y, uint8_t*
memcpy(&bitmap[bitmapY + dstX], &cacheBuffer[cacheY + glyph->mStartX], glyph->mBitmapWidth);
} else {
for (uint32_t i = 0; i < glyph->mBitmapWidth; ++i) {
- bitmap[bitmapY + dstX + i] = cacheBuffer[cacheY + (glyph->mStartX + i)*formatSize];
+ bitmap[bitmapY + dstX + i] = cacheBuffer[cacheY + (glyph->mStartX + i)*formatSize + alpha_channel_offset];
}
}
}
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index 0c31b2ce988d..595325da963b 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -2857,54 +2857,56 @@ public class AudioService extends IAudioService.Stub {
return name + "_" + suffix;
}
- public synchronized void readSettings() {
- // force maximum volume on all streams if fixed volume property is set
- if (mUseFixedVolume) {
- mIndex.put(AudioSystem.DEVICE_OUT_DEFAULT, mIndexMax);
- return;
- }
- // do not read system stream volume from settings: this stream is always aliased
- // to another stream type and its volume is never persisted. Values in settings can
- // only be stale values
- if ((mStreamType == AudioSystem.STREAM_SYSTEM) ||
- (mStreamType == AudioSystem.STREAM_SYSTEM_ENFORCED)) {
- int index = 10 * AudioManager.DEFAULT_STREAM_VOLUME[mStreamType];
- synchronized (mCameraSoundForced) {
- if (mCameraSoundForced) {
- index = mIndexMax;
+ public void readSettings() {
+ synchronized (VolumeStreamState.class) {
+ // force maximum volume on all streams if fixed volume property is set
+ if (mUseFixedVolume) {
+ mIndex.put(AudioSystem.DEVICE_OUT_DEFAULT, mIndexMax);
+ return;
+ }
+ // do not read system stream volume from settings: this stream is always aliased
+ // to another stream type and its volume is never persisted. Values in settings can
+ // only be stale values
+ if ((mStreamType == AudioSystem.STREAM_SYSTEM) ||
+ (mStreamType == AudioSystem.STREAM_SYSTEM_ENFORCED)) {
+ int index = 10 * AudioManager.DEFAULT_STREAM_VOLUME[mStreamType];
+ synchronized (mCameraSoundForced) {
+ if (mCameraSoundForced) {
+ index = mIndexMax;
+ }
}
+ mIndex.put(AudioSystem.DEVICE_OUT_DEFAULT, index);
+ return;
}
- mIndex.put(AudioSystem.DEVICE_OUT_DEFAULT, index);
- return;
- }
- int remainingDevices = AudioSystem.DEVICE_OUT_ALL;
+ int remainingDevices = AudioSystem.DEVICE_OUT_ALL;
- for (int i = 0; remainingDevices != 0; i++) {
- int device = (1 << i);
- if ((device & remainingDevices) == 0) {
- continue;
- }
- remainingDevices &= ~device;
-
- // retrieve current volume for device
- String name = getSettingNameForDevice(device);
- // if no volume stored for current stream and device, use default volume if default
- // device, continue otherwise
- int defaultIndex = (device == AudioSystem.DEVICE_OUT_DEFAULT) ?
- AudioManager.DEFAULT_STREAM_VOLUME[mStreamType] : -1;
- int index = Settings.System.getIntForUser(
- mContentResolver, name, defaultIndex, UserHandle.USER_CURRENT);
- if (index == -1) {
- continue;
- }
+ for (int i = 0; remainingDevices != 0; i++) {
+ int device = (1 << i);
+ if ((device & remainingDevices) == 0) {
+ continue;
+ }
+ remainingDevices &= ~device;
+
+ // retrieve current volume for device
+ String name = getSettingNameForDevice(device);
+ // if no volume stored for current stream and device, use default volume if default
+ // device, continue otherwise
+ int defaultIndex = (device == AudioSystem.DEVICE_OUT_DEFAULT) ?
+ AudioManager.DEFAULT_STREAM_VOLUME[mStreamType] : -1;
+ int index = Settings.System.getIntForUser(
+ mContentResolver, name, defaultIndex, UserHandle.USER_CURRENT);
+ if (index == -1) {
+ continue;
+ }
- // ignore settings for fixed volume devices: volume should always be at max or 0
- if ((mStreamVolumeAlias[mStreamType] == AudioSystem.STREAM_MUSIC) &&
- ((device & mFixedVolumeDevices) != 0)) {
- mIndex.put(device, (index != 0) ? mIndexMax : 0);
- } else {
- mIndex.put(device, getValidIndex(10 * index));
+ // ignore settings for fixed volume devices: volume should always be at max or 0
+ if ((mStreamVolumeAlias[mStreamType] == AudioSystem.STREAM_MUSIC) &&
+ ((device & mFixedVolumeDevices) != 0)) {
+ mIndex.put(device, (index != 0) ? mIndexMax : 0);
+ } else {
+ mIndex.put(device, getValidIndex(10 * index));
+ }
}
}
}
@@ -2922,32 +2924,34 @@ public class AudioService extends IAudioService.Stub {
AudioSystem.setStreamVolumeIndex(mStreamType, index, device);
}
- public synchronized void applyAllVolumes() {
- // apply default volume first: by convention this will reset all
- // devices volumes in audio policy manager to the supplied value
- int index;
- if (isMuted()) {
- index = 0;
- } else {
- index = (getIndex(AudioSystem.DEVICE_OUT_DEFAULT) + 5)/10;
- }
- AudioSystem.setStreamVolumeIndex(mStreamType, index, AudioSystem.DEVICE_OUT_DEFAULT);
- // then apply device specific volumes
- Set set = mIndex.entrySet();
- Iterator i = set.iterator();
- while (i.hasNext()) {
- Map.Entry entry = (Map.Entry)i.next();
- int device = ((Integer)entry.getKey()).intValue();
- if (device != AudioSystem.DEVICE_OUT_DEFAULT) {
- if (isMuted()) {
- index = 0;
- } else if ((device & AudioSystem.DEVICE_OUT_ALL_A2DP) != 0 &&
- mAvrcpAbsVolSupported) {
- index = (mIndexMax + 5)/10;
- } else {
- index = ((Integer)entry.getValue() + 5)/10;
+ public void applyAllVolumes() {
+ synchronized (VolumeStreamState.class) {
+ // apply default volume first: by convention this will reset all
+ // devices volumes in audio policy manager to the supplied value
+ int index;
+ if (isMuted()) {
+ index = 0;
+ } else {
+ index = (getIndex(AudioSystem.DEVICE_OUT_DEFAULT) + 5)/10;
+ }
+ AudioSystem.setStreamVolumeIndex(mStreamType, index, AudioSystem.DEVICE_OUT_DEFAULT);
+ // then apply device specific volumes
+ Set set = mIndex.entrySet();
+ Iterator i = set.iterator();
+ while (i.hasNext()) {
+ Map.Entry entry = (Map.Entry)i.next();
+ int device = ((Integer)entry.getKey()).intValue();
+ if (device != AudioSystem.DEVICE_OUT_DEFAULT) {
+ if (isMuted()) {
+ index = 0;
+ } else if ((device & AudioSystem.DEVICE_OUT_ALL_A2DP) != 0 &&
+ mAvrcpAbsVolSupported) {
+ index = (mIndexMax + 5)/10;
+ } else {
+ index = ((Integer)entry.getValue() + 5)/10;
+ }
+ AudioSystem.setStreamVolumeIndex(mStreamType, index, device);
}
- AudioSystem.setStreamVolumeIndex(mStreamType, index, device);
}
}
}
@@ -2957,94 +2961,104 @@ public class AudioService extends IAudioService.Stub {
device);
}
- public synchronized boolean setIndex(int index, int device) {
- int oldIndex = getIndex(device);
- index = getValidIndex(index);
- synchronized (mCameraSoundForced) {
- if ((mStreamType == AudioSystem.STREAM_SYSTEM_ENFORCED) && mCameraSoundForced) {
- index = mIndexMax;
+ public boolean setIndex(int index, int device) {
+ synchronized (VolumeStreamState.class) {
+ int oldIndex = getIndex(device);
+ index = getValidIndex(index);
+ synchronized (mCameraSoundForced) {
+ if ((mStreamType == AudioSystem.STREAM_SYSTEM_ENFORCED) && mCameraSoundForced) {
+ index = mIndexMax;
+ }
}
- }
- mIndex.put(device, index);
-
- if (oldIndex != index) {
- // Apply change to all streams using this one as alias
- // if changing volume of current device, also change volume of current
- // device on aliased stream
- boolean currentDevice = (device == getDeviceForStream(mStreamType));
- int numStreamTypes = AudioSystem.getNumStreamTypes();
- for (int streamType = numStreamTypes - 1; streamType >= 0; streamType--) {
- if (streamType != mStreamType &&
- mStreamVolumeAlias[streamType] == mStreamType) {
- int scaledIndex = rescaleIndex(index, mStreamType, streamType);
- mStreamStates[streamType].setIndex(scaledIndex,
- device);
- if (currentDevice) {
+ mIndex.put(device, index);
+
+ if (oldIndex != index) {
+ // Apply change to all streams using this one as alias
+ // if changing volume of current device, also change volume of current
+ // device on aliased stream
+ boolean currentDevice = (device == getDeviceForStream(mStreamType));
+ int numStreamTypes = AudioSystem.getNumStreamTypes();
+ for (int streamType = numStreamTypes - 1; streamType >= 0; streamType--) {
+ if (streamType != mStreamType &&
+ mStreamVolumeAlias[streamType] == mStreamType) {
+ int scaledIndex = rescaleIndex(index, mStreamType, streamType);
mStreamStates[streamType].setIndex(scaledIndex,
- getDeviceForStream(streamType));
+ device);
+ if (currentDevice) {
+ mStreamStates[streamType].setIndex(scaledIndex,
+ getDeviceForStream(streamType));
+ }
}
}
+ return true;
+ } else {
+ return false;
}
- return true;
- } else {
- return false;
}
}
- public synchronized int getIndex(int device) {
- Integer index = mIndex.get(device);
- if (index == null) {
- // there is always an entry for AudioSystem.DEVICE_OUT_DEFAULT
- index = mIndex.get(AudioSystem.DEVICE_OUT_DEFAULT);
+ public int getIndex(int device) {
+ synchronized (VolumeStreamState.class) {
+ Integer index = mIndex.get(device);
+ if (index == null) {
+ // there is always an entry for AudioSystem.DEVICE_OUT_DEFAULT
+ index = mIndex.get(AudioSystem.DEVICE_OUT_DEFAULT);
+ }
+ return index.intValue();
}
- return index.intValue();
}
public int getMaxIndex() {
return mIndexMax;
}
- public synchronized void setAllIndexes(VolumeStreamState srcStream) {
- int srcStreamType = srcStream.getStreamType();
- // apply default device volume from source stream to all devices first in case
- // some devices are present in this stream state but not in source stream state
- int index = srcStream.getIndex(AudioSystem.DEVICE_OUT_DEFAULT);
- index = rescaleIndex(index, srcStreamType, mStreamType);
- Set set = mIndex.entrySet();
- Iterator i = set.iterator();
- while (i.hasNext()) {
- Map.Entry entry = (Map.Entry)i.next();
- entry.setValue(index);
- }
- // Now apply actual volume for devices in source stream state
- set = srcStream.mIndex.entrySet();
- i = set.iterator();
- while (i.hasNext()) {
- Map.Entry entry = (Map.Entry)i.next();
- int device = ((Integer)entry.getKey()).intValue();
- index = ((Integer)entry.getValue()).intValue();
+ public void setAllIndexes(VolumeStreamState srcStream) {
+ synchronized (VolumeStreamState.class) {
+ int srcStreamType = srcStream.getStreamType();
+ // apply default device volume from source stream to all devices first in case
+ // some devices are present in this stream state but not in source stream state
+ int index = srcStream.getIndex(AudioSystem.DEVICE_OUT_DEFAULT);
index = rescaleIndex(index, srcStreamType, mStreamType);
-
- setIndex(index, device);
+ Set set = mIndex.entrySet();
+ Iterator i = set.iterator();
+ while (i.hasNext()) {
+ Map.Entry entry = (Map.Entry)i.next();
+ entry.setValue(index);
+ }
+ // Now apply actual volume for devices in source stream state
+ set = srcStream.mIndex.entrySet();
+ i = set.iterator();
+ while (i.hasNext()) {
+ Map.Entry entry = (Map.Entry)i.next();
+ int device = ((Integer)entry.getKey()).intValue();
+ index = ((Integer)entry.getValue()).intValue();
+ index = rescaleIndex(index, srcStreamType, mStreamType);
+
+ setIndex(index, device);
+ }
}
}
- public synchronized void setAllIndexesToMax() {
- Set set = mIndex.entrySet();
- Iterator i = set.iterator();
- while (i.hasNext()) {
- Map.Entry entry = (Map.Entry)i.next();
- entry.setValue(mIndexMax);
+ public void setAllIndexesToMax() {
+ synchronized (VolumeStreamState.class) {
+ Set set = mIndex.entrySet();
+ Iterator i = set.iterator();
+ while (i.hasNext()) {
+ Map.Entry entry = (Map.Entry)i.next();
+ entry.setValue(mIndexMax);
+ }
}
}
- public synchronized void mute(IBinder cb, boolean state) {
- VolumeDeathHandler handler = getDeathHandler(cb, state);
- if (handler == null) {
- Log.e(TAG, "Could not get client death handler for stream: "+mStreamType);
- return;
+ public void mute(IBinder cb, boolean state) {
+ synchronized (VolumeStreamState.class) {
+ VolumeDeathHandler handler = getDeathHandler(cb, state);
+ if (handler == null) {
+ Log.e(TAG, "Could not get client death handler for stream: "+mStreamType);
+ return;
+ }
+ handler.mute(state);
}
- handler.mute(state);
}
public int getStreamType() {
diff --git a/packages/InputDevices/res/raw/keyboard_layout_danish.kcm b/packages/InputDevices/res/raw/keyboard_layout_danish.kcm
index 9386a454b6cd..9168d1227c2a 100644
--- a/packages/InputDevices/res/raw/keyboard_layout_danish.kcm
+++ b/packages/InputDevices/res/raw/keyboard_layout_danish.kcm
@@ -13,13 +13,11 @@
# limitations under the License.
#
-# Danish keyboard layout.
+# Danish (EU based + Sami) keyboard layout.
#
type OVERLAY
-map key 12 SLASH
-map key 53 MINUS
map key 86 PLUS
### ROW 1
@@ -61,6 +59,7 @@ key 5 {
label: '5'
base: '5'
shift: '%'
+ ralt: '\u20ac'
}
key 6 {
@@ -97,7 +96,7 @@ key 0 {
ralt: '}'
}
-key SLASH {
+key MINUS {
label: '+'
base: '+'
shift: '?'
@@ -116,6 +115,8 @@ key Q {
label: 'Q'
base: 'q'
shift, capslock: 'Q'
+ ralt: '\u00e2'
+ ralt+capslock, shift+ralt: '\u00c2'
}
key W {
@@ -129,6 +130,7 @@ key E {
base: 'e'
shift, capslock: 'E'
ralt: '\u20ac'
+ ralt+capslock: '\u20ac'
}
key R {
@@ -141,6 +143,8 @@ key T {
label: 'T'
base: 't'
shift, capslock: 'T'
+ ralt: '\u0167'
+ ralt+capslock, shift+ralt: '\u0166'
}
key Y {
@@ -159,12 +163,16 @@ key I {
label: 'I'
base: 'i'
shift, capslock: 'I'
+ ralt: '\u00ef'
+ ralt+capslock, shift+ralt: '\u00cf'
}
key O {
label: 'O'
base: 'o'
shift, capslock: 'O'
+ ralt: '\u00f5'
+ ralt+capslock, shift+ralt: '\u00d5'
}
key P {
@@ -192,36 +200,48 @@ key A {
label: 'A'
base: 'a'
shift, capslock: 'A'
+ ralt: '\u00e1'
+ ralt+capslock, shift+ralt: '\u00c1'
}
key S {
label: 'S'
base: 's'
shift, capslock: 'S'
+ ralt: '\u0161'
+ ralt+capslock, shift+ralt: '\u0160'
}
key D {
label: 'D'
base: 'd'
shift, capslock: 'D'
+ ralt: '\u0111'
+ ralt+capslock, shift+ralt: '\u0110'
}
key F {
label: 'F'
base: 'f'
shift, capslock: 'F'
+ ralt: '\u01e5'
+ ralt+capslock, shift+ralt: '\u01e4'
}
key G {
label: 'G'
base: 'g'
shift, capslock: 'G'
+ ralt: '\u01e7'
+ ralt+capslock, shift+ralt: '\u01e6'
}
key H {
label: 'H'
base: 'h'
shift, capslock: 'H'
+ ralt: '\u021f'
+ ralt+capslock, shift+ralt: '\u021e'
}
key J {
@@ -234,6 +254,8 @@ key K {
label: 'K'
base: 'k'
shift, capslock: 'K'
+ ralt: '\u01e9'
+ ralt+capslock, shift+ralt: '\u01e8'
}
key L {
@@ -246,12 +268,16 @@ key SEMICOLON {
label: '\u00c6'
base: '\u00e6'
shift, capslock: '\u00c6'
+ ralt: '\u00e4'
+ ralt+capslock, shift+ralt: '\u00c4'
}
key APOSTROPHE {
label: '\u00d8'
base: '\u00f8'
shift, capslock: '\u00d8'
+ ralt: '\u00f6'
+ ralt+capslock, shift+ralt: '\u00d6'
}
key BACKSLASH {
@@ -273,6 +299,8 @@ key Z {
label: 'Z'
base: 'z'
shift, capslock: 'Z'
+ ralt: '\u017e'
+ ralt+capslock, shift+ralt: '\u017d'
}
key X {
@@ -285,31 +313,39 @@ key C {
label: 'C'
base: 'c'
shift, capslock: 'C'
+ ralt: '\u010d'
+ ralt+capslock, shift+ralt: '\u010c'
}
key V {
label: 'V'
base: 'v'
shift, capslock: 'V'
+ ralt: '\u01ef'
+ ralt+capslock, shift+ralt: '\u01ee'
}
key B {
label: 'B'
base: 'b'
shift, capslock: 'B'
+ ralt: '\u0292'
+ ralt+capslock, shift+ralt: '\u01b7'
}
key N {
label: 'N'
base: 'n'
shift, capslock: 'N'
+ ralt: '\u014b'
+ ralt+capslock, shift+ralt: '\u014a'
}
key M {
label: 'M'
base: 'm'
shift, capslock: 'M'
- ralt: '\u00b5'
+ ralt, ralt+capslock: '\u00b5'
}
key COMMA {
@@ -324,7 +360,7 @@ key PERIOD {
shift: ':'
}
-key MINUS {
+key SLASH {
label: '-'
base: '-'
shift: '_'
diff --git a/packages/InputDevices/res/raw/keyboard_layout_finnish.kcm b/packages/InputDevices/res/raw/keyboard_layout_finnish.kcm
index c6e5ac407650..b4deed4506ba 100644
--- a/packages/InputDevices/res/raw/keyboard_layout_finnish.kcm
+++ b/packages/InputDevices/res/raw/keyboard_layout_finnish.kcm
@@ -13,13 +13,11 @@
# limitations under the License.
#
-# Finnish multilingual keyboard layout.
+# Finnish (& Swedish)(EU based + Sami) keyboard layout.
#
type OVERLAY
-map key 12 SLASH
-map key 53 MINUS
map key 86 PLUS
### ROW 1
@@ -28,14 +26,12 @@ key GRAVE {
label: '\u00a7'
base: '\u00a7'
shift: '\u00bd'
- ralt: '\u0335'
}
key 1 {
label: '1'
base: '1'
shift: '!'
- ralt+shift: '\u00a1'
}
key 2 {
@@ -43,7 +39,6 @@ key 2 {
base: '2'
shift: '"'
ralt: '@'
- ralt+shift: '\u201d'
}
key 3 {
@@ -51,7 +46,6 @@ key 3 {
base: '3'
shift: '#'
ralt: '\u00a3'
- ralt+shift: '\u00bb'
}
key 4 {
@@ -59,23 +53,19 @@ key 4 {
base: '4'
shift: '\u00a4'
ralt: '$'
- ralt+shift: '\u00ab'
}
key 5 {
label: '5'
base: '5'
shift: '%'
- ralt: '\u2030'
- ralt+shift: '\u201c'
+ ralt: '\u20ac'
}
key 6 {
label: '6'
base: '6'
shift: '&'
- ralt: '\u201a'
- ralt+shift: '\u201e'
}
key 7 {
@@ -104,23 +94,19 @@ key 0 {
base: '0'
shift: '='
ralt: '}'
- ralt+shift: '\u00b0'
}
-key SLASH {
+key MINUS {
label: '+'
base: '+'
shift: '?'
ralt: '\\'
- ralt+shift: '\u00bf'
}
key EQUALS {
label: '\u00b4'
base: '\u0301'
shift: '\u0300'
- ralt: '\u0327'
- ralt+shift: '\u0328'
}
### ROW 2
@@ -129,6 +115,8 @@ key Q {
label: 'Q'
base: 'q'
shift, capslock: 'Q'
+ ralt: '\u00e2'
+ ralt+capslock, shift+ralt: '\u00c2'
}
key W {
@@ -142,6 +130,7 @@ key E {
base: 'e'
shift, capslock: 'E'
ralt: '\u20ac'
+ ralt+capslock: '\u20ac'
}
key R {
@@ -154,8 +143,8 @@ key T {
label: 'T'
base: 't'
shift, capslock: 'T'
- ralt: '\u00fe'
- ralt+shift, ralt+capslock: '\u00de'
+ ralt: '\u0167'
+ ralt+capslock, shift+ralt: '\u0166'
}
key Y {
@@ -174,31 +163,28 @@ key I {
label: 'I'
base: 'i'
shift, capslock: 'I'
- ralt: '\u0131'
+ ralt: '\u00ef'
+ ralt+capslock, shift+ralt: '\u00cf'
}
key O {
label: 'O'
base: 'o'
shift, capslock: 'O'
- ralt: '\u0153'
- ralt+shift, ralt+capslock: '\u0152'
+ ralt: '\u00f5'
+ ralt+capslock, shift+ralt: '\u00d5'
}
key P {
label: 'P'
base: 'p'
shift, capslock: 'P'
- ralt: '\u031b'
- ralt+shift: '\u0309'
}
key LEFT_BRACKET {
label: '\u00c5'
base: '\u00e5'
shift, capslock: '\u00c5'
- ralt: '\u030b'
- ralt+shift: '\u030a'
}
key RIGHT_BRACKET {
@@ -206,7 +192,6 @@ key RIGHT_BRACKET {
base: '\u0308'
shift: '\u0302'
ralt: '\u0303'
- ralt+shift: '\u0304'
}
### ROW 3
@@ -215,41 +200,48 @@ key A {
label: 'A'
base: 'a'
shift, capslock: 'A'
- ralt: '\u0259'
- ralt+shift, ralt+capslock: '\u018f'
+ ralt: '\u00e1'
+ ralt+capslock, shift+ralt: '\u00c1'
}
key S {
label: 'S'
base: 's'
shift, capslock: 'S'
- ralt: '\u00df'
+ ralt: '\u0161'
+ ralt+capslock, shift+ralt: '\u0160'
}
key D {
label: 'D'
base: 'd'
shift, capslock: 'D'
- ralt: '\u00f0'
- ralt+shift, ralt+capslock: '\u00d0'
+ ralt: '\u0111'
+ ralt+capslock, shift+ralt: '\u0110'
}
key F {
label: 'F'
base: 'f'
shift, capslock: 'F'
+ ralt: '\u01e5'
+ ralt+capslock, shift+ralt: '\u01e4'
}
key G {
label: 'G'
base: 'g'
shift, capslock: 'G'
+ ralt: '\u01e7'
+ ralt+capslock, shift+ralt: '\u01e6'
}
key H {
label: 'H'
base: 'h'
shift, capslock: 'H'
+ ralt: '\u021f'
+ ralt+capslock, shift+ralt: '\u021e'
}
key J {
@@ -262,14 +254,14 @@ key K {
label: 'K'
base: 'k'
shift, capslock: 'K'
- ralt: '\u0138'
+ ralt: '\u01e9'
+ ralt+capslock, shift+ralt: '\u01e8'
}
key L {
label: 'L'
base: 'l'
shift, capslock: 'L'
- ralt: '\u0335'
}
key SEMICOLON {
@@ -277,7 +269,7 @@ key SEMICOLON {
base: '\u00f6'
shift, capslock: '\u00d6'
ralt: '\u00f8'
- ralt+shift, ralt+capslock: '\u00d8'
+ ralt+capslock, shift+ralt: '\u00d8'
}
key APOSTROPHE {
@@ -285,15 +277,13 @@ key APOSTROPHE {
base: '\u00e4'
shift, capslock: '\u00c4'
ralt: '\u00e6'
- ralt+shift, ralt+capslock: '\u00c6'
+ ralt+capslock, shift+ralt: '\u00c6'
}
key BACKSLASH {
label: '\''
base: '\''
shift: '*'
- ralt: '\u030c'
- ralt+shift: '\u0306'
}
### ROW 4
@@ -309,34 +299,38 @@ key Z {
label: 'Z'
base: 'z'
shift, capslock: 'Z'
- ralt: '\u0292'
- ralt+shift, ralt+capslock: '\u01b7'
+ ralt: '\u017e'
+ ralt+capslock, shift+ralt: '\u017d'
}
key X {
label: 'X'
base: 'x'
shift, capslock: 'X'
- ralt: '\u00d7'
- ralt+shift: '\u00b7'
}
key C {
label: 'C'
base: 'c'
shift, capslock: 'C'
+ ralt: '\u010d'
+ ralt+capslock, shift+ralt: '\u010c'
}
key V {
label: 'V'
base: 'v'
shift, capslock: 'V'
+ ralt: '\u01ef'
+ ralt+capslock, shift+ralt: '\u01ee'
}
key B {
label: 'B'
base: 'b'
shift, capslock: 'B'
+ ralt: '\u0292'
+ ralt+capslock, shift+ralt: '\u01b7'
}
key N {
@@ -344,37 +338,30 @@ key N {
base: 'n'
shift, capslock: 'N'
ralt: '\u014b'
- ralt+shift, ralt+capslock: '\u014a'
+ ralt+capslock, shift+ralt: '\u014a'
}
key M {
label: 'M'
base: 'm'
shift, capslock: 'M'
- ralt: '\u00b5'
- ralt+shift: '\u2014'
+ ralt, ralt+capslock: '\u00b5'
}
key COMMA {
label: ','
base: ','
shift: ';'
- ralt: '\u2019'
- ralt+shift: '\u2018'
}
key PERIOD {
label: '.'
base: '.'
shift: ':'
- ralt: '\u0323'
- ralt+shift: '\u0307'
}
-key MINUS {
+key SLASH {
label: '-'
base: '-'
shift: '_'
- ralt: '\u2013'
- ralt+shift: '\u0307'
}
diff --git a/packages/InputDevices/res/raw/keyboard_layout_latvian_qwerty.kcm b/packages/InputDevices/res/raw/keyboard_layout_latvian_qwerty.kcm
new file mode 100644
index 000000000000..d4bc0c03f8fb
--- /dev/null
+++ b/packages/InputDevices/res/raw/keyboard_layout_latvian_qwerty.kcm
@@ -0,0 +1,362 @@
+# Copyright (C) 2014 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# Latvian (QWERTY-US-intl based) keyboard layout.
+#
+
+type OVERLAY
+
+map key 86 BACKSLASH
+map key 43 POUND
+
+### ROW 1
+
+key GRAVE {
+ label: '\u0300'
+ base: '\u0300'
+ shift: '\u0303'
+ ralt: '-'
+}
+
+key 1 {
+ label: '1'
+ base: '1'
+ shift: '!'
+ ralt: '\u00a0'
+}
+
+key 2 {
+ label: '2'
+ base: '2'
+ shift: '@'
+ ralt: '\u00ab'
+}
+
+key 3 {
+ label: '3'
+ base: '3'
+ shift: '#'
+ ralt: '\u00bb'
+}
+
+key 4 {
+ label: '4'
+ base: '4'
+ shift: '$'
+ ralt: '\u20ac'
+ ralt+shift: '\u00a7'
+}
+
+key 5 {
+ label: '5'
+ base: '5'
+ shift: '%'
+ ralt+shift: '\u00b0'
+}
+
+key 6 {
+ label: '6'
+ base: '6'
+ shift: '\u0302'
+ ralt: '\u2019'
+}
+
+key 7 {
+ label: '7'
+ base: '7'
+ shift: '&'
+ ralt+shift: '\u00b1'
+}
+
+key 8 {
+ label: '8'
+ base: '8'
+ shift: '*'
+ ralt+shift: '\u00d7'
+}
+
+key 9 {
+ label: '9'
+ base: '9'
+ shift: '('
+}
+
+key 0 {
+ label: '0'
+ base: '0'
+ shift: ')'
+}
+
+key MINUS {
+ label: '-'
+ base: '-'
+ shift: '_'
+ ralt: '\u2013'
+ ralt+shift: '\u2014'
+}
+
+key EQUALS {
+ label: '='
+ base: '='
+ shift: '+'
+}
+
+### ROW 2
+
+key Q {
+ label: 'Q'
+ base: 'q'
+ shift, capslock: 'Q'
+}
+
+key W {
+ label: 'W'
+ base: 'w'
+ shift, capslock: 'W'
+}
+
+key E {
+ label: 'E'
+ base: 'e'
+ shift, capslock: 'E'
+ ralt: '\u0113'
+ shift+ralt, ralt+capslock: '\u0112'
+}
+
+key R {
+ label: 'R'
+ base: 'r'
+ shift, capslock: 'R'
+ ralt: '\u0157'
+ shift+ralt, ralt+capslock: '\u0156'
+}
+
+key T {
+ label: 'T'
+ base: 't'
+ shift, capslock: 'T'
+}
+
+key Y {
+ label: 'Y'
+ base: 'y'
+ shift, capslock: 'Y'
+}
+
+key U {
+ label: 'U'
+ base: 'u'
+ shift, capslock: 'U'
+ ralt: '\u016b'
+ shift+ralt, ralt+capslock: '\u016a'
+}
+
+key I {
+ label: 'I'
+ base: 'i'
+ shift, capslock: 'I'
+ ralt: '\u012b'
+ shift+ralt, ralt+capslock: '\u012a'
+}
+
+key O {
+ label: 'O'
+ base: 'o'
+ shift, capslock: 'O'
+ ralt: '\u00f5'
+ shift+ralt, ralt+capslock: '\u00d5'
+}
+
+key P {
+ label: 'P'
+ base: 'p'
+ shift, capslock: 'P'
+}
+
+key LEFT_BRACKET {
+ label: '['
+ base: '['
+ shift: '{'
+}
+
+key RIGHT_BRACKET {
+ label: ']'
+ base: ']'
+ shift: '}'
+}
+
+
+### ROW 3
+
+key A {
+ label: 'A'
+ base: 'a'
+ shift, capslock: 'A'
+ ralt: '\u0101'
+ shift+ralt, ralt+capslock: '\u0100'
+}
+
+key S {
+ label: 'S'
+ base: 's'
+ shift, capslock: 'S'
+ ralt: '\u0161'
+ shift+ralt, ralt+capslock: '\u0160'
+}
+
+key D {
+ label: 'D'
+ base: 'd'
+ shift, capslock: 'D'
+}
+
+key F {
+ label: 'F'
+ base: 'f'
+ shift, capslock: 'F'
+}
+
+key G {
+ label: 'G'
+ base: 'g'
+ shift, capslock: 'G'
+ ralt: '\u0123'
+ shift+ralt, ralt+capslock: '\u0122'
+}
+
+key H {
+ label: 'H'
+ base: 'h'
+ shift, capslock: 'H'
+}
+
+key J {
+ label: 'J'
+ base: 'j'
+ shift, capslock: 'J'
+}
+
+key K {
+ label: 'K'
+ base: 'k'
+ shift, capslock: 'K'
+ ralt: '\u0137'
+ shift+ralt, ralt+capslock: '\u0136'
+}
+
+key L {
+ label: 'L'
+ base: 'l'
+ shift, capslock: 'L'
+ ralt: '\u013c'
+ shift+ralt, ralt+capslock: '\u013b'
+}
+
+key SEMICOLON {
+ label: ';'
+ base: ';'
+ shift: ':'
+}
+
+key APOSTROPHE {
+ label: '\''
+ base: '\''
+ shift: '"'
+ ralt: '\u0301'
+ shift+ralt: '\u0308'
+}
+
+key POUND {
+ label: '\u00b0'
+ base: '\u00b0'
+ shift: '|'
+}
+
+### ROW 4
+
+key BACKSLASH {
+ label: '\\'
+ base: '\\'
+ shift: '|'
+ ralt: '\u00ac'
+ shift+ralt: '\u00a6'
+}
+
+key Z {
+ label: 'Z'
+ base: 'z'
+ shift, capslock: 'Z'
+ ralt: '\u017e'
+ shift+ralt, ralt+capslock: '\u017d'
+}
+
+key X {
+ label: 'X'
+ base: 'x'
+ shift, capslock: 'X'
+}
+
+key C {
+ label: 'C'
+ base: 'c'
+ shift, capslock: 'C'
+ ralt: '\u010d'
+ shift+ralt, ralt+capslock: '\u010c'
+}
+
+key V {
+ label: 'V'
+ base: 'v'
+ shift, capslock: 'V'
+}
+
+key B {
+ label: 'B'
+ base: 'b'
+ shift, capslock: 'B'
+}
+
+key N {
+ label: 'N'
+ base: 'n'
+ shift, capslock: 'N'
+ ralt: '\u0146'
+ shift+ralt, ralt+capslock: '\u0145'
+}
+
+key M {
+ label: 'M'
+ base: 'm'
+ shift, capslock: 'M'
+}
+
+key COMMA {
+ label: ','
+ base: ','
+ shift: '<'
+}
+
+key PERIOD {
+ label: '.'
+ base: '.'
+ shift: '>'
+}
+
+key SLASH {
+ label: '/'
+ base: '/'
+ shift: '?'
+ ralt: '\u00bf'
+}
diff --git a/packages/InputDevices/res/raw/keyboard_layout_norwegian.kcm b/packages/InputDevices/res/raw/keyboard_layout_norwegian.kcm
index d1be485ed781..560dd1631add 100644
--- a/packages/InputDevices/res/raw/keyboard_layout_norwegian.kcm
+++ b/packages/InputDevices/res/raw/keyboard_layout_norwegian.kcm
@@ -13,13 +13,11 @@
# limitations under the License.
#
-# Norwegian keyboard layout.
+# Norwegian (EU based + Sami) keyboard layout.
#
type OVERLAY
-map key 12 SLASH
-map key 53 MINUS
map key 86 PLUS
### ROW 1
@@ -61,6 +59,7 @@ key 5 {
label: '5'
base: '5'
shift: '%'
+ ralt: '\u20ac'
}
key 6 {
@@ -97,7 +96,7 @@ key 0 {
ralt: '}'
}
-key SLASH {
+key MINUS {
label: '+'
base: '+'
shift: '?'
@@ -116,6 +115,8 @@ key Q {
label: 'Q'
base: 'q'
shift, capslock: 'Q'
+ ralt: '\u00e2'
+ ralt+capslock, shift+ralt: '\u00c2'
}
key W {
@@ -129,6 +130,7 @@ key E {
base: 'e'
shift, capslock: 'E'
ralt: '\u20ac'
+ ralt+capslock: '\u20ac'
}
key R {
@@ -141,6 +143,8 @@ key T {
label: 'T'
base: 't'
shift, capslock: 'T'
+ ralt: '\u0167'
+ ralt+capslock, shift+ralt: '\u0166'
}
key Y {
@@ -159,12 +163,16 @@ key I {
label: 'I'
base: 'i'
shift, capslock: 'I'
+ ralt: '\u00ef'
+ ralt+capslock, shift+ralt: '\u00cf'
}
key O {
label: 'O'
base: 'o'
shift, capslock: 'O'
+ ralt: '\u00f5'
+ ralt+capslock, shift+ralt: '\u00d5'
}
key P {
@@ -192,36 +200,48 @@ key A {
label: 'A'
base: 'a'
shift, capslock: 'A'
+ ralt: '\u00e1'
+ ralt+capslock, shift+ralt: '\u00c1'
}
key S {
label: 'S'
base: 's'
shift, capslock: 'S'
+ ralt: '\u0161'
+ ralt+capslock, shift+ralt: '\u0160'
}
key D {
label: 'D'
base: 'd'
shift, capslock: 'D'
+ ralt: '\u0111'
+ ralt+capslock, shift+ralt: '\u0110'
}
key F {
label: 'F'
base: 'f'
shift, capslock: 'F'
+ ralt: '\u01e5'
+ ralt+capslock, shift+ralt: '\u01e4'
}
key G {
label: 'G'
base: 'g'
shift, capslock: 'G'
+ ralt: '\u01e7'
+ ralt+capslock, shift+ralt: '\u01e6'
}
key H {
label: 'H'
base: 'h'
shift, capslock: 'H'
+ ralt: '\u021f'
+ ralt+capslock, shift+ralt: '\u021e'
}
key J {
@@ -234,6 +254,8 @@ key K {
label: 'K'
base: 'k'
shift, capslock: 'K'
+ ralt: '\u01e9'
+ ralt+capslock, shift+ralt: '\u01e8'
}
key L {
@@ -246,12 +268,16 @@ key SEMICOLON {
label: '\u00d8'
base: '\u00f8'
shift, capslock: '\u00d8'
+ ralt: '\u00f6'
+ ralt+capslock, shift+ralt: '\u00d6'
}
key APOSTROPHE {
label: '\u00c6'
base: '\u00e6'
shift, capslock: '\u00c6'
+ ralt: '\u00e4'
+ ralt+capslock, shift+ralt: '\u00c4'
}
key BACKSLASH {
@@ -272,6 +298,8 @@ key Z {
label: 'Z'
base: 'z'
shift, capslock: 'Z'
+ ralt: '\u017e'
+ ralt+capslock, shift+ralt: '\u017d'
}
key X {
@@ -284,31 +312,39 @@ key C {
label: 'C'
base: 'c'
shift, capslock: 'C'
+ ralt: '\u010d'
+ ralt+capslock, shift+ralt: '\u010c'
}
key V {
label: 'V'
base: 'v'
shift, capslock: 'V'
+ ralt: '\u01ef'
+ ralt+capslock, shift+ralt: '\u01ee'
}
key B {
label: 'B'
base: 'b'
shift, capslock: 'B'
+ ralt: '\u0292'
+ ralt+capslock, shift+ralt: '\u01b7'
}
key N {
label: 'N'
base: 'n'
shift, capslock: 'N'
+ ralt: '\u014b'
+ ralt+capslock, shift+ralt: '\u014a'
}
key M {
label: 'M'
base: 'm'
shift, capslock: 'M'
- ralt: '\u00b5'
+ ralt, ralt+capslock: '\u00b5'
}
key COMMA {
@@ -323,7 +359,7 @@ key PERIOD {
shift: ':'
}
-key MINUS {
+key SLASH {
label: '-'
base: '-'
shift: '_'
diff --git a/packages/InputDevices/res/raw/keyboard_layout_swedish.kcm b/packages/InputDevices/res/raw/keyboard_layout_swedish.kcm
index e42bd6c46795..8a4e9a505dfa 100644
--- a/packages/InputDevices/res/raw/keyboard_layout_swedish.kcm
+++ b/packages/InputDevices/res/raw/keyboard_layout_swedish.kcm
@@ -13,13 +13,11 @@
# limitations under the License.
#
-# Swedish keyboard layout.
+# Swedish (Finnish) (EU based + Sami) keyboard layout.
#
type OVERLAY
-map key 12 SLASH
-map key 53 MINUS
map key 86 PLUS
### ROW 1
@@ -61,6 +59,7 @@ key 5 {
label: '5'
base: '5'
shift: '%'
+ ralt: '\u20ac'
}
key 6 {
@@ -97,7 +96,7 @@ key 0 {
ralt: '}'
}
-key SLASH {
+key MINUS {
label: '+'
base: '+'
shift: '?'
@@ -116,6 +115,8 @@ key Q {
label: 'Q'
base: 'q'
shift, capslock: 'Q'
+ ralt: '\u00e2'
+ ralt+capslock, shift+ralt: '\u00c2'
}
key W {
@@ -129,6 +130,7 @@ key E {
base: 'e'
shift, capslock: 'E'
ralt: '\u20ac'
+ ralt+capslock: '\u20ac'
}
key R {
@@ -141,6 +143,8 @@ key T {
label: 'T'
base: 't'
shift, capslock: 'T'
+ ralt: '\u0167'
+ ralt+capslock, shift+ralt: '\u0166'
}
key Y {
@@ -159,12 +163,16 @@ key I {
label: 'I'
base: 'i'
shift, capslock: 'I'
+ ralt: '\u00ef'
+ ralt+capslock, shift+ralt: '\u00cf'
}
key O {
label: 'O'
base: 'o'
shift, capslock: 'O'
+ ralt: '\u00f5'
+ ralt+capslock, shift+ralt: '\u00d5'
}
key P {
@@ -192,36 +200,48 @@ key A {
label: 'A'
base: 'a'
shift, capslock: 'A'
+ ralt: '\u00e1'
+ ralt+capslock, shift+ralt: '\u00c1'
}
key S {
label: 'S'
base: 's'
shift, capslock: 'S'
+ ralt: '\u0161'
+ ralt+capslock, shift+ralt: '\u0160'
}
key D {
label: 'D'
base: 'd'
shift, capslock: 'D'
+ ralt: '\u0111'
+ ralt+capslock, shift+ralt: '\u0110'
}
key F {
label: 'F'
base: 'f'
shift, capslock: 'F'
+ ralt: '\u01e5'
+ ralt+capslock, shift+ralt: '\u01e4'
}
key G {
label: 'G'
base: 'g'
shift, capslock: 'G'
+ ralt: '\u01e7'
+ ralt+capslock, shift+ralt: '\u01e6'
}
key H {
label: 'H'
base: 'h'
shift, capslock: 'H'
+ ralt: '\u021f'
+ ralt+capslock, shift+ralt: '\u021e'
}
key J {
@@ -234,6 +254,8 @@ key K {
label: 'K'
base: 'k'
shift, capslock: 'K'
+ ralt: '\u01e9'
+ ralt+capslock, shift+ralt: '\u01e8'
}
key L {
@@ -246,12 +268,16 @@ key SEMICOLON {
label: '\u00d6'
base: '\u00f6'
shift, capslock: '\u00d6'
+ ralt: '\u00f8'
+ ralt+capslock, shift+ralt: '\u00d8'
}
key APOSTROPHE {
label: '\u00c4'
base: '\u00e4'
shift, capslock: '\u00c4'
+ ralt: '\u00e6'
+ ralt+capslock, shift+ralt: '\u00c6'
}
key BACKSLASH {
@@ -273,6 +299,8 @@ key Z {
label: 'Z'
base: 'z'
shift, capslock: 'Z'
+ ralt: '\u017e'
+ ralt+capslock, shift+ralt: '\u017d'
}
key X {
@@ -285,31 +313,39 @@ key C {
label: 'C'
base: 'c'
shift, capslock: 'C'
+ ralt: '\u010d'
+ ralt+capslock, shift+ralt: '\u010c'
}
key V {
label: 'V'
base: 'v'
shift, capslock: 'V'
+ ralt: '\u01ef'
+ ralt+capslock, shift+ralt: '\u01ee'
}
key B {
label: 'B'
base: 'b'
shift, capslock: 'B'
+ ralt: '\u0292'
+ ralt+capslock, shift+ralt: '\u01b7'
}
key N {
label: 'N'
base: 'n'
shift, capslock: 'N'
+ ralt: '\u014b'
+ ralt+capslock, shift+ralt: '\u014a'
}
key M {
label: 'M'
base: 'm'
shift, capslock: 'M'
- ralt: '\u00b5'
+ ralt, ralt+capslock: '\u00b5'
}
key COMMA {
@@ -324,7 +360,7 @@ key PERIOD {
shift: ':'
}
-key MINUS {
+key SLASH {
label: '-'
base: '-'
shift: '_'
diff --git a/packages/InputDevices/res/values/strings.xml b/packages/InputDevices/res/values/strings.xml
index 62393361369e..968961a257f7 100644
--- a/packages/InputDevices/res/values/strings.xml
+++ b/packages/InputDevices/res/values/strings.xml
@@ -113,4 +113,7 @@
<!-- Spanish (Latin) keyboard layout label. [CHAR LIMIT=35] -->
<string name="keyboard_layout_spanish_latin">Spanish (Latin)</string>
+
+ <!-- Latvian keyboard layout label. [CHAR LIMIT=35] -->
+ <string name="keyboard_layout_latvian">Latvian</string>
</resources>
diff --git a/packages/InputDevices/res/xml/keyboard_layouts.xml b/packages/InputDevices/res/xml/keyboard_layouts.xml
index dc1db0b9e28d..6f7253ca49c4 100644
--- a/packages/InputDevices/res/xml/keyboard_layouts.xml
+++ b/packages/InputDevices/res/xml/keyboard_layouts.xml
@@ -143,4 +143,8 @@
<keyboard-layout android:name="keyboard_layout_spanish_latin"
android:label="@string/keyboard_layout_spanish_latin"
android:keyboardLayout="@raw/keyboard_layout_spanish_latin" />
+
+ <keyboard-layout android:name="keyboard_layout_latvian"
+ android:label="@string/keyboard_layout_latvian"
+ android:keyboardLayout="@raw/keyboard_layout_latvian_qwerty" />
</keyboard-layouts>
diff --git a/services/input/InputDispatcher.cpp b/services/input/InputDispatcher.cpp
index 06a57d5952d0..0da8489897be 100644
--- a/services/input/InputDispatcher.cpp
+++ b/services/input/InputDispatcher.cpp
@@ -1968,7 +1968,7 @@ void InputDispatcher::startDispatchCycleLocked(nsecs_t currentTime,
xOffset = dispatchEntry->xOffset * scaleFactor;
yOffset = dispatchEntry->yOffset * scaleFactor;
if (scaleFactor != 1.0f) {
- for (size_t i = 0; i < motionEntry->pointerCount; i++) {
+ for (uint32_t i = 0; i < motionEntry->pointerCount; i++) {
scaledCoords[i] = motionEntry->pointerCoords[i];
scaledCoords[i].scale(scaleFactor);
}
@@ -1981,7 +1981,7 @@ void InputDispatcher::startDispatchCycleLocked(nsecs_t currentTime,
// We don't want the dispatch target to know.
if (dispatchEntry->targetFlags & InputTarget::FLAG_ZERO_COORDS) {
- for (size_t i = 0; i < motionEntry->pointerCount; i++) {
+ for (uint32_t i = 0; i < motionEntry->pointerCount; i++) {
scaledCoords[i].clear();
}
usingCoords = scaledCoords;
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index 076855d8db6f..22a713dc49c2 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -268,7 +268,7 @@ public final class ActivityManagerService extends ActivityManagerNative
// before we decide it's never going to come up for real, when the process was
// started with a wrapper for instrumentation (such as Valgrind) because it
// could take much longer than usual.
- static final int PROC_START_TIMEOUT_WITH_WRAPPER = 20*300*1000;
+ static final int PROC_START_TIMEOUT_WITH_WRAPPER = 20*1200*1000;
// How long to wait after going idle before forcing apps to GC.
static final int GC_TIMEOUT = 5*1000;
@@ -2780,7 +2780,7 @@ public final class ActivityManagerService extends ActivityManagerNative
debugFlags |= Zygote.DEBUG_ENABLE_ASSERT;
}
- String requiredAbi = app.info.requiredCpuAbi;
+ String requiredAbi = app.info.cpuAbi;
if (requiredAbi == null) {
requiredAbi = Build.SUPPORTED_ABIS[0];
}
diff --git a/services/java/com/android/server/pm/PackageManagerService.java b/services/java/com/android/server/pm/PackageManagerService.java
index 6799feb7c107..cdf1df6b1174 100755
--- a/services/java/com/android/server/pm/PackageManagerService.java
+++ b/services/java/com/android/server/pm/PackageManagerService.java
@@ -1603,7 +1603,10 @@ public class PackageManagerService extends IPackageManager.Stub {
updateAllSharedLibrariesLPw();
for (SharedUserSetting setting : mSettings.getAllSharedUsersLPw()) {
- adjustCpuAbisForSharedUserLPw(setting.packages, true /* do dexopt */,
+ // NOTE: We ignore potential failures here during a system scan (like
+ // the rest of the commands above) because there's precious little we
+ // can do about it. A settings error is reported, though.
+ adjustCpuAbisForSharedUserLPw(setting.packages, null,
false /* force dexopt */, false /* defer dexopt */);
}
@@ -2207,7 +2210,7 @@ public class PackageManagerService extends IPackageManager.Stub {
pkg.applicationInfo.dataDir =
getDataPathForPackage(packageName, 0).getPath();
pkg.applicationInfo.nativeLibraryDir = ps.nativeLibraryPathString;
- pkg.applicationInfo.requiredCpuAbi = ps.requiredCpuAbiString;
+ pkg.applicationInfo.cpuAbi = ps.cpuAbiString;
}
return generatePackageInfo(pkg, flags, userId);
}
@@ -4348,8 +4351,8 @@ public class PackageManagerService extends IPackageManager.Stub {
private String getAppInstructionSet(ApplicationInfo info) {
String instructionSet = getPreferredInstructionSet();
- if (info.requiredCpuAbi != null) {
- instructionSet = VMRuntime.getInstructionSet(info.requiredCpuAbi);
+ if (info.cpuAbi != null) {
+ instructionSet = VMRuntime.getInstructionSet(info.cpuAbi);
}
return instructionSet;
@@ -4358,8 +4361,8 @@ public class PackageManagerService extends IPackageManager.Stub {
private String getAppInstructionSetFromSettings(PackageSetting ps) {
String instructionSet = getPreferredInstructionSet();
- if (ps.requiredCpuAbiString != null) {
- instructionSet = VMRuntime.getInstructionSet(ps.requiredCpuAbiString);
+ if (ps.cpuAbiString != null) {
+ instructionSet = VMRuntime.getInstructionSet(ps.cpuAbiString);
}
return instructionSet;
@@ -4748,7 +4751,7 @@ public class PackageManagerService extends IPackageManager.Stub {
// the PkgSetting exists already and doesn't have to be created.
pkgSetting = mSettings.getPackageLPw(pkg, origPackage, realName, suid, destCodeFile,
destResourceFile, pkg.applicationInfo.nativeLibraryDir,
- pkg.applicationInfo.requiredCpuAbi,
+ pkg.applicationInfo.cpuAbi,
pkg.applicationInfo.flags, user, false);
if (pkgSetting == null) {
Slog.w(TAG, "Creating application package " + pkg.packageName + " failed");
@@ -5076,9 +5079,9 @@ public class PackageManagerService extends IPackageManager.Stub {
// We've successfully copied native libraries across, so we make a
// note of what ABI we're using
if (copyRet != PackageManager.NO_NATIVE_LIBRARIES) {
- pkg.applicationInfo.requiredCpuAbi = Build.SUPPORTED_ABIS[copyRet];
+ pkg.applicationInfo.cpuAbi = Build.SUPPORTED_ABIS[copyRet];
} else {
- pkg.applicationInfo.requiredCpuAbi = null;
+ pkg.applicationInfo.cpuAbi = null;
}
} catch (IOException e) {
Slog.e(TAG, "Unable to copy native libraries", e);
@@ -5096,12 +5099,12 @@ public class PackageManagerService extends IPackageManager.Stub {
final NativeLibraryHelper.ApkHandle handle = new NativeLibraryHelper.ApkHandle(scanFile);
final int abi = NativeLibraryHelper.findSupportedAbi(handle, Build.SUPPORTED_ABIS);
if (abi >= 0) {
- pkg.applicationInfo.requiredCpuAbi = Build.SUPPORTED_ABIS[abi];
+ pkg.applicationInfo.cpuAbi = Build.SUPPORTED_ABIS[abi];
} else if (abi == PackageManager.NO_NATIVE_LIBRARIES) {
// Note that (non upgraded) system apps will not have any native
// libraries bundled in their APK, but we're guaranteed not to be
// such an app at this point.
- pkg.applicationInfo.requiredCpuAbi = null;
+ pkg.applicationInfo.cpuAbi = null;
} else {
mLastScanError = PackageManager.INSTALL_FAILED_INTERNAL_ERROR;
return null;
@@ -5129,6 +5132,20 @@ public class PackageManagerService extends IPackageManager.Stub {
}
pkg.mScanPath = path;
+ if ((scanMode&SCAN_BOOTING) == 0 && pkgSetting.sharedUser != null) {
+ // We don't do this here during boot because we can do it all
+ // at once after scanning all existing packages.
+ //
+ // We also do this *before* we perform dexopt on this package, so that
+ // we can avoid redundant dexopts, and also to make sure we've got the
+ // code and package path correct.
+ if (!adjustCpuAbisForSharedUserLPw(pkgSetting.sharedUser.packages,
+ pkg, forceDex, (scanMode & SCAN_DEFER_DEX) != 0)) {
+ mLastScanError = PackageManager.INSTALL_FAILED_CPU_ABI_INCOMPATIBLE;
+ return null;
+ }
+ }
+
if ((scanMode&SCAN_NO_DEX) == 0) {
if (performDexOptLI(pkg, forceDex, (scanMode&SCAN_DEFER_DEX) != 0, false)
== DEX_OPT_FAILED) {
@@ -5248,12 +5265,6 @@ public class PackageManagerService extends IPackageManager.Stub {
// writer
synchronized (mPackages) {
- if ((scanMode&SCAN_BOOTING) == 0 && pkgSetting.sharedUser != null) {
- // We don't do this here during boot because we can do it all
- // at once after scanning all existing packages.
- adjustCpuAbisForSharedUserLPw(pkgSetting.sharedUser.packages,
- true, forceDex, (scanMode & SCAN_DEFER_DEX) != 0);
- }
// We don't expect installation to fail beyond this point,
if ((scanMode&SCAN_MONITOR) != 0) {
mAppDirs.put(pkg.mPath, pkg);
@@ -5597,30 +5608,49 @@ public class PackageManagerService extends IPackageManager.Stub {
return pkg;
}
- public void adjustCpuAbisForSharedUserLPw(Set<PackageSetting> packagesForUser,
- boolean doDexOpt, boolean forceDexOpt, boolean deferDexOpt) {
+ /**
+ * Adjusts ABIs for a set of packages belonging to a shared user so that they all match.
+ * i.e, so that all packages can be run inside a single process if required.
+ *
+ * Optionally, callers can pass in a parsed package via {@code newPackage} in which case
+ * this function will either try and make the ABI for all packages in {@code packagesForUser}
+ * match {@code scannedPackage} or will update the ABI of {@code scannedPackage} to match
+ * the ABI selected for {@code packagesForUser}. This variant is used when installing or
+ * updating a package that belongs to a shared user.
+ */
+ private boolean adjustCpuAbisForSharedUserLPw(Set<PackageSetting> packagesForUser,
+ PackageParser.Package scannedPackage, boolean forceDexOpt, boolean deferDexOpt) {
String requiredInstructionSet = null;
+ if (scannedPackage != null && scannedPackage.applicationInfo.cpuAbi != null) {
+ requiredInstructionSet = VMRuntime.getInstructionSet(
+ scannedPackage.applicationInfo.cpuAbi);
+ }
+
PackageSetting requirer = null;
for (PackageSetting ps : packagesForUser) {
- if (ps.requiredCpuAbiString != null) {
- final String instructionSet = VMRuntime.getInstructionSet(ps.requiredCpuAbiString);
+ // If packagesForUser contains scannedPackage, we skip it. This will happen
+ // when scannedPackage is an update of an existing package. Without this check,
+ // we will never be able to change the ABI of any package belonging to a shared
+ // user, even if it's compatible with other packages.
+ if (scannedPackage == null || ! scannedPackage.packageName.equals(ps.name)) {
+ if (ps.cpuAbiString == null) {
+ continue;
+ }
+
+ final String instructionSet = VMRuntime.getInstructionSet(ps.cpuAbiString);
if (requiredInstructionSet != null) {
if (!instructionSet.equals(requiredInstructionSet)) {
// We have a mismatch between instruction sets (say arm vs arm64).
- //
- // TODO: We should rescan all the packages in a shared UID to check if
- // they do contain shared libs for other ABIs in addition to the ones we've
- // already extracted. For example, the package might contain both arm64-v8a
- // and armeabi-v7a shared libs, and we'd have chosen arm64-v8a on 64 bit
- // devices.
- String errorMessage = "Instruction set mismatch, " + requirer.pkg.packageName
- + " requires " + requiredInstructionSet + " whereas " + ps.pkg.packageName
+ // bail out.
+ String errorMessage = "Instruction set mismatch, "
+ + ((requirer == null) ? "[caller]" : requirer)
+ + " requires " + requiredInstructionSet + " whereas " + ps
+ " requires " + instructionSet;
Slog.e(TAG, errorMessage);
reportSettingsProblem(Log.WARN, errorMessage);
// Give up, don't bother making any other changes to the package settings.
- return;
+ return false;
}
} else {
requiredInstructionSet = instructionSet;
@@ -5630,20 +5660,45 @@ public class PackageManagerService extends IPackageManager.Stub {
}
if (requiredInstructionSet != null) {
+ String adjustedAbi;
+ if (requirer != null) {
+ // requirer != null implies that either scannedPackage was null or that scannedPackage
+ // did not require an ABI, in which case we have to adjust scannedPackage to match
+ // the ABI of the set (which is the same as requirer's ABI)
+ adjustedAbi = requirer.cpuAbiString;
+ if (scannedPackage != null) {
+ scannedPackage.applicationInfo.cpuAbi = adjustedAbi;
+ }
+ } else {
+ // requirer == null implies that we're updating all ABIs in the set to
+ // match scannedPackage.
+ adjustedAbi = scannedPackage.applicationInfo.cpuAbi;
+ }
+
for (PackageSetting ps : packagesForUser) {
- if (ps.requiredCpuAbiString == null) {
- ps.requiredCpuAbiString = requirer.requiredCpuAbiString;
- if (ps.pkg != null) {
- ps.pkg.applicationInfo.requiredCpuAbi = requirer.requiredCpuAbiString;
- Slog.i(TAG, "Adjusting ABI for : " + ps.name + " to " + ps.requiredCpuAbiString);
- if (doDexOpt) {
- performDexOptLI(ps.pkg, forceDexOpt, deferDexOpt, true);
+ if (scannedPackage == null || !scannedPackage.packageName.equals(ps.name)) {
+ if (ps.cpuAbiString != null) {
+ continue;
+ }
+
+ ps.cpuAbiString = adjustedAbi;
+ if (ps.pkg != null && ps.pkg.applicationInfo != null) {
+ ps.pkg.applicationInfo.cpuAbi = adjustedAbi;
+ Slog.i(TAG, "Adjusting ABI for : " + ps.name + " to " + adjustedAbi);
+
+ if (performDexOptLI(ps.pkg, forceDexOpt, deferDexOpt, true) == DEX_OPT_FAILED) {
+ ps.cpuAbiString = null;
+ ps.pkg.applicationInfo.cpuAbi = null;
+ return false;
+ } else {
mInstaller.rmdex(ps.codePathString, getPreferredInstructionSet());
}
}
}
}
}
+
+ return true;
}
private void setUpCustomResolverActivity(PackageParser.Package pkg) {
@@ -5738,15 +5793,15 @@ public class PackageManagerService extends IPackageManager.Stub {
// Assume that the bundled native libraries always correspond to the
// most preferred 32 or 64 bit ABI.
if (lib64.exists()) {
- pkg.applicationInfo.requiredCpuAbi = Build.SUPPORTED_64_BIT_ABIS[0];
- pkgSetting.requiredCpuAbiString = Build.SUPPORTED_64_BIT_ABIS[0];
+ pkg.applicationInfo.cpuAbi = Build.SUPPORTED_64_BIT_ABIS[0];
+ pkgSetting.cpuAbiString = Build.SUPPORTED_64_BIT_ABIS[0];
} else if (lib.exists()) {
- pkg.applicationInfo.requiredCpuAbi = Build.SUPPORTED_32_BIT_ABIS[0];
- pkgSetting.requiredCpuAbiString = Build.SUPPORTED_32_BIT_ABIS[0];
+ pkg.applicationInfo.cpuAbi = Build.SUPPORTED_32_BIT_ABIS[0];
+ pkgSetting.cpuAbiString = Build.SUPPORTED_32_BIT_ABIS[0];
} else {
// This is the case where the app has no native code.
- pkg.applicationInfo.requiredCpuAbi = null;
- pkgSetting.requiredCpuAbiString = null;
+ pkg.applicationInfo.cpuAbi = null;
+ pkgSetting.cpuAbiString = null;
}
}
diff --git a/services/java/com/android/server/pm/PackageSetting.java b/services/java/com/android/server/pm/PackageSetting.java
index 15df3d22f496..284da99c9f2d 100644
--- a/services/java/com/android/server/pm/PackageSetting.java
+++ b/services/java/com/android/server/pm/PackageSetting.java
@@ -30,8 +30,8 @@ final class PackageSetting extends PackageSettingBase {
SharedUserSetting sharedUser;
PackageSetting(String name, String realName, File codePath, File resourcePath,
- String nativeLibraryPathString, String requiredCpuAbiString, int pVersionCode, int pkgFlags) {
- super(name, realName, codePath, resourcePath, nativeLibraryPathString, requiredCpuAbiString, pVersionCode,
+ String nativeLibraryPathString, String cpuAbiString, int pVersionCode, int pkgFlags) {
+ super(name, realName, codePath, resourcePath, nativeLibraryPathString, cpuAbiString, pVersionCode,
pkgFlags);
}
diff --git a/services/java/com/android/server/pm/PackageSettingBase.java b/services/java/com/android/server/pm/PackageSettingBase.java
index ba95b9a07a9a..44803a57c3e7 100644
--- a/services/java/com/android/server/pm/PackageSettingBase.java
+++ b/services/java/com/android/server/pm/PackageSettingBase.java
@@ -53,7 +53,7 @@ class PackageSettingBase extends GrantedPermissions {
File resourcePath;
String resourcePathString;
String nativeLibraryPathString;
- String requiredCpuAbiString;
+ String cpuAbiString;
long timeStamp;
long firstInstallTime;
long lastUpdateTime;
@@ -81,11 +81,11 @@ class PackageSettingBase extends GrantedPermissions {
/* package name of the app that installed this package */
String installerPackageName;
PackageSettingBase(String name, String realName, File codePath, File resourcePath,
- String nativeLibraryPathString, String requiredCpuAbiString, int pVersionCode, int pkgFlags) {
+ String nativeLibraryPathString, String cpuAbiString, int pVersionCode, int pkgFlags) {
super(pkgFlags);
this.name = name;
this.realName = realName;
- init(codePath, resourcePath, nativeLibraryPathString, requiredCpuAbiString, pVersionCode);
+ init(codePath, resourcePath, nativeLibraryPathString, cpuAbiString, pVersionCode);
}
/**
@@ -102,7 +102,7 @@ class PackageSettingBase extends GrantedPermissions {
resourcePath = base.resourcePath;
resourcePathString = base.resourcePathString;
nativeLibraryPathString = base.nativeLibraryPathString;
- requiredCpuAbiString = base.requiredCpuAbiString;
+ cpuAbiString = base.cpuAbiString;
timeStamp = base.timeStamp;
firstInstallTime = base.firstInstallTime;
lastUpdateTime = base.lastUpdateTime;
@@ -136,7 +136,7 @@ class PackageSettingBase extends GrantedPermissions {
this.resourcePath = resourcePath;
this.resourcePathString = resourcePath.toString();
this.nativeLibraryPathString = nativeLibraryPathString;
- this.requiredCpuAbiString = requiredCpuAbiString;
+ this.cpuAbiString = requiredCpuAbiString;
this.versionCode = pVersionCode;
}
@@ -167,7 +167,7 @@ class PackageSettingBase extends GrantedPermissions {
grantedPermissions = base.grantedPermissions;
gids = base.gids;
- requiredCpuAbiString = base.requiredCpuAbiString;
+ cpuAbiString = base.cpuAbiString;
timeStamp = base.timeStamp;
firstInstallTime = base.firstInstallTime;
lastUpdateTime = base.lastUpdateTime;
diff --git a/services/java/com/android/server/pm/Settings.java b/services/java/com/android/server/pm/Settings.java
index dad30e4365f8..14f38fbc81c2 100644
--- a/services/java/com/android/server/pm/Settings.java
+++ b/services/java/com/android/server/pm/Settings.java
@@ -214,10 +214,10 @@ final class Settings {
PackageSetting getPackageLPw(PackageParser.Package pkg, PackageSetting origPackage,
String realName, SharedUserSetting sharedUser, File codePath, File resourcePath,
- String nativeLibraryPathString, String requiredCpuAbiString, int pkgFlags, UserHandle user, boolean add) {
+ String nativeLibraryPathString, String cpuAbiString, int pkgFlags, UserHandle user, boolean add) {
final String name = pkg.packageName;
PackageSetting p = getPackageLPw(name, origPackage, realName, sharedUser, codePath,
- resourcePath, nativeLibraryPathString, requiredCpuAbiString, pkg.mVersionCode, pkgFlags,
+ resourcePath, nativeLibraryPathString, cpuAbiString, pkg.mVersionCode, pkgFlags,
user, add, true /* allowInstall */);
return p;
}
@@ -304,7 +304,7 @@ final class Settings {
p.pkg.applicationInfo.flags &= ~ApplicationInfo.FLAG_UPDATED_SYSTEM_APP;
}
PackageSetting ret = addPackageLPw(name, p.realName, p.codePath, p.resourcePath,
- p.nativeLibraryPathString, p.requiredCpuAbiString, p.appId, p.versionCode, p.pkgFlags);
+ p.nativeLibraryPathString, p.cpuAbiString, p.appId, p.versionCode, p.pkgFlags);
mDisabledSysPackages.remove(name);
return ret;
}
@@ -318,7 +318,7 @@ final class Settings {
}
PackageSetting addPackageLPw(String name, String realName, File codePath, File resourcePath,
- String nativeLibraryPathString, String requiredCpuAbiString, int uid, int vc, int pkgFlags) {
+ String nativeLibraryPathString, String cpuAbiString, int uid, int vc, int pkgFlags) {
PackageSetting p = mPackages.get(name);
if (p != null) {
if (p.appId == uid) {
@@ -328,7 +328,7 @@ final class Settings {
"Adding duplicate package, keeping first: " + name);
return null;
}
- p = new PackageSetting(name, realName, codePath, resourcePath, nativeLibraryPathString, requiredCpuAbiString,
+ p = new PackageSetting(name, realName, codePath, resourcePath, nativeLibraryPathString, cpuAbiString,
vc, pkgFlags);
p.appId = uid;
if (addUserIdLPw(uid, p, name)) {
@@ -397,11 +397,11 @@ final class Settings {
private PackageSetting getPackageLPw(String name, PackageSetting origPackage,
String realName, SharedUserSetting sharedUser, File codePath, File resourcePath,
- String nativeLibraryPathString, String requiredCpuAbiString, int vc, int pkgFlags,
+ String nativeLibraryPathString, String cpuAbiString, int vc, int pkgFlags,
UserHandle installUser, boolean add, boolean allowInstall) {
PackageSetting p = mPackages.get(name);
if (p != null) {
- p.requiredCpuAbiString = requiredCpuAbiString;
+ p.cpuAbiString = cpuAbiString;
if (!p.codePath.equals(codePath)) {
// Check to see if its a disabled system app
if ((p.pkgFlags & ApplicationInfo.FLAG_SYSTEM) != 0) {
@@ -445,7 +445,7 @@ final class Settings {
if (origPackage != null) {
// We are consuming the data from an existing package.
p = new PackageSetting(origPackage.name, name, codePath, resourcePath,
- nativeLibraryPathString, requiredCpuAbiString, vc, pkgFlags);
+ nativeLibraryPathString, cpuAbiString, vc, pkgFlags);
if (PackageManagerService.DEBUG_UPGRADE) Log.v(PackageManagerService.TAG, "Package "
+ name + " is adopting original package " + origPackage.name);
// Note that we will retain the new package's signature so
@@ -462,7 +462,7 @@ final class Settings {
p.setTimeStamp(codePath.lastModified());
} else {
p = new PackageSetting(name, realName, codePath, resourcePath,
- nativeLibraryPathString, requiredCpuAbiString, vc, pkgFlags);
+ nativeLibraryPathString, cpuAbiString, vc, pkgFlags);
p.setTimeStamp(codePath.lastModified());
p.sharedUser = sharedUser;
// If this is not a system app, it starts out stopped.
@@ -589,7 +589,7 @@ final class Settings {
p.nativeLibraryPathString = nativeLibraryPath;
}
// Update the required Cpu Abi
- p.requiredCpuAbiString = pkg.applicationInfo.requiredCpuAbi;
+ p.cpuAbiString = pkg.applicationInfo.cpuAbi;
// Update version code if needed
if (pkg.mVersionCode != p.versionCode) {
p.versionCode = pkg.mVersionCode;
@@ -1507,8 +1507,8 @@ final class Settings {
if (pkg.nativeLibraryPathString != null) {
serializer.attribute(null, "nativeLibraryPath", pkg.nativeLibraryPathString);
}
- if (pkg.requiredCpuAbiString != null) {
- serializer.attribute(null, "requiredCpuAbi", pkg.requiredCpuAbiString);
+ if (pkg.cpuAbiString != null) {
+ serializer.attribute(null, "requiredCpuAbi", pkg.cpuAbiString);
}
if (pkg.sharedUser == null) {
serializer.attribute(null, "userId", Integer.toString(pkg.appId));
@@ -1552,8 +1552,8 @@ final class Settings {
if (pkg.nativeLibraryPathString != null) {
serializer.attribute(null, "nativeLibraryPath", pkg.nativeLibraryPathString);
}
- if (pkg.requiredCpuAbiString != null) {
- serializer.attribute(null, "requiredCpuAbi", pkg.requiredCpuAbiString);
+ if (pkg.cpuAbiString != null) {
+ serializer.attribute(null, "requiredCpuAbi", pkg.cpuAbiString);
}
serializer.attribute(null, "flags", Integer.toString(pkg.pkgFlags));
serializer.attribute(null, "ft", Long.toHexString(pkg.timeStamp));
@@ -1819,7 +1819,7 @@ final class Settings {
if (idObj != null && idObj instanceof SharedUserSetting) {
PackageSetting p = getPackageLPw(pp.name, null, pp.realName,
(SharedUserSetting) idObj, pp.codePath, pp.resourcePath,
- pp.nativeLibraryPathString, pp.requiredCpuAbiString, pp.versionCode, pp.pkgFlags,
+ pp.nativeLibraryPathString, pp.cpuAbiString, pp.versionCode, pp.pkgFlags,
null, true /* add */, false /* allowInstall */);
if (p == null) {
PackageManagerService.reportSettingsProblem(Log.WARN,
@@ -2239,7 +2239,7 @@ final class Settings {
String codePathStr = parser.getAttributeValue(null, "codePath");
String resourcePathStr = parser.getAttributeValue(null, "resourcePath");
String nativeLibraryPathStr = parser.getAttributeValue(null, "nativeLibraryPath");
- String requiredCpuAbiString = parser.getAttributeValue(null, "requiredCpuAbi");
+ String cpuAbiString = parser.getAttributeValue(null, "requiredCpuAbi");
if (resourcePathStr == null) {
resourcePathStr = codePathStr;
@@ -2260,7 +2260,7 @@ final class Settings {
pkgFlags |= ApplicationInfo.FLAG_PRIVILEGED;
}
PackageSetting ps = new PackageSetting(name, realName, codePathFile,
- new File(resourcePathStr), nativeLibraryPathStr, requiredCpuAbiString, versionCode, pkgFlags);
+ new File(resourcePathStr), nativeLibraryPathStr, cpuAbiString, versionCode, pkgFlags);
String timeStampStr = parser.getAttributeValue(null, "ft");
if (timeStampStr != null) {
try {
@@ -2327,7 +2327,7 @@ final class Settings {
String codePathStr = null;
String resourcePathStr = null;
String nativeLibraryPathStr = null;
- String requiredCpuAbiString = null;
+ String cpuAbiString = null;
String systemStr = null;
String installerPackageName = null;
String uidError = null;
@@ -2347,7 +2347,7 @@ final class Settings {
codePathStr = parser.getAttributeValue(null, "codePath");
resourcePathStr = parser.getAttributeValue(null, "resourcePath");
nativeLibraryPathStr = parser.getAttributeValue(null, "nativeLibraryPath");
- requiredCpuAbiString = parser.getAttributeValue(null, "requiredCpuAbi");
+ cpuAbiString = parser.getAttributeValue(null, "requiredCpuAbi");
version = parser.getAttributeValue(null, "version");
if (version != null) {
@@ -2425,7 +2425,7 @@ final class Settings {
+ parser.getPositionDescription());
} else if (userId > 0) {
packageSetting = addPackageLPw(name.intern(), realName, new File(codePathStr),
- new File(resourcePathStr), nativeLibraryPathStr, requiredCpuAbiString, userId, versionCode,
+ new File(resourcePathStr), nativeLibraryPathStr, cpuAbiString, userId, versionCode,
pkgFlags);
if (PackageManagerService.DEBUG_SETTINGS)
Log.i(PackageManagerService.TAG, "Reading package " + name + ": userId="
@@ -2443,7 +2443,7 @@ final class Settings {
userId = sharedIdStr != null ? Integer.parseInt(sharedIdStr) : 0;
if (userId > 0) {
packageSetting = new PendingPackage(name.intern(), realName, new File(
- codePathStr), new File(resourcePathStr), nativeLibraryPathStr, requiredCpuAbiString, userId,
+ codePathStr), new File(resourcePathStr), nativeLibraryPathStr, cpuAbiString, userId,
versionCode, pkgFlags);
packageSetting.setTimeStamp(timeStamp);
packageSetting.firstInstallTime = firstInstallTime;
@@ -2472,7 +2472,7 @@ final class Settings {
packageSetting.uidError = "true".equals(uidError);
packageSetting.installerPackageName = installerPackageName;
packageSetting.nativeLibraryPathString = nativeLibraryPathStr;
- packageSetting.requiredCpuAbiString = requiredCpuAbiString;
+ packageSetting.cpuAbiString = cpuAbiString;
// Handle legacy string here for single-user mode
final String enabledStr = parser.getAttributeValue(null, ATTR_ENABLED);
if (enabledStr != null) {
@@ -2936,7 +2936,7 @@ final class Settings {
pw.print(prefix); pw.print(" codePath="); pw.println(ps.codePathString);
pw.print(prefix); pw.print(" resourcePath="); pw.println(ps.resourcePathString);
pw.print(prefix); pw.print(" nativeLibraryPath="); pw.println(ps.nativeLibraryPathString);
- pw.print(prefix); pw.print(" requiredCpuAbi="); pw.println(ps.requiredCpuAbiString);
+ pw.print(prefix); pw.print(" requiredCpuAbi="); pw.println(ps.cpuAbiString);
pw.print(prefix); pw.print(" versionCode="); pw.print(ps.versionCode);
if (ps.pkg != null) {
pw.print(" targetSdk="); pw.print(ps.pkg.applicationInfo.targetSdkVersion);