feat: v0.3.6.0 — AES-GCM field encryption, PIN/passphrase security, encryption verifier, backup codec
build / Assemble debug APK (push) Failing after 2s
No files matched your search
@@ -3,6 +3,7 @@ package org.incido.app
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.view.WindowManager
|
||||
import androidx.activity.compose.setContent
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
@@ -37,6 +38,14 @@ class MainActivity : FragmentActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
enableEdgeToEdge()
|
||||
// v0.3.5.0: block screenshots / screen recording / app-switcher
|
||||
// previews per the user's preference (ON by default). Apply the
|
||||
// snapshot synchronously so the very first frame is protected,
|
||||
// then keep reacting to the settings flow so flipping the
|
||||
// toggle in Settings takes effect immediately.
|
||||
applyScreenshotBlock((application as org.incido.compose.IncidoApplication)
|
||||
.container.settingsRepository.snapshot().blockScreenshots)
|
||||
observeScreenshotBlock()
|
||||
handleShareIntent(intent)
|
||||
setContent {
|
||||
val app = application as org.incido.compose.IncidoApplication
|
||||
@@ -73,6 +82,28 @@ class MainActivity : FragmentActivity() {
|
||||
app?.container?.securityManager?.onAppBackgrounded()
|
||||
}
|
||||
|
||||
/** v0.3.5.0 — set or clear [WindowManager.LayoutParams.FLAG_SECURE]. */
|
||||
private fun applyScreenshotBlock(block: Boolean) {
|
||||
if (block) {
|
||||
window.setFlags(
|
||||
WindowManager.LayoutParams.FLAG_SECURE,
|
||||
WindowManager.LayoutParams.FLAG_SECURE,
|
||||
)
|
||||
} else {
|
||||
window.clearFlags(WindowManager.LayoutParams.FLAG_SECURE)
|
||||
}
|
||||
}
|
||||
|
||||
/** v0.3.5.0 — react to live changes of the "Block screenshots" toggle. */
|
||||
private fun observeScreenshotBlock() {
|
||||
val app = application as org.incido.compose.IncidoApplication
|
||||
lifecycleScope.launch {
|
||||
app.container.settingsRepository.userSettingsFlow.collect { settings ->
|
||||
applyScreenshotBlock(settings.blockScreenshots)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Decode any ACTION_SEND / ACTION_SEND_MULTIPLE payload into a
|
||||
* [SharedIntentBuffer.Payload] and stash it. Safe to call multiple
|
||||
@@ -90,7 +121,13 @@ class MainActivity : FragmentActivity() {
|
||||
// would otherwise run the image-byte I/O asynchronously and miss
|
||||
// the first composition. We push an initial payload with no
|
||||
// images; the async block then re-`put`s with images appended.
|
||||
//
|
||||
// v0.3.6.0: also stash EXTRA_SUBJECT — most browsers fill it
|
||||
// with the page `<title>` for share-URL intents, which the
|
||||
// LinkedShareComposer uses as the note title (offline-only,
|
||||
// see app/src/main/AndroidManifest.xml).
|
||||
val text: String? = intent.getStringExtra(Intent.EXTRA_TEXT)
|
||||
val subject: String? = intent.getStringExtra(Intent.EXTRA_SUBJECT)
|
||||
val uris: List<Uri> = when (action) {
|
||||
Intent.ACTION_SEND -> listOfNotNull(
|
||||
@Suppress("DEPRECATION")
|
||||
@@ -101,7 +138,7 @@ class MainActivity : FragmentActivity() {
|
||||
else -> emptyList()
|
||||
}
|
||||
SharedIntentBuffer.put(
|
||||
SharedIntentBuffer.Payload(text = text, images = emptyList())
|
||||
SharedIntentBuffer.Payload(text = text, images = emptyList(), subject = subject)
|
||||
)
|
||||
|
||||
if (uris.isNotEmpty()) {
|
||||
|
||||
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 124 KiB |
|
After Width: | Height: | Size: 214 KiB |
@@ -1,30 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
|
||||
<!--
|
||||
Foreground glyph for the adaptive launcher icon. A stylised
|
||||
inscription mark — two parallel lines bisected by a diagonal cut.
|
||||
The "incido" mark. Sized for the 72dp safe area inside the 108dp
|
||||
adaptive icon canvas.
|
||||
-->
|
||||
|
||||
<!-- Left vertical bar -->
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M 38 30 L 46 30 L 46 78 L 38 78 Z" />
|
||||
|
||||
<!-- Right vertical bar -->
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M 62 30 L 70 30 L 70 78 L 62 78 Z" />
|
||||
|
||||
<!-- Diagonal cut (incido = "I cut into") -->
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M 34 42 L 74 66 L 70 72 L 30 48 Z" />
|
||||
|
||||
</vector>
|
||||
@@ -1,6 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
v0.3.3.8: designed icon replaces the v0.1 placeholder glyph.
|
||||
The foreground is the density-bucketed incido.png artwork
|
||||
(drawable-<density>/ic_launcher_foreground.png, sized for the
|
||||
108dp adaptive canvas); the background matches the artwork's
|
||||
edge colour so parallax exposure is seamless.
|
||||
-->
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
</adaptive-icon>
|
||||
@@ -1,6 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
v0.3.3.8: designed icon replaces the v0.1 placeholder glyph.
|
||||
Round launcher variant of the adaptive icon; same artwork
|
||||
layers as ic_launcher.xml.
|
||||
-->
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
</adaptive-icon>
|
||||
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 9.2 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 46 KiB |
@@ -1,5 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Brand-neutral background for the adaptive launcher icon. -->
|
||||
<color name="ic_launcher_background">#6650A4</color>
|
||||
<!-- v0.3.3.8: background for the adaptive launcher icon, matched to
|
||||
the edge colour of the incido.png artwork so parallax exposure
|
||||
of the background layer is seamless. -->
|
||||
<color name="ic_launcher_background">#010435</color>
|
||||
</resources>
|
||||