From 82df7e60a1fe82f6f9c8c8e38a36fac86ce1c3a7 Mon Sep 17 00:00:00 2001 From: Mill Chen Date: Thu, 7 Jan 2021 00:49:14 +0800 Subject: [PATCH] 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 --- .../settings/network/telephony/MobileNetworkActivity.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/com/android/settings/network/telephony/MobileNetworkActivity.java b/src/com/android/settings/network/telephony/MobileNetworkActivity.java index b179770d485..92f0054d2e7 100644 --- a/src/com/android/settings/network/telephony/MobileNetworkActivity.java +++ b/src/com/android/settings/network/telephony/MobileNetworkActivity.java @@ -115,6 +115,9 @@ public class MobileNetworkActivity extends SettingsBaseActivity final ActionBar actionBar = getActionBar(); if (actionBar != null) { 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());