Introduce realtime log viewer

This contains a share button and a save button, the former using a
custom content provider.

Co-authored-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Harsh Shandilya
2020-03-26 00:49:01 -06:00
committed by Jason A. Donenfeld
co-authored by Jason A. Donenfeld
parent 6f973afa36
commit 63a395125a
20 changed files with 449 additions and 117 deletions
@@ -4,6 +4,7 @@
*/
package com.wireguard.android.activity
import android.content.Intent
import android.content.pm.PackageManager
import android.os.Build
import android.os.Bundle
@@ -100,6 +101,10 @@ class SettingsActivity : ThemeChangeAwareActivity() {
wgQuickOnlyPrefs.forEach { it.parent?.removePreference(it) }
}
}
preferenceManager.findPreference<Preference>("log_viewer")?.setOnPreferenceClickListener {
startActivity(Intent(requireContext(), LogViewerActivity::class.java))
true
}
val moduleInstaller = preferenceManager.findPreference<Preference>("module_downloader")
val kernelModuleDisabler = preferenceManager.findPreference<Preference>("kernel_module_disabler")
moduleInstaller?.isVisible = false