Advertisement
arter97

OnePlus 7 Pro rounded corners patch

Jan 2nd, 2020
638
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 6.93 KB | None | 0 0
  1. From de0bff6931f703c8086605a13b3e1dc186f8322b Mon Sep 17 00:00:00 2001
  2. From: Park Ju Hyung <qkrwngud825@gmail.com>
  3. Date: Fri, 3 Jan 2020 11:51:28 +0900
  4. Subject: [PATCH] oneplus7pro: set custom cutout shapes
  5.  
  6. For perfectly rounded corners.
  7.  
  8. Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
  9. ---
  10. .../SystemUI/res/drawable/rounded_bottom.xml  | 24 ++++++++++++++++++
  11.  .../SystemUI/res/drawable/rounded_top.xml     | 24 ++++++++++++++++++
  12.  .../SystemUI/res/values/pa_config.xml         |  3 +++
  13.  .../SystemUI/res/values/pa_dimens.xml         | 25 +++++++++++++++++++
  14.  .../base/core/res/res/values/config.xml       |  2 +-
  15.  5 files changed, 77 insertions(+), 1 deletion(-)
  16.  create mode 100644 overlay-pa/frameworks/base/packages/SystemUI/res/drawable/rounded_bottom.xml
  17.  create mode 100644 overlay-pa/frameworks/base/packages/SystemUI/res/drawable/rounded_top.xml
  18.  create mode 100644 overlay-pa/frameworks/base/packages/SystemUI/res/values/pa_dimens.xml
  19.  
  20. 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
  21. new file mode 100644
  22. index 0000000..fb2d614
  23. --- /dev/null
  24. +++ b/overlay-pa/frameworks/base/packages/SystemUI/res/drawable/rounded_bottom.xml
  25. @@ -0,0 +1,24 @@
  26. +<!--
  27. +    Copyright (C) 2016 The Android Open Source Project
  28. +
  29. +    You may obtain a copy of the License at
  30. +
  31. +         http://www.apache.org/licenses/LICENSE-2.0
  32. +
  33. +    Unless required by applicable law or agreed to in writing, software
  34. +    distributed under the License is distributed on an "AS IS" BASIS,
  35. +    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  36. +    See the License for the specific language governing permissions and
  37. +    limitations under the License.
  38. +-->
  39. +<vector xmlns:android="http://schemas.android.com/apk/res/android"
  40. +    android:width="223.0px"
  41. +    android:height="223.0px"
  42. +    android:viewportWidth="223.0"
  43. +    android:viewportHeight="223.0">
  44. +
  45. +    <path
  46. +        android:fillColor="#ff000000"
  47. +        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" />
  48. +
  49. +</vector>
  50. 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
  51. new file mode 100644
  52. index 0000000..6c98037
  53. --- /dev/null
  54. +++ b/overlay-pa/frameworks/base/packages/SystemUI/res/drawable/rounded_top.xml
  55. @@ -0,0 +1,24 @@
  56. +<!--
  57. +    Copyright (C) 2016 The Android Open Source Project
  58. +
  59. +    You may obtain a copy of the License at
  60. +
  61. +         http://www.apache.org/licenses/LICENSE-2.0
  62. +
  63. +    Unless required by applicable law or agreed to in writing, software
  64. +    distributed under the License is distributed on an "AS IS" BASIS,
  65. +    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  66. +    See the License for the specific language governing permissions and
  67. +    limitations under the License.
  68. +-->
  69. +<vector xmlns:android="http://schemas.android.com/apk/res/android"
  70. +    android:width="223.0px"
  71. +    android:height="223.0px"
  72. +    android:viewportWidth="223.0"
  73. +    android:viewportHeight="223.0">
  74. +
  75. +    <path
  76. +        android:fillColor="#ff000000"
  77. +        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" />
  78. +
  79. +</vector>
  80. 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
  81. index 689c669..f6b3e7a 100644
  82. --- a/overlay-pa/frameworks/base/packages/SystemUI/res/values/pa_config.xml
  83. +++ b/overlay-pa/frameworks/base/packages/SystemUI/res/values/pa_config.xml
  84. @@ -20,4 +20,7 @@
  85.      <integer name="config_maxVisibleNotificationIcons">7</integer>
  86.      <integer name="config_maxVisibleNotificationIconsWhenDark">8</integer>
  87.  
  88. +    <!-- Allow devices to use unordinary cutout overlays -->
  89. +    <bool name="config_customCutout">true</bool>
  90. +
  91.  </resources>
  92. 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
  93. new file mode 100644
  94. index 0000000..86ad4fe
  95. --- /dev/null
  96. +++ b/overlay-pa/frameworks/base/packages/SystemUI/res/values/pa_dimens.xml
  97. @@ -0,0 +1,25 @@
  98. +<?xml version="1.0" encoding="utf-8"?>
  99. +<!--
  100. +    Copyright 2019 Paranoid Android
  101. +
  102. +    Licensed under the Apache License, Version 2.0 (the "License");
  103. +    you may not use this file except in compliance with the License.
  104. +    You may obtain a copy of the License at
  105. +
  106. +        http://www.apache.org/licenses/LICENSE-2.0
  107. +
  108. +    Unless required by applicable law or agreed to in writing, software
  109. +    distributed under the License is distributed on an "AS IS" BASIS,
  110. +    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  111. +    See the License for the specific language governing permissions and
  112. +    limitations under the License.
  113. +-->
  114. +<resources>
  115. +
  116. +    <!-- Custom cutout overlay view sizes -->
  117. +    <dimen name="config_customCutoutTopWidth">223.0px</dimen>
  118. +    <dimen name="config_customCutoutTopHeight">223.0px</dimen>
  119. +    <dimen name="config_customCutoutBottomWidth">223.0px</dimen>
  120. +    <dimen name="config_customCutoutBottomHeight">223.0px</dimen>
  121. +
  122. +</resources>
  123. diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
  124. index 729803a..431071e 100644
  125. --- a/overlay/frameworks/base/core/res/res/values/config.xml
  126. +++ b/overlay/frameworks/base/core/res/res/values/config.xml
  127. @@ -343,6 +343,6 @@
  128.      <integer translatable="false" name="config_brightness_ramp_rate_fast">400</integer>
  129.  
  130.      <!-- Radius of the software rounded corners. -->
  131. -    <dimen name="rounded_corner_radius">48px</dimen>
  132. +    <dimen name="rounded_corner_radius">140px</dimen>
  133.  
  134.  </resources>
  135. --
  136. 2.24.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement