From fbfb518250c37ed8dcdc7789754b4ba17578fd83 Mon Sep 17 00:00:00 2001 From: Dmitry Muhomor Date: Thu, 30 May 2024 17:23:38 +0300 Subject: [PATCH] allow to skip setup on debuggable builds by tapping the Welcome message --- .../setupwizard/view/activity/WelcomeActivity.kt | 7 +++++++ res/layout/activity_welcome.xml | 1 + 2 files changed, 8 insertions(+) diff --git a/java/app/grapheneos/setupwizard/view/activity/WelcomeActivity.kt b/java/app/grapheneos/setupwizard/view/activity/WelcomeActivity.kt index 921abd3..e6d4eef 100644 --- a/java/app/grapheneos/setupwizard/view/activity/WelcomeActivity.kt +++ b/java/app/grapheneos/setupwizard/view/activity/WelcomeActivity.kt @@ -1,6 +1,7 @@ package app.grapheneos.setupwizard.view.activity import android.content.pm.PackageManager +import android.os.Build import android.os.Bundle import android.util.Log import android.view.View @@ -43,6 +44,12 @@ class WelcomeActivity : SetupWizardActivity(R.layout.activity_welcome) { @MainThread override fun bindViews() { + if (Build.isDebuggable()) { + requireViewById(R.id.welcome_to_grapheneos).setOnClickListener { + FinishActions.finish(this@WelcomeActivity) + } + } + oemUnlockedContainer = requireViewById(R.id.oem_unlocked_container) language = requireViewById(R.id.language) accessibility = requireViewById(R.id.accessibility) diff --git a/res/layout/activity_welcome.xml b/res/layout/activity_welcome.xml index 00bbfa7..f5c356a 100644 --- a/res/layout/activity_welcome.xml +++ b/res/layout/activity_welcome.xml @@ -69,6 +69,7 @@ android:src="@drawable/grapheneos_icon" />