diff options
53 files changed, 234 insertions, 209 deletions
diff --git a/core/java/android/app/Fragment.java b/core/java/android/app/Fragment.java index d626e5f..4db07bb8 100644 --- a/core/java/android/app/Fragment.java +++ b/core/java/android/app/Fragment.java @@ -212,8 +212,8 @@ final class FragmentState implements Parcelable { * state of its view hierarchy has been restored. * <li> {@link #onStart} makes the fragment visible to the user (based on its * containing activity being started). - * <li> {@link #onResume} makes the fragment interacting with the user (based on its - * containing activity being resumed). + * <li> {@link #onResume} makes the fragment begin interacting with the user + * (based on its containing activity being resumed). * </ol> * * <p>As a fragment is no longer being used, it goes through a reverse @@ -543,7 +543,7 @@ public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListene * and later retrieved by the Fragment with {@link #getArguments}. * * <p>Applications should generally not implement a constructor. The - * first place application code an run where the fragment is ready to + * first place application code can run where the fragment is ready to * be used is in {@link #onAttach(Activity)}, the point where the fragment * is actually associated with its activity. Some applications may also * want to implement {@link #onInflate} to retrieve attributes from a @@ -699,8 +699,7 @@ public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListene } /** - * Return the arguments supplied when the fragment was instantiated, - * if any. + * Return the arguments supplied to {@link #setArguments}, if any. */ final public Bundle getArguments() { return mArguments; diff --git a/core/java/android/app/FragmentManager.java b/core/java/android/app/FragmentManager.java index bf2a629..54f6d0a 100644 --- a/core/java/android/app/FragmentManager.java +++ b/core/java/android/app/FragmentManager.java @@ -67,7 +67,7 @@ public abstract class FragmentManager { * with {@link FragmentTransaction#addToBackStack(String) * FragmentTransaction.addToBackStack()}. Entries can later be * retrieved with {@link FragmentManager#getBackStackEntryAt(int) - * FragmentManager.getBackStackEntry()}. + * FragmentManager.getBackStackEntryAt()}. * * <p>Note that you should never hold on to a BackStackEntry object; * the identifier as returned by {@link #getId} is the only thing that @@ -257,7 +257,7 @@ public abstract class FragmentManager { /** * Return the BackStackEntry at index <var>index</var> in the back stack; - * entries start index 0 being the bottom of the stack. + * where the item on the bottom of the stack has index 0. */ public abstract BackStackEntry getBackStackEntryAt(int index); diff --git a/core/java/android/app/FragmentTransaction.java b/core/java/android/app/FragmentTransaction.java index 652ad23..a278d83 100644 --- a/core/java/android/app/FragmentTransaction.java +++ b/core/java/android/app/FragmentTransaction.java @@ -23,7 +23,7 @@ public abstract class FragmentTransaction { /** * Add a fragment to the activity state. This fragment may optionally * also have its view (if {@link Fragment#onCreateView Fragment.onCreateView} - * returns non-null) into a container view of the activity. + * returns non-null) inserted into a container view of the activity. * * @param containerViewId Optional identifier of the container this fragment is * to be placed in. If 0, it will not be placed in a container. diff --git a/core/java/android/net/LocalSocket.java b/core/java/android/net/LocalSocket.java index 31bc20b..a374a86 100644 --- a/core/java/android/net/LocalSocket.java +++ b/core/java/android/net/LocalSocket.java @@ -29,7 +29,7 @@ import java.net.SocketOptions; */ public class LocalSocket implements Closeable { - private LocalSocketImpl impl; + private final LocalSocketImpl impl; private volatile boolean implCreated; private LocalSocketAddress localAddress; private boolean isBound; diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java index a23ecd7..71f7a16 100644 --- a/core/java/android/os/Build.java +++ b/core/java/android/os/Build.java @@ -477,7 +477,8 @@ public class Build { * <p>Applications targeting this or a later release will get these * new changes in behavior:</p> * <ul> - * <li> The default result of {android.preference.PreferenceActivity#isValidFragment + * <li> The default result of + * {@link android.preference.PreferenceActivity#isValidFragment(String) * PreferenceActivity.isValueFragment} becomes false instead of true.</li> * <li> In {@link android.webkit.WebView}, apps targeting earlier versions will have * JS URLs evaluated directly and any result of the evaluation will not replace diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java index 5b9b5b0..7bedfc1 100644 --- a/core/java/android/os/Process.java +++ b/core/java/android/os/Process.java @@ -456,6 +456,7 @@ public class Process { * @param targetSdkVersion The target SDK version for the app. * @param seInfo null-ok SELinux information for the new process. * @param abi non-null the ABI this app should be started with. + * @param instructionSet null-ok the instruction set to use. * @param zygoteArgs Additional arguments to supply to the zygote process. * * @return An object that describes the result of the attempt to start the process. @@ -470,11 +471,12 @@ public class Process { int targetSdkVersion, String seInfo, String abi, + String instructionSet, String[] zygoteArgs) { try { return startViaZygote(processClass, niceName, uid, gid, gids, debugFlags, mountExternal, targetSdkVersion, seInfo, - abi, zygoteArgs); + abi, instructionSet, zygoteArgs); } catch (ZygoteStartFailedEx ex) { Log.e(LOG_TAG, "Starting VM process through Zygote failed"); @@ -577,6 +579,7 @@ public class Process { * @param targetSdkVersion The target SDK version for the app. * @param seInfo null-ok SELinux information for the new process. * @param abi the ABI the process should use. + * @param instructionSet null-ok the instruction set to use. * @param extraArgs Additional arguments to supply to the zygote process. * @return An object that describes the result of the attempt to start the process. * @throws ZygoteStartFailedEx if process start failed for any reason @@ -589,6 +592,7 @@ public class Process { int targetSdkVersion, String seInfo, String abi, + String instructionSet, String[] extraArgs) throws ZygoteStartFailedEx { synchronized(Process.class) { @@ -648,6 +652,10 @@ public class Process { argsForZygote.add("--seinfo=" + seInfo); } + if (instructionSet != null) { + argsForZygote.add("--instruction-set=" + instructionSet); + } + argsForZygote.add(processClass); if (extraArgs != null) { diff --git a/core/java/android/provider/DocumentsProvider.java b/core/java/android/provider/DocumentsProvider.java index 49816f8..8667c88 100644 --- a/core/java/android/provider/DocumentsProvider.java +++ b/core/java/android/provider/DocumentsProvider.java @@ -291,7 +291,7 @@ public abstract class DocumentsProvider extends ContentProvider { } /** - * Return documents that that match the given query under the requested + * Return documents that match the given query under the requested * root. The returned documents should be sorted by relevance in descending * order. How documents are matched against the query string is an * implementation detail left to each provider, but it's suggested that at diff --git a/core/java/android/text/Html.java b/core/java/android/text/Html.java index f839d52..0e39118 100644 --- a/core/java/android/text/Html.java +++ b/core/java/android/text/Html.java @@ -64,7 +64,7 @@ public class Html { */ public static interface ImageGetter { /** - * This methos is called when the HTML parser encounters an + * This method is called when the HTML parser encounters an * <img> tag. The <code>source</code> argument is the * string from the "src" attribute; the return value should be * a Drawable representation of the image or <code>null</code> diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index 9414237..72a5f47 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -5853,8 +5853,8 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager /** * Information about how wide the view wants to be. Can be one of the - * constants FILL_PARENT (replaced by MATCH_PARENT , - * in API Level 8) or WRAP_CONTENT. or an exact size. + * constants FILL_PARENT (replaced by MATCH_PARENT + * in API Level 8) or WRAP_CONTENT, or an exact size. */ @ViewDebug.ExportedProperty(category = "layout", mapping = { @ViewDebug.IntToString(from = MATCH_PARENT, to = "MATCH_PARENT"), @@ -5864,8 +5864,8 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager /** * Information about how tall the view wants to be. Can be one of the - * constants FILL_PARENT (replaced by MATCH_PARENT , - * in API Level 8) or WRAP_CONTENT. or an exact size. + * constants FILL_PARENT (replaced by MATCH_PARENT + * in API Level 8) or WRAP_CONTENT, or an exact size. */ @ViewDebug.ExportedProperty(category = "layout", mapping = { @ViewDebug.IntToString(from = MATCH_PARENT, to = "MATCH_PARENT"), diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index d53bb74..6a58301 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -2021,7 +2021,7 @@ public class WebView extends AbsoluteLayout /** * In addition to the FindListener that the user may set via the WebView.setFindListener * API, FindActionModeCallback will register it's own FindListener. We keep them separate - * via this class so that that the two FindListeners can potentially exist at once. + * via this class so that the two FindListeners can potentially exist at once. */ private class FindListenerDistributor implements FindListener { private FindListener mFindDialogFindListener; diff --git a/core/java/com/android/internal/os/Zygote.java b/core/java/com/android/internal/os/Zygote.java index 54c532a..f23326c 100644 --- a/core/java/com/android/internal/os/Zygote.java +++ b/core/java/com/android/internal/os/Zygote.java @@ -75,21 +75,25 @@ public final class Zygote { * file descriptor numbers that are to be closed by the child * (and replaced by /dev/null) after forking. An integer value * of -1 in any entry in the array means "ignore this one". + * @param instructionSet null-ok the instruction set to use. * * @return 0 if this is the child, pid of the child * if this is the parent, or -1 on error. */ public static int forkAndSpecialize(int uid, int gid, int[] gids, int debugFlags, - int[][] rlimits, int mountExternal, String seInfo, String niceName, int[] fdsToClose) { + int[][] rlimits, int mountExternal, String seInfo, String niceName, int[] fdsToClose, + String instructionSet) { VM_HOOKS.preFork(); int pid = nativeForkAndSpecialize( - uid, gid, gids, debugFlags, rlimits, mountExternal, seInfo, niceName, fdsToClose); + uid, gid, gids, debugFlags, rlimits, mountExternal, seInfo, niceName, fdsToClose, + instructionSet); VM_HOOKS.postForkCommon(); return pid; } native private static int nativeForkAndSpecialize(int uid, int gid, int[] gids,int debugFlags, - int[][] rlimits, int mountExternal, String seInfo, String niceName, int[] fdsToClose); + int[][] rlimits, int mountExternal, String seInfo, String niceName, int[] fdsToClose, + String instructionSet); /** * Special method to start the system server process. In addition to the @@ -126,8 +130,8 @@ public final class Zygote { native private static int nativeForkSystemServer(int uid, int gid, int[] gids, int debugFlags, int[][] rlimits, long permittedCapabilities, long effectiveCapabilities); - private static void callPostForkChildHooks(int debugFlags) { - VM_HOOKS.postForkChild(debugFlags); + private static void callPostForkChildHooks(int debugFlags, String instructionSet) { + VM_HOOKS.postForkChild(debugFlags, instructionSet); } diff --git a/core/java/com/android/internal/os/ZygoteConnection.java b/core/java/com/android/internal/os/ZygoteConnection.java index 0c48368..6c1901b 100644 --- a/core/java/com/android/internal/os/ZygoteConnection.java +++ b/core/java/com/android/internal/os/ZygoteConnection.java @@ -222,7 +222,7 @@ class ZygoteConnection { pid = Zygote.forkAndSpecialize(parsedArgs.uid, parsedArgs.gid, parsedArgs.gids, parsedArgs.debugFlags, rlimits, parsedArgs.mountExternal, parsedArgs.seInfo, - parsedArgs.niceName, fdsToClose); + parsedArgs.niceName, fdsToClose, parsedArgs.instructionSet); } catch (IOException ex) { logAndPrintError(newStderr, "Exception creating pipe", ex); } catch (ErrnoException ex) { @@ -311,6 +311,7 @@ class ZygoteConnection { * [--] <args for RuntimeInit > * <li> If <code>--runtime-init</code> is absent: * [--] <classname> [args...] + * <li> --instruction-set=<i>instruction-set-string</i> which instruction set to use/emulate. * </ul> */ static class Arguments { @@ -374,6 +375,11 @@ class ZygoteConnection { boolean abiListQuery; /** + * The instruction set to use, or null when not important. + */ + String instructionSet; + + /** * Constructs instance and parses args * @param args zygote command-line args * @throws IllegalArgumentException @@ -528,6 +534,8 @@ class ZygoteConnection { mountExternal = Zygote.MOUNT_EXTERNAL_MULTIUSER_ALL; } else if (arg.equals("--query-abi-list")) { abiListQuery = true; + } else if (arg.startsWith("--instruction-set=")) { + instructionSet = arg.substring(arg.indexOf('=') + 1); } else { break; } diff --git a/core/jni/Android.mk b/core/jni/Android.mk index b5e068d..d19bcae 100644 --- a/core/jni/Android.mk +++ b/core/jni/Android.mk @@ -1,5 +1,6 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) +LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_CFLAGS += -DHAVE_CONFIG_H -DKHTML_NO_EXCEPTIONS -DGKWQ_NO_JAVA LOCAL_CFLAGS += -DNO_SUPPORT_JS_BINDING -DQT_NO_WHEELEVENT -DKHTML_NO_XBL @@ -218,9 +219,10 @@ endif LOCAL_SHARED_LIBRARIES += \ libdl + # we need to access the private Bionic header # <bionic_tls.h> in com_google_android_gles_jni_GLImpl.cpp -LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../../../bionic/libc/private +LOCAL_C_INCLUDES += bionic/libc/private ifeq ($(WITH_MALLOC_LEAK_CHECK),true) LOCAL_CFLAGS += -DMALLOC_LEAK_CHECK diff --git a/core/jni/android/graphics/TextLayoutCache.cpp b/core/jni/android/graphics/TextLayoutCache.cpp index 5db083a..d37bc32 100644 --- a/core/jni/android/graphics/TextLayoutCache.cpp +++ b/core/jni/android/graphics/TextLayoutCache.cpp @@ -499,7 +499,7 @@ void TextLayoutShaper::computeValues(const SkPaint* paint, const UChar* chars, #define HB_InvalidCodePoint ~0u hb_codepoint_t -utf16_to_code_point(const uint16_t *chars, size_t len, ssize_t *iter) { +utf16_to_code_point(const char16_t *chars, size_t len, ssize_t *iter) { const uint16_t v = chars[(*iter)++]; if (HB_IsHighSurrogate(v)) { // surrogate pair @@ -526,7 +526,7 @@ utf16_to_code_point(const uint16_t *chars, size_t len, ssize_t *iter) { } hb_codepoint_t -utf16_to_code_point_prev(const uint16_t *chars, size_t len, ssize_t *iter) { +utf16_to_code_point_prev(const char16_t *chars, size_t len, ssize_t *iter) { const uint16_t v = chars[(*iter)--]; if (HB_IsLowSurrogate(v)) { // surrogate pair @@ -567,7 +567,7 @@ hb_script_t code_point_to_script(hb_codepoint_t codepoint) { } bool -hb_utf16_script_run_next(ScriptRun* run, const uint16_t *chars, size_t len, ssize_t *iter) { +hb_utf16_script_run_next(ScriptRun* run, const char16_t *chars, size_t len, ssize_t *iter) { if (size_t(*iter) == len) return false; @@ -610,7 +610,7 @@ hb_utf16_script_run_next(ScriptRun* run, const uint16_t *chars, size_t len, ssiz } bool -hb_utf16_script_run_prev(ScriptRun* run, const uint16_t *chars, size_t len, ssize_t *iter) { +hb_utf16_script_run_prev(ScriptRun* run, const char16_t *chars, size_t len, ssize_t *iter) { if (*iter == -1) return false; diff --git a/core/jni/android_ddm_DdmHandleNativeHeap.cpp b/core/jni/android_ddm_DdmHandleNativeHeap.cpp index f5eaf94..9b96320 100644 --- a/core/jni/android_ddm_DdmHandleNativeHeap.cpp +++ b/core/jni/android_ddm_DdmHandleNativeHeap.cpp @@ -35,7 +35,15 @@ extern "C" void get_malloc_leak_info(uint8_t** info, size_t* overallSize, extern "C" void free_malloc_leak_info(uint8_t* info); +#define DDMS_HEADER_SIGNATURE 0x812345dd +#define DDMS_VERSION 2 + struct Header { +#if defined(__LP64__) + uint32_t signature; + uint16_t version; + uint16_t pointerSize; +#endif size_t mapSize; size_t allocSize; size_t allocInfoSize; @@ -77,6 +85,12 @@ static jbyteArray DdmHandleNativeHeap_getLeakInfo(JNIEnv* env, jobject) { ALOGD("*** mapSize: %d allocSize: %d allocInfoSize: %d totalMemory: %d", header.mapSize, header.allocSize, header.allocInfoSize, header.totalMemory); +#if defined(__LP64__) + header.signature = DDMS_HEADER_SIGNATURE; + header.version = DDMS_VERSION; + header.pointerSize = sizeof(void*); +#endif + jbyteArray array = env->NewByteArray(sizeof(Header) + header.mapSize + header.allocSize); if (array != NULL) { env->SetByteArrayRegion(array, 0, diff --git a/core/jni/com_android_internal_net_NetworkStatsFactory.cpp b/core/jni/com_android_internal_net_NetworkStatsFactory.cpp index 0b9ad9b..a42b4df 100644 --- a/core/jni/com_android_internal_net_NetworkStatsFactory.cpp +++ b/core/jni/com_android_internal_net_NetworkStatsFactory.cpp @@ -17,6 +17,7 @@ #define LOG_TAG "NetworkStats" #include <errno.h> +#include <inttypes.h> #include <sys/stat.h> #include <sys/types.h> @@ -79,7 +80,7 @@ static int readNetworkStatsDetail(JNIEnv* env, jclass clazz, jobject stats, while (fgets(buffer, sizeof(buffer), fp) != NULL) { stats_line s; int64_t rawTag; - if (sscanf(buffer, "%d %31s 0x%llx %u %u %llu %llu %llu %llu", &s.idx, + if (sscanf(buffer, "%d %31s 0x%llx %u %u %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64, &s.idx, s.iface, &rawTag, &s.uid, &s.set, &s.rxBytes, &s.rxPackets, &s.txBytes, &s.txPackets) == 9) { if (s.idx != lastIdx + 1) { diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp index 0cdddba..bfbeca1 100644 --- a/core/jni/com_android_internal_os_Zygote.cpp +++ b/core/jni/com_android_internal_os_Zygote.cpp @@ -402,7 +402,8 @@ static pid_t ForkAndSpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArra jlong permittedCapabilities, jlong effectiveCapabilities, jint mount_external, jstring java_se_info, jstring java_se_name, - bool is_system_server, jintArray fdsToClose) { + bool is_system_server, jintArray fdsToClose, + jstring instructionSet) { SetSigChldHandler(); pid_t pid = fork(); @@ -505,7 +506,8 @@ static pid_t ForkAndSpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArra UnsetSigChldHandler(); - env->CallStaticVoidMethod(gZygoteClass, gCallPostForkChildHooks, debug_flags); + env->CallStaticVoidMethod(gZygoteClass, gCallPostForkChildHooks, debug_flags, + is_system_server ? NULL : instructionSet); if (env->ExceptionCheck()) { ALOGE("Error calling post fork hooks."); RuntimeAbort(env); @@ -523,9 +525,9 @@ static jint com_android_internal_os_Zygote_nativeForkAndSpecialize( JNIEnv* env, jclass, jint uid, jint gid, jintArray gids, jint debug_flags, jobjectArray rlimits, jint mount_external, jstring se_info, jstring se_name, - jintArray fdsToClose) { + jintArray fdsToClose, jstring instructionSet) { return ForkAndSpecializeCommon(env, uid, gid, gids, debug_flags, - rlimits, 0, 0, mount_external, se_info, se_name, false, fdsToClose); + rlimits, 0, 0, mount_external, se_info, se_name, false, fdsToClose, instructionSet); } static jint com_android_internal_os_Zygote_nativeForkSystemServer( @@ -535,7 +537,7 @@ static jint com_android_internal_os_Zygote_nativeForkSystemServer( pid_t pid = ForkAndSpecializeCommon(env, uid, gid, gids, debug_flags, rlimits, permittedCapabilities, effectiveCapabilities, - MOUNT_EXTERNAL_NONE, NULL, NULL, true, NULL); + MOUNT_EXTERNAL_NONE, NULL, NULL, true, NULL, NULL); if (pid > 0) { // The zygote process checks whether the child process has died or not. ALOGI("System server process %d has been created", pid); @@ -553,7 +555,8 @@ static jint com_android_internal_os_Zygote_nativeForkSystemServer( } static JNINativeMethod gMethods[] = { - { "nativeForkAndSpecialize", "(II[II[[IILjava/lang/String;Ljava/lang/String;[I)I", + { "nativeForkAndSpecialize", + "(II[II[[IILjava/lang/String;Ljava/lang/String;[ILjava/lang/String;)I", (void *) com_android_internal_os_Zygote_nativeForkAndSpecialize }, { "nativeForkSystemServer", "(II[II[[IJJ)I", (void *) com_android_internal_os_Zygote_nativeForkSystemServer } @@ -564,7 +567,8 @@ int register_com_android_internal_os_Zygote(JNIEnv* env) { if (gZygoteClass == NULL) { RuntimeAbort(env); } - gCallPostForkChildHooks = env->GetStaticMethodID(gZygoteClass, "callPostForkChildHooks", "(I)V"); + gCallPostForkChildHooks = env->GetStaticMethodID(gZygoteClass, "callPostForkChildHooks", + "(ILjava/lang/String;)V"); return AndroidRuntime::registerNativeMethods(env, "com/android/internal/os/Zygote", gMethods, NELEM(gMethods)); diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 8ec2d64..bff26d13 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -1046,7 +1046,7 @@ <!-- =========================================== --> <eat-comment /> - <!-- Used for permissions that are associated with accessing and modifyign + <!-- Used for permissions that are associated with accessing and modifying telephony state: placing calls, intercepting outgoing calls, reading and modifying the phone state. --> <permission-group android:name="android.permission-group.PHONE_CALLS" diff --git a/docs/html/guide/appendix/glossary.jd b/docs/html/guide/appendix/glossary.jd index af60eb7..db518f9 100644 --- a/docs/html/guide/appendix/glossary.jd +++ b/docs/html/guide/appendix/glossary.jd @@ -94,7 +94,7 @@ excludeFromSuggestions=true Plugin, DDMS is integrated into your development environment. See <a href="{@docRoot}tools/debugging/ddms.html">Using DDMS</a> to learn more about the program.</dd> - <dt id="dialog">Dialog</dt> <dd> A floating window that that acts as a lightweight + <dt id="dialog">Dialog</dt> <dd> A floating window that acts as a lightweight form. A dialog can have button controls only and is intended to perform a simple action (such as button choice) and perhaps return a value. A dialog is not intended to persist in the history stack, contain complex layout, diff --git a/docs/html/guide/faq/commontasks.jd b/docs/html/guide/faq/commontasks.jd index 086721f..2943aef 100644 --- a/docs/html/guide/faq/commontasks.jd +++ b/docs/html/guide/faq/commontasks.jd @@ -653,7 +653,7 @@ and the {@link android.os.Handler} documentation.</p> <p>You can highlight or style the formatting of strings or substrings of text in a TextView object. There are two ways to do this:</p> <ul> - <li>If you use a <a href="{@docRoot}guide/topics/resources/available-resources.html#stringresources">string resource</a>, + <li>If you use a <a href="{@docRoot}guide/topics/resources/string-resource.html">string resource</a>, you can add some simple styling, such as bold or italic using HTML notation. The currently supported tags are: <code>B</code> (bold), <code>I</code> (italic), <code>U</code> (underline), @@ -661,8 +661,8 @@ and the {@link android.os.Handler} documentation.</p> <code>SUP</code> (superscript), <code>SUB</code> (subscript), and <code>STRIKE</code> (strikethrough). So, for example, in res/values/strings.xml you could declare this:<br /> - <code><resource><br /> - <string id="@+id/styled_welcome_message">We + <code><resources><br /> + <string name="styled_welcome_message">We are <b><i>so</i></b> glad to see you.</string><br /> </resources></code></li> <li>To style text on the fly, or to add highlighting or more complex styling, diff --git a/docs/html/guide/topics/graphics/2d-graphics.jd b/docs/html/guide/topics/graphics/2d-graphics.jd index d842cb9..8c7a4d8 100644 --- a/docs/html/guide/topics/graphics/2d-graphics.jd +++ b/docs/html/guide/topics/graphics/2d-graphics.jd @@ -228,9 +228,9 @@ graphics such as those used in a game.</p> <p>The following code snippet demonstrates how to build an {@link android.widget.ImageView} that uses an image from drawable resources and add it to the layout.</p> <pre> - LinearLayout mLinearLayout; +LinearLayout mLinearLayout; - protected void onCreate(Bundle savedInstanceState) { +protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Create a LinearLayout in which to add the ImageView @@ -241,20 +241,20 @@ graphics such as those used in a game.</p> i.setImageResource(R.drawable.my_image); i.setAdjustViewBounds(true); // set the ImageView bounds to match the Drawable's dimensions i.setLayoutParams(new Gallery.LayoutParams(LayoutParams.WRAP_CONTENT, - LayoutParams.WRAP_CONTENT)); + LayoutParams.WRAP_CONTENT)); // Add the ImageView to the layout and set the layout as the content view mLinearLayout.addView(i); setContentView(mLinearLayout); - } +} </pre> <p>In other cases, you may want to handle your image resource as a {@link android.graphics.drawable.Drawable} object. To do so, create a Drawable from the resource like so: <pre> - Resources res = mContext.getResources(); - Drawable myImage = res.getDrawable(R.drawable.my_image); - </pre> +Resources res = mContext.getResources(); +Drawable myImage = res.getDrawable(R.drawable.my_image); +</pre> <p class="warning"><strong>Note:</strong> Each unique resource in your project can maintain only one state, no matter how many different objects you may instantiate for it. For example, if you @@ -269,12 +269,12 @@ animation</a>.</p> <p>The XML snippet below shows how to add a resource Drawable to an {@link android.widget.ImageView} in the XML layout (with some red tint just for fun). <pre> - <ImageView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:tint="#55ff0000" - android:src="@drawable/my_image"/> - </pre> +<ImageView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:tint="#55ff0000" + android:src="@drawable/my_image"/> +</pre> <p>For more information on using project resources, read about <a href="{@docRoot}guide/topics/resources/index.html">Resources and Assets</a>.</p> @@ -305,22 +305,22 @@ specific XML attributes that help define the object <h4 id="drawable-xml-example">Example</h4> <p>Here's some XML that defines a TransitionDrawable:</p> <pre> - <transition xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:drawable="@drawable/image_expand"> - <item android:drawable="@drawable/image_collapse"> - </transition> - </pre> +<transition xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:drawable="@drawable/image_expand"> + <item android:drawable="@drawable/image_collapse"> +</transition> +</pre> <p>With this XML saved in the file <code>res/drawable/expand_collapse.xml</code>, the following code will instantiate the TransitionDrawable and set it as the content of an ImageView:</p> <pre> - Resources res = mContext.getResources(); - TransitionDrawable transition = (TransitionDrawable) -res.getDrawable(R.drawable.expand_collapse); - ImageView image = (ImageView) findViewById(R.id.toggle_image); - image.setImageDrawable(transition); - </pre> +Resources res = mContext.getResources(); +TransitionDrawable transition = (TransitionDrawable) + res.getDrawable(R.drawable.expand_collapse); +ImageView image = (ImageView) findViewById(R.id.toggle_image); +image.setImageDrawable(transition); +</pre> <p>Then this transition can be run forward (for 1 second) with:</p> <pre>transition.startTransition(1000);</pre> @@ -337,7 +337,7 @@ supported by each.</p> primitive shapes and style them in any way imaginable.</p> <p>A ShapeDrawable is an extension of {@link android.graphics.drawable.Drawable}, so you can use -one where ever +one wherever a Drawable is expected — perhaps for the background of a View, set with {@link android.view.View#setBackgroundDrawable(android.graphics.drawable.Drawable) setBackgroundDrawable()}. @@ -349,27 +349,27 @@ View that Here's a basic extension of the View class that does just this, to draw a ShapeDrawable as a View:</p> <pre> - public class CustomDrawableView extends View { - private ShapeDrawable mDrawable; +public class CustomDrawableView extends View { + private ShapeDrawable mDrawable; - public CustomDrawableView(Context context) { - super(context); + public CustomDrawableView(Context context) { + super(context); - int x = 10; - int y = 10; - int width = 300; - int height = 50; + int x = 10; + int y = 10; + int width = 300; + int height = 50; - mDrawable = new ShapeDrawable(new OvalShape()); - mDrawable.getPaint().setColor(0xff74AC23); - mDrawable.setBounds(x, y, x + width, y + height); - } + mDrawable = new ShapeDrawable(new OvalShape()); + mDrawable.getPaint().setColor(0xff74AC23); + mDrawable.setBounds(x, y, x + width, y + height); + } - protected void onDraw(Canvas canvas) { - mDrawable.draw(canvas); - } - } - </pre> + protected void onDraw(Canvas canvas) { + mDrawable.draw(canvas); + } +} +</pre> <p>In the constructor, a ShapeDrawable is defines as an {@link android.graphics.drawable.shapes.OvalShape}. @@ -379,15 +379,15 @@ then the <p>With the custom View defined, it can be drawn any way you like. With the sample above, we can draw the shape programmatically in an Activity:</p> <pre> - CustomDrawableView mCustomDrawableView; +CustomDrawableView mCustomDrawableView; - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - mCustomDrawableView = new CustomDrawableView(this); +protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + mCustomDrawableView = new CustomDrawableView(this); - setContentView(mCustomDrawableView); - } - </pre> + setContentView(mCustomDrawableView); +} +</pre> <p>If you'd like to draw this custom drawable from the XML layout instead of from the Activity, then the CustomDrawable class must override the {@link @@ -396,11 +396,11 @@ then the instantiating a View via inflation from XML. Then add a CustomDrawable element to the XML, like so:</p> <pre> - <com.example.shapedrawable.CustomDrawableView - android:layout_width="fill_parent" - android:layout_height="wrap_content" - /> - </pre> +<com.example.shapedrawable.CustomDrawableView + android:layout_width="fill_parent" + android:layout_height="wrap_content" + /> +</pre> <p>The ShapeDrawable class (like many other Drawable types in the {@link android.graphics.drawable} package) diff --git a/docs/html/guide/topics/manifest/service-element.jd b/docs/html/guide/topics/manifest/service-element.jd index 2213b72..e26f263 100644 --- a/docs/html/guide/topics/manifest/service-element.jd +++ b/docs/html/guide/topics/manifest/service-element.jd @@ -138,7 +138,7 @@ There is no default. The name must be specified. </p></dd> <dt><a name="prmsn"></a>{@code android:permission}</dt> -<dd>The name of a permission that that an entity must have in order to +<dd>The name of a permission that an entity must have in order to launch the service or bind to it. If a caller of <code>{@link android.content.Context#startService startService()}</code>, <code>{@link android.content.Context#bindService bindService()}</code>, or @@ -156,7 +156,7 @@ not protected by a permission. <p> For more information on permissions, see the -<a href="{@docRoot}guide/topics/manifest/manifest-intro.html#sectperm">Permissions</a> +<a href="{@docRoot}guide/topics/manifest/manifest-intro.html#perms">Permissions</a> section in the introduction and a separate document, <a href="{@docRoot}guide/topics/security/security.html">Security and Permissions</a>. </p></dd> diff --git a/docs/html/guide/topics/search/searchable-config.jd b/docs/html/guide/topics/search/searchable-config.jd index fc13c04..e38024c 100644 --- a/docs/html/guide/topics/search/searchable-config.jd +++ b/docs/html/guide/topics/search/searchable-config.jd @@ -329,7 +329,7 @@ user is entering query text. This is added to the <dt><code>android:suggestActionMsg</code></dt> <dd><em>String</em>. An action message to be sent if the action key is pressed while a suggestion is in focus. This is added to the - intent that that the system passes to your searchable activity (using the action + intent that the system passes to your searchable activity (using the action you've defined for the suggestion). To examine the string, use {@link android.content.Intent#getStringExtra getStringExtra(SearchManager.ACTION_MSG)}. This should only be used if all your diff --git a/docs/html/guide/topics/ui/settings.jd b/docs/html/guide/topics/ui/settings.jd index d96447d..77453ee 100644 --- a/docs/html/guide/topics/ui/settings.jd +++ b/docs/html/guide/topics/ui/settings.jd @@ -801,7 +801,7 @@ String syncConnPref = sharedPref.getString(SettingsActivity.KEY_PREF_SYNC_CONN, <h3 id="Listening">Listening for preference changes</h3> -<p>There are several reasons you might want to be notified as soon as the use changes one of the +<p>There are several reasons you might want to be notified as soon as the user changes one of the preferences. In order to receive a callback when a change happens to any one of the preferences, implement the {@link android.content.SharedPreferences.OnSharedPreferenceChangeListener SharedPreference.OnSharedPreferenceChangeListener} interface and register the listener for the diff --git a/docs/html/reference/com/google/android/gms/cast/MediaMetadata.html b/docs/html/reference/com/google/android/gms/cast/MediaMetadata.html index e61a46f..dfe7528 100644 --- a/docs/html/reference/com/google/android/gms/cast/MediaMetadata.html +++ b/docs/html/reference/com/google/android/gms/cast/MediaMetadata.html @@ -1006,7 +1006,7 @@ Summary: <tr class="alt-color api apilevel-" > <td class="jd-typecol">int</td> <td class="jd-linkcol"><a href="/reference/com/google/android/gms/cast/MediaMetadata.html#MEDIA_TYPE_TV_SHOW">MEDIA_TYPE_TV_SHOW</a></td> - <td class="jd-descrcol" width="100%">A media type representing an TV show.</td> + <td class="jd-descrcol" width="100%">A media type representing a TV show.</td> </tr> @@ -2665,7 +2665,7 @@ From class </div> <div class="jd-details-descr"> - <div class="jd-tagdata jd-tagdescr"><p>A media type representing an TV show. </p></div> + <div class="jd-tagdata jd-tagdescr"><p>A media type representing a TV show. </p></div> <div class="jd-tagdata"> diff --git a/docs/html/reference/com/google/android/gms/location/LocationRequest.html b/docs/html/reference/com/google/android/gms/location/LocationRequest.html index a07e936..5f06434 100644 --- a/docs/html/reference/com/google/android/gms/location/LocationRequest.html +++ b/docs/html/reference/com/google/android/gms/location/LocationRequest.html @@ -2409,7 +2409,7 @@ From interface <p>This interval is inexact. You may not receive updates at all (if no location sources are available), or you may receive them slower than requested. You may also receive them faster than requested (if other applications are requesting location at a faster interval). - The fastest rate that that you will receive updates can be controlled with + The fastest rate that you will receive updates can be controlled with <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setFastestInterval(long)">setFastestInterval(long)</a></code>. By default this fastest rate is 6x the interval frequency. <p>Applications with only the coarse location permission may have their interval silently diff --git a/docs/html/tools/debugging/ddms.jd b/docs/html/tools/debugging/ddms.jd index d2fb47a..1b59875 100644 --- a/docs/html/tools/debugging/ddms.jd +++ b/docs/html/tools/debugging/ddms.jd @@ -140,7 +140,7 @@ parent.link=index.html <li>Click <strong>Get Allocations</strong> to see a list of objects that have been allocated since you clicked on the <strong>Start Tracking</strong> button. You can click on <strong>Get - Allocations</strong> again to append to the list new objects that that have been + Allocations</strong> again to append to the list new objects that have been allocated.</li> <li>To stop tracking or to clear the data and start over, click the <strong>Stop Tracking diff --git a/docs/html/tools/help/monkey.jd b/docs/html/tools/help/monkey.jd index b6300a7..941f5d9 100644 --- a/docs/html/tools/help/monkey.jd +++ b/docs/html/tools/help/monkey.jd @@ -12,7 +12,7 @@ yet repeatable manner.</p> <a name="overview"></a> <h2>Overview</h2> -<p>The Monkey is a command-line tool that that you can run on any emulator +<p>The Monkey is a command-line tool that you can run on any emulator instance or on a device. It sends a pseudo-random stream of user events into the system, which acts as a stress test on the application software you are developing.</p> diff --git a/docs/html/tools/testing/testing_eclipse.jd b/docs/html/tools/testing/testing_eclipse.jd index 7d3be47..6c9d55b 100644 --- a/docs/html/tools/testing/testing_eclipse.jd +++ b/docs/html/tools/testing/testing_eclipse.jd @@ -218,7 +218,7 @@ from Eclipse</a>. <p> Another useful convention is to add the method <code>testPreconditions()</code> to your test class. Use this method to test that the application under test is initialized correctly. If this - test fails, you know that that the initial conditions were in error. When this happens, further + test fails, you know that the initial conditions were in error. When this happens, further test results are suspect, regardless of whether or not the tests succeeded. </p> <p> diff --git a/docs/html/tools/testing/testing_otheride.jd b/docs/html/tools/testing/testing_otheride.jd index 9484158..a774087 100644 --- a/docs/html/tools/testing/testing_otheride.jd +++ b/docs/html/tools/testing/testing_otheride.jd @@ -281,7 +281,7 @@ $ android create test-project -m ../HelloAndroid -n HelloAndroidTest -p HelloAnd <p> Another useful convention is to add the method <code>testPreConditions()</code> to your test class. Use this method to test that the application under test is initialized correctly. If this - test fails, you know that that the initial conditions were in error. When this happens, further + test fails, you know that the initial conditions were in error. When this happens, further test results are suspect, regardless of whether or not the tests succeeded. </p> <p> diff --git a/docs/html/wear/design/index.html b/docs/html/wear/design/index.html index 9952490..6e59ea3 100644 --- a/docs/html/wear/design/index.html +++ b/docs/html/wear/design/index.html @@ -529,7 +529,7 @@ Notifications</a>.</p> <img src="/wear/images/circle_voice_B.png" height="200" style="float:right;margin:0 0 20px 40px" /> <img src="/wear/images/circle_voice_A.png" height="200" style="float:right;margin:0 0 20px 40px" /> -<p>Voice replies are primarily used by messaging applications to provide a hands-free way of dictating a short message. You can also provide a up to five suggested replies or “canned responses” that are useful in a wide range of cases. These canned responses can be tapped by the user, allowing for a fast method of sending simple replies in cases where speaking may not be desirable.</p> +<p>Voice replies are primarily used by messaging applications to provide a hands-free way of dictating a short message. You can also provide up to five suggested replies or “canned responses” that are useful in a wide range of cases. These canned responses can be tapped by the user, allowing for a fast method of sending simple replies in cases where speaking may not be desirable.</p> <p>You should attempt to cover a range of simple, neutral replies in your choices. Longer voice replies may be automatically truncated in the Voice reply UI.</p> diff --git a/graphics/java/android/graphics/drawable/GradientDrawable.java b/graphics/java/android/graphics/drawable/GradientDrawable.java index b340777..d4056f7 100644 --- a/graphics/java/android/graphics/drawable/GradientDrawable.java +++ b/graphics/java/android/graphics/drawable/GradientDrawable.java @@ -406,9 +406,9 @@ public class GradientDrawable extends Drawable { /** * <p>Sets the colors used to draw the gradient. Each color is specified as an * ARGB integer and the array must contain at least 2 colors.</p> - * <p><strong>Note</strong>: changing orientation will affect all instances + * <p><strong>Note</strong>: changing colors will affect all instances * of a drawable loaded from a resource. It is recommended to invoke - * {@link #mutate()} before changing the orientation.</p> + * {@link #mutate()} before changing the colors.</p> * * @param colors 2 or more ARGB colors * @@ -610,7 +610,7 @@ public class GradientDrawable extends Drawable { } /** - * <p>Changes this drawbale to use a single color instead of a gradient.</p> + * <p>Changes this drawable to use a single color instead of a gradient.</p> * <p><strong>Note</strong>: changing color will affect all instances * of a drawable loaded from a resource. It is recommended to invoke * {@link #mutate()} before changing the color.</p> diff --git a/include/androidfw/ResourceTypes.h b/include/androidfw/ResourceTypes.h index b334aab..2d1314b 100644 --- a/include/androidfw/ResourceTypes.h +++ b/include/androidfw/ResourceTypes.h @@ -669,25 +669,25 @@ public: // These are available for all nodes: int32_t getCommentID() const; - const uint16_t* getComment(size_t* outLen) const; + const char16_t* getComment(size_t* outLen) const; uint32_t getLineNumber() const; // This is available for TEXT: int32_t getTextID() const; - const uint16_t* getText(size_t* outLen) const; + const char16_t* getText(size_t* outLen) const; ssize_t getTextValue(Res_value* outValue) const; // These are available for START_NAMESPACE and END_NAMESPACE: int32_t getNamespacePrefixID() const; - const uint16_t* getNamespacePrefix(size_t* outLen) const; + const char16_t* getNamespacePrefix(size_t* outLen) const; int32_t getNamespaceUriID() const; - const uint16_t* getNamespaceUri(size_t* outLen) const; + const char16_t* getNamespaceUri(size_t* outLen) const; // These are available for START_TAG and END_TAG: int32_t getElementNamespaceID() const; - const uint16_t* getElementNamespace(size_t* outLen) const; + const char16_t* getElementNamespace(size_t* outLen) const; int32_t getElementNameID() const; - const uint16_t* getElementName(size_t* outLen) const; + const char16_t* getElementName(size_t* outLen) const; // Remaining methods are for retrieving information about attributes // associated with a START_TAG: @@ -696,10 +696,10 @@ public: // Returns -1 if no namespace, -2 if idx out of range. int32_t getAttributeNamespaceID(size_t idx) const; - const uint16_t* getAttributeNamespace(size_t idx, size_t* outLen) const; + const char16_t* getAttributeNamespace(size_t idx, size_t* outLen) const; int32_t getAttributeNameID(size_t idx) const; - const uint16_t* getAttributeName(size_t idx, size_t* outLen) const; + const char16_t* getAttributeName(size_t idx, size_t* outLen) const; uint32_t getAttributeNameResID(size_t idx) const; // These will work only if the underlying string pool is UTF-8. @@ -707,7 +707,7 @@ public: const char* getAttributeName8(size_t idx, size_t* outLen) const; int32_t getAttributeValueStringID(size_t idx) const; - const uint16_t* getAttributeStringValue(size_t idx, size_t* outLen) const; + const char16_t* getAttributeStringValue(size_t idx, size_t* outLen) const; int32_t getAttributeDataType(size_t idx) const; int32_t getAttributeData(size_t idx) const; @@ -1566,7 +1566,7 @@ public: size_t defPackageLen = 0, uint32_t* outTypeSpecFlags = NULL) const; - static bool expandResourceRef(const uint16_t* refStr, size_t refLen, + static bool expandResourceRef(const char16_t* refStr, size_t refLen, String16* outPackage, String16* outType, String16* outName, diff --git a/libs/androidfw/ResourceTypes.cpp b/libs/androidfw/ResourceTypes.cpp index 2f3b1f7..0e36d1b 100644 --- a/libs/androidfw/ResourceTypes.cpp +++ b/libs/androidfw/ResourceTypes.cpp @@ -76,9 +76,9 @@ inline int isspace16(char16_t c) { // range checked; guaranteed to NUL-terminate within the stated number of available slots // NOTE: if this truncates the dst string due to running out of space, no attempt is // made to avoid splitting surrogate pairs. -static void strcpy16_dtoh(uint16_t* dst, const uint16_t* src, size_t avail) +static void strcpy16_dtoh(char16_t* dst, const char16_t* src, size_t avail) { - uint16_t* last = dst + avail - 1; + char16_t* last = dst + avail - 1; while (*src && (dst < last)) { char16_t s = dtohs(*src); *dst++ = s; @@ -584,7 +584,7 @@ decodeLength(const uint8_t** str) return len; } -const uint16_t* ResStringPool::stringAt(size_t idx, size_t* u16len) const +const char16_t* ResStringPool::stringAt(size_t idx, size_t* u16len) const { if (mError == NO_ERROR && idx < mHeader->stringCount) { const bool isUTF8 = (mHeader->flags&ResStringPool_header::UTF8_FLAG) != 0; @@ -903,7 +903,7 @@ int32_t ResXMLParser::getCommentID() const return mCurNode != NULL ? dtohl(mCurNode->comment.index) : -1; } -const uint16_t* ResXMLParser::getComment(size_t* outLen) const +const char16_t* ResXMLParser::getComment(size_t* outLen) const { int32_t id = getCommentID(); return id >= 0 ? mTree.mStrings.stringAt(id, outLen) : NULL; @@ -922,7 +922,7 @@ int32_t ResXMLParser::getTextID() const return -1; } -const uint16_t* ResXMLParser::getText(size_t* outLen) const +const char16_t* ResXMLParser::getText(size_t* outLen) const { int32_t id = getTextID(); return id >= 0 ? mTree.mStrings.stringAt(id, outLen) : NULL; @@ -945,7 +945,7 @@ int32_t ResXMLParser::getNamespacePrefixID() const return -1; } -const uint16_t* ResXMLParser::getNamespacePrefix(size_t* outLen) const +const char16_t* ResXMLParser::getNamespacePrefix(size_t* outLen) const { int32_t id = getNamespacePrefixID(); //printf("prefix=%d event=%p\n", id, mEventCode); @@ -960,7 +960,7 @@ int32_t ResXMLParser::getNamespaceUriID() const return -1; } -const uint16_t* ResXMLParser::getNamespaceUri(size_t* outLen) const +const char16_t* ResXMLParser::getNamespaceUri(size_t* outLen) const { int32_t id = getNamespaceUriID(); //printf("uri=%d event=%p\n", id, mEventCode); @@ -978,7 +978,7 @@ int32_t ResXMLParser::getElementNamespaceID() const return -1; } -const uint16_t* ResXMLParser::getElementNamespace(size_t* outLen) const +const char16_t* ResXMLParser::getElementNamespace(size_t* outLen) const { int32_t id = getElementNamespaceID(); return id >= 0 ? mTree.mStrings.stringAt(id, outLen) : NULL; @@ -995,7 +995,7 @@ int32_t ResXMLParser::getElementNameID() const return -1; } -const uint16_t* ResXMLParser::getElementName(size_t* outLen) const +const char16_t* ResXMLParser::getElementName(size_t* outLen) const { int32_t id = getElementNameID(); return id >= 0 ? mTree.mStrings.stringAt(id, outLen) : NULL; @@ -1024,7 +1024,7 @@ int32_t ResXMLParser::getAttributeNamespaceID(size_t idx) const return -2; } -const uint16_t* ResXMLParser::getAttributeNamespace(size_t idx, size_t* outLen) const +const char16_t* ResXMLParser::getAttributeNamespace(size_t idx, size_t* outLen) const { int32_t id = getAttributeNamespaceID(idx); //printf("attribute namespace=%d idx=%d event=%p\n", id, idx, mEventCode); @@ -1055,7 +1055,7 @@ int32_t ResXMLParser::getAttributeNameID(size_t idx) const return -1; } -const uint16_t* ResXMLParser::getAttributeName(size_t idx, size_t* outLen) const +const char16_t* ResXMLParser::getAttributeName(size_t idx, size_t* outLen) const { int32_t id = getAttributeNameID(idx); //printf("attribute name=%d idx=%d event=%p\n", id, idx, mEventCode); @@ -1095,7 +1095,7 @@ int32_t ResXMLParser::getAttributeValueStringID(size_t idx) const return -1; } -const uint16_t* ResXMLParser::getAttributeStringValue(size_t idx, size_t* outLen) const +const char16_t* ResXMLParser::getAttributeStringValue(size_t idx, size_t* outLen) const { int32_t id = getAttributeValueStringID(idx); //XML_NOISY(printf("getAttributeValue 0x%x=0x%x\n", idx, id)); @@ -4128,7 +4128,7 @@ nope: return 0; } -bool ResTable::expandResourceRef(const uint16_t* refStr, size_t refLen, +bool ResTable::expandResourceRef(const char16_t* refStr, size_t refLen, String16* outPackage, String16* outType, String16* outName, diff --git a/libs/androidfw/tests/Android.mk b/libs/androidfw/tests/Android.mk index 977ba80..cf11bb7 100644 --- a/libs/androidfw/tests/Android.mk +++ b/libs/androidfw/tests/Android.mk @@ -13,11 +13,6 @@ shared_libraries := \ libcutils \ libutils \ libui \ - libstlport - -static_libraries := \ - libgtest \ - libgtest_main $(foreach file,$(test_src_files), \ $(eval include $(CLEAR_VARS)) \ diff --git a/libs/hwui/Android.mk b/libs/hwui/Android.mk index 411c133..490921e 100644 --- a/libs/hwui/Android.mk +++ b/libs/hwui/Android.mk @@ -1,5 +1,6 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) +LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk # Only build libhwui when USE_OPENGL_RENDERER is # defined in the current device/board configuration @@ -65,14 +66,12 @@ ifeq ($(USE_OPENGL_RENDERER),true) ifneq (false,$(ANDROID_ENABLE_RENDERSCRIPT)) LOCAL_CFLAGS += -DANDROID_ENABLE_RENDERSCRIPT - LOCAL_SHARED_LIBRARIES += libRS libRScpp libstlport + LOCAL_SHARED_LIBRARIES += libRS libRScpp LOCAL_C_INCLUDES += \ $(intermediates) \ frameworks/rs/cpp \ frameworks/rs \ - external/stlport/stlport \ - bionic/ \ - bionic/libstdc++/include + endif ifndef HWUI_COMPILE_SYMBOLS @@ -83,6 +82,7 @@ ifeq ($(USE_OPENGL_RENDERER),true) LOCAL_CFLAGS += -fno-omit-frame-pointer -marm -mapcs endif + include external/stlport/libstlport.mk include $(BUILD_SHARED_LIBRARY) include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/libs/hwui/DisplayListOp.h b/libs/hwui/DisplayListOp.h index 842e028..f888b50 100644 --- a/libs/hwui/DisplayListOp.h +++ b/libs/hwui/DisplayListOp.h @@ -878,7 +878,7 @@ public: } virtual void output(int level, uint32_t logFlags) const { - OP_LOG("Draw bitmap %p src="RECT_STRING", dst="RECT_STRING, + OP_LOG("Draw bitmap %p src=" RECT_STRING ", dst=" RECT_STRING, mBitmap, RECT_ARGS(mSrc), RECT_ARGS(mLocalBounds)); } @@ -1068,7 +1068,7 @@ public: } virtual void output(int level, uint32_t logFlags) const { - OP_LOG("Draw patch "RECT_STRING, RECT_ARGS(mLocalBounds)); + OP_LOG("Draw patch " RECT_STRING, RECT_ARGS(mLocalBounds)); } virtual const char* name() { return "DrawPatch"; } @@ -1150,7 +1150,7 @@ public: } virtual void output(int level, uint32_t logFlags) const { - OP_LOG("Draw Rect "RECT_STRING, RECT_ARGS(mLocalBounds)); + OP_LOG("Draw Rect " RECT_STRING, RECT_ARGS(mLocalBounds)); } virtual void onDefer(OpenGLRenderer& renderer, DeferInfo& deferInfo, @@ -1201,7 +1201,7 @@ public: } virtual void output(int level, uint32_t logFlags) const { - OP_LOG("Draw RoundRect "RECT_STRING", rx %f, ry %f", RECT_ARGS(mLocalBounds), mRx, mRy); + OP_LOG("Draw RoundRect " RECT_STRING ", rx %f, ry %f", RECT_ARGS(mLocalBounds), mRx, mRy); } virtual const char* name() { return "DrawRoundRect"; } @@ -1244,7 +1244,7 @@ public: } virtual void output(int level, uint32_t logFlags) const { - OP_LOG("Draw Oval "RECT_STRING, RECT_ARGS(mLocalBounds)); + OP_LOG("Draw Oval " RECT_STRING, RECT_ARGS(mLocalBounds)); } virtual const char* name() { return "DrawOval"; } @@ -1264,7 +1264,7 @@ public: } virtual void output(int level, uint32_t logFlags) const { - OP_LOG("Draw Arc "RECT_STRING", start %f, sweep %f, useCenter %d", + OP_LOG("Draw Arc " RECT_STRING ", start %f, sweep %f, useCenter %d", RECT_ARGS(mLocalBounds), mStartAngle, mSweepAngle, mUseCenter); } @@ -1301,7 +1301,7 @@ public: } virtual void output(int level, uint32_t logFlags) const { - OP_LOG("Draw Path %p in "RECT_STRING, mPath, RECT_ARGS(mLocalBounds)); + OP_LOG("Draw Path %p in " RECT_STRING, mPath, RECT_ARGS(mLocalBounds)); } virtual const char* name() { return "DrawPath"; } diff --git a/libs/usb/tests/AccessoryChat/accessorychat/Android.mk b/libs/usb/tests/AccessoryChat/accessorychat/Android.mk index 300224a..51f2111 100644 --- a/libs/usb/tests/AccessoryChat/accessorychat/Android.mk +++ b/libs/usb/tests/AccessoryChat/accessorychat/Android.mk @@ -4,6 +4,7 @@ LOCAL_PATH:= $(call my-dir) ifeq ($(HOST_OS),linux) include $(CLEAR_VARS) +LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_MODULE_TAGS := optional @@ -11,7 +12,6 @@ LOCAL_SRC_FILES := accessorychat.c LOCAL_MODULE := accessorychat -LOCAL_C_INCLUDES += bionic/libc/kernel/common LOCAL_STATIC_LIBRARIES := libusbhost libcutils LOCAL_LDLIBS += -lpthread LOCAL_CFLAGS := -g -O0 @@ -22,6 +22,7 @@ endif # Build for device include $(CLEAR_VARS) +LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_MODULE_TAGS := optional diff --git a/location/java/android/location/LocationRequest.java b/location/java/android/location/LocationRequest.java index c9162fe..f39702e 100644 --- a/location/java/android/location/LocationRequest.java +++ b/location/java/android/location/LocationRequest.java @@ -288,7 +288,7 @@ public final class LocationRequest implements Parcelable { * no location sources are available), or you may receive them * slower than requested. You may also receive them faster than * requested (if other applications are requesting location at a - * faster interval). The fastest rate that that you will receive + * faster interval). The fastest rate that you will receive * updates can be controlled with {@link #setFastestInterval}. * * <p>Applications with only the coarse location permission may have their diff --git a/media/jni/android_media_MediaMuxer.cpp b/media/jni/android_media_MediaMuxer.cpp index 3561b06..3fef446f 100644 --- a/media/jni/android_media_MediaMuxer.cpp +++ b/media/jni/android_media_MediaMuxer.cpp @@ -164,7 +164,7 @@ static void android_media_MediaMuxer_setOrientationHint( } static void android_media_MediaMuxer_setLocation( - JNIEnv *env, jclass clazz, jint nativeObject, jint latitude, jint longitude) { + JNIEnv *env, jclass clazz, jlong nativeObject, jint latitude, jint longitude) { MediaMuxer* muxer = reinterpret_cast<MediaMuxer *>(nativeObject); status_t res = muxer->setLocation(latitude, longitude); diff --git a/media/mca/filterfw/Android.mk b/media/mca/filterfw/Android.mk index 2a9448d..a5b4b27 100644 --- a/media/mca/filterfw/Android.mk +++ b/media/mca/filterfw/Android.mk @@ -22,6 +22,7 @@ include $(all-subdir-makefiles) # Build main libfilterfw include $(CLEAR_VARS) +LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_MODULE := libfilterfw @@ -30,7 +31,7 @@ LOCAL_MODULE_TAGS := optional LOCAL_WHOLE_STATIC_LIBRARIES := libfilterfw_jni \ libfilterfw_native -LOCAL_SHARED_LIBRARIES := libstlport \ +LOCAL_SHARED_LIBRARIES := \ libGLESv2 \ libEGL \ libgui \ @@ -48,4 +49,5 @@ LOCAL_SHARED_LIBRARIES := libstlport \ # part of a system image. LOCAL_PRELINK_MODULE := false +include external/stlport/libstlport.mk include $(BUILD_SHARED_LIBRARY) diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index 70e4582..07f5490 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -3496,7 +3496,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { topIsFullscreen = (lp.flags & WindowManager.LayoutParams.FLAG_FULLSCREEN) != 0 || (mLastSystemUiFlags & View.SYSTEM_UI_FLAG_FULLSCREEN) != 0; // The subtle difference between the window for mTopFullscreenOpaqueWindowState - // and mTopIsFullscreen is that that mTopIsFullscreen is set only if the window + // and mTopIsFullscreen is that mTopIsFullscreen is set only if the window // has the FLAG_FULLSCREEN set. Not sure if there is another way that to be the // case though. if (mStatusBarController.isTransientShowing()) { diff --git a/services/input/EventHub.cpp b/services/input/EventHub.cpp index a302cd2..bf979d4 100644 --- a/services/input/EventHub.cpp +++ b/services/input/EventHub.cpp @@ -1381,7 +1381,7 @@ void EventHub::releaseControllerNumberLocked(Device* device) { bool EventHub::hasKeycodeLocked(Device* device, int keycode) const { - if (!device->keyMap.haveKeyLayout() || !device->keyBitmask) { + if (!device->keyMap.haveKeyLayout()) { return false; } diff --git a/services/input/tests/Android.mk b/services/input/tests/Android.mk index 9278f41..3eb93dc 100644 --- a/services/input/tests/Android.mk +++ b/services/input/tests/Android.mk @@ -16,19 +16,10 @@ shared_libraries := \ libhardware_legacy \ libui \ libskia \ - libstlport \ libinput \ libinputservice -static_libraries := \ - libgtest \ - libgtest_main - c_includes := \ - bionic \ - bionic/libstdc++/include \ - external/gtest/include \ - external/stlport/stlport \ external/skia/include/core module_tags := eng tests diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java index dea41e4..a77e241 100644 --- a/services/java/com/android/server/am/ActivityManagerService.java +++ b/services/java/com/android/server/am/ActivityManagerService.java @@ -170,6 +170,7 @@ import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.WindowManager; +import dalvik.system.VMRuntime; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; @@ -2786,11 +2787,16 @@ public final class ActivityManagerService extends ActivityManagerNative requiredAbi = Build.SUPPORTED_ABIS[0]; } + String instructionSet = null; + if (app.info.cpuAbi != null) { + instructionSet = VMRuntime.getInstructionSet(app.info.cpuAbi); + } + // Start the process. It will either succeed and return a result containing // the PID of the new process, or else throw a RuntimeException. Process.ProcessStartResult startResult = Process.start("android.app.ActivityThread", app.processName, uid, uid, gids, debugFlags, mountExternal, - app.info.targetSdkVersion, app.info.seinfo, requiredAbi, null); + app.info.targetSdkVersion, app.info.seinfo, requiredAbi, instructionSet, null); BatteryStatsImpl bs = mBatteryStatsService.getActiveStatistics(); synchronized (bs) { diff --git a/tools/aapt/Android.mk b/tools/aapt/Android.mk index 2949f8e..162edc4 100644 --- a/tools/aapt/Android.mk +++ b/tools/aapt/Android.mk @@ -31,6 +31,7 @@ aapt_src_files := \ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) +LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_SRC_FILES := $(aapt_src_files) @@ -73,14 +74,12 @@ include $(BUILD_HOST_EXECUTABLE) # ========================================================= ifneq ($(SDK_ONLY),true) include $(CLEAR_VARS) +LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_SRC_FILES := $(aapt_src_files) LOCAL_MODULE := aapt -LOCAL_C_INCLUDES += bionic -LOCAL_C_INCLUDES += bionic/libstdc++/include -LOCAL_C_INCLUDES += external/stlport/stlport LOCAL_C_INCLUDES += external/libpng LOCAL_C_INCLUDES += external/zlib @@ -95,9 +94,9 @@ LOCAL_SHARED_LIBRARIES := \ libz LOCAL_STATIC_LIBRARIES := \ - libstlport_static \ libexpat_static +include external/stlport/libstlport.mk include $(BUILD_EXECUTABLE) endif diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp index f7de558..f863311 100644 --- a/tools/aapt/Command.cpp +++ b/tools/aapt/Command.cpp @@ -197,14 +197,10 @@ int doList(Bundle* bundle) } const ResTable& res = assets.getResources(false); - if (&res == NULL) { - printf("\nNo resource table found.\n"); - } else { #ifndef HAVE_ANDROID_OS - printf("\nResource table:\n"); - res.print(false); + printf("\nResource table:\n"); + res.print(false); #endif - } Asset* manifestAsset = assets.openNonAsset("AndroidManifest.xml", Asset::ACCESS_BUFFER); @@ -253,7 +249,7 @@ String8 getAttribute(const ResXMLTree& tree, const char* ns, } } size_t len; - const uint16_t* str = tree.getAttributeStringValue(idx, &len); + const char16_t* str = tree.getAttributeStringValue(idx, &len); return str ? String8(str, len) : String8(); } @@ -271,7 +267,7 @@ static String8 getAttribute(const ResXMLTree& tree, uint32_t attrRes, String8* o } } size_t len; - const uint16_t* str = tree.getAttributeStringValue(idx, &len); + const char16_t* str = tree.getAttributeStringValue(idx, &len); return str ? String8(str, len) : String8(); } @@ -325,7 +321,7 @@ static String8 getResolvedAttribute(const ResTable* resTable, const ResXMLTree& if (tree.getAttributeValue(idx, &value) != NO_ERROR) { if (value.dataType == Res_value::TYPE_STRING) { size_t len; - const uint16_t* str = tree.getAttributeStringValue(idx, &len); + const char16_t* str = tree.getAttributeStringValue(idx, &len); return str ? String8(str, len) : String8(); } resTable->resolveReference(&value, 0); @@ -531,11 +527,6 @@ int doDump(Bundle* bundle) assets.setConfiguration(config); const ResTable& res = assets.getResources(false); - if (&res == NULL) { - fprintf(stderr, "ERROR: dump failed because no resource table was found\n"); - goto bail; - } - if (strcmp("resources", option) == 0) { #ifndef HAVE_ANDROID_OS res.print(bundle->getValues()); diff --git a/tools/aapt/Resource.cpp b/tools/aapt/Resource.cpp index 4d29ff7..f842bee 100644 --- a/tools/aapt/Resource.cpp +++ b/tools/aapt/Resource.cpp @@ -250,7 +250,7 @@ static status_t parsePackage(Bundle* bundle, const sp<AaptAssets>& assets, ssize_t minSdkIndex = block.indexOfAttribute(RESOURCES_ANDROID_NAMESPACE, "minSdkVersion"); if (minSdkIndex >= 0) { - const uint16_t* minSdk16 = block.getAttributeStringValue(minSdkIndex, &len); + const char16_t* minSdk16 = block.getAttributeStringValue(minSdkIndex, &len); const char* minSdk8 = strdup(String8(minSdk16).string()); bundle->setManifestMinSdkVersion(minSdk8); } @@ -456,7 +456,7 @@ static int validateAttr(const String8& path, const ResTable& table, size_t len; ssize_t index = parser.indexOfAttribute(ns, attr); - const uint16_t* str; + const char16_t* str; Res_value value; if (index >= 0 && parser.getAttributeValue(index, &value) >= 0) { const ResStringPool* pool = &parser.getStrings(); @@ -1422,7 +1422,7 @@ status_t buildResources(Bundle* bundle, const sp<AaptAssets>& assets) } size_t len; ssize_t index = block.indexOfAttribute(RESOURCES_ANDROID_NAMESPACE, "name"); - const uint16_t* id = block.getAttributeStringValue(index, &len); + const char16_t* id = block.getAttributeStringValue(index, &len); if (id == NULL) { fprintf(stderr, "%s:%d: missing name attribute in element <%s>.\n", manifestPath.string(), block.getLineNumber(), @@ -1465,7 +1465,7 @@ status_t buildResources(Bundle* bundle, const sp<AaptAssets>& assets) hasErrors = true; } syms->addStringSymbol(String8(e), idStr, srcPos); - const uint16_t* cmt = block.getComment(&len); + const char16_t* cmt = block.getComment(&len); if (cmt != NULL && *cmt != 0) { //printf("Comment of %s: %s\n", String8(e).string(), // String8(cmt).string()); diff --git a/tools/aapt/ResourceIdCache.cpp b/tools/aapt/ResourceIdCache.cpp index e03f4f6..359443d 100644 --- a/tools/aapt/ResourceIdCache.cpp +++ b/tools/aapt/ResourceIdCache.cpp @@ -9,7 +9,6 @@ #include <utils/Log.h> #include "ResourceIdCache.h" #include <map> -using namespace std; static size_t mHits = 0; @@ -29,7 +28,7 @@ struct CacheEntry { CacheEntry(const android::String16& name, uint32_t resId) : hashedName(name), id(resId) { } }; -static map< uint32_t, CacheEntry > mIdMap; +static std::map< uint32_t, CacheEntry > mIdMap; // djb2; reasonable choice for strings when collisions aren't particularly important @@ -63,7 +62,7 @@ uint32_t ResourceIdCache::lookup(const android::String16& package, bool onlyPublic) { const String16 hashedName = makeHashableName(package, type, name, onlyPublic); const uint32_t hashcode = hash(hashedName); - map<uint32_t, CacheEntry>::iterator item = mIdMap.find(hashcode); + std::map<uint32_t, CacheEntry>::iterator item = mIdMap.find(hashcode); if (item == mIdMap.end()) { // cache miss mMisses++; diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp index cf271a9..6632809 100644 --- a/tools/aapt/ResourceTable.cpp +++ b/tools/aapt/ResourceTable.cpp @@ -388,7 +388,7 @@ static status_t compileAttribute(const sp<AaptFile>& in, ssize_t l10nIdx = block.indexOfAttribute(NULL, "localization"); if (l10nIdx >= 0) { - const uint16_t* str = block.getAttributeStringValue(l10nIdx, &len); + const char16_t* str = block.getAttributeStringValue(l10nIdx, &len); bool error; uint32_t l10n_required = parse_flags(str, len, l10nRequiredFlags, &error); if (error) { @@ -1323,7 +1323,7 @@ status_t compileResourceFile(Bundle* bundle, size_t n = block.getAttributeCount(); for (size_t i = 0; i < n; i++) { size_t length; - const uint16_t* attr = block.getAttributeName(i, &length); + const char16_t* attr = block.getAttributeName(i, &length); if (strcmp16(attr, name16.string()) == 0) { name.setTo(block.getAttributeStringValue(i, &length)); } else if (strcmp16(attr, translatable16.string()) == 0) { @@ -1439,14 +1439,14 @@ status_t compileResourceFile(Bundle* bundle, // translatable. for (size_t i = 0; i < n; i++) { size_t length; - const uint16_t* attr = block.getAttributeName(i, &length); + const char16_t* attr = block.getAttributeName(i, &length); if (strcmp16(attr, formatted16.string()) == 0) { - const uint16_t* value = block.getAttributeStringValue(i, &length); + const char16_t* value = block.getAttributeStringValue(i, &length); if (strcmp16(value, false16.string()) == 0) { curIsFormatted = false; } } else if (strcmp16(attr, translatable16.string()) == 0) { - const uint16_t* value = block.getAttributeStringValue(i, &length); + const char16_t* value = block.getAttributeStringValue(i, &length); if (strcmp16(value, false16.string()) == 0) { isTranslatable = false; } diff --git a/tools/aapt/StringPool.cpp b/tools/aapt/StringPool.cpp index 158b391..c7fd040 100644 --- a/tools/aapt/StringPool.cpp +++ b/tools/aapt/StringPool.cpp @@ -21,7 +21,7 @@ #define NOISY(x) //x -void strcpy16_htod(uint16_t* dst, const uint16_t* src) +void strcpy16_htod(char16_t* dst, const char16_t* src) { while (*src) { char16_t s = htods(*src); @@ -447,9 +447,9 @@ status_t StringPool::writeStringBlock(const sp<AaptFile>& pool) strncpy((char*)strings, encStr, encSize+1); } else { - uint16_t* strings = (uint16_t*)dat; + char16_t* strings = (char16_t*)dat; - ENCODE_LENGTH(strings, sizeof(uint16_t), strSize) + ENCODE_LENGTH(strings, sizeof(char16_t), strSize) strcpy16_htod(strings, ent.value); } diff --git a/tools/aapt/StringPool.h b/tools/aapt/StringPool.h index 1b3abfd..1b5a7ba 100644 --- a/tools/aapt/StringPool.h +++ b/tools/aapt/StringPool.h @@ -26,7 +26,7 @@ using namespace android; #define PRINT_STRING_METRICS 0 -void strcpy16_htod(uint16_t* dst, const uint16_t* src); +void strcpy16_htod(char16_t* dst, const char16_t* src); void printStringPool(const ResStringPool* pool); diff --git a/tools/aapt/XMLNode.cpp b/tools/aapt/XMLNode.cpp index 607d419..03c66c1 100644 --- a/tools/aapt/XMLNode.cpp +++ b/tools/aapt/XMLNode.cpp @@ -234,9 +234,9 @@ status_t parseStyledString(Bundle* bundle, const String8 element8(element16); size_t nslen; - const uint16_t* ns = inXml->getElementNamespace(&nslen); + const char16_t* ns = inXml->getElementNamespace(&nslen); if (ns == NULL) { - ns = (const uint16_t*)"\0\0"; + ns = (const char16_t*)"\0\0"; nslen = 0; } const String8 nspace(String16(ns, nslen)); @@ -291,9 +291,9 @@ moveon: } else if (code == ResXMLTree::END_TAG) { size_t nslen; - const uint16_t* ns = inXml->getElementNamespace(&nslen); + const char16_t* ns = inXml->getElementNamespace(&nslen); if (ns == NULL) { - ns = (const uint16_t*)"\0\0"; + ns = (const char16_t*)"\0\0"; nslen = 0; } const String8 nspace(String16(ns, nslen)); @@ -422,7 +422,7 @@ static String8 make_prefix(int depth) } static String8 build_namespace(const Vector<namespace_entry>& namespaces, - const uint16_t* ns) + const char16_t* ns) { String8 str; if (ns != NULL) { @@ -453,9 +453,9 @@ void printXMLBlock(ResXMLTree* block) int i; if (code == ResXMLTree::START_TAG) { size_t len; - const uint16_t* ns16 = block->getElementNamespace(&len); + const char16_t* ns16 = block->getElementNamespace(&len); String8 elemNs = build_namespace(namespaces, ns16); - const uint16_t* com16 = block->getComment(&len); + const char16_t* com16 = block->getComment(&len); if (com16) { printf("%s <!-- %s -->\n", prefix.string(), String8(com16).string()); } @@ -503,7 +503,7 @@ void printXMLBlock(ResXMLTree* block) } else if (code == ResXMLTree::START_NAMESPACE) { namespace_entry ns; size_t len; - const uint16_t* prefix16 = block->getNamespacePrefix(&len); + const char16_t* prefix16 = block->getNamespacePrefix(&len); if (prefix16) { ns.prefix = String8(prefix16); } else { @@ -518,7 +518,7 @@ void printXMLBlock(ResXMLTree* block) depth--; const namespace_entry& ns = namespaces.top(); size_t len; - const uint16_t* prefix16 = block->getNamespacePrefix(&len); + const char16_t* prefix16 = block->getNamespacePrefix(&len); String8 pr; if (prefix16) { pr = String8(prefix16); |
