Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add overlays for Xiaomi Mi 10T Lite/Mi 10i/Redmi Note 9 Pro #643

Open
wants to merge 6 commits into
base: pie
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Xiaomi/Mi10TLite-SystemUI/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_PACKAGE_NAME := treble-overlay-xiaomi-mi10tlite-systemui
LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT)/overlay
LOCAL_IS_RUNTIME_RESOURCE_OVERLAY := true
LOCAL_PRIVATE_PLATFORM_APIS := true
include $(BUILD_PACKAGE)
10 changes: 10 additions & 0 deletions Xiaomi/Mi10TLite-SystemUI/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="me.phh.treble.overlay.xiaomi.mi10tlite.systemui"
android:versionCode="1"
android:versionName="1.0">
<overlay android:targetPackage="com.android.systemui"
android:requiredSystemPropertyName="ro.product.vendor.device"
android:requiredSystemPropertyValue="+(gauguin|gauguinpro|gauguininpro)"
android:priority="779"
android:isStatic="true" />
</manifest>
22 changes: 22 additions & 0 deletions Xiaomi/Mi10TLite-SystemUI/res/values-land/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2009, 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.
*/
-->
<resources>
<!-- the padding on the top of the statusbar (usually 0) -->
<dimen name="status_bar_padding_top">0dp</dimen>
</resources>
24 changes: 24 additions & 0 deletions Xiaomi/Mi10TLite-SystemUI/res/values-port/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2009, 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.
*/
-->
<resources>
<!-- the padding on the top of the statusbar (usually 0) -->
<!-- status_bar_height = 95, punch hole y center = 58 -->
<!-- icon height = (95 - 58) * 2 = 74, padding = 95 - 74 = 21 -->
<dimen name="status_bar_padding_top">21px</dimen>
</resources>
41 changes: 41 additions & 0 deletions Xiaomi/Mi10TLite-SystemUI/res/values/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2009, 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.
*/
-->
<resources>
<!-- Default paddings for content around the corners. -->
<dimen name="rounded_corner_content_padding">21px</dimen>

<!-- Location on the screen of the center of the fingerprint sensor. For devices with under
display fingerprint sensors, this directly corresponds to the fingerprint sensor's location.
For devices with sensors on the back of the device, this corresponds to the location on the
screen directly in front of the sensor.
By default, this is set to @null to use the horizontal center of the screen. -->
<dimen name="physical_fingerprint_sensor_center_screen_location_x">1080px</dimen>
iovxw marked this conversation as resolved.
Show resolved Hide resolved

<!-- Location on the screen of the center of the fingerprint sensor. For devices with under
display fingerprint sensors, this directly corresponds to the fingerprint sensor's location.
For devices with sensors on the back of the device, this corresponds to the location on the
screen directly in front of the sensor. -->
<dimen name="physical_power_button_center_screen_location_y">1000px</dimen>

<!-- Location on the screen of the center of the fingerprint sensor. For devices with under
display fingerprint sensors, this directly corresponds to the fingerprint sensor's location.
For devices with sensors on the back of the device, this corresponds to the location on the
screen directly in front of the sensor. -->
<dimen name="physical_fingerprint_sensor_center_screen_location_y">@dimen/physical_power_button_center_screen_location_y</dimen>
iovxw marked this conversation as resolved.
Show resolved Hide resolved
</resources>
8 changes: 8 additions & 0 deletions Xiaomi/Mi10TLite/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_PACKAGE_NAME := treble-overlay-xiaomi-mi10tlite
LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT)/overlay
LOCAL_IS_RUNTIME_RESOURCE_OVERLAY := true
LOCAL_PRIVATE_PLATFORM_APIS := true
include $(BUILD_PACKAGE)
10 changes: 10 additions & 0 deletions Xiaomi/Mi10TLite/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="me.phh.treble.overlay.xiaomi.mi10tlite"
android:versionCode="1"
android:versionName="1.0">
<overlay android:targetPackage="android"
android:requiredSystemPropertyName="ro.product.vendor.device"
android:requiredSystemPropertyValue="+(gauguin|gauguinpro|gauguininpro)"
android:priority="777"
android:isStatic="true" />
</manifest>
5 changes: 5 additions & 0 deletions Xiaomi/Mi10TLite/res/values-land/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="status_bar_height">28dp</dimen>
<dimen name="status_bar_height_default">28dp</dimen>
</resources>
6 changes: 6 additions & 0 deletions Xiaomi/Mi10TLite/res/values-port/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="status_bar_height">95px</dimen>
<!-- _default ensures that `SystemBarUtils.getStatusBarHeight` will get correct value -->
<dimen name="status_bar_height_default">95px</dimen>
</resources>
Loading