[Setup] Theme ChooseLockGeneric for setup wizard
This is step one of theming the set-up lock screen flow to match the setup wizard theme. This shows the general approach of creating a subclass of both the activity and fragment and overriding methods to achieve the desired behavior for setup. ag/594000 is a much more comprehensive change for what the final change will look like. Bug: 18482708 Change-Id: Idff34937f39f46a0c488df2cae4c46155b80cab7
This commit is contained in:
@@ -19,6 +19,7 @@ package com.android.settings;
|
||||
import android.accessibilityservice.AccessibilityServiceInfo;
|
||||
import android.app.Activity;
|
||||
import android.app.ActivityManagerNative;
|
||||
import android.app.Fragment;
|
||||
import android.app.PendingIntent;
|
||||
import android.app.admin.DevicePolicyManager;
|
||||
import android.content.Context;
|
||||
@@ -50,7 +51,7 @@ public class ChooseLockGeneric extends SettingsActivity {
|
||||
@Override
|
||||
public Intent getIntent() {
|
||||
Intent modIntent = new Intent(super.getIntent());
|
||||
modIntent.putExtra(EXTRA_SHOW_FRAGMENT, ChooseLockGenericFragment.class.getName());
|
||||
modIntent.putExtra(EXTRA_SHOW_FRAGMENT, getFragmentClass().getName());
|
||||
return modIntent;
|
||||
}
|
||||
|
||||
@@ -60,6 +61,10 @@ public class ChooseLockGeneric extends SettingsActivity {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* package */ Class<? extends Fragment> getFragmentClass() {
|
||||
return ChooseLockGenericFragment.class;
|
||||
}
|
||||
|
||||
public static class InternalActivity extends ChooseLockGeneric {
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user