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

Commit 11a77446 authored by Jason Monk's avatar Jason Monk
Browse files

Add QS Tuner

Change-Id: I908d0161b7209b8e99299f5cb3eb58f3d7b52752
parent cf304fb3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -184,7 +184,7 @@

        <activity android:name=".tuner.TunerActivity"
                  android:enabled="false"
                  android:icon="@drawable/icon"
                  android:icon="@*android:drawable/stat_sys_adb"
                  android:theme="@android:style/Theme.Material.Settings"
                  android:label="@string/system_ui_tuner"
                  android:exported="true">
+47 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     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.
-->

<com.android.systemui.tuner.AutoScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/system_secondary_color" >
    <LinearLayout
        android:id="@+id/all_details"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingStart="?android:attr/listPreferredItemPaddingStart"
        android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
        android:gravity="center"
        android:orientation="vertical">

        <View
            android:background="@color/qs_tile_divider"
            android:layout_width="match_parent"
            android:layout_height="2dp" />

        <FrameLayout
            android:id="@+id/remove_target"
            android:layout_width="105dp"
            android:layout_height="@dimen/qs_tile_height" />

        <FrameLayout
            android:id="@+id/add_target"
            android:layout_width="105dp"
            android:layout_height="@dimen/qs_tile_height" />
    </LinearLayout>
</com.android.systemui.tuner.AutoScrollView>
+9 −0
Original line number Diff line number Diff line
@@ -1024,4 +1024,13 @@

    <!-- Name of special SystemUI debug settings -->
    <string name="system_ui_tuner">SystemUI Tuner</string>

    <!-- Name of quick settings -->
    <string name="quick_settings">Quick Settings</string>

    <!-- Description for adding  a quick settings tile -->
    <string name="add_tile">Add tile</string>

    <!-- Name of a quick settings tile controlled by broadcast -->
    <string name="broadcast_tile">Broadcast Tile</string>
</resources>
+4 −0
Original line number Diff line number Diff line
@@ -19,4 +19,8 @@

        <!-- Tuner prefs go here -->

        <Preference
            android:key="qs_tuner"
            android:title="@string/quick_settings" />

</PreferenceScreen>
+9 −9
Original line number Diff line number Diff line
@@ -50,12 +50,12 @@ public class QSPanel extends ViewGroup {
    private static final float TILE_ASPECT = 1.2f;

    private final Context mContext;
    private final ArrayList<TileRecord> mRecords = new ArrayList<TileRecord>();
    protected final ArrayList<TileRecord> mRecords = new ArrayList<TileRecord>();
    private final View mDetail;
    private final ViewGroup mDetailContent;
    private final TextView mDetailSettingsButton;
    private final TextView mDetailDoneButton;
    private final View mBrightnessView;
    protected final View mBrightnessView;
    private final QSDetailClipper mClipper;
    private final H mHandler = new H();

@@ -560,13 +560,13 @@ public class QSPanel extends ViewGroup {
        DetailAdapter detailAdapter;
    }

    private static final class TileRecord extends Record {
        QSTile<?> tile;
        QSTileView tileView;
        int row;
        int col;
        boolean scanState;
        boolean openingDetail;
    protected static final class TileRecord extends Record {
        public QSTile<?> tile;
        public QSTileView tileView;
        public int row;
        public int col;
        public boolean scanState;
        public boolean openingDetail;
    }

    private final AnimatorListenerAdapter mTeardownDetailWhenDone = new AnimatorListenerAdapter() {
Loading