Set attribute sucUsePartnerResource
Add the attribute for all pages apply gliflayout of setupdesign library. In addition, set the value false to remove stencil theme customization for outside setupwizard flow. Test: atest Bug: 128961334 Bug: 128364683 Change-Id: If55e9bf97970a5cd08d8d426747c483d80565559
This commit is contained in:
@@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
<com.google.android.setupdesign.GlifLayout
|
<com.google.android.setupdesign.GlifLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:icon="@drawable/ic_lock">
|
android:icon="@drawable/ic_lock">
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
<com.google.android.setupdesign.GlifLayout
|
<com.google.android.setupdesign.GlifLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:id="@+id/setup_wizard_layout"
|
android:id="@+id/setup_wizard_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
<com.google.android.setupdesign.GlifLayout
|
<com.google.android.setupdesign.GlifLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:id="@+id/setup_wizard_layout"
|
android:id="@+id/setup_wizard_layout"
|
||||||
style="?attr/face_layout_theme"
|
style="?attr/face_layout_theme"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
<com.google.android.setupdesign.GlifLayout
|
<com.google.android.setupdesign.GlifLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:id="@+id/setup_wizard_layout"
|
android:id="@+id/setup_wizard_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
<com.google.android.setupdesign.GlifLayout
|
<com.google.android.setupdesign.GlifLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:id="@+id/setup_wizard_layout"
|
android:id="@+id/setup_wizard_layout"
|
||||||
style="?attr/fingerprint_layout_theme"
|
style="?attr/fingerprint_layout_theme"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
<com.google.android.setupdesign.GlifLayout
|
<com.google.android.setupdesign.GlifLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:id="@+id/setup_wizard_layout"
|
android:id="@+id/setup_wizard_layout"
|
||||||
style="?attr/fingerprint_layout_theme"
|
style="?attr/fingerprint_layout_theme"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
<com.google.android.setupdesign.GlifLayout
|
<com.google.android.setupdesign.GlifLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
style="?attr/fingerprint_layout_theme"
|
style="?attr/fingerprint_layout_theme"
|
||||||
android:id="@+id/setup_wizard_layout"
|
android:id="@+id/setup_wizard_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
<com.google.android.setupdesign.GlifLayout
|
<com.google.android.setupdesign.GlifLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:id="@+id/setup_wizard_layout"
|
android:id="@+id/setup_wizard_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
@@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
<com.google.android.setupdesign.GlifLayout
|
<com.google.android.setupdesign.GlifLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:id="@+id/setup_wizard_layout"
|
android:id="@+id/setup_wizard_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
@@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
<com.google.android.setupdesign.GlifLayout
|
<com.google.android.setupdesign.GlifLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:id="@+id/setup_wizard_layout"
|
android:id="@+id/setup_wizard_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
@@ -533,4 +533,9 @@
|
|||||||
<item name="android:paddingEnd">8dp</item>
|
<item name="android:paddingEnd">8dp</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="SetupWizardPartnerResource">
|
||||||
|
<!-- Disable to use partner overlay theme for outside setupwizard flow. -->
|
||||||
|
<item name="sucUsePartnerResource">false</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -27,6 +27,7 @@ import android.content.SharedPreferences;
|
|||||||
import android.content.pm.ActivityInfo;
|
import android.content.pm.ActivityInfo;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.content.pm.PackageManager.NameNotFoundException;
|
import android.content.pm.PackageManager.NameNotFoundException;
|
||||||
|
import android.content.res.Resources.Theme;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.UserHandle;
|
import android.os.UserHandle;
|
||||||
@@ -333,6 +334,12 @@ public class SettingsActivity extends SettingsBaseActivity
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onApplyThemeResource(Theme theme, int resid, boolean first) {
|
||||||
|
theme.applyStyle(R.style.SetupWizardPartnerResource, true);
|
||||||
|
super.onApplyThemeResource(theme, resid, first);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||||
super.onActivityResult(requestCode, resultCode, data);
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
|
@@ -21,6 +21,7 @@ import static com.android.settings.Utils.SETTINGS_PACKAGE_NAME;
|
|||||||
import android.annotation.Nullable;
|
import android.annotation.Nullable;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
|
import android.content.res.Resources.Theme;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.UserHandle;
|
import android.os.UserHandle;
|
||||||
@@ -97,6 +98,7 @@ public abstract class BiometricEnrollBase extends InstrumentedActivity {
|
|||||||
@Override
|
@Override
|
||||||
protected void onApplyThemeResource(Resources.Theme theme, int resid, boolean first) {
|
protected void onApplyThemeResource(Resources.Theme theme, int resid, boolean first) {
|
||||||
resid = SetupWizardUtils.getTheme(getIntent());
|
resid = SetupWizardUtils.getTheme(getIntent());
|
||||||
|
theme.applyStyle(R.style.SetupWizardPartnerResource, true);
|
||||||
super.onApplyThemeResource(theme, resid, first);
|
super.onApplyThemeResource(theme, resid, first);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -24,6 +24,7 @@ import static com.android.settings.deviceinfo.StorageSettings.TAG;
|
|||||||
import android.annotation.LayoutRes;
|
import android.annotation.LayoutRes;
|
||||||
import android.annotation.NonNull;
|
import android.annotation.NonNull;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.content.res.Resources.Theme;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
@@ -123,6 +124,12 @@ public abstract class StorageWizardBase extends FragmentActivity {
|
|||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onApplyThemeResource(Theme theme, int resid, boolean first) {
|
||||||
|
theme.applyStyle(R.style.SetupWizardPartnerResource, true);
|
||||||
|
super.onApplyThemeResource(theme, resid, first);
|
||||||
|
}
|
||||||
|
|
||||||
protected FooterButton getBackButton() {
|
protected FooterButton getBackButton() {
|
||||||
return mBack;
|
return mBack;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user