SetupWizard: Add option to skip setup wizard on eng builds
Change-Id: I160e95f7985b60740a94d059506ec5716d85cc41
This commit is contained in:
committed by
Bruno Martins
parent
ff8446a504
commit
bf0afd2ffc
@@ -82,5 +82,12 @@
|
||||
android:text="@string/accessibility_settings"
|
||||
style="@style/SudGlifButton.Secondary" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/skip"
|
||||
style="@style/SudGlifButton.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/skip"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
@@ -82,5 +82,12 @@
|
||||
android:text="@string/accessibility_settings"
|
||||
style="@style/SudGlifButton.Secondary" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/skip"
|
||||
style="@style/SudGlifButton.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/skip"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
@@ -108,6 +108,19 @@
|
||||
android:layout_height="0.0dip"
|
||||
android:layout_weight="1.0" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/skip"
|
||||
style="@style/SudGlifButton.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/skip"
|
||||
android:visibility="gone" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0.0dip"
|
||||
android:layout_height="0.0dip"
|
||||
android:layout_weight="1.0" />
|
||||
|
||||
<Button
|
||||
android:id="@id/start"
|
||||
style="@style/SudGlifButton.Primary"
|
||||
|
@@ -10,6 +10,7 @@ import static org.lineageos.setupwizard.SetupWizardApp.ACTION_EMERGENCY_DIAL;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Build;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
@@ -36,6 +37,7 @@ public class WelcomeActivity extends SubBaseActivity {
|
||||
setNextText(R.string.start);
|
||||
Button startButton = findViewById(R.id.start);
|
||||
Button emergButton = findViewById(R.id.emerg_dialer);
|
||||
Button skipButton = findViewById(R.id.skip);
|
||||
startButton.setOnClickListener(view -> onNextPressed());
|
||||
findViewById(R.id.launch_accessibility)
|
||||
.setOnClickListener(
|
||||
@@ -60,6 +62,13 @@ public class WelcomeActivity extends SubBaseActivity {
|
||||
welcomeTitle.setText(getString(R.string.setup_welcome_message,
|
||||
getString(R.string.os_name)));
|
||||
}
|
||||
|
||||
if (Build.TYPE.equals("eng")) {
|
||||
skipButton.setVisibility(View.VISIBLE);
|
||||
skipButton.setOnClickListener(v -> {
|
||||
SetupWizardUtils.finishSetupWizard(WelcomeActivity.this);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user