First slice of the app_Settings fork (PawletOS/axion-port-plan.md, design rule 6 explicitly waived for this app): folds in what used to be a patch against stock AOSP Settings (pawletos-about-device-cards.patch, now retired in the patches repo) as direct fork edits, then extends it. Card-grid header (device icon, OS-version card, device-model card, summary line) is the same content the retired patch added, now native rather than patched in. New "Hardware" preference category adds only the stats stock Settings doesn't already surface anywhere on this screen: total RAM, screen resolution, camera megapixel summary, battery design capacity. Model, hardware revision, serial, manufactured year, kernel version, security patch, build number, and storage used/total are NOT duplicated here -- HardwareInfoFragment, FirmwareVersionSettings, and StorageUsageProgressBarPreferenceController already provide them. PawletDeviceInfoProvider (reimplemented with AxionOS's ax_deviceinfo as a design reference only, no code copied -- that repo ships no LICENSE file) backs the four new rows, matching BasePreferenceController's getAvailabilityStatus()/getSummary() pattern already used throughout this codebase (see SerialNumberPreferenceController). Each row checks a persist.pawlet.hw.* SystemProperties override first, then falls back to live detection (MemInfoReader, DisplayManager, Camera2 CameraCharacteristics, BatteryManager+PowerProfile); a row hides itself (UNSUPPORTED_ON_DEVICE) if neither an override nor a queryable value exists, so a board without a battery or camera just shows fewer rows. Not yet done: AndroidDeviceInfo library integration, WebView-provider picker migration from the retired app_PawletSettings, general-toggle screens, manifest wiring to actually build this fork. Not built/tested -- no AOSP tree pointed at this fork yet to validate against.
130 lines
5.4 KiB
XML
130 lines
5.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
PawletOS: card-grid About Device header, replacing settings_entity_header
|
|
for this screen only. Icon on the left, "Android version" / "Device info"
|
|
stat cards on the right (tap through to the real FirmwareVersionSettings /
|
|
HardwareInfoFragment screens — same destinations the rows below already
|
|
use), summary line underneath. See MyDeviceInfoFragment#initHeader().
|
|
-->
|
|
<LinearLayout
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
android:id="@+id/pawlet_about_device_header_root"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:paddingHorizontal="16dp"
|
|
android:paddingTop="16dp"
|
|
android:paddingBottom="8dp">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="180dp"
|
|
android:orientation="horizontal">
|
|
|
|
<FrameLayout
|
|
android:layout_width="0dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="0.6"
|
|
android:layout_marginEnd="16dp"
|
|
android:background="@drawable/pawlet_about_icon_background">
|
|
|
|
<ImageView
|
|
android:id="@+id/pawlet_about_device_icon"
|
|
android:layout_width="64dp"
|
|
android:layout_height="64dp"
|
|
android:layout_gravity="center"
|
|
android:src="@drawable/ic_settings_about_device_filled"
|
|
android:contentDescription="@null" />
|
|
</FrameLayout>
|
|
|
|
<LinearLayout
|
|
android:layout_width="0dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="0.4"
|
|
android:orientation="vertical">
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:id="@+id/pawlet_about_os_card"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
android:layout_weight="1"
|
|
android:layout_marginBottom="8dp"
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
app:cardCornerRadius="12dp"
|
|
app:cardElevation="2dp">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="vertical"
|
|
android:gravity="center_vertical"
|
|
android:padding="12dp">
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/firmware_version"
|
|
android:textAppearance="?attr/textAppearanceTitleSmall"
|
|
android:maxLines="1" />
|
|
|
|
<TextView
|
|
android:id="@+id/pawlet_about_os_subtitle"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="4dp"
|
|
android:textAppearance="?attr/textAppearanceBodySmall"
|
|
android:textColor="?attr/colorOnSurfaceVariant"
|
|
android:maxLines="1" />
|
|
</LinearLayout>
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:id="@+id/pawlet_about_model_card"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
android:layout_weight="1"
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
app:cardCornerRadius="12dp"
|
|
app:cardElevation="2dp">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="vertical"
|
|
android:gravity="center_vertical"
|
|
android:padding="12dp">
|
|
|
|
<TextView
|
|
android:id="@+id/pawlet_about_model_title"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/model_info"
|
|
android:textAppearance="?attr/textAppearanceTitleSmall"
|
|
android:maxLines="1" />
|
|
|
|
<TextView
|
|
android:id="@+id/pawlet_about_model_subtitle"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="4dp"
|
|
android:textAppearance="?attr/textAppearanceBodySmall"
|
|
android:textColor="?attr/colorOnSurfaceVariant"
|
|
android:maxLines="2" />
|
|
</LinearLayout>
|
|
</com.google.android.material.card.MaterialCardView>
|
|
</LinearLayout>
|
|
</LinearLayout>
|
|
|
|
<TextView
|
|
android:id="@+id/pawlet_about_summary"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="12dp"
|
|
android:textAppearance="?attr/textAppearanceBodySmall"
|
|
android:textColor="?attr/colorOnSurfaceVariant" />
|
|
|
|
</LinearLayout>
|