Rename back button to navigate up button
A minor wording review. Test: build pass Bug: 219000314 Change-Id: I23bc580b193cc891b659514d13705db2c55b756a Merged-In: I23bc580b193cc891b659514d13705db2c55b756a
This commit is contained in:
@@ -144,8 +144,7 @@ public class SettingsActivity extends SettingsBaseActivity
|
||||
|
||||
public static final String EXTRA_SHOW_FRAGMENT_AS_SUBSETTING =
|
||||
":settings:show_fragment_as_subsetting";
|
||||
public static final String EXTRA_IS_SECONDARY_LAYER_PAGE =
|
||||
":settings:is_secondary_layer_page";
|
||||
public static final String EXTRA_IS_SECOND_LAYER_PAGE = ":settings:is_second_layer_page";
|
||||
|
||||
/**
|
||||
* Additional extra of Settings#ACTION_SETTINGS_LARGE_SCREEN_DEEP_LINK.
|
||||
@@ -372,12 +371,12 @@ public class SettingsActivity extends SettingsBaseActivity
|
||||
if (WizardManagerHelper.isAnySetupWizard(intent)) {
|
||||
return false;
|
||||
}
|
||||
final boolean isSecondaryLayerPage =
|
||||
intent.getBooleanExtra(EXTRA_IS_SECONDARY_LAYER_PAGE, false);
|
||||
final boolean isSecondLayerPage =
|
||||
intent.getBooleanExtra(EXTRA_IS_SECOND_LAYER_PAGE, false);
|
||||
|
||||
// TODO: move Settings's ActivityEmbeddingUtils to SettingsLib.
|
||||
return !com.android.settingslib.activityembedding.ActivityEmbeddingUtils
|
||||
.shouldHideBackButton(this, isSecondaryLayerPage);
|
||||
.shouldHideNavigateUpButton(this, isSecondLayerPage);
|
||||
}
|
||||
|
||||
private boolean isSubSettings(Intent intent) {
|
||||
|
@@ -197,7 +197,7 @@ public class ActivityEmbeddingRulesController {
|
||||
addActivityFilter(activityFilters, Settings.class);
|
||||
|
||||
final Intent intent = new Intent(mContext, Settings.NetworkDashboardActivity.class);
|
||||
intent.putExtra(SettingsActivity.EXTRA_IS_SECONDARY_LAYER_PAGE, true);
|
||||
intent.putExtra(SettingsActivity.EXTRA_IS_SECOND_LAYER_PAGE, true);
|
||||
final SplitPlaceholderRule placeholderRule = new SplitPlaceholderRule(
|
||||
activityFilters,
|
||||
intent,
|
||||
|
@@ -122,9 +122,9 @@ public class SubSettingLauncher {
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Decide whether the next page is secondary layer page or not. */
|
||||
public SubSettingLauncher setIsSecondaryLayerPage(boolean isSecondaryLayerPage) {
|
||||
mLaunchRequest.mIsSecondaryLayerPage = isSecondaryLayerPage;
|
||||
/** Decide whether the next page is second layer page or not. */
|
||||
public SubSettingLauncher setIsSecondLayerPage(boolean isSecondLayerPage) {
|
||||
mLaunchRequest.mIsSecondLayerPage = isSecondLayerPage;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -176,8 +176,8 @@ public class SubSettingLauncher {
|
||||
intent.addFlags(mLaunchRequest.mFlags);
|
||||
intent.putExtra(SettingsBaseActivity.EXTRA_PAGE_TRANSITION_TYPE,
|
||||
mLaunchRequest.mTransitionType);
|
||||
intent.putExtra(SettingsActivity.EXTRA_IS_SECONDARY_LAYER_PAGE,
|
||||
mLaunchRequest.mIsSecondaryLayerPage);
|
||||
intent.putExtra(SettingsActivity.EXTRA_IS_SECOND_LAYER_PAGE,
|
||||
mLaunchRequest.mIsSecondLayerPage);
|
||||
|
||||
return intent;
|
||||
}
|
||||
@@ -225,6 +225,6 @@ public class SubSettingLauncher {
|
||||
int mTransitionType;
|
||||
Bundle mArguments;
|
||||
Bundle mExtras;
|
||||
boolean mIsSecondaryLayerPage;
|
||||
boolean mIsSecondLayerPage;
|
||||
}
|
||||
}
|
||||
|
@@ -52,10 +52,10 @@ public class FeatureFlagPreference extends SwitchPreference {
|
||||
FeatureFlagUtils.setEnabled(getContext(), mKey, isChecked);
|
||||
}
|
||||
|
||||
// A temporary logic for settings_hide_secondary_page_back_button_in_two_pane
|
||||
// A temporary logic for settings_hide_second_layer_page_navigate_up_button_in_two_pane
|
||||
// Remove it before Android T release.
|
||||
if (TextUtils.equals(mKey,
|
||||
FeatureFlagUtils.SETTINGS_HIDE_SECONDARY_PAGE_BACK_BUTTON_IN_TWO_PANE)) {
|
||||
FeatureFlagUtils.SETTINGS_HIDE_SECOND_LAYER_PAGE_NAVIGATE_UP_BUTTON_IN_TWO_PANE)) {
|
||||
Settings.Global.putString(getContext().getContentResolver(),
|
||||
mKey, String.valueOf(isChecked));
|
||||
}
|
||||
|
@@ -119,7 +119,7 @@ public class TopLevelSettings extends DashboardFragment implements
|
||||
? ((Instrumentable) caller).getMetricsCategory()
|
||||
: Instrumentable.METRICS_CATEGORY_UNKNOWN)
|
||||
.setTitleRes(-1)
|
||||
.setIsSecondaryLayerPage(true)
|
||||
.setIsSecondLayerPage(true)
|
||||
.launch();
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user