Update deprecated code
Change-Id: I1b128b0f8b654c5c76464c12145d927ec10da26e
This commit is contained in:
committed by
Michael Bestas
parent
83338c4ae6
commit
f58c0f4b83
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2016 The CyanogenMod Project
|
||||
* Copyright (C) 2017-2023 The LineageOS Project
|
||||
* Copyright (C) 2017-2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -17,6 +17,10 @@
|
||||
|
||||
package org.lineageos.setupwizard;
|
||||
|
||||
import static org.lineageos.setupwizard.SetupWizardApp.ACTION_ACCESSIBILITY_SETTINGS;
|
||||
import static org.lineageos.setupwizard.SetupWizardApp.ACTION_EMERGENCY_DIAL;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
@@ -27,29 +31,34 @@ import com.google.android.setupcompat.util.SystemBarHelper;
|
||||
|
||||
import org.lineageos.setupwizard.util.SetupWizardUtils;
|
||||
|
||||
public class WelcomeActivity extends BaseSetupWizardActivity {
|
||||
public class WelcomeActivity extends SubBaseActivity {
|
||||
|
||||
public static final String TAG = WelcomeActivity.class.getSimpleName();
|
||||
|
||||
private View mRootView;
|
||||
@Override
|
||||
protected void onStartSubactivity() {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
onSetupStart();
|
||||
SystemBarHelper.setBackButtonVisible(getWindow(), false);
|
||||
mRootView = findViewById(R.id.setup_wizard_layout);
|
||||
View rootView = findViewById(R.id.setup_wizard_layout);
|
||||
setNextText(R.string.start);
|
||||
Button startButton = findViewById(R.id.start);
|
||||
Button emergButton = findViewById(R.id.emerg_dialer);
|
||||
startButton.setOnClickListener(view -> onNextPressed());
|
||||
findViewById(R.id.launch_accessibility)
|
||||
.setOnClickListener(view -> startAccessibilitySettings());
|
||||
.setOnClickListener(
|
||||
view -> startSubactivity(new Intent(ACTION_ACCESSIBILITY_SETTINGS)));
|
||||
|
||||
FooterButtonStyleUtils.applyPrimaryButtonPartnerResource(this, startButton, true);
|
||||
|
||||
if (SetupWizardUtils.hasTelephony(this)) {
|
||||
setSkipText(R.string.emergency_call);
|
||||
emergButton.setOnClickListener(view -> startEmergencyDialer());
|
||||
emergButton.setOnClickListener(
|
||||
view -> startSubactivity(new Intent(ACTION_EMERGENCY_DIAL)));
|
||||
|
||||
FooterButtonStyleUtils.applySecondaryButtonPartnerResource(this, emergButton, true);
|
||||
} else {
|
||||
@@ -61,12 +70,13 @@ public class WelcomeActivity extends BaseSetupWizardActivity {
|
||||
getString(R.string.os_name)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutResId() {
|
||||
return R.layout.welcome_activity;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getTitleResId() {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user