Merge "Telephony: Initialize GsmCellLocation class members properly"
diff --git a/cmds/pm/src/com/android/commands/pm/Pm.java b/cmds/pm/src/com/android/commands/pm/Pm.java
index 5e9d8f7..5249065 100644
--- a/cmds/pm/src/com/android/commands/pm/Pm.java
+++ b/cmds/pm/src/com/android/commands/pm/Pm.java
@@ -563,7 +563,10 @@
if (res != 0) {
Resources r = getResources(pii);
if (r != null) {
- return r.getString(res);
+ try {
+ return r.getString(res);
+ } catch (Resources.NotFoundException e) {
+ }
}
}
return null;
diff --git a/core/java/android/nfc/tech/Ndef.java b/core/java/android/nfc/tech/Ndef.java
index 5852ce4..fdccaae 100644
--- a/core/java/android/nfc/tech/Ndef.java
+++ b/core/java/android/nfc/tech/Ndef.java
@@ -51,7 +51,7 @@
* {@link Ndef} on NFC Forum Tag Types 1-4, and implement all NDEF operations
* as defined in this class.
*
- * <p>Some vendors have there own well defined specifications for storing NDEF data
+ * <p>Some vendors have their own well defined specifications for storing NDEF data
* on tags that do not fall into the above categories. Android devices with NFC
* should enumerate and implement {@link Ndef} under these vendor specifications
* where possible, but it is not mandatory. {@link #getType} returns a String
diff --git a/core/java/android/os/Debug.java b/core/java/android/os/Debug.java
index 344dc91..9377def 100644
--- a/core/java/android/os/Debug.java
+++ b/core/java/android/os/Debug.java
@@ -104,7 +104,7 @@
/**
* This class is used to retrieved various statistics about the memory mappings for this
- * process. The returns info broken down by dalvik, native, and other. All results are in kB.
+ * process. The returned info is broken down by dalvik, native, and other. All results are in kB.
*/
public static class MemoryInfo implements Parcelable {
/** The proportional set size for dalvik heap. (Doesn't include other Dalvik overhead.) */
diff --git a/core/java/android/printservice/PrintService.java b/core/java/android/printservice/PrintService.java
index c5aee7b..ae95854 100644
--- a/core/java/android/printservice/PrintService.java
+++ b/core/java/android/printservice/PrintService.java
@@ -386,7 +386,7 @@
@Override
public void setClient(IPrintServiceClient client) {
- mHandler.obtainMessage(ServiceHandler.MSG_SET_CLEINT, client)
+ mHandler.obtainMessage(ServiceHandler.MSG_SET_CLIENT, client)
.sendToTarget();
}
@@ -414,7 +414,7 @@
public static final int MSG_STOP_PRINTER_STATE_TRACKING = 7;
public static final int MSG_ON_PRINTJOB_QUEUED = 8;
public static final int MSG_ON_REQUEST_CANCEL_PRINTJOB = 9;
- public static final int MSG_SET_CLEINT = 10;
+ public static final int MSG_SET_CLIENT = 10;
public ServiceHandler(Looper looper) {
super(looper, null, true);
@@ -528,9 +528,9 @@
onPrintJobQueued(new PrintJob(printJobInfo, mClient));
} break;
- case MSG_SET_CLEINT: {
+ case MSG_SET_CLIENT: {
if (DEBUG) {
- Log.i(LOG_TAG, "MSG_SET_CLEINT "
+ Log.i(LOG_TAG, "MSG_SET_CLIENT "
+ getPackageName());
}
mClient = (IPrintServiceClient) message.obj;
diff --git a/core/jni/Android.mk b/core/jni/Android.mk
index 2d54742..d070c97 100644
--- a/core/jni/Android.mk
+++ b/core/jni/Android.mk
@@ -177,11 +177,9 @@
$(call include-path-for, bluedroid) \
$(call include-path-for, libhardware)/hardware \
$(call include-path-for, libhardware_legacy)/hardware_legacy \
- $(TOP)/bionic/libc/dns/include \
$(TOP)/frameworks/av/include \
$(TOP)/system/media/camera/include \
$(TOP)/system/netd/include \
- external/icu/icu4c/source/common \
external/pdfium/core/include/fpdfapi \
external/pdfium/core/include/fpdfdoc \
external/pdfium/fpdfsdk/include \
@@ -191,11 +189,9 @@
external/sqlite/dist \
external/sqlite/android \
external/expat/lib \
- external/openssl/include \
external/tremor/Tremor \
external/jpeg \
external/harfbuzz_ng/src \
- external/zlib \
frameworks/opt/emoji \
libcore/include \
$(call include-path-for, audio-utils) \
diff --git a/core/jni/android_net_NetUtils.cpp b/core/jni/android_net_NetUtils.cpp
index 991b43f..9092512 100644
--- a/core/jni/android_net_NetUtils.cpp
+++ b/core/jni/android_net_NetUtils.cpp
@@ -19,7 +19,6 @@
#include "jni.h"
#include "JNIHelp.h"
#include "NetdClient.h"
-#include "resolv_netid.h"
#include <utils/misc.h>
#include <android_runtime/AndroidRuntime.h>
#include <utils/Log.h>
diff --git a/location/java/android/location/LocationRequest.java b/location/java/android/location/LocationRequest.java
index 39fe4ea..65e7ced 100644
--- a/location/java/android/location/LocationRequest.java
+++ b/location/java/android/location/LocationRequest.java
@@ -212,6 +212,7 @@
switch (criteria.getPowerRequirement()) {
case Criteria.POWER_HIGH:
quality = POWER_HIGH;
+ break;
default:
quality = POWER_LOW;
}
diff --git a/media/jni/soundpool/android_media_SoundPool_SoundPoolImpl.cpp b/media/jni/soundpool/android_media_SoundPool_SoundPoolImpl.cpp
index ce20e52..baf61d5 100644
--- a/media/jni/soundpool/android_media_SoundPool_SoundPoolImpl.cpp
+++ b/media/jni/soundpool/android_media_SoundPool_SoundPoolImpl.cpp
@@ -231,14 +231,14 @@
SoundPool *ap = MusterSoundPool(env, thiz);
if (ap != NULL) {
- // release weak reference
+ // release weak reference and clear callback
jobject weakRef = (jobject) ap->getUserData();
+ ap->setCallback(NULL, NULL);
if (weakRef != NULL) {
env->DeleteGlobalRef(weakRef);
}
- // clear callback and native context
- ap->setCallback(NULL, NULL);
+ // clear native context
env->SetLongField(thiz, fields.mNativeContext, 0);
delete ap;
}
diff --git a/services/core/java/com/android/server/MountService.java b/services/core/java/com/android/server/MountService.java
index 743db16..59570bf 100644
--- a/services/core/java/com/android/server/MountService.java
+++ b/services/core/java/com/android/server/MountService.java
@@ -2155,7 +2155,7 @@
}
}
- private String toHex(String password) {
+ private static String toHex(String password) {
if (password == null) {
return "";
}
@@ -2163,18 +2163,12 @@
return new String(HexEncoding.encode(bytes));
}
- private String fromHex(String hexPassword) {
+ private static String fromHex(String hexPassword) throws IllegalArgumentException {
if (hexPassword == null) {
return null;
}
- final byte[] bytes;
- try {
- bytes = HexEncoding.decode(hexPassword.toCharArray(), false);
- } catch (IllegalArgumentException e) {
- return null;
- }
-
+ final byte[] bytes = HexEncoding.decode(hexPassword.toCharArray(), false);
return new String(bytes, StandardCharsets.UTF_8);
}