Stage 1 (0.129): report, evidence, timing keys from the screen's root; build memory raised
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -66,10 +66,6 @@ class MainActivity : ComponentActivity() {
|
||||
* opens as one copy (singleTask, 8 November 2026), also when adb sends them to an Orbit already open.
|
||||
*/
|
||||
private fun readAdbRequests(intent: android.content.Intent?) = Edition.readAdbRequests(this, intent)
|
||||
override fun dispatchKeyEvent(event: android.view.KeyEvent): Boolean {
|
||||
if (event.action == android.view.KeyEvent.ACTION_DOWN && event.repeatCount == 0) OrbitTiming.key(event.keyCode)
|
||||
return super.dispatchKeyEvent(event)
|
||||
}
|
||||
override fun onNewIntent(intent: android.content.Intent) { super.onNewIntent(intent); setIntent(intent); readAdbRequests(intent) }
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
// A restore confirmed on the phone's backup is put in place first, before anything here reads the data.
|
||||
@@ -192,6 +188,8 @@ private fun OrbitApp() {
|
||||
val activity = androidx.activity.compose.LocalActivity.current
|
||||
LaunchedEffect(Unit) { while (true) { delay(1000); if (SleepTimer.tick(System.currentTimeMillis())) { SleepTimer.clear(); activity?.finish() } } }
|
||||
Box(Modifier.fillMaxSize().background(Navy).onPreviewKeyEvent { event ->
|
||||
// Timings (0.129 stage 0): when the press came, for the next frame drawn after it. Off unless switched on.
|
||||
if (event.nativeKeyEvent.action == android.view.KeyEvent.ACTION_DOWN && event.nativeKeyEvent.repeatCount == 0) OrbitTiming.key(event.nativeKeyEvent.keyCode)
|
||||
// The first press after two hours without one asks who's watching, and does nothing else (WatchCheck).
|
||||
if (event.nativeKeyEvent.action == android.view.KeyEvent.ACTION_DOWN && WatchCheck.key()) { WatchCheck.swallowUp = true; return@onPreviewKeyEvent true }
|
||||
if (event.nativeKeyEvent.action == android.view.KeyEvent.ACTION_UP && WatchCheck.swallowUp) { WatchCheck.swallowUp = false; return@onPreviewKeyEvent true }
|
||||
|
||||
Reference in New Issue
Block a user