Merge "Remove background tint during SUW" into tm-qpr-dev am: 135041eab5

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/21265617

Change-Id: I673e399d2e40d9dec1b216901902645be022dd45
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Diya Bera
2023-02-06 18:28:50 +00:00
committed by Automerger Merge Worker
4 changed files with 62 additions and 4 deletions

View File

@@ -21,8 +21,8 @@
android:viewportHeight="24">
<path
android:pathData="M18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6h2c0,-1.66 1.34,-3 3,-3s3,1.34 3,3v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM18,20L6,20L6,10h12v10z"
android:fillColor="?attr/sudListItemIconColor"/>
android:fillColor="?android:attr/colorAccent"/>
<path
android:pathData="M12,15m-2,0a2,2 0,1 1,4 0a2,2 0,1 1,-4 0"
android:fillColor="?attr/sudListItemIconColor"/>
android:fillColor="?android:attr/colorAccent"/>
</vector>

View File

@@ -21,8 +21,8 @@
android:viewportHeight="24">
<path
android:pathData="M20.5,2v2.02C18.18,2.13 15.22,1 12,1S5.82,2.13 3.5,4.02V2H2v3.5V7h1.5H7V5.5H4.09c2.11,-1.86 4.88,-3 7.91,-3s5.79,1.14 7.91,3H17V7h3.5H22V5.5V2H20.5z"
android:fillColor="?attr/sudListItemIconColor"/>
android:fillColor="?android:attr/colorAccent"/>
<path
android:pathData="M18.89,13.77l-3.8,-1.67C14.96,12.04 14.81,12 14.65,12H14l0,-4.37c0,-1.32 -0.96,-2.5 -2.27,-2.62C10.25,4.88 9,6.05 9,7.5v8.15l-1.87,-0.4c-0.19,-0.03 -1.02,-0.15 -1.73,0.56L4,17.22l5.12,5.19C9.49,22.79 10,23 10.53,23h6.55c0.98,0 1.81,-0.7 1.97,-1.67l0.92,-5.44C20.12,15.03 19.68,14.17 18.89,13.77zM18,15.56L17.08,21h-6.55l-3.7,-3.78L11,18.11V7.5C11,7.22 11.22,7 11.5,7S12,7.22 12,7.5v6.18h1.76L18,15.56z"
android:fillColor="?attr/sudListItemIconColor"/>
android:fillColor="?android:attr/colorAccent"/>
</vector>

View File

@@ -72,6 +72,7 @@ import com.android.settings.EventLogTags;
import com.android.settings.R;
import com.android.settings.SettingsActivity;
import com.android.settings.SettingsPreferenceFragment;
import com.android.settings.SetupWizardUtils;
import com.android.settings.Utils;
import com.android.settings.biometrics.BiometricEnrollActivity;
import com.android.settings.biometrics.BiometricEnrollBase;
@@ -428,6 +429,9 @@ public class ChooseLockGeneric extends SettingsActivity {
Intent chooseLockGenericIntent = new Intent(getActivity(),
getInternalActivityClass());
chooseLockGenericIntent.setAction(getIntent().getAction());
if (WizardManagerHelper.isAnySetupWizard(getIntent())) {
SetupWizardUtils.copySetupExtras(getIntent(), chooseLockGenericIntent);
}
// Forward the target user id to ChooseLockGeneric.
chooseLockGenericIntent.putExtra(Intent.EXTRA_USER_ID, mUserId);
chooseLockGenericIntent.putExtra(CONFIRM_CREDENTIALS, !mPasswordConfirmed);

View File

@@ -24,6 +24,8 @@ import static com.android.settings.password.ChooseLockSettingsHelper.EXTRA_KEY_R
import android.app.RemoteServiceException.MissingRequestPasswordComplexityPermissionException;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.os.IBinder;
import android.os.UserHandle;
@@ -45,6 +47,8 @@ import com.android.settings.utils.SettingsDividerItemDecoration;
import com.google.android.setupdesign.GlifPreferenceLayout;
import com.google.android.setupdesign.util.ThemeHelper;
import org.jetbrains.annotations.NotNull;
/**
* Setup Wizard's version of ChooseLockGeneric screen. It inherits the logic and basic structure
* from ChooseLockGeneric class, and should remain similar to that behaviorally. This class should
@@ -238,6 +242,13 @@ public class SetupChooseLockGeneric extends ChooseLockGeneric {
}
public static class InternalActivity extends ChooseLockGeneric.InternalActivity {
@Override
protected void onCreate(Bundle savedState) {
setTheme(SetupWizardUtils.getTheme(this, getIntent()));
ThemeHelper.trySetDynamicColor(this);
super.onCreate(savedState);
}
@Override
protected boolean isValidFragment(String fragmentName) {
return InternalSetupChooseLockGenericFragment.class.getName().equals(fragmentName);
@@ -254,6 +265,49 @@ public class SetupChooseLockGeneric extends ChooseLockGeneric {
protected boolean canRunBeforeDeviceProvisioned() {
return true;
}
@Override
public void onViewCreated(@NotNull View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
GlifPreferenceLayout layout = (GlifPreferenceLayout) view;
int titleResource = R.string.lock_settings_picker_new_lock_title;
layout.setHeaderText(titleResource);
setDivider(new ColorDrawable(Color.TRANSPARENT));
setDividerHeight(0);
getHeaderView().setVisible(false);
}
@Override
protected Intent getLockPasswordIntent(int quality) {
final Intent intent = SetupChooseLockPassword.modifyIntentForSetup(
getContext(), super.getLockPasswordIntent(quality));
SetupWizardUtils.copySetupExtras(getIntent(), intent);
return intent;
}
@Override
protected Intent getLockPatternIntent() {
final Intent intent = SetupChooseLockPattern.modifyIntentForSetup(
getContext(), super.getLockPatternIntent());
SetupWizardUtils.copySetupExtras(getIntent(), intent);
return intent;
}
@Override
protected Intent getBiometricEnrollIntent(Context context) {
final Intent intent = super.getBiometricEnrollIntent(context);
SetupWizardUtils.copySetupExtras(getIntent(), intent);
return intent;
}
@Override
public RecyclerView onCreateRecyclerView(LayoutInflater inflater, ViewGroup parent,
Bundle savedInstanceState) {
GlifPreferenceLayout layout = (GlifPreferenceLayout) parent;
return layout.onCreateRecyclerView(inflater, parent, savedInstanceState);
}
}
}
}