Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ dependencies {
detektPlugins(libs.detekt.compose)
detektPlugins(libs.detekt.rules.compose)

debugImplementation("com.squareup.leakcanary:leakcanary-android:3.0-alpha-8")
// debugImplementation("com.squareup.leakcanary:leakcanary-android:3.0-alpha-8")
}

configurations.all {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@
val proofModeSwitch = findPreference<SwitchPreferenceCompat>(Prefs.USE_PROOFMODE)

// Check if permission is granted
val hasPermission = ContextCompat.checkSelfPermission(
requireContext(), Manifest.permission.READ_PHONE_STATE
) == PackageManager.PERMISSION_GRANTED
val hasPermission = ContextCompat.checkSelfPermission(requireContext(), Manifest.permission.READ_PHONE_STATE) == PackageManager.PERMISSION_GRANTED

Check warning

Code scanning / detekt

Reports lines with exceeded length Warning

Exceeded max line length (120)
&& ContextCompat.checkSelfPermission(requireContext(), Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED

Check warning

Code scanning / detekt

Reports lines with exceeded length Warning

Exceeded max line length (120)

Check warning

Code scanning / detekt

Reports mis-indented code Warning

Unexpected indentation (20) (should be 16)

Check warning

Code scanning / detekt

Checks if condition chaining is wrapped right Warning

Line must not begin with "&&"
&& ContextCompat.checkSelfPermission(requireContext(), Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED

Check warning

Code scanning / detekt

Reports mis-indented code Warning

Unexpected indentation (20) (should be 16)

Check warning

Code scanning / detekt

Checks if condition chaining is wrapped right Warning

Line must not begin with "&&"

if (!hasPermission) {
proofModeSwitch?.isChecked = false // Uncheck if permission not granted
Expand All @@ -68,7 +68,7 @@
getPrefByKey<SwitchPreferenceCompat>(R.string.pref_key_use_proof_mode)?.setOnPreferenceChangeListener { preference, newValue ->
if (newValue as Boolean) {
PermissionX.init(this)
.permissions(Manifest.permission.READ_PHONE_STATE)
.permissions(Manifest.permission.READ_PHONE_STATE, Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION)

Check warning

Code scanning / detekt

Reports lines with exceeded length Warning

Exceeded max line length (120)

Check warning

Code scanning / detekt

Reports incorrect argument list wrapping Warning

Argument should be on a separate line (unless all arguments can fit a single line)

Check warning

Code scanning / detekt

Reports incorrect argument list wrapping Warning

Argument should be on a separate line (unless all arguments can fit a single line)

Check warning

Code scanning / detekt

Reports incorrect argument list wrapping Warning

Argument should be on a separate line (unless all arguments can fit a single line)

Check warning

Code scanning / detekt

Reports incorrect argument list wrapping Warning

Missing newline before ")"
.onExplainRequestReason { _, _ ->
val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS)
val uri = Uri.fromParts("package", activity?.packageName, null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ abstract class Conduit(
if (!Prefs.useProofMode) return emptyArray()

// Don't use geolocation and network information.
Prefs.proofModeLocation = false
Prefs.proofModeNetwork = false
Prefs.proofModeLocation = true
Prefs.proofModeNetwork = true

try {
var hash = ProofMode.generateProof(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ object ProofModeHelper {
if (initialized) return completed()

// Disable ProofMode GPS data tracking by default.
if (Prefs.proofModeLocation) Prefs.proofModeLocation = false
if (Prefs.proofModeLocation) Prefs.proofModeLocation = true

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
val encryptedPassphrase = Prefs.proofModeEncryptedPassphrase
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@


<!-- Strings for ProofMode Activity -->
<string name="phone_permission_required">Phone permission required</string>
<string name="phone_permission_required">Phone and Location permission required</string>

<!-- Strings for nearby sharing -->

Expand Down
Loading