From 931dd8006da9347e4127453f753d027a50edec84 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 31 Jan 2016 19:50:52 +0100 Subject: [PATCH] Added notes --- app/src/main/java/eu/faircode/netguard/ActivityLog.java | 2 ++ .../main/java/eu/faircode/netguard/ActivitySettings.java | 1 + app/src/main/jni/netguard/netguard.c | 6 ++++++ 3 files changed, 9 insertions(+) diff --git a/app/src/main/java/eu/faircode/netguard/ActivityLog.java b/app/src/main/java/eu/faircode/netguard/ActivityLog.java index fa137b4b..60c9f23b 100644 --- a/app/src/main/java/eu/faircode/netguard/ActivityLog.java +++ b/app/src/main/java/eu/faircode/netguard/ActivityLog.java @@ -299,6 +299,8 @@ public class ActivityLog extends AppCompatActivity implements SharedPreferences. @Override public boolean onPrepareOptionsMenu(Menu menu) { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); + + // https://gist.github.com/granoeste/5574148 File pcap_file = new File(getCacheDir(), "netguard.pcap"); boolean resolve = prefs.getBoolean("resolve", false); diff --git a/app/src/main/java/eu/faircode/netguard/ActivitySettings.java b/app/src/main/java/eu/faircode/netguard/ActivitySettings.java index 8005650d..48e2ecd1 100644 --- a/app/src/main/java/eu/faircode/netguard/ActivitySettings.java +++ b/app/src/main/java/eu/faircode/netguard/ActivitySettings.java @@ -192,6 +192,7 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere }); // Handle hosts import + // https://github.com/Free-Software-for-Android/AdAway/wiki/HostsSources Preference pref_hosts = screen.findPreference("hosts"); Preference pref_block_domains = screen.findPreference("use_hosts"); pref_block_domains.setEnabled(new File(getFilesDir(), "hosts.txt").exists()); diff --git a/app/src/main/jni/netguard/netguard.c b/app/src/main/jni/netguard/netguard.c index 48d38cec..16468bd1 100644 --- a/app/src/main/jni/netguard/netguard.c +++ b/app/src/main/jni/netguard/netguard.c @@ -2786,6 +2786,12 @@ jobject create_packet(const struct arguments *args, gettimeofday(&start, NULL); #endif + /* + jbyte b[] = {1,2,3}; + jbyteArray ret = env->NewByteArray(3); + env->SetByteArrayRegion (ret, 0, 3, b); + */ + const char *packet = "eu/faircode/netguard/Packet"; if (midInitPacket == NULL) midInitPacket = jniGetMethodID(env, clsPacket, "", "()V");