Merge "Remove obsolete OMA-DRM support"
diff --git a/cmds/input/src/com/android/commands/input/Input.java b/cmds/input/src/com/android/commands/input/Input.java
index e43501c..80ac539 100644
--- a/cmds/input/src/com/android/commands/input/Input.java
+++ b/cmds/input/src/com/android/commands/input/Input.java
@@ -56,12 +56,14 @@
return;
}
} else if (command.equals("keyevent")) {
- if (args.length == 2) {
- int keyCode = KeyEvent.keyCodeFromString(args[1]);
- if (keyCode == KeyEvent.KEYCODE_UNKNOWN) {
- keyCode = KeyEvent.keyCodeFromString("KEYCODE_" + args[1]);
+ if (args.length >= 2) {
+ for (int i=1; i < args.length; i++) {
+ int keyCode = KeyEvent.keyCodeFromString(args[i]);
+ if (keyCode == KeyEvent.KEYCODE_UNKNOWN) {
+ keyCode = KeyEvent.keyCodeFromString("KEYCODE_" + args[i]);
+ }
+ sendKeyEvent(keyCode);
}
- sendKeyEvent(keyCode);
return;
}
} else if (command.equals("tap")) {
@@ -237,7 +239,7 @@
DEFAULT_META_STATE, DEFAULT_PRECISION_X, DEFAULT_PRECISION_Y, DEFAULT_DEVICE_ID,
DEFAULT_EDGE_FLAGS);
event.setSource(inputSource);
- Log.i("Input", "injectMotionEvent: " + event);
+ Log.i(TAG, "injectMotionEvent: " + event);
InputManager.getInstance().injectInputEvent(event,
InputManager.INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH);
}
@@ -249,7 +251,7 @@
private void showUsage() {
System.err.println("usage: input ...");
System.err.println(" input text <string>");
- System.err.println(" input keyevent <key code number or name>");
+ System.err.println(" input keyevent <key code number or name> ...");
System.err.println(" input [touchscreen|touchpad|touchnavigation] tap <x> <y>");
System.err.println(" input [touchscreen|touchpad|touchnavigation] swipe "
+ "<x1> <y1> <x2> <y2> [duration(ms)]");
diff --git a/core/java/android/net/http/CertificateChainValidator.java b/core/java/android/net/http/CertificateChainValidator.java
index f66075d..155ab93 100644
--- a/core/java/android/net/http/CertificateChainValidator.java
+++ b/core/java/android/net/http/CertificateChainValidator.java
@@ -17,18 +17,19 @@
package android.net.http;
+import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.security.GeneralSecurityException;
import java.security.KeyManagementException;
import java.security.cert.Certificate;
import java.security.cert.CertificateException;
+import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import javax.net.ssl.DefaultHostnameVerifier;
import javax.net.ssl.SSLHandshakeException;
import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.X509TrustManager;
-import org.apache.harmony.security.provider.cert.X509CertImpl;
import org.apache.harmony.xnet.provider.jsse.SSLParametersImpl;
import org.apache.harmony.xnet.provider.jsse.TrustManagerImpl;
@@ -118,8 +119,14 @@
X509Certificate[] serverCertificates = new X509Certificate[certChain.length];
- for (int i = 0; i < certChain.length; ++i) {
- serverCertificates[i] = new X509CertImpl(certChain[i]);
+ try {
+ CertificateFactory cf = CertificateFactory.getInstance("X.509");
+ for (int i = 0; i < certChain.length; ++i) {
+ serverCertificates[i] = (X509Certificate) cf.generateCertificate(
+ new ByteArrayInputStream(certChain[i]));
+ }
+ } catch (CertificateException e) {
+ throw new IOException("can't read certificate", e);
}
return verifyServerDomainAndCertificates(serverCertificates, domain, authType);
diff --git a/core/java/android/webkit/BrowserFrame.java b/core/java/android/webkit/BrowserFrame.java
index ce886f2..0b384bf 100644
--- a/core/java/android/webkit/BrowserFrame.java
+++ b/core/java/android/webkit/BrowserFrame.java
@@ -40,13 +40,13 @@
import junit.framework.Assert;
+import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.lang.ref.WeakReference;
import java.net.URLEncoder;
-import java.nio.charset.Charsets;
import java.security.PrivateKey;
-import java.security.cert.CertificateEncodingException;
+import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.HashMap;
@@ -55,7 +55,6 @@
import java.util.Map;
import java.util.Set;
-import org.apache.harmony.security.provider.cert.X509CertImpl;
import org.apache.harmony.xnet.provider.jsse.OpenSSLKey;
import org.apache.harmony.xnet.provider.jsse.OpenSSLKeyHolder;
@@ -1081,10 +1080,12 @@
String url) {
final SslError sslError;
try {
- X509Certificate cert = new X509CertImpl(certDER);
+ CertificateFactory cf = CertificateFactory.getInstance("X.509");
+ X509Certificate cert = (X509Certificate) cf.generateCertificate(
+ new ByteArrayInputStream(certDER));
SslCertificate sslCert = new SslCertificate(cert);
sslError = SslError.SslErrorFromChromiumErrorCode(certError, sslCert, url);
- } catch (IOException e) {
+ } catch (Exception e) {
// Can't get the certificate, not much to do.
Log.e(LOGTAG, "Can't get the certificate from WebKit, canceling");
nativeSslCertErrorCancel(handle, certError);
@@ -1202,9 +1203,11 @@
*/
private void setCertificate(byte cert_der[]) {
try {
- X509Certificate cert = new X509CertImpl(cert_der);
+ CertificateFactory cf = CertificateFactory.getInstance("X.509");
+ X509Certificate cert = (X509Certificate) cf.generateCertificate(
+ new ByteArrayInputStream(cert_der));
mCallbackProxy.onReceivedCertificate(new SslCertificate(cert));
- } catch (IOException e) {
+ } catch (Exception e) {
// Can't get the certificate, not much to do.
Log.e(LOGTAG, "Can't get the certificate from WebKit, canceling");
return;
diff --git a/tools/aapt/Main.cpp b/tools/aapt/Main.cpp
index 32fecb2..977226b 100644
--- a/tools/aapt/Main.cpp
+++ b/tools/aapt/Main.cpp
@@ -48,6 +48,7 @@
" List contents of Zip-compatible archive.\n\n", gProgName);
fprintf(stderr,
" %s d[ump] [--values] WHAT file.{apk} [asset [asset ...]]\n"
+ " strings Print the contents of the resource table string pool in the APK.\n"
" badging Print the label and icon for the app declared in APK.\n"
" permissions Print the permissions from the APK.\n"
" resources Print the resource table from the APK.\n"