Merge "Update private space setup string and loading screen title" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
e6b9290a0e
@@ -52,16 +52,17 @@ public class AutoAdvanceSetupFragment extends InstrumentedFragment {
|
||||
private static final String TITLE_INDEX = "title_index";
|
||||
private static final int DELAY_BETWEEN_SCREENS = 5000; // 5 seconds in millis
|
||||
private static final int ANIMATION_DURATION_MILLIS = 500;
|
||||
private static final int HEADER_TEXT_MAX_LINES = 4;
|
||||
private GlifLayout mRootView;
|
||||
private Handler mHandler;
|
||||
private int mScreenTitleIndex;
|
||||
private static final List<Pair<Integer, Integer>> HEADER_IMAGE_PAIRS =
|
||||
ImmutableList.of(
|
||||
new Pair(R.string.privatespace_apps_hidden_title,
|
||||
new Pair(R.string.private_space_notifications_hidden_title,
|
||||
R.drawable.privatespace_setup_flow_placeholder),
|
||||
new Pair(R.string.privatespace_access_from_apps_title,
|
||||
new Pair(R.string.private_space_share_photos_title,
|
||||
R.drawable.privatespace_setup_flow_placeholder),
|
||||
new Pair(R.string.privatespace_system_apps_installed_title,
|
||||
new Pair(R.string.private_space_apps_installed_title,
|
||||
R.drawable.privatespace_setup_flow_placeholder));
|
||||
|
||||
private Runnable mUpdateScreenResources =
|
||||
@@ -116,6 +117,7 @@ public class AutoAdvanceSetupFragment extends InstrumentedFragment {
|
||||
mRootView =
|
||||
(GlifLayout)
|
||||
inflater.inflate(R.layout.privatespace_advancing_screen, container, false);
|
||||
mRootView.getHeaderTextView().setMaxLines(HEADER_TEXT_MAX_LINES);
|
||||
updateHeaderAndImage();
|
||||
mHandler = new Handler(Looper.getMainLooper());
|
||||
mHandler.postDelayed(mUpdateScreenResources, DELAY_BETWEEN_SCREENS);
|
||||
|
||||
@@ -47,14 +47,14 @@ public class PrivateProfileCreationError extends InstrumentedFragment {
|
||||
final FooterBarMixin mixin = rootView.getMixin(FooterBarMixin.class);
|
||||
mixin.setPrimaryButton(
|
||||
new FooterButton.Builder(getContext())
|
||||
.setText(R.string.privatespace_tryagain_label)
|
||||
.setText(R.string.private_space_tryagain_label)
|
||||
.setListener(onTryAgain())
|
||||
.setButtonType(FooterButton.ButtonType.NEXT)
|
||||
.setTheme(com.google.android.setupdesign.R.style.SudGlifButton_Primary)
|
||||
.build());
|
||||
mixin.setSecondaryButton(
|
||||
new FooterButton.Builder(getContext())
|
||||
.setText(R.string.privatespace_cancel_label)
|
||||
.setText(R.string.private_space_cancel_label)
|
||||
.setListener(onCancel())
|
||||
.setButtonType(FooterButton.ButtonType.CANCEL)
|
||||
.setTheme(
|
||||
|
||||
@@ -51,7 +51,7 @@ public class PrivateSpaceAccountLoginError extends InstrumentedFragment {
|
||||
final FooterBarMixin mixin = rootView.getMixin(FooterBarMixin.class);
|
||||
mixin.setPrimaryButton(
|
||||
new FooterButton.Builder(getContext())
|
||||
.setText(R.string.privatespace_tryagain_label)
|
||||
.setText(R.string.private_space_tryagain_label)
|
||||
.setListener(nextScreen())
|
||||
.setButtonType(FooterButton.ButtonType.NEXT)
|
||||
.setTheme(com.google.android.setupdesign.R.style.SudGlifButton_Primary)
|
||||
|
||||
@@ -50,14 +50,14 @@ public class PrivateSpaceEducation extends InstrumentedFragment {
|
||||
final FooterBarMixin mixin = rootView.getMixin(FooterBarMixin.class);
|
||||
mixin.setPrimaryButton(
|
||||
new FooterButton.Builder(getContext())
|
||||
.setText(R.string.privatespace_setup_button_label)
|
||||
.setText(R.string.private_space_setup_button_label)
|
||||
.setListener(onSetup())
|
||||
.setButtonType(FooterButton.ButtonType.NEXT)
|
||||
.setTheme(com.google.android.setupdesign.R.style.SudGlifButton_Primary)
|
||||
.build());
|
||||
mixin.setSecondaryButton(
|
||||
new FooterButton.Builder(getContext())
|
||||
.setText(R.string.privatespace_cancel_label)
|
||||
.setText(R.string.private_space_cancel_label)
|
||||
.setListener(onCancel())
|
||||
.setButtonType(FooterButton.ButtonType.CANCEL)
|
||||
.setTheme(
|
||||
|
||||
@@ -60,14 +60,14 @@ public class PrivateSpaceSetLockFragment extends InstrumentedFragment {
|
||||
final FooterBarMixin mixin = rootView.getMixin(FooterBarMixin.class);
|
||||
mixin.setPrimaryButton(
|
||||
new FooterButton.Builder(getContext())
|
||||
.setText(R.string.privatespace_use_screenlock_label)
|
||||
.setText(R.string.private_space_use_screenlock_label)
|
||||
.setListener(onClickUse())
|
||||
.setButtonType(FooterButton.ButtonType.NEXT)
|
||||
.setTheme(com.google.android.setupdesign.R.style.SudGlifButton_Primary)
|
||||
.build());
|
||||
mixin.setSecondaryButton(
|
||||
new FooterButton.Builder(getContext())
|
||||
.setText(R.string.privatespace_set_lock_label)
|
||||
.setText(R.string.private_space_set_lock_label)
|
||||
.setListener(onClickNewLock())
|
||||
.setButtonType(FooterButton.ButtonType.NEXT)
|
||||
.setTheme(
|
||||
|
||||
@@ -55,7 +55,7 @@ public class SetupSuccessFragment extends InstrumentedFragment {
|
||||
final FooterBarMixin mixin = rootView.getMixin(FooterBarMixin.class);
|
||||
mixin.setPrimaryButton(
|
||||
new FooterButton.Builder(getContext())
|
||||
.setText(R.string.privatespace_done_label)
|
||||
.setText(R.string.private_space_done_label)
|
||||
.setListener(onClickNext())
|
||||
.setButtonType(FooterButton.ButtonType.NEXT)
|
||||
.setTheme(com.google.android.setupdesign.R.style.SudGlifButton_Primary)
|
||||
@@ -104,6 +104,7 @@ public class SetupSuccessFragment extends InstrumentedFragment {
|
||||
}
|
||||
|
||||
private void accessPrivateSpaceToast() {
|
||||
Toast.makeText(getContext(), R.string.scrolldown_to_access, Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(getContext(), R.string.private_space_scrolldown_to_access,
|
||||
Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ public class UseOneLockControllerSwitch extends AbstractPreferenceController
|
||||
new AlertDialog.Builder(mContext)
|
||||
.setMessage(R.string.private_space_new_lock_title)
|
||||
.setPositiveButton(
|
||||
R.string.privatespace_set_lock_label,
|
||||
R.string.private_space_set_lock_label,
|
||||
(dialog, which) -> {
|
||||
Intent intent = new Intent(mContext,
|
||||
PrivateProfileContextHelperActivity.class);
|
||||
@@ -201,7 +201,7 @@ public class UseOneLockControllerSwitch extends AbstractPreferenceController
|
||||
UNUNIFY_PRIVATE_LOCK_FROM_DEVICE_REQUEST,
|
||||
/*Options*/ null, mUserHandle);
|
||||
})
|
||||
.setNegativeButton(R.string.privatespace_cancel_label,
|
||||
.setNegativeButton(R.string.private_space_cancel_label,
|
||||
(DialogInterface dialog, int which) -> {
|
||||
mUnifyProfile.setChecked(true);
|
||||
dialog.dismiss();
|
||||
|
||||
Reference in New Issue
Block a user