Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From de0bff6931f703c8086605a13b3e1dc186f8322b Mon Sep 17 00:00:00 2001
- From: Park Ju Hyung <qkrwngud825@gmail.com>
- Date: Fri, 3 Jan 2020 11:51:28 +0900
- Subject: [PATCH] oneplus7pro: set custom cutout shapes
- For perfectly rounded corners.
- Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
- ---
- .../SystemUI/res/drawable/rounded_bottom.xml | 24 ++++++++++++++++++
- .../SystemUI/res/drawable/rounded_top.xml | 24 ++++++++++++++++++
- .../SystemUI/res/values/pa_config.xml | 3 +++
- .../SystemUI/res/values/pa_dimens.xml | 25 +++++++++++++++++++
- .../base/core/res/res/values/config.xml | 2 +-
- 5 files changed, 77 insertions(+), 1 deletion(-)
- create mode 100644 overlay-pa/frameworks/base/packages/SystemUI/res/drawable/rounded_bottom.xml
- create mode 100644 overlay-pa/frameworks/base/packages/SystemUI/res/drawable/rounded_top.xml
- create mode 100644 overlay-pa/frameworks/base/packages/SystemUI/res/values/pa_dimens.xml
- diff --git a/overlay-pa/frameworks/base/packages/SystemUI/res/drawable/rounded_bottom.xml b/overlay-pa/frameworks/base/packages/SystemUI/res/drawable/rounded_bottom.xml
- new file mode 100644
- index 0000000..fb2d614
- --- /dev/null
- +++ b/overlay-pa/frameworks/base/packages/SystemUI/res/drawable/rounded_bottom.xml
- @@ -0,0 +1,24 @@
- +<!--
- + Copyright (C) 2016 The Android Open Source Project
- +
- + 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="223.0px"
- + android:height="223.0px"
- + android:viewportWidth="223.0"
- + android:viewportHeight="223.0">
- +
- + <path
- + android:fillColor="#ff000000"
- + android:pathData="M0,0l0,20.4c0,0,0,0,0.1,15.2c0.2,15.1,0.2,15.1,0.2,15.1l0.5,13.4c0,0,0,0,0.7,11.9c1,10.8,1,10.8,1,10.8l1.3,9.9 c0,0,0,0,1.5,9.2c1.8,8.6,1.8,8.6,1.8,8.6l2,8.1c0,0,0,0,2.3,7.6c2.6,7.2,2.6,7.2,2.6,7.2l2.8,6.9c0,0,0,0,3.1,6.5 c3.3,6.2,3.3,6.2,3.3,6.2l3.6,5.9c0,0,0,0,3.9,5.6c4.1,5.3,4.1,5.3,4.1,5.3l4.4,5c0,0,0,0,2.3,2.4c2.4,2.3,2.4,2.3,2.4,2.3l5,4.4 c0,0,0,0,5.2,4.2c5.5,3.9,5.5,3.9,5.5,3.9l5.8,3.6c0,0,0,0,6.1,3.4c6.5,3.1,6.5,3.1,6.5,3.1l6.8,2.9c0,0,0,0,7.2,2.6 c7.6,2.3,7.6,2.3,7.6,2.3l8.1,2.1c0,0,0,0,8.6,1.8c9.2,1.5,9.2,1.5,9.2,1.5l9.9,1.3c0,0,0,0,10.8,1c12,0.8,12,0.8,12,0.8l13.7,0.5 c0,0,0,0,16.6,0.3c23.3,0.1,23.3,0.1,23.3,0.1h11.4H0V0z" />
- +
- +</vector>
- diff --git a/overlay-pa/frameworks/base/packages/SystemUI/res/drawable/rounded_top.xml b/overlay-pa/frameworks/base/packages/SystemUI/res/drawable/rounded_top.xml
- new file mode 100644
- index 0000000..6c98037
- --- /dev/null
- +++ b/overlay-pa/frameworks/base/packages/SystemUI/res/drawable/rounded_top.xml
- @@ -0,0 +1,24 @@
- +<!--
- + Copyright (C) 2016 The Android Open Source Project
- +
- + 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="223.0px"
- + android:height="223.0px"
- + android:viewportWidth="223.0"
- + android:viewportHeight="223.0">
- +
- + <path
- + android:fillColor="#ff000000"
- + android:pathData="M0,223.12 V202.77 l0.08-15.16,0.25-15.05,0.48-13.37,0.73-11.91,1-10.8,1.25-9.93,1.51-9.22,1.78-8.62,2-8.11,2.3-7.65 L14,85.72 l2.82-6.85,3.08-6.5,3.34-6.17,3.6-5.86,3.87-5.55,4.13-5.27,4.4-5,2.31-2.39,2.38-2.32,5-4.44 L54.1,31.2 l5.52-3.9,5.82-3.64,6.13-3.38 L78,17.18 l6.81-2.86 L92,11.72 l7.6-2.34,8.06-2.08,8.58-1.81,9.17-1.55,9.89-1.29,10.79-1,12-.77,13.72-.52,16.65-.28 L211.74,0 H0 V223.12Z" />
- +
- +</vector>
- diff --git a/overlay-pa/frameworks/base/packages/SystemUI/res/values/pa_config.xml b/overlay-pa/frameworks/base/packages/SystemUI/res/values/pa_config.xml
- index 689c669..f6b3e7a 100644
- --- a/overlay-pa/frameworks/base/packages/SystemUI/res/values/pa_config.xml
- +++ b/overlay-pa/frameworks/base/packages/SystemUI/res/values/pa_config.xml
- @@ -20,4 +20,7 @@
- <integer name="config_maxVisibleNotificationIcons">7</integer>
- <integer name="config_maxVisibleNotificationIconsWhenDark">8</integer>
- + <!-- Allow devices to use unordinary cutout overlays -->
- + <bool name="config_customCutout">true</bool>
- +
- </resources>
- diff --git a/overlay-pa/frameworks/base/packages/SystemUI/res/values/pa_dimens.xml b/overlay-pa/frameworks/base/packages/SystemUI/res/values/pa_dimens.xml
- new file mode 100644
- index 0000000..86ad4fe
- --- /dev/null
- +++ b/overlay-pa/frameworks/base/packages/SystemUI/res/values/pa_dimens.xml
- @@ -0,0 +1,25 @@
- +<?xml version="1.0" encoding="utf-8"?>
- +<!--
- + Copyright 2019 Paranoid Android
- +
- + 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>
- +
- + <!-- Custom cutout overlay view sizes -->
- + <dimen name="config_customCutoutTopWidth">223.0px</dimen>
- + <dimen name="config_customCutoutTopHeight">223.0px</dimen>
- + <dimen name="config_customCutoutBottomWidth">223.0px</dimen>
- + <dimen name="config_customCutoutBottomHeight">223.0px</dimen>
- +
- +</resources>
- diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
- index 729803a..431071e 100644
- --- a/overlay/frameworks/base/core/res/res/values/config.xml
- +++ b/overlay/frameworks/base/core/res/res/values/config.xml
- @@ -343,6 +343,6 @@
- <integer translatable="false" name="config_brightness_ramp_rate_fast">400</integer>
- <!-- Radius of the software rounded corners. -->
- - <dimen name="rounded_corner_radius">48px</dimen>
- + <dimen name="rounded_corner_radius">140px</dimen>
- </resources>
- --
- 2.24.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement