Merge "Use the getBidiFormattedPhoneNumber to replace getFormattedPhoneNumber"
diff --git a/res/layout/mobile_network_settings_container_v2.xml b/res/layout/mobile_network_settings_container_v2.xml
deleted file mode 100644
index ed7296b..0000000
--- a/res/layout/mobile_network_settings_container_v2.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?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>
diff --git a/res/xml/mobile_network_settings_v2.xml b/res/xml/mobile_network_settings.xml
similarity index 100%
rename from res/xml/mobile_network_settings_v2.xml
rename to res/xml/mobile_network_settings.xml
diff --git a/res/xml/network_and_internet_v2.xml b/res/xml/network_and_internet.xml
similarity index 100%
rename from res/xml/network_and_internet_v2.xml
rename to res/xml/network_and_internet.xml
diff --git a/src/com/android/settings/fuelgauge/BatteryAppListPreferenceController.java b/src/com/android/settings/fuelgauge/BatteryAppListPreferenceController.java
index 7741a97..70b964c 100644
--- a/src/com/android/settings/fuelgauge/BatteryAppListPreferenceController.java
+++ b/src/com/android/settings/fuelgauge/BatteryAppListPreferenceController.java
@@ -46,7 +46,6 @@
import com.android.settings.SettingsActivity;
import com.android.settings.core.InstrumentedPreferenceFragment;
import com.android.settings.core.PreferenceControllerMixin;
-import com.android.settingslib.applications.AppUtils;
import com.android.settingslib.core.AbstractPreferenceController;
import com.android.settingslib.core.lifecycle.Lifecycle;
import com.android.settingslib.core.lifecycle.LifecycleObserver;
@@ -355,7 +354,7 @@
// Don't show over-counted, unaccounted and hidden system module in any condition
return sipper.drainType == BatterySipper.DrainType.OVERCOUNTED
|| sipper.drainType == BatterySipper.DrainType.UNACCOUNTED
- || mBatteryUtils.isHiddenSystemModule(sipper);
+ || mBatteryUtils.isHiddenSystemModule(sipper) || sipper.getUid() < 0;
}
@VisibleForTesting
diff --git a/src/com/android/settings/network/NetworkDashboardFragment.java b/src/com/android/settings/network/NetworkDashboardFragment.java
index fed2da3..2bc97e6 100644
--- a/src/com/android/settings/network/NetworkDashboardFragment.java
+++ b/src/com/android/settings/network/NetworkDashboardFragment.java
@@ -56,7 +56,7 @@
@Override
protected int getPreferenceScreenResId() {
- return R.xml.network_and_internet_v2;
+ return R.xml.network_and_internet;
}
@Override
@@ -141,7 +141,7 @@
}
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
diff --git a/src/com/android/settings/network/telephony/MobileNetworkActivity.java b/src/com/android/settings/network/telephony/MobileNetworkActivity.java
index 20221c1..1bcbf97 100644
--- a/src/com/android/settings/network/telephony/MobileNetworkActivity.java
+++ b/src/com/android/settings/network/telephony/MobileNetworkActivity.java
@@ -22,6 +22,8 @@
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 @@
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 @@
? 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 @@
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();
}
diff --git a/src/com/android/settings/network/telephony/MobileNetworkSettings.java b/src/com/android/settings/network/telephony/MobileNetworkSettings.java
index 1400e3a..a928c28 100644
--- a/src/com/android/settings/network/telephony/MobileNetworkSettings.java
+++ b/src/com/android/settings/network/telephony/MobileNetworkSettings.java
@@ -195,7 +195,7 @@
@Override
protected int getPreferenceScreenResId() {
- return R.xml.mobile_network_settings_v2;
+ return R.xml.mobile_network_settings;
}
@Override
@@ -259,7 +259,7 @@
}
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
- new BaseSearchIndexProvider(R.xml.mobile_network_settings_v2) {
+ new BaseSearchIndexProvider(R.xml.mobile_network_settings) {
/** suppress full page if user is not admin */
@Override