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

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

Merge "Remove dead code and obsolete patterns"

parents 11151f50 22d53b14
Loading
Loading
Loading
Loading
+0 −63
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 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.
-->

<ScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:clipToPadding="false"
    android:scrollbarStyle="@integer/preference_scrollbar_style">

    <LinearLayout
        android:id="@+id/all_details"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:paddingTop="5dip"
        android:paddingBottom="5dip"
        android:orientation="vertical">

        <TextView
            style="?android:attr/listSeparatorTextViewStyle"
            android:text="@string/mem_state_subtitle" />

        <LinearLayout
            android:id="@+id/mem_state"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingStart="6dip"
            android:orientation="vertical">

            <!-- Insert detail items here -->

        </LinearLayout>

        <TextView
            style="?android:attr/listSeparatorTextViewStyle"
            android:text="@string/mem_use_subtitle" />

        <LinearLayout
            android:id="@+id/mem_use"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingStart="6dip"
            android:orientation="vertical">

            <!-- Insert detail items here -->

        </LinearLayout>

    </LinearLayout>
</ScrollView>
+0 −4
Original line number Diff line number Diff line
@@ -148,10 +148,6 @@
        <attr name="aspectRatio" format="float" />
    </declare-styleable>

    <declare-styleable name="TintablePreference">
        <attr name="android:tint" format="color|reference" />
    </declare-styleable>

    <!-- For UsageView -->
    <declare-styleable name="UsageView">
        <attr name="android:colorAccent" />
+0 −16
Original line number Diff line number Diff line
@@ -5021,22 +5021,6 @@
    <string name="menu_proc_stats_duration">Duration</string>
    <!-- [CHAR LIMIT=NONE] Activity title for process stats details on overall memory state -->
    <string name="mem_details_title">Memory details</string>
    <!-- [CHAR LIMIT=NONE] Subtitle for process stats memory state details for list of memory states -->
    <string name="mem_state_subtitle">Memory states</string>
    <!-- [CHAR LIMIT=NONE] Subtitle for process stats memory state details for list of memory use -->
    <string name="mem_use_subtitle">Memory use</string>
    <!-- [CHAR LIMIT=NONE] Type of memory use associated with the kernel -->
    <string name="mem_use_kernel_type">Kernel</string>
    <!-- [CHAR LIMIT=NONE] Type of memory use associated with native processes -->
    <string name="mem_use_native_type">Native</string>
    <!-- [CHAR LIMIT=NONE] Type of memory use associated with kernel caches -->
    <string name="mem_use_kernel_cache_type">Kernel caches</string>
    <!-- [CHAR LIMIT=NONE] Type of memory use associated with kernel zram swap -->
    <string name="mem_use_zram_type">ZRam swap</string>
    <!-- [CHAR LIMIT=NONE] Type of memory use that is available/free -->
    <string name="mem_use_free_type">Free</string>
    <!-- [CHAR LIMIT=NONE] Total of all memory use -->
    <string name="mem_use_total">Total</string>
    <!-- [CHAR LIMIT=NONE] Menu for process stats to show 3 hours of data -->
    <string name="menu_duration_3h">3 hours</string>
    <!-- [CHAR LIMIT=NONE] Menu for process stats to show 3 hours of data -->
+2 −1
Original line number Diff line number Diff line
@@ -16,11 +16,12 @@
package com.android.settings;

import android.content.Context;
import android.support.v7.preference.Preference;
import android.support.v7.preference.PreferenceViewHolder;
import android.util.AttributeSet;
import android.widget.ProgressBar;

public class AppProgressPreference extends TintablePreference {
public class AppProgressPreference extends Preference {

    private int mProgress;

+0 −55
Original line number Diff line number Diff line
/*
 * Copyright (C) 2015 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.
 */
package com.android.settings;

import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.TypedArray;
import android.support.annotation.ColorInt;
import android.support.v7.preference.Preference;
import android.support.v7.preference.PreferenceViewHolder;
import android.util.AttributeSet;
import android.widget.ImageView;

public class TintablePreference extends Preference {
    @ColorInt
    private int mTintColor;

    public TintablePreference(Context context, AttributeSet attrs) {
        super(context, attrs);

        TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.TintablePreference);
        mTintColor = a.getColor(R.styleable.TintablePreference_android_tint, 0);
        a.recycle();
    }

    public void setTint(int color) {
        mTintColor = color;
        notifyChanged();
    }

    @Override
    public void onBindViewHolder(PreferenceViewHolder view) {
        super.onBindViewHolder(view);

        if (mTintColor != 0) {
            ((ImageView) view.findViewById(android.R.id.icon)).setImageTintList(
                    ColorStateList.valueOf(mTintColor));
        } else {
            ((ImageView) view.findViewById(android.R.id.icon)).setImageTintList(null);
        }
    }
}
Loading