Loading cmds/input/src/com/android/commands/input/Input.java +9 −7 Original line number Diff line number Diff line Loading @@ -56,12 +56,14 @@ public class Input { return; } } else if (command.equals("keyevent")) { if (args.length == 2) { int keyCode = KeyEvent.keyCodeFromString(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[1]); keyCode = KeyEvent.keyCodeFromString("KEYCODE_" + args[i]); } sendKeyEvent(keyCode); } return; } } else if (command.equals("tap")) { Loading Loading @@ -237,7 +239,7 @@ public class Input { 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); } Loading @@ -249,7 +251,7 @@ public class Input { 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)]"); Loading core/java/android/net/http/CertificateChainValidator.java +10 −3 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -118,8 +119,14 @@ public class CertificateChainValidator { X509Certificate[] serverCertificates = new X509Certificate[certChain.length]; try { CertificateFactory cf = CertificateFactory.getInstance("X.509"); for (int i = 0; i < certChain.length; ++i) { serverCertificates[i] = new X509CertImpl(certChain[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); Loading core/java/android/webkit/BrowserFrame.java +10 −7 Original line number Diff line number Diff line Loading @@ -40,13 +40,13 @@ import android.view.WindowManager; 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; Loading @@ -55,7 +55,6 @@ import java.util.Iterator; 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; Loading Loading @@ -1081,10 +1080,12 @@ class BrowserFrame extends Handler { 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); Loading Loading @@ -1202,9 +1203,11 @@ class BrowserFrame extends Handler { */ 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; Loading tools/aapt/Main.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ void usage(void) " 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" Loading Loading
cmds/input/src/com/android/commands/input/Input.java +9 −7 Original line number Diff line number Diff line Loading @@ -56,12 +56,14 @@ public class Input { return; } } else if (command.equals("keyevent")) { if (args.length == 2) { int keyCode = KeyEvent.keyCodeFromString(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[1]); keyCode = KeyEvent.keyCodeFromString("KEYCODE_" + args[i]); } sendKeyEvent(keyCode); } return; } } else if (command.equals("tap")) { Loading Loading @@ -237,7 +239,7 @@ public class Input { 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); } Loading @@ -249,7 +251,7 @@ public class Input { 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)]"); Loading
core/java/android/net/http/CertificateChainValidator.java +10 −3 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -118,8 +119,14 @@ public class CertificateChainValidator { X509Certificate[] serverCertificates = new X509Certificate[certChain.length]; try { CertificateFactory cf = CertificateFactory.getInstance("X.509"); for (int i = 0; i < certChain.length; ++i) { serverCertificates[i] = new X509CertImpl(certChain[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); Loading
core/java/android/webkit/BrowserFrame.java +10 −7 Original line number Diff line number Diff line Loading @@ -40,13 +40,13 @@ import android.view.WindowManager; 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; Loading @@ -55,7 +55,6 @@ import java.util.Iterator; 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; Loading Loading @@ -1081,10 +1080,12 @@ class BrowserFrame extends Handler { 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); Loading Loading @@ -1202,9 +1203,11 @@ class BrowserFrame extends Handler { */ 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; Loading
tools/aapt/Main.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ void usage(void) " 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" Loading