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

Commit 46c06ad9 authored by Michael W's avatar Michael W
Browse files

Updater: The great cleanup

* Make final where possible
* Remove unused casts, imports, methods, enums and constructors
* Add null checks

Change-Id: Idd1a16426dd1928e2ed9922f5a35ba32ce4f808b
parent bdb6a3ff
Loading
Loading
Loading
Loading
+16 −15
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:orientation="horizontal"
    android:id="@+id/main_container"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    android:padding="16dp"
    android:weightSum="2">
    android:weightSum="2"
    android:baselineAligned="false">

    <RelativeLayout
        android:layout_width="0dp"
@@ -29,57 +30,57 @@
                android:fontFamily="sans-serif-light"
                android:paddingBottom="16dp"
                android:textColor="?android:attr/textColorPrimary"
                android:textSize="56sp" />
                android:textSize="56sp"
                tools:text="LineageOS\n18.1" />

            <TextView
                android:id="@+id/header_build_version"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/header_title"
                android:textColor="?android:attr/textColorPrimary"
                android:textSize="14sp" />
                android:textSize="14sp"
                tools:text="Android 11"/>

            <TextView
                android:id="@+id/header_build_date"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/header_build_version"
                android:textColor="?android:attr/textColorPrimary"
                android:textSize="14sp" />
                android:textSize="14sp"
                tools:text="2022-01-01"/>

            <TextView
                android:id="@+id/header_last_check"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/header_build_date"
                android:textColor="?android:attr/textColorPrimary"
                android:textSize="14sp" />
                android:textSize="14sp"
                tools:text="Last checked: 2022-01-01"/>

        </LinearLayout>
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/header_last_check"
            android:layout_alignParentBottom="true"
            android:weightSum="2"
            android:orientation="horizontal">

            <Button
                android:id="@+id/refresh"
                android:drawableLeft="@drawable/ic_menu_refresh"
                android:drawableStart="@drawable/ic_menu_refresh"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="refresh"
                android:text="@string/menu_refresh"
                style="@style/Widget.AppCompat.Button.Borderless.Colored"/>

            <Button
                android:id="@+id/preferences"
                android:drawableLeft="@drawable/ic_menu_preferences"
                android:drawableStart="@drawable/ic_menu_preferences"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="preferences"
                android:text="@string/menu_preferences"
                style="@style/Widget.AppCompat.Button.Borderless.Colored"/>

        </LinearLayout>
+4 −2
Original line number Diff line number Diff line
@@ -16,7 +16,8 @@
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal"
        android:weightSum="1">
        android:weightSum="1"
        android:baselineAligned="false">

        <LinearLayout
            android:layout_width="0dp"
@@ -90,7 +91,8 @@
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="end"
                android:padding="8dp" />
                android:padding="8dp"
                android:contentDescription="@null" />
            <Button
                android:id="@id/update_action"
                style="@style/Widget.AppCompat.Button.Borderless.Colored"
+4 −4
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@
            android:entries="@array/menu_auto_updates_check_interval_entries" />
    </LinearLayout>

    <Switch
    <androidx.appcompat.widget.SwitchCompat
        android:id="@+id/preferences_auto_delete_updates"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
@@ -37,7 +37,7 @@
        android:text="@string/menu_auto_delete_updates"
        android:textSize="16sp" />

    <Switch
    <androidx.appcompat.widget.SwitchCompat
        android:id="@+id/preferences_mobile_data_warning"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
@@ -45,7 +45,7 @@
        android:text="@string/menu_mobile_data_warning"
        android:textSize="16sp" />

    <Switch
    <androidx.appcompat.widget.SwitchCompat
        android:id="@+id/preferences_ab_perf_mode"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
@@ -53,7 +53,7 @@
        android:text="@string/menu_ab_perf_mode"
        android:textSize="16sp" />

    <Switch
    <androidx.appcompat.widget.SwitchCompat
        android:id="@+id/preferences_update_recovery"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
+4 −2
Original line number Diff line number Diff line
@@ -15,7 +15,8 @@
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal"
        android:weightSum="1">
        android:weightSum="1"
        android:baselineAligned="false">

        <LinearLayout
            android:layout_width="0dp"
@@ -89,7 +90,8 @@
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="end"
                android:padding="8dp" />
                android:padding="8dp"
                android:contentDescription="@null" />
            <Button
                android:id="@id/update_action"
                style="@style/Widget.AppCompat.Button.Borderless.Colored"
+1 −2
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">
<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:id="@+id/menu_export_update"
        android:title="@string/menu_export_update" />
Loading