- gradle
The command gradlew is wrapper of jar file, the proxy setting is the same with the standard Java proxy setting.
./gradlew -DsocksProxyHost=127.0.0.1 -DsocksProxyPort=5000 tasks
- hg
import android.net.Uri; | |
import android.util.Log; | |
import android.webkit.WebView; | |
/** | |
* using java reflect method to get html5 video data source | |
*/ | |
public class WebViewDataSourceReflect { | |
private static final String TAG = WebViewDataSourceReflect.class.getSimpleName(); |
import java.lang.reflect.Constructor; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.Method; | |
import org.apache.http.HttpHost; | |
import android.annotation.SuppressLint; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.net.Proxy; |
Index: core/prebuilt.mk | |
=================================================================== | |
--- core/prebuilt.mk (revision 2966) | |
+++ core/prebuilt.mk (working copy) | |
@@ -16,6 +16,16 @@ | |
$(error dont use LOCAL_PREBUILT_JAVA_LIBRARIES anymore LOCAL_PATH=$(LOCAL_PATH)) | |
endif | |
+#ifneq ($(filter APPS,$(LOCAL_MODULE_CLASS)),) | |
+# ifeq (true,$(WITH_DEXPREOPT)) |
#!/bin/bash | |
function usage() | |
{ | |
echo "Usage: $0 kerneldir arch" | |
exit 1 | |
} | |
if [ "$1" == "" -o "$2" == "" ] | |
then |
#!/bin/bash | |
# | |
# This file echoes a bunch of color codes to the | |
# terminal to demonstrate what's available. Each | |
# line is the color code of one forground color, | |
# out of 17 (default + 16 escapes), followed by a | |
# test use of that color on all nine background | |
# colors (default + 8 escapes). | |
# | |
# Author: Giles Orr |
#!/bin/sh | |
# | |
# colors v1.03 | |
# | |
# A simple shell script to output an ANSI terminal color chart. | |
# It may be useful when trying to customize your ANSI terminal | |
# color scheme! | |
# | |
# Written and placed in the public domain by Ian Abbott <[email protected]> | |
# |
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 | |
http://maven.apache.org/xsd/settings-1.0.0.xsd"> | |
<proxies> | |
<proxy> | |
<id>proxy</id> | |
<active>true</active> | |
<protocol>http</protocol> | |
<host>192.168.1.254</host> |
buildscript { | |
repositories { | |
flatDir { dirs '../FrameworkJars' } | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:1.0.0' | |
} | |
} | |
apply plugin: 'android' |
public class PrivateExample { | |
public static void main(String[] args) throws Exception { | |
KeyGenerator keyGenerator = KeyGenerator.getInstance("DES"); | |
SecretKey secretKey = keyGenerator.generateKey(); | |
String desString = Base64.encodeBase64String(secretKey.getEncoded()); | |
System.out.println("DES Base64 String: " + desString); | |