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

Commit 2583fc1e authored by Jason Monk's avatar Jason Monk
Browse files

Move process stats screen into memory screen.

 - Move process stats from developer options to top level
   settings item.
 - Some minor UI changes to the top of the page
 - Major UI updates to detail page, now shows info with processes
   as pref categories and services as prefs, with a way to kill
   them (taken from Running Services page).
 - Some major refactorings in code, in attempt to make it more
   usable
 - Added color bar on per app basis to visualize the avg/max
   relationship
 - Updated the way avg is calculated across multiple entries in
   ProcStatsPackageEntry to be more accurate
 - Change the way max memory is calculated in
   ProcStatsPackageEntry to be less accurate but more useful

Bug: 19443802
Change-Id: Ia6aaabe42c415c50997a09bfb814a6f6e5731772
parent c5184ff1
Loading
Loading
Loading
Loading
+25 −0
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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24dp"
        android:height="24dp"
        android:viewportWidth="48.0"
        android:viewportHeight="48.0">

    <path
        android:fillColor="#FF000000"
        android:pathData="M24.0,4.0C12.9,4.0 4.0,12.9 4.0,24.0s8.9,20.0 20.0,20.0c11.1,0.0 20.0,-8.9 20.0,-20.0S35.1,4.0 24.0,4.0zM34.0,31.2L31.2,34.0L24.0,26.8L16.8,34.0L14.0,31.2l7.2,-7.2L14.0,16.8l2.8,-2.8l7.2,7.2l7.2,-7.2l2.8,2.8L26.8,24.0L34.0,31.2z"/>
</vector>
+37 −0
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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="32dp"
        android:height="32dp"
        android:viewportWidth="24.0"
        android:viewportHeight="24.0">
    <path
        android:pathData="M6.0,4.0l0.0,16.0 12.0,0.0 0.0,-16.0 -12.0,0.0z
        M6.0,5.25l0,1.5 -3,0 0,-1.5 3,0z
        M6.0,9.25l0,1.5 -3,0 0,-1.5 3,0z
        M6.0,13.25l0,1.5 -3,0 0,-1.5 3,0z
        M6.0,17.25l0,1.5 -3,0 0,-1.5 3,0z
        M21.0,5.25l0,1.5 -3,0 0,-1.5 3,0z
        M21.0,9.25l0,1.5 -3,0 0,-1.5 3,0z
        M21.0,13.25l0,1.5 -3,0 0,-1.5 3,0z
        M21.0,17.25l0,1.5 -3,0 0,-1.5 3,0z

        M11.5,14.5l1,0 0,3 -1,0 0,-3z
        M13.25,14.5l1,0 0,3 -1,0 0,-3z
        M15.0,14.5l1,0 0,3 -1,0 0,-3z
        "
        android:fillColor="#ff009587" />
</vector>
+74 −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.
-->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minHeight="?android:attr/listPreferredItemHeight"
    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
    android:paddingTop="8dip"
    android:paddingBottom="8dip">

    <ImageView
        android:id="@android:id/icon"
        android:layout_width="@android:dimen/app_icon_size"
        android:layout_height="@android:dimen/app_icon_size"
        android:layout_marginEnd="8dip"
        android:scaleType="centerInside"
        android:contentDescription="@null"
        android:duplicateParentState="true" />

    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:orientation="vertical"
        android:duplicateParentState="true">

        <TextView
            android:id="@android:id/title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="2dip"
            android:singleLine="true"
            android:ellipsize="marquee"
            android:textAppearance="@android:style/TextAppearance.Material.Subhead"
            android:textAlignment="viewStart"
            android:duplicateParentState="true" />

        <TextView
            android:id="@android:id/summary"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textAppearance="@android:style/TextAppearance.Material.Body1"
            android:textColor="?android:attr/textColorSecondary"
            android:textAlignment="viewStart"
            android:duplicateParentState="true" />

    </LinearLayout>

    <com.android.settings.applications.LinearColorBar
        android:id="@+id/linear_color_bar"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:layout_marginTop="5dp"
        android:layout_marginBottom="5dp"
        android:duplicateParentState="true" />

</LinearLayout>
+22 −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.
-->
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/cancel"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:clickable="true"
    android:src="@drawable/ic_cancel"
    />
+58 −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.
-->

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center_vertical|end"
    android:layout_marginBottom="5dp" >

    <ImageView
        android:layout_width="16dp"
        android:layout_height="16dp"
        android:scaleType="centerInside"
        android:src="@color/memory_avg_use"
        android:contentDescription="@null" />

    <TextView
        android:id="@+id/memory_avg"
        android:text="@string/memory_avg_use"
        android:textAppearance="@android:style/TextAppearance.Material.Body1"
        android:textColor="?android:attr/textColorSecondary"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="16dp" />

    <ImageView
        android:layout_width="16dp"
        android:layout_height="16dp"
        android:scaleType="centerInside"
        android:src="@color/memory_max_use"
        android:contentDescription="@null" />

    <TextView
        android:id="@+id/memory_max"
        android:text="@string/memory_max_use"
        android:textAppearance="@android:style/TextAppearance.Material.Body1"
        android:textColor="?android:attr/textColorSecondary"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="16dp" />

</LinearLayout>
Loading