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

Commit 7bbf0c70 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

release-request-bd6aa7dd-7b02-4794-942c-14599bf61208-for-git_oc-mr1-release-41...

release-request-bd6aa7dd-7b02-4794-942c-14599bf61208-for-git_oc-mr1-release-4193791 snap-temp-L98700000083613807

Change-Id: Ie05a204c9e41f9609ae62a93460907f66e2cbbbc
parents 9bdedc31 c0cc7feb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@
            android:gravity="start"
            android:singleLine="true"
            android:ellipsize="marquee"
            android:textAlignment="viewStart"
            android:textAppearance="@android:style/TextAppearance.Material.Body1"
            android:textColor="?android:attr/textColorSecondary" />

+25 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2017 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.
-->

<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
        android:title="@string/data_usage_summary_title">

    <PreferenceCategory
            android:key="data_plan_usage"
            android:title="@string/usage">

    </PreferenceCategory>
</PreferenceScreen>
+30 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2017 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.
-->

<PreferenceScreen
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:title="@string/data_usage_summary_title">

    <com.android.settings.datausage.TemplatePreferenceCategory
            android:key="data_usage_mobile_category"
            android:title="@string/data_usage_tab_mobile">

        <com.android.settings.datausage.CellDataPreference
                android:key="data_usage_enable"
                android:title="@string/data_usage_enable_mobile" />
    </com.android.settings.datausage.TemplatePreferenceCategory>

</PreferenceScreen>
+7 −4
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ import android.support.v7.preference.Preference;
import android.support.v7.preference.Preference.OnPreferenceClickListener;
import android.support.v7.preference.PreferenceCategory;
import android.support.v7.preference.PreferenceScreen;
import android.text.BidiFormatter;
import android.text.TextUtils;
import android.text.format.DateUtils;
import android.text.format.Formatter;
@@ -67,6 +68,7 @@ import android.view.MenuItem;
import android.view.View;
import android.webkit.IWebViewUpdateService;
import android.widget.Button;

import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.internal.os.BatterySipper;
import com.android.internal.os.BatteryStatsHelper;
@@ -83,9 +85,8 @@ import com.android.settings.applications.defaultapps.DefaultSmsPreferenceControl
import com.android.settings.applications.instantapps.InstantAppButtonsController;
import com.android.settings.datausage.AppDataUsage;
import com.android.settings.datausage.DataUsageList;
import com.android.settings.datausage.DataUsageSummary;
import com.android.settings.development.DevelopmentSettingsEnabler;
import com.android.settings.datausage.DataUsageUtils;
import com.android.settings.development.DevelopmentSettingsEnabler;
import com.android.settings.fuelgauge.AdvancedPowerUsageDetail;
import com.android.settings.fuelgauge.BatteryEntry;
import com.android.settings.fuelgauge.BatteryStatsHelperLoader;
@@ -105,6 +106,7 @@ import com.android.settingslib.applications.StorageStatsSource;
import com.android.settingslib.applications.StorageStatsSource.AppStorageStats;
import com.android.settingslib.net.ChartData;
import com.android.settingslib.net.ChartDataLoader;

import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.HashSet;
@@ -208,7 +210,7 @@ public class InstalledAppDetails extends AppInfoBase

                @Override
                public Loader<BatteryStatsHelper> onCreateLoader(int id, Bundle args) {
                    return new BatteryStatsHelperLoader(getContext(), args);
                    return new BatteryStatsHelperLoader(getContext());
                }

                @Override
@@ -632,7 +634,8 @@ public class InstalledAppDetails extends AppInfoBase
                .setSummary(summary)
                .setIsInstantApp(isInstantApp)
                .done(activity, false /* rebindActions */);
        mVersionPreference.setSummary(getString(R.string.version_text, pkgInfo.versionName));
        mVersionPreference.setSummary(getString(R.string.version_text,
                BidiFormatter.getInstance().unicodeWrap(pkgInfo.versionName)));
    }

    @VisibleForTesting
+16 −4
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import com.android.settingslib.core.AbstractPreferenceController;
import com.android.settingslib.drawer.DashboardCategory;
import com.android.settingslib.drawer.SettingsDrawerActivity;
import com.android.settingslib.drawer.Tile;
import com.android.settingslib.drawer.TileUtils;

import java.util.ArrayList;
import java.util.Collection;
@@ -227,6 +228,20 @@ public abstract class DashboardFragment extends SettingsPreferenceFragment
        return true;
    }

    @VisibleForTesting
    boolean tintTileIcon(Tile tile) {
        // First check if the tile has set the icon tintable metadata.
        final Bundle metadata = tile.metaData;
        if (metadata != null
                && metadata.containsKey(TileUtils.META_DATA_PREFERENCE_ICON_TINTABLE)) {
            return metadata.getBoolean(TileUtils.META_DATA_PREFERENCE_ICON_TINTABLE);
        }
        final String pkgName = getContext().getPackageName();
        // If this drawable is coming from outside Settings, tint it to match the color.
        return pkgName != null && tile.intent != null
                && !pkgName.equals(tile.intent.getComponent().getPackageName());
    }

    /**
     * Displays resource based tiles.
     */
@@ -315,7 +330,6 @@ public abstract class DashboardFragment extends SettingsPreferenceFragment
                android.R.attr.colorControlNormal});
        final int tintColor = a.getColor(0, context.getColor(android.R.color.white));
        a.recycle();
        final String pkgName = context.getPackageName();
        // Install dashboard tiles.
        for (Tile tile : tiles) {
            final String key = mDashboardFeatureProvider.getDashboardKeyForTile(tile);
@@ -326,9 +340,7 @@ public abstract class DashboardFragment extends SettingsPreferenceFragment
            if (!displayTile(tile)) {
                continue;
            }
            if (pkgName != null && tile.intent != null
                    && !pkgName.equals(tile.intent.getComponent().getPackageName())) {
                // If this drawable is coming from outside Settings, tint it to match the color.
            if (tintTileIcon(tile)) {
                tile.icon.setTint(tintColor);
            }
            if (mDashboardTilePrefKeys.contains(key)) {
Loading