Encrypt and save crash reports, send them the next time TorPlugin start

Will currently fail at runtime; requires a public key and a server onion.
This commit is contained in:
str4d
2016-03-31 11:11:55 +00:00
parent 28086cd359
commit d545aaa892
18 changed files with 342 additions and 32 deletions

View File

@@ -17,11 +17,15 @@ import java.util.Collection;
import java.util.Collections;
import java.util.List;
import static android.content.Context.MODE_PRIVATE;
public class AndroidUtils {
// Fake Bluetooth address returned by BluetoothAdapter on API 23 and later
private static final String FAKE_BLUETOOTH_ADDRESS = "02:00:00:00:00:00";
private static final String STORED_CRASH_REPORTS = "crash-reports";
@SuppressLint("NewApi")
@SuppressWarnings("deprecation")
public static Collection<String> getSupportedArchitectures() {
@@ -84,4 +88,8 @@ public class AndroidUtils {
}
}
}
public static File getCrashReportDir(Context ctx) {
return ctx.getDir(STORED_CRASH_REPORTS, MODE_PRIVATE);
}
}