Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9aded56b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove duplicate layout mobile_network_settings_container_v2"

parents 7aa1aa4c 8fe35bff
Loading
Loading
Loading
Loading
+0 −39
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2019 The Android Open Source Project

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  -->

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <Toolbar
        android:id="@+id/mobile_action_bar"
        style="?android:attr/actionBarStyle"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:navigationContentDescription="@*android:string/action_bar_up_description"
        android:theme="?android:attr/actionBarTheme"/>

    <FrameLayout
        android:id="@+id/main_content"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1"/>

</LinearLayout>
+2 −2
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ public class NetworkDashboardFragment extends DashboardFragment implements

    @Override
    protected int getPreferenceScreenResId() {
        return R.xml.network_and_internet_v2;
        return R.xml.network_and_internet;
    }

    @Override
@@ -141,7 +141,7 @@ public class NetworkDashboardFragment extends DashboardFragment implements
    }

    public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
            new BaseSearchIndexProvider(R.xml.network_and_internet_v2) {
            new BaseSearchIndexProvider(R.xml.network_and_internet) {

                @Override
                public List<AbstractPreferenceController> createPreferenceControllers(Context
+11 −8
Original line number Diff line number Diff line
@@ -22,6 +22,8 @@ import android.os.Bundle;
import android.os.UserManager;
import android.provider.Settings;
import android.telephony.SubscriptionInfo;
import android.view.View;
import android.widget.Toolbar;

import androidx.annotation.NonNull;
import androidx.annotation.VisibleForTesting;
@@ -74,8 +76,14 @@ public class MobileNetworkActivity extends SettingsBaseActivity
            return;
        }

        setContentView(R.layout.mobile_network_settings_container_v2);
        setActionBar(findViewById(R.id.mobile_action_bar));
        final Toolbar toolbar = findViewById(R.id.action_bar);
        toolbar.setVisibility(View.VISIBLE);
        setActionBar(toolbar);

        final ActionBar actionBar = getActionBar();
        if (actionBar != null) {
            actionBar.setDisplayHomeAsUpEnabled(true);
        }

        mProxySubscriptionMgr = ProxySubscriptionManager.getInstance(this);
        mProxySubscriptionMgr.setLifecycle(getLifecycle());
@@ -85,11 +93,6 @@ public class MobileNetworkActivity extends SettingsBaseActivity
                ? savedInstanceState.getInt(Settings.EXTRA_SUB_ID, SUB_ID_NULL)
                : SUB_ID_NULL;

        final ActionBar actionBar = getActionBar();
        if (actionBar != null) {
            actionBar.setDisplayHomeAsUpEnabled(true);
        }

        final SubscriptionInfo subscription = getSubscription();
        updateTitleAndNavigation(subscription);
    }
@@ -178,7 +181,7 @@ public class MobileNetworkActivity extends SettingsBaseActivity

        final Fragment fragment = new MobileNetworkSettings();
        fragment.setArguments(bundle);
        fragmentTransaction.replace(R.id.main_content, fragment, buildFragmentTag(subId));
        fragmentTransaction.replace(R.id.content_frame, fragment, buildFragmentTag(subId));
        fragmentTransaction.commit();
    }

Loading