Disable the title of mobile network

After the collapsing toolbar layout is applied to subsetting pages, the
mobile network page has two title shown currently. One is the activity
title while the other is the collapsing toolbar title To make sure
there will be only one title shown on this page, the activity title will
be removed and we will keep the collapsing toolbar title.

Bug: 176899590
Test: manual test and visual verified
1) Navigate to Settings -> Network & internet -> Mobile network
2) Check if there's only one title in this page

Change-Id: I50e57468c640f1d176fd99dcaafc06ed3fc601dc
This commit is contained in:
Mill Chen
2021-01-07 00:49:14 +08:00
parent 14cfd2f2ca
commit 82df7e60a1

View File

@@ -115,6 +115,9 @@ public class MobileNetworkActivity extends SettingsBaseActivity
final ActionBar actionBar = getActionBar(); final ActionBar actionBar = getActionBar();
if (actionBar != null) { if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(true); actionBar.setDisplayHomeAsUpEnabled(true);
// TODO(b/176882938): Enable title after material component updated
// If CollapsingToolbarLayout is applied, the old action bar won't show title.
actionBar.setDisplayShowTitleEnabled(mCollapsingToolbarLayout == null);
} }
getProxySubscriptionManager().setLifecycle(getLifecycle()); getProxySubscriptionManager().setLifecycle(getLifecycle());