18 Commits
Author SHA1 Message Date
nehemiah-zb a149ba151d Update patch name 2023-12-18 19:56:17 -05:00
nehemiah-zb 5dea1381e1 PAtch the patch 2023-12-18 19:45:14 -05:00
nehemiah-zb 5683edcaf6 Kaput? 2023-12-18 16:16:48 -05:00
nehemiah-zb 4ddfb5bf1d Foutje, bedankt 2023-12-18 15:57:54 -05:00
nehemiah-zb 9b267128fd Button backlight patch 2023-12-18 15:44:44 -05:00
nehemiah-zb b2547c7f80 We don't have Jelly 2023-12-18 13:51:51 -05:00
nehemiah-zb f1c5c7baad Make out 2023-12-17 14:17:53 -05:00
Andy CrossGate Yan 201050d707 Changes for July 2022 2022-07-17 04:05:59 +00:00
Andy CrossGate Yan ec4deb39f7 Changes for March 2022 2022-03-15 07:04:24 +00:00
Andy CrossGate Yan fcfa9d0ee2 Changes for January 2022 2022-01-22 01:13:28 +00:00
Andy CrossGate Yan 3d849377eb Move Huawei-specific patches into platform_treble 2022-01-20 16:11:44 +00:00
Andy YanandGitHub 54183357d4 Merge pull request #2 from Iceows/lineage-18.1 2022-01-21 00:08:35 +08:00
Raphael Mounier eba4b17b61 Fix screen recording on Huawei device V2
Fix screen recording on Huawei device
2022-01-18 19:29:34 +01:00
Raphael Mounier c06888bd93 Huawei cell signal strength not working
This patch fixes a problem concerning all Huawei kirin devices (MediaPad, Prague, Warsaw ..). On these devices the signal quality is not recovered correctly from the modem layer
2021-12-15 08:02:22 +01:00
Andy CrossGate Yan 2930204aad Proper target names
Fixes https://github.com/AndyCGYan/lineage_build_unified/issues/12, as well as obsoleting 2 "fixes" from earlier
2021-11-18 16:11:32 +00:00
Andy CrossGate Yan 45b9af4bdc Changes for November 2021 2021-11-08 11:53:53 +00:00
Andy CrossGate Yan 8a48d127cf Changes for September 2021, syncing up to v312 2021-09-14 23:24:59 +00:00
Andy CrossGate Yan 01693449b8 Initial unified commit for Android 11, syncing up to v311 2021-08-08 09:32:01 +00:00
326 changed files with 21243 additions and 126220 deletions
@@ -0,0 +1,133 @@
From f63609cfc0fcc6a488ba7d024a1b1e3853637b09 Mon Sep 17 00:00:00 2001
From: jhenrique09 <jhenrique09.mcz@hotmail.com>
Date: Sun, 29 Mar 2020 17:38:39 -0300
Subject: [PATCH] fwb: Start device specific popup camera service conditionally
Change-Id: I07f97fe58495ef666fa317d14fa1334389015e11
---
.../custom/popupcamera/PopUpCameraUtils.java | 20 +++++++++++++++++++
core/res/res/values/lineage_config.xml | 3 +++
core/res/res/values/lineage_symbols.xml | 3 +++
.../server/camera/CameraServiceProxy.java | 20 +++++++++++++++++++
4 files changed, 46 insertions(+)
create mode 100644 core/java/com/android/internal/util/custom/popupcamera/PopUpCameraUtils.java
diff --git a/core/java/com/android/internal/util/custom/popupcamera/PopUpCameraUtils.java b/core/java/com/android/internal/util/custom/popupcamera/PopUpCameraUtils.java
new file mode 100644
index 00000000000..f7988608141
--- /dev/null
+++ b/core/java/com/android/internal/util/custom/popupcamera/PopUpCameraUtils.java
@@ -0,0 +1,20 @@
+/*
+* Copyright (C) 2019 The Pixel Experience 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.
+*/
+package com.android.internal.util.custom.popupcamera;
+
+public class PopUpCameraUtils {
+ public static String MANAGE_POPUP_CAMERA_SERVICE_PERMISSION = "org.pixelexperience.device.MANAGE_POPUP_CAMERA_SERVICE";
+}
diff --git a/core/res/res/values/lineage_config.xml b/core/res/res/values/lineage_config.xml
index 4b090379f5a..3315de74147 100644
--- a/core/res/res/values/lineage_config.xml
+++ b/core/res/res/values/lineage_config.xml
@@ -34,4 +34,7 @@
<!-- The list of components which should be forced to be enabled. -->
<string-array name="config_forceEnabledComponents" translatable="false">
</string-array>
+
+ <!-- Component name of popup camera service -->
+ <string name="config_popUpCameraServiceComponentName" translatable="false"></string>
</resources>
diff --git a/core/res/res/values/lineage_symbols.xml b/core/res/res/values/lineage_symbols.xml
index 155da4479fb..c7e58b3943f 100644
--- a/core/res/res/values/lineage_symbols.xml
+++ b/core/res/res/values/lineage_symbols.xml
@@ -25,4 +25,7 @@
<java-symbol type="array" name="config_deviceDisabledComponents" />
<java-symbol type="array" name="config_globallyDisabledComponents" />
<java-symbol type="array" name="config_forceEnabledComponents" />
+
+ <!-- Component name of popup camera service -->
+ <java-symbol type="string" name="config_popUpCameraServiceComponentName" />
</resources>
diff --git a/services/core/java/com/android/server/camera/CameraServiceProxy.java b/services/core/java/com/android/server/camera/CameraServiceProxy.java
index 5f7a72c8512..9e72fa09993 100644
--- a/services/core/java/com/android/server/camera/CameraServiceProxy.java
+++ b/services/core/java/com/android/server/camera/CameraServiceProxy.java
@@ -16,6 +16,7 @@
package com.android.server.camera;
import android.content.BroadcastReceiver;
+import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
@@ -32,6 +33,7 @@ import android.os.Process;
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.SystemProperties;
+import android.os.UserHandle;
import android.os.UserManager;
import android.util.ArrayMap;
import android.util.ArraySet;
@@ -53,6 +55,8 @@ import java.util.Set;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
+import com.android.internal.util.custom.popupcamera.PopUpCameraUtils;
+
/**
* CameraServiceProxy is the system_server analog to the camera service running in cameraserver.
*
@@ -106,6 +110,8 @@ public class CameraServiceProxy extends SystemService
private final boolean mNotifyNfc;
private final boolean mAllowMediaUid;
+ private final String mPopUpCameraServiceComponentName;
+
private ScheduledThreadPoolExecutor mLogWriterService = new ScheduledThreadPoolExecutor(
/*corePoolSize*/ 1);
@@ -218,6 +224,8 @@ public class CameraServiceProxy extends SystemService
// Don't keep any extra logging threads if not needed
mLogWriterService.setKeepAliveTime(1, TimeUnit.SECONDS);
mLogWriterService.allowCoreThreadTimeOut(true);
+ mPopUpCameraServiceComponentName = mContext.getResources().getString(
+ com.android.internal.R.string.config_popUpCameraServiceComponentName);
}
@Override
@@ -338,6 +346,18 @@ public class CameraServiceProxy extends SystemService
}
}
+ @Override
+ public void onBootPhase(int phase) {
+ if (phase == PHASE_BOOT_COMPLETED &&
+ !mPopUpCameraServiceComponentName.equals("")) {
+ String perm = PopUpCameraUtils.MANAGE_POPUP_CAMERA_SERVICE_PERMISSION;
+ mContext.enforceCallingOrSelfPermission(perm, "Missing or invalid popup camera service permission: " + perm);
+ Intent i = new Intent();
+ i.setComponent(ComponentName.unflattenFromString(mPopUpCameraServiceComponentName));
+ mContext.startServiceAsUser(i, UserHandle.SYSTEM);
+ }
+ }
+
/**
* Dump camera usage events to log.
* Package-private
--
2.25.1
@@ -0,0 +1,69 @@
From 9b7fb863d5b8ed266574f5bbd73dd896f8534f89 Mon Sep 17 00:00:00 2001
From: XiNGRZ <chenxingyu92@gmail.com>
Date: Thu, 13 Feb 2020 20:19:22 +0800
Subject: [PATCH] build: Add support of generating kernel includes for prebuilt
kernels
For prebuilt kernels, point TARGET_KERNEL_HEADER_SOURCE to the dummy
kernel source used to generate headers for HALs.
Change-Id: I8dbbe3760230ae32f4252e99d1c777a029046d39
---
build/soong/Android.bp | 4 ++--
config/BoardConfigKernel.mk | 4 ++++
config/BoardConfigSoong.mk | 2 +-
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/build/soong/Android.bp b/build/soong/Android.bp
index ee68c11e..03006e44 100644
--- a/build/soong/Android.bp
+++ b/build/soong/Android.bp
@@ -21,7 +21,7 @@ lineage_generator {
name: "generated_kernel_includes",
// The headers make command
- cmd: "$(PATH_OVERRIDE_SOONG) $(KERNEL_MAKE_CMD) $(KERNEL_MAKE_FLAGS) -C $(TARGET_KERNEL_SOURCE) O=$(KERNEL_BUILD_OUT_PREFIX)$(genDir) ARCH=$(KERNEL_ARCH) $(KERNEL_CROSS_COMPILE) headers_install",
+ cmd: "$(PATH_OVERRIDE_SOONG) $(KERNEL_MAKE_CMD) $(KERNEL_MAKE_FLAGS) -C $(TARGET_KERNEL_HEADER_SOURCE) O=$(KERNEL_BUILD_OUT_PREFIX)$(genDir) ARCH=$(KERNEL_ARCH) $(KERNEL_CROSS_COMPILE) headers_install",
// Directories that can be imported by a cc_* module generated_headers property
export_include_dirs: [
@@ -32,7 +32,7 @@ lineage_generator {
],
// Sources for dependency tracking
- dep_root: "$(TARGET_KERNEL_SOURCE)",
+ dep_root: "$(TARGET_KERNEL_HEADER_SOURCE)",
dep_files: [
"Makefile",
"include/**/*",
diff --git a/config/BoardConfigKernel.mk b/config/BoardConfigKernel.mk
index 8479369a..508927fd 100644
--- a/config/BoardConfigKernel.mk
+++ b/config/BoardConfigKernel.mk
@@ -52,6 +52,10 @@ else
KERNEL_ARCH := $(TARGET_KERNEL_ARCH)
endif
+ifneq ($(TARGET_KERNEL_SOURCE),)
+TARGET_KERNEL_HEADER_SOURCE := $(TARGET_KERNEL_SOURCE)
+endif
+
CLANG_PREBUILTS := $(BUILD_TOP)/prebuilts/clang/host/$(HOST_PREBUILT_TAG)/clang-r383902b
GCC_PREBUILTS := $(BUILD_TOP)/prebuilts/gcc/$(HOST_PREBUILT_TAG)
# arm64 toolchain
diff --git a/config/BoardConfigSoong.mk b/config/BoardConfigSoong.mk
index c0b01674..aacc8c56 100644
--- a/config/BoardConfigSoong.mk
+++ b/config/BoardConfigSoong.mk
@@ -9,7 +9,7 @@ EXPORT_TO_SOONG := \
KERNEL_MAKE_FLAGS \
PATH_OVERRIDE_SOONG \
TARGET_KERNEL_CONFIG \
- TARGET_KERNEL_SOURCE
+ TARGET_KERNEL_HEADER_SOURCE
# Setup SOONG_CONFIG_* vars to export the vars listed above.
# Documentation here:
--
2.25.1
@@ -0,0 +1,28 @@
From 7ff66a5a2479b490ae553781be0cf19ac5cf9010 Mon Sep 17 00:00:00 2001
From: Alexander Koskovich <zvnexus@outlook.com>
Date: Sat, 3 Oct 2020 14:28:35 -0700
Subject: [PATCH 1/2] Make broken copy headers the default.
* Do not take this for S unless needed, this is a hack
for this cycle.
Change-Id: I55c8897d7d4d5c2a9e62b1a931b3856b2e38956e
---
core/board_config.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/core/board_config.mk b/core/board_config.mk
index 86162b6f3..d152bdff6 100644
--- a/core/board_config.mk
+++ b/core/board_config.mk
@@ -113,6 +113,7 @@ endif
# ###############################################################
$(foreach v,$(_build_broken_var_list),$(eval $(v) :=))
BUILD_BROKEN_NINJA_USES_ENV_VARS :=
+BUILD_BROKEN_USES_BUILD_COPY_HEADERS := true
# Boards may be defined under $(SRC_TARGET_DIR)/board/$(TARGET_DEVICE)
# or under vendor/*/$(TARGET_DEVICE). Search in both places, but
--
2.25.1
@@ -1,27 +0,0 @@
From 90eaa68455703e85c5f97d0b13945bd04351e24c Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 14 Oct 2021 12:20:52 +0000
Subject: [PATCH] build: Remove llkd
...until someone figures out why Genshin Impact fails it
Change-Id: I29384a820a0c07b29d3f11d7039bed40eeaee926
---
target/product/base_system.mk | 1 -
1 file changed, 1 deletion(-)
diff --git a/target/product/base_system.mk b/target/product/base_system.mk
index b5b41f3be..c18a6dc03 100644
--- a/target/product/base_system.mk
+++ b/target/product/base_system.mk
@@ -195,7 +195,6 @@ PRODUCT_PACKAGES += \
libwilhelm \
linker \
linkerconfig \
- llkd \
lmkd \
LocalTransport \
locksettings \
--
2.25.1
@@ -0,0 +1,42 @@
From bd52c99f0fb44194a420df337f23639af8c26db9 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 5 Sep 2021 00:22:49 +0000
Subject: [PATCH 2/2] Revert "Add llkd to mainline_system"
This reverts commit 8879840c52b2647c000dffee0935bb5af662998a.
---
target/product/mainline_system.mk | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/target/product/mainline_system.mk b/target/product/mainline_system.mk
index a787707a0..4653207b3 100644
--- a/target/product/mainline_system.mk
+++ b/target/product/mainline_system.mk
@@ -39,9 +39,6 @@ PRODUCT_PACKAGES += \
Tag \
TimeZoneUpdater \
-# Binaries
-PRODUCT_PACKAGES += llkd
-
# OTA support
PRODUCT_PACKAGES += \
recovery-refresh \
@@ -49,10 +46,12 @@ PRODUCT_PACKAGES += \
update_verifier \
# Wrapped net utils for /vendor access.
-PRODUCT_PACKAGES += netutils-wrapper-1.0
+PRODUCT_PACKAGES += \
+ netutils-wrapper-1.0 \
# Charger images
-PRODUCT_PACKAGES += charger_res_images
+PRODUCT_PACKAGES += \
+ charger_res_images \
# system_other support
PRODUCT_PACKAGES += \
--
2.25.1
@@ -1,126 +0,0 @@
From ae74e74a16845c786042581f0fae8c8685ee5be7 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 13 Jan 2022 14:22:24 +0000
Subject: [PATCH 01/14] Add SPenPointerOverlay
Toggle this overlay with property "persist.ui.spen.pointer"
Change-Id: I21f7e05cf8ebd74c950dfb20cf7eee99bfe22988
---
packages/overlays/Android.mk | 1 +
.../overlays/SPenPointerOverlay/Android.bp | 28 ++++++++++++++++++
.../SPenPointerOverlay/AndroidManifest.xml | 23 ++++++++++++++
.../sem_pointer_spot_hovering_spen.png | Bin 0 -> 411 bytes
.../res/drawable/pointer_arrow_icon.xml | 5 ++++
5 files changed, 57 insertions(+)
create mode 100644 packages/overlays/SPenPointerOverlay/Android.bp
create mode 100644 packages/overlays/SPenPointerOverlay/AndroidManifest.xml
create mode 100644 packages/overlays/SPenPointerOverlay/res/drawable-xxhdpi/sem_pointer_spot_hovering_spen.png
create mode 100644 packages/overlays/SPenPointerOverlay/res/drawable/pointer_arrow_icon.xml
diff --git a/packages/overlays/Android.mk b/packages/overlays/Android.mk
index 69641e69a9f2..36ec11af3068 100644
--- a/packages/overlays/Android.mk
+++ b/packages/overlays/Android.mk
@@ -31,6 +31,7 @@ LOCAL_REQUIRED_MODULES := \
NavigationBarModeGesturalOverlayNarrowBack \
NavigationBarModeGesturalOverlayWideBack \
NavigationBarModeGesturalOverlayExtraWideBack \
+ SPenPointerOverlay \
preinstalled-packages-platform-overlays.xml
include $(BUILD_PHONY_PACKAGE)
diff --git a/packages/overlays/SPenPointerOverlay/Android.bp b/packages/overlays/SPenPointerOverlay/Android.bp
new file mode 100644
index 000000000000..7632ebd43ef6
--- /dev/null
+++ b/packages/overlays/SPenPointerOverlay/Android.bp
@@ -0,0 +1,28 @@
+//
+// Copyright 2021, 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.
+//
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "frameworks_base_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["frameworks_base_license"],
+}
+
+runtime_resource_overlay {
+ name: "SPenPointerOverlay",
+ product_specific: true,
+}
diff --git a/packages/overlays/SPenPointerOverlay/AndroidManifest.xml b/packages/overlays/SPenPointerOverlay/AndroidManifest.xml
new file mode 100644
index 000000000000..b785214f854b
--- /dev/null
+++ b/packages/overlays/SPenPointerOverlay/AndroidManifest.xml
@@ -0,0 +1,23 @@
+<!--
+ ~ Copyright (C) 2021 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.samsung.android.spenpointer.overlay"
+ android:versionCode="1"
+ android:versionName="1.0">
+ <overlay android:targetPackage="android" android:priority="5932" android:isStatic="true"
+ android:requiredSystemPropertyName="persist.ui.spen.pointer" android:requiredSystemPropertyValue="true"/>
+</manifest>
diff --git a/packages/overlays/SPenPointerOverlay/res/drawable-xxhdpi/sem_pointer_spot_hovering_spen.png b/packages/overlays/SPenPointerOverlay/res/drawable-xxhdpi/sem_pointer_spot_hovering_spen.png
new file mode 100644
index 0000000000000000000000000000000000000000..b73246c80a95e0bceeb8c09aacd2653722fca2d2
GIT binary patch
literal 411
zcmeAS@N?(olHy`uVBq!ia0vp^av;pX3?zBp#Z3TG?EyX^u0VPYDww}y>9XB>H{O1*
z{q+Z+%%XMcH{QCp_4%7Ek6&zi^&Z52_8N#bKYY6T$G`bYmOylGdHNEl2EyKW`#w-H
zMEkav?|=xXa@&iyKv|#(o9;XSGJv*hefA2d9ViRrHpmHroTOV4<QL2kefT?*&XynF
zf9jt6d~bTxr(K#H%-fm6)$T^@`96*P!_O$D=#P=#_iokL5u<mvYQ}e<#%Z1|jv*T7
z-(HO6Z&DCpO9*-59T;HT8)CHh%)kHdv-@V7U0D0tD*XMooHrlj82&Lg8FU>wkZ<5N
zBf!g`Yhiojq)$5MjpwPIIqY#_(VA78COitTt~#=3<I2pBClgEGRn7j@r_s({E14^`
zzN)C=(stXhXOBPbPTyLVZ~8%?D9+x@`{Nq(tjK9wr(Jhj*%s6+*nEHflkLxVMFlvw
UdB5Fp8R$X=Pgg&ebxsLQ0B%Ow$N&HU
literal 0
HcmV?d00001
diff --git a/packages/overlays/SPenPointerOverlay/res/drawable/pointer_arrow_icon.xml b/packages/overlays/SPenPointerOverlay/res/drawable/pointer_arrow_icon.xml
new file mode 100644
index 000000000000..f35255c5f961
--- /dev/null
+++ b/packages/overlays/SPenPointerOverlay/res/drawable/pointer_arrow_icon.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
+ android:bitmap="@drawable/sem_pointer_spot_hovering_spen"
+ android:hotSpotX="5dp"
+ android:hotSpotY="5dp" />
--
2.25.1
@@ -1,29 +1,29 @@
From 03ed62fb9ce9ce4da4f666f24a9c9c65cc5b9c03 Mon Sep 17 00:00:00 2001 From 0353d82691df67c3497cc0df021d8a0850b6cfec Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com> From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Tue, 6 Oct 2020 01:41:16 +0000 Date: Tue, 6 Oct 2020 01:41:16 +0000
Subject: [PATCH 10/14] UI: Revive navbar layout tuning via sysui_nav_bar Subject: [PATCH 1/3] UI: Revive navbar layout tuning via sysui_nav_bar tunable
tunable
Google keeps fixing what ain't broken. Google keeps fixing what ain't broken.
This partially undoes https://github.com/LineageOS/android_frameworks_base/commit/e0d5ccd331e694afdc3c8462a1b845df329de2b8 and https://github.com/LineageOS/android_frameworks_base/commit/d34b4e8d278386b85a00018c502bd21d00f8813b
Change-Id: Ied7d7859e50fd0fcc346219964e747c5d5f4c352 Change-Id: Ied7d7859e50fd0fcc346219964e747c5d5f4c352
--- ---
.../navigationbar/NavigationBarInflaterView.java | 15 +++++++++++++++ .../statusbar/phone/NavigationBarInflaterView.java | 14 ++++++++++++++
1 file changed, 15 insertions(+) 1 file changed, 14 insertions(+)
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java
index 51feed875337..5f0f9a220c31 100644 index 047cb702c55..e4b3395f57a 100644
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java
@@ -118,6 +118,7 @@ public class NavigationBarInflaterView extends FrameLayout @@ -108,6 +108,7 @@ public class NavigationBarInflaterView extends FrameLayout
private boolean mInverseLayout; private boolean mIsVertical;
private boolean mIsHintEnabled; private boolean mAlternativeOrder;
+ private boolean mUsingCustomLayout; + private boolean mUsingCustomLayout;
public NavigationBarInflaterView(Context context, AttributeSet attrs) { private OverviewProxyService mOverviewProxyService;
super(context, attrs); private int mNavBarMode = NAV_BAR_MODE_3BUTTON;
@@ -177,6 +178,7 @@ public class NavigationBarInflaterView extends FrameLayout @@ -173,6 +174,7 @@ public class NavigationBarInflaterView extends FrameLayout
super.onAttachedToWindow(); super.onAttachedToWindow();
Dependency.get(TunerService.class).addTunable(this, NAV_BAR_INVERSE); Dependency.get(TunerService.class).addTunable(this, NAV_BAR_INVERSE);
Dependency.get(TunerService.class).addTunable(this, KEY_NAVIGATION_HINT); Dependency.get(TunerService.class).addTunable(this, KEY_NAVIGATION_HINT);
@@ -31,7 +31,7 @@ index 51feed875337..5f0f9a220c31 100644
} }
@Override @Override
@@ -195,6 +197,8 @@ public class NavigationBarInflaterView extends FrameLayout @@ -191,6 +193,8 @@ public class NavigationBarInflaterView extends FrameLayout
mIsHintEnabled = TunerService.parseIntegerSwitch(newValue, true); mIsHintEnabled = TunerService.parseIntegerSwitch(newValue, true);
updateHint(); updateHint();
onLikelyDefaultLayoutChange(); onLikelyDefaultLayoutChange();
@@ -40,7 +40,7 @@ index 51feed875337..5f0f9a220c31 100644
} }
} }
@@ -204,7 +208,18 @@ public class NavigationBarInflaterView extends FrameLayout @@ -200,7 +204,17 @@ public class NavigationBarInflaterView extends FrameLayout
updateLayoutInversion(); updateLayoutInversion();
} }
@@ -55,10 +55,9 @@ index 51feed875337..5f0f9a220c31 100644
public void onLikelyDefaultLayoutChange() { public void onLikelyDefaultLayoutChange() {
+ // Don't override custom layouts + // Don't override custom layouts
+ if (mUsingCustomLayout) return; + if (mUsingCustomLayout) return;
+
// Reevaluate new layout // Reevaluate new layout
final String newValue = getDefaultLayout(); final String newValue = getDefaultLayout();
if (!Objects.equals(mCurrentLayout, newValue)) {
-- --
2.25.1 2.25.1
@@ -1,76 +0,0 @@
From 4e591984e8f533e0ad305caf8aa03c60cd9314d0 Mon Sep 17 00:00:00 2001
From: AndyCGYan <GeForce8800Ultra@gmail.com>
Date: Fri, 22 Mar 2019 00:41:20 +0800
Subject: [PATCH 02/14] Disable FP lockouts optionally
Both timed and permanent lockouts - GET THE FUCK OUT
Now targeting LockoutFramework, introduced in Android 12
Now controlled by property "persist.sys.fp.lockouts.disable"
Change-Id: I2d4b091f3546d4d7903bfb4d5585629212dc9915
---
.../hidl/LockoutFrameworkImpl.java | 28 +++++++++++--------
1 file changed, 17 insertions(+), 11 deletions(-)
diff --git a/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java b/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java
index a0befea8e085..48c4ded9f5ca 100644
--- a/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java
+++ b/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java
@@ -25,6 +25,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.SystemClock;
+import android.os.SystemProperties;
import android.util.Slog;
import android.util.SparseBooleanArray;
import android.util.SparseIntArray;
@@ -44,6 +45,7 @@ public class LockoutFrameworkImpl implements LockoutTracker {
private static final int MAX_FAILED_ATTEMPTS_LOCKOUT_PERMANENT = 20;
private static final long FAIL_LOCKOUT_TIMEOUT_MS = 30 * 1000;
private static final String KEY_LOCKOUT_RESET_USER = "lockout_reset_user";
+ private static final String DISABLE_FP_LOCKOUTS_PROPERTY = "persist.sys.fp.lockouts.disable";
private final class LockoutReceiver extends BroadcastReceiver {
@Override
@@ -101,23 +103,27 @@ public class LockoutFrameworkImpl implements LockoutTracker {
}
void addFailedAttemptForUser(int userId) {
- mFailedAttempts.put(userId, mFailedAttempts.get(userId, 0) + 1);
- mTimedLockoutCleared.put(userId, false);
+ if (!SystemProperties.getBoolean(DISABLE_FP_LOCKOUTS_PROPERTY, false)) {
+ mFailedAttempts.put(userId, mFailedAttempts.get(userId, 0) + 1);
+ mTimedLockoutCleared.put(userId, false);
- if (getLockoutModeForUser(userId) != LOCKOUT_NONE) {
- scheduleLockoutResetForUser(userId);
+ if (getLockoutModeForUser(userId) != LOCKOUT_NONE) {
+ scheduleLockoutResetForUser(userId);
+ }
}
}
@Override
public @LockoutMode int getLockoutModeForUser(int userId) {
- final int failedAttempts = mFailedAttempts.get(userId, 0);
- if (failedAttempts >= MAX_FAILED_ATTEMPTS_LOCKOUT_PERMANENT) {
- return LOCKOUT_PERMANENT;
- } else if (failedAttempts > 0
- && !mTimedLockoutCleared.get(userId, false)
- && (failedAttempts % MAX_FAILED_ATTEMPTS_LOCKOUT_TIMED == 0)) {
- return LOCKOUT_TIMED;
+ if (!SystemProperties.getBoolean(DISABLE_FP_LOCKOUTS_PROPERTY, false)) {
+ final int failedAttempts = mFailedAttempts.get(userId, 0);
+ if (failedAttempts >= MAX_FAILED_ATTEMPTS_LOCKOUT_PERMANENT) {
+ return LOCKOUT_PERMANENT;
+ } else if (failedAttempts > 0
+ && !mTimedLockoutCleared.get(userId, false)
+ && (failedAttempts % MAX_FAILED_ATTEMPTS_LOCKOUT_TIMED == 0)) {
+ return LOCKOUT_TIMED;
+ }
}
return LOCKOUT_NONE;
}
--
2.25.1
@@ -1,7 +1,7 @@
From 1d9cba70b8a820933b6e54afef69a72e7e1ab85e Mon Sep 17 00:00:00 2001 From 6fdadb36add6aa2f8c6c3d25c4ff8135278a9919 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com> From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 10 Jan 2021 11:44:29 +0000 Date: Sun, 10 Jan 2021 11:44:29 +0000
Subject: [PATCH 05/14] UI: Disable wallpaper zoom Subject: [PATCH 2/3] UI: Disable wallpaper zoom
It does little more than inducing motion sickness It does little more than inducing motion sickness
@@ -11,18 +11,18 @@ Change-Id: I78cc5484930b27f172cd8d8a5bd9042dce3478d0
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 659d0f37bf05..272df37188bf 100644 index 51b461e7949..f761d28e68d 100644
--- a/core/res/res/values/config.xml --- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml
@@ -5104,7 +5104,7 @@ @@ -4384,7 +4384,7 @@
<item name="config_wallpaperMinScale" format="float" type="dimen">1</item> <string name="config_customSessionPolicyProvider"></string>
<!-- The max scale for the wallpaper when it's zoomed in --> <!-- The max scale for the wallpaper when it's zoomed in -->
- <item name="config_wallpaperMaxScale" format="float" type="dimen">1.10</item> - <item name="config_wallpaperMaxScale" format="float" type="dimen">1.10</item>
+ <item name="config_wallpaperMaxScale" format="float" type="dimen">1</item> + <item name="config_wallpaperMaxScale" format="float" type="dimen">1</item>
<!-- If true, the wallpaper will scale regardless of the value of shouldZoomOutWallpaper() --> <!-- Package name that will receive an explicit manifest broadcast for
<bool name="config_alwaysScaleWallpaper">false</bool> android.os.action.POWER_SAVE_MODE_CHANGED. -->
-- --
2.25.1 2.25.1
@@ -1,7 +1,7 @@
From 3b4a0dc39f8d03ddac9c45fd3e7fc4577334a645 Mon Sep 17 00:00:00 2001 From 2fba4148047720a307d88013f20dbb87e389a751 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com> From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 5 Apr 2018 10:01:19 +0800 Date: Thu, 5 Apr 2018 10:01:19 +0800
Subject: [PATCH 03/14] Disable vendor mismatch warning Subject: [PATCH 3/3] Disable vendor mismatch warning
Change-Id: Ieb8fe91e2f02462f074312ed0f4885d183e9780b Change-Id: Ieb8fe91e2f02462f074312ed0f4885d183e9780b
--- ---
@@ -9,10 +9,10 @@ Change-Id: Ieb8fe91e2f02462f074312ed0f4885d183e9780b
1 file changed, 2 insertions(+), 14 deletions(-) 1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
index 01490f029e97..6199267cac0b 100644 index ec178a4b543..f1d9cd968bc 100644
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java --- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java +++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
@@ -5856,20 +5856,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { @@ -6494,20 +6494,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
} }
if (!Build.isBuildConsistent()) { if (!Build.isBuildConsistent()) {
@@ -1,62 +0,0 @@
From becd4bf809789b1d0d53956539d3d452e9f20e5a Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 16 Oct 2021 02:23:48 +0000
Subject: [PATCH 04/14] UI: Adjust default navbar layouts
- Slightly tighten nodpi layout
- Remove sw372dp layout - looks terrible, probably meant for legacy phablets, but most modern phones qualify
Change-Id: Ia32f5d92e6c9e36560c53e7dffce7d2c29a81fe5
---
.../SystemUI/res/values-sw372dp/config.xml | 25 -------------------
packages/SystemUI/res/values/config.xml | 2 +-
2 files changed, 1 insertion(+), 26 deletions(-)
delete mode 100644 packages/SystemUI/res/values-sw372dp/config.xml
diff --git a/packages/SystemUI/res/values-sw372dp/config.xml b/packages/SystemUI/res/values-sw372dp/config.xml
deleted file mode 100644
index 07b797a32428..000000000000
--- a/packages/SystemUI/res/values-sw372dp/config.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2017, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
- for different hardware and product builds. -->
-<resources>
- <!-- Nav bar button default ordering/layout -->
- <string name="config_navBarLayout" translatable="false">left[.25W],back[.5WC];home;recent[.5WC],right[.25W]</string>
-</resources>
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index d7d88cea2dbc..8a2b88d3cf9a 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -301,7 +301,7 @@
</string-array>
<!-- Nav bar button default ordering/layout -->
- <string name="config_navBarLayout" translatable="false">left[.5W],back[1WC];home;recent[1WC],right[.5W]</string>
+ <string name="config_navBarLayout" translatable="false">left[.6W],back[1WC];home;recent[1WC],right[.6W]</string>
<string name="config_navBarLayoutQuickstep" translatable="false">back[1.7WC];home;contextual[1.7WC]</string>
<string name="config_navBarLayoutHandle" translatable="false">back[70AC];home_handle;ime_switcher[70AC]</string>
--
2.25.1
@@ -1,39 +0,0 @@
From 4c3587987591a1c4545322b0855ea138e7fd26ce Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 25 Sep 2022 02:20:52 +0000
Subject: [PATCH 06/14] UI: Follow Monet and light/dark theme in user 1 icon
Change-Id: I755077c6003c39ddc9428da1defe6a6ddd0e5ff8
---
core/res/res/values-night/colors.xml | 1 +
core/res/res/values/colors.xml | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/core/res/res/values-night/colors.xml b/core/res/res/values-night/colors.xml
index ffaccd3ddc57..e2a955b89c77 100644
--- a/core/res/res/values-night/colors.xml
+++ b/core/res/res/values-night/colors.xml
@@ -33,6 +33,7 @@
<color name="overview_background">@color/overview_background_dark</color>
+ <color name="user_icon_1">@color/system_accent1_100</color>
<color name="user_icon_4">#fff439a0</color><!-- pink -->
<color name="user_icon_6">#ff4ecde6</color><!-- cyan -->
<color name="user_icon_7">#fffbbc04</color><!-- yellow -->
diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml
index d5875f547e91..c7711ed3e493 100644
--- a/core/res/res/values/colors.xml
+++ b/core/res/res/values/colors.xml
@@ -174,7 +174,7 @@
<color name="system_notification_accent_color">#00000000</color>
<!-- Default user icon colors -->
- <color name="user_icon_1">#ffe46962</color><!-- red -->
+ <color name="user_icon_1">@color/system_accent1_600</color>
<color name="user_icon_2">#ffaf5cf7</color><!-- purple -->
<color name="user_icon_3">#ff4c8df6</color><!-- blue -->
<color name="user_icon_4">#fff439a0</color><!-- pink -->
--
2.25.1
@@ -1,35 +0,0 @@
From cd200004d3b59dcb33187a3228a4bdab6b16619b Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 3 Jun 2020 01:31:34 +0000
Subject: [PATCH 07/14] UI: Increase default status bar height
Change-Id: Ibbcf63159e19bb2bb2b1094ea07ab85917630b07
---
core/res/res/values/dimens.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index 2542268a153a..099a6badc034 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -41,7 +41,7 @@
<!-- The default height of the status bar used in {@link SystemBarUtils#getStatusBarHeight} to
calculate the status bar height. -->
- <dimen name="status_bar_height_default">24dp</dimen>
+ <dimen name="status_bar_height_default">28dp</dimen>
<!-- Height of the status bar.
Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
-->
@@ -49,7 +49,7 @@
<!-- Height of the status bar in portrait.
Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
-->
- <dimen name="status_bar_height_portrait">24dp</dimen>
+ <dimen name="status_bar_height_portrait">28dp</dimen>
<!-- Height of the status bar in landscape.
Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
-->
--
2.25.1
@@ -1,32 +0,0 @@
From 6bc225de6c671c50ed045eef9575b0aa2ab5835f Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 25 Sep 2022 02:20:20 +0000
Subject: [PATCH 08/14] UI: Remove QS footer background
Change-Id: I68e82e0c5e3eddb2d3f767fe792b1436eae506ef
---
packages/SystemUI/res-keyguard/layout/footer_actions.xml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/packages/SystemUI/res-keyguard/layout/footer_actions.xml b/packages/SystemUI/res-keyguard/layout/footer_actions.xml
index a101c64a48e0..028ab29b8643 100644
--- a/packages/SystemUI/res-keyguard/layout/footer_actions.xml
+++ b/packages/SystemUI/res-keyguard/layout/footer_actions.xml
@@ -25,7 +25,6 @@
android:elevation="@dimen/qs_panel_elevation"
android:paddingTop="@dimen/qs_footer_actions_top_padding"
android:paddingBottom="@dimen/qs_footer_actions_bottom_padding"
- android:background="@drawable/qs_footer_actions_background"
android:gravity="center_vertical|end"
android:layout_gravity="bottom"
>
@@ -98,4 +97,4 @@
android:tint="?androidprv:attr/textColorPrimaryInverse" />
</LinearLayout>
-</com.android.systemui.qs.FooterActionsView>
\ No newline at end of file
+</com.android.systemui.qs.FooterActionsView>
--
2.25.1
@@ -1,56 +0,0 @@
From b421fc2bb853966ede836e09203718dfc8d0cb56 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 19 Mar 2022 09:22:24 +0000
Subject: [PATCH 09/14] UI: Restore split-screen divider to pre-Sv2 looks
- Kill rounded corners - where two rectangles collide should be perfectly straight
- Make it black again - taskbar should mind its own business
Change-Id: I240b627793b615c82bd07ebd77638cde180ef80f
---
.../Shell/res/color/split_divider_background.xml | 4 ++--
.../wm/shell/common/split/SplitLayout.java | 15 +--------------
2 files changed, 3 insertions(+), 16 deletions(-)
diff --git a/libs/WindowManager/Shell/res/color/split_divider_background.xml b/libs/WindowManager/Shell/res/color/split_divider_background.xml
index 049980803ee3..cd54ac26a7fd 100644
--- a/libs/WindowManager/Shell/res/color/split_divider_background.xml
+++ b/libs/WindowManager/Shell/res/color/split_divider_background.xml
@@ -15,5 +15,5 @@
~ limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:color="@android:color/system_neutral1_500" android:lStar="15" />
-</selector>
\ No newline at end of file
+ <item android:color="@android:color/black" />
+</selector>
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
index 419e62daf586..229844e42a49 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
@@ -152,20 +152,7 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange
}
private int getDividerInsets(Resources resources, Display display) {
- final int dividerInset = resources.getDimensionPixelSize(
- com.android.internal.R.dimen.docked_stack_divider_insets);
-
- int radius = 0;
- RoundedCorner corner = display.getRoundedCorner(RoundedCorner.POSITION_TOP_LEFT);
- radius = corner != null ? Math.max(radius, corner.getRadius()) : radius;
- corner = display.getRoundedCorner(RoundedCorner.POSITION_TOP_RIGHT);
- radius = corner != null ? Math.max(radius, corner.getRadius()) : radius;
- corner = display.getRoundedCorner(RoundedCorner.POSITION_BOTTOM_RIGHT);
- radius = corner != null ? Math.max(radius, corner.getRadius()) : radius;
- corner = display.getRoundedCorner(RoundedCorner.POSITION_BOTTOM_LEFT);
- radius = corner != null ? Math.max(radius, corner.getRadius()) : radius;
-
- return Math.max(dividerInset, radius);
+ return 0;
}
/** Gets bounds of the primary split with screen based coordinate. */
--
2.25.1
@@ -1,31 +0,0 @@
From 5dd8363ed108cb2443fad9e7cd25a3ad54e020b9 Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Tue, 3 Nov 2020 22:43:12 -0800
Subject: [PATCH 12/14] core: Remove old app target SDK dialog
If an app is old, users should already know that, and there's usually no
point in warning them about it because they would already be using a
newer version if one existed. Sometimes, using an old app is necessary
for one reason or another, so remove this annoyance and let the user use
their old app in peace.
Change-Id: I1a3021f0f9bec1ab6ff7641776391e1bd4c3cc49
---
services/core/java/com/android/server/wm/AppWarnings.java | 1 -
1 file changed, 1 deletion(-)
diff --git a/services/core/java/com/android/server/wm/AppWarnings.java b/services/core/java/com/android/server/wm/AppWarnings.java
index 994f07959f3b..6749ae78c09c 100644
--- a/services/core/java/com/android/server/wm/AppWarnings.java
+++ b/services/core/java/com/android/server/wm/AppWarnings.java
@@ -168,7 +168,6 @@ class AppWarnings {
public void onStartActivity(ActivityRecord r) {
showUnsupportedCompileSdkDialogIfNeeded(r);
showUnsupportedDisplaySizeDialogIfNeeded(r);
- showDeprecatedTargetDialogIfNeeded(r);
}
/**
--
2.25.1
@@ -1,41 +0,0 @@
From 84e2133ee773923f221a9b9754e4b1ce6bcf5e1a Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Tue, 5 Oct 2021 21:01:50 -0700
Subject: [PATCH 13/14] Paint: Enable subpixel text positioning by default
On desktop Linux, subpixel text positioning is necessary to avoid
kerning issues, and Android is no different. Even though most phone
displays have relatively high DPIs, the lack of subpixel text
positioning is only unnoticeable on high-end devices such as the Pixel 4
XL (1440x3040 @ 6.3 in => 537 dpi).
For example, on the Pixel 5 (1080 x 2340 @ 6.0 in => 432 dpi),
horizontally-scrolling labels in QS tiles can be seen "jittering"
slightly upon close observation. This was tested with the Google Sans
font on Google's stock OS. At this lower DPI, there is still a need for
subpixel text positioning (at least in some cases).
Enable subpixel text positioning by default to fix occasional kerning
issues and jittering when text is in motion.
Change-Id: I8d71e5848a745c5a2d457a28c68458920928ee09
---
graphics/java/android/graphics/Paint.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/graphics/java/android/graphics/Paint.java b/graphics/java/android/graphics/Paint.java
index 451b99ea7550..e60d506a171b 100644
--- a/graphics/java/android/graphics/Paint.java
+++ b/graphics/java/android/graphics/Paint.java
@@ -253,7 +253,7 @@ public class Paint {
// These flags are always set on a new/reset paint, even if flags 0 is passed.
static final int HIDDEN_DEFAULT_PAINT_FLAGS = DEV_KERN_TEXT_FLAG | EMBEDDED_BITMAP_TEXT_FLAG
- | FILTER_BITMAP_FLAG;
+ | FILTER_BITMAP_FLAG | SUBPIXEL_TEXT_FLAG;
/**
* Font hinter option that disables font hinting.
--
2.25.1
@@ -1,34 +0,0 @@
From b63b5c1fb46eaf032270bbb65b9a61fe487c5e46 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 26 Jun 2021 14:23:09 +0000
Subject: [PATCH] Jelly: MainActivity: Restore applyThemeColor
Fixes black statusbar on start
Change-Id: I6816f5b1dcb3c7bcaee2736a9e2a3ecd63217bc6
---
app/src/main/java/org/lineageos/jelly/MainActivity.kt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/src/main/java/org/lineageos/jelly/MainActivity.kt b/app/src/main/java/org/lineageos/jelly/MainActivity.kt
index 0143957..af7191c 100644
--- a/app/src/main/java/org/lineageos/jelly/MainActivity.kt
+++ b/app/src/main/java/org/lineageos/jelly/MainActivity.kt
@@ -192,6 +192,7 @@ class MainActivity : WebViewExtActivity(), SearchBarController.OnCancelListener,
findViewById(R.id.search_menu_cancel),
this)
setUiMode()
+ applyThemeColor(mThemeColor)
try {
val httpCacheDir = File(cacheDir, "suggestion_responses")
val httpCacheSize = 1024 * 1024.toLong() // 1 MiB
@@ -726,4 +727,4 @@ class MainActivity : WebViewExtActivity(), SearchBarController.OnCancelListener,
private const val STATE_KEY_THEME_COLOR = "theme_color"
private const val LOCATION_PERM_REQ = 424
}
-}
\ No newline at end of file
+}
--
2.25.1
@@ -1,4 +1,4 @@
From 9ee8209308b775f6cd4a104fe1cd89c9645e4742 Mon Sep 17 00:00:00 2001 From 47bf5612cec98931ee3076c307247ac58d07ccff Mon Sep 17 00:00:00 2001
From: AndyCGYan <GeForce8800Ultra@gmail.com> From: AndyCGYan <GeForce8800Ultra@gmail.com>
Date: Sun, 13 Jan 2019 21:44:48 +0800 Date: Sun, 13 Jan 2019 21:44:48 +0800
Subject: [PATCH] LineageParts: Invert per-app stretch-to-fullscreen Subject: [PATCH] LineageParts: Invert per-app stretch-to-fullscreen
@@ -27,13 +27,13 @@ index 40d0938..1119cef 100644
android:visibility="gone" /> android:visibility="gone" />
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 9340e57..63a4b71 100644 index ee5f7f9..eeed571 100644
--- a/res/values-zh-rCN/strings.xml --- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml +++ b/res/values-zh-rCN/strings.xml
@@ -434,9 +434,9 @@ @@ -448,9 +448,9 @@
<string name="display_rotation_90_title">90 度</string> <string name="auto_power_save_summary_on">电量 %s 时自动启用省电</string>
<string name="display_rotation_180_title">180 度</string> <string name="auto_power_save_summary_off">不要自动启用省电</string>
<string name="display_rotation_270_title">270 度</string> <string name="auto_power_save_never">永不</string>
- <string name="long_screen_settings_title">全屏应用</string> - <string name="long_screen_settings_title">全屏应用</string>
- <string name="long_screen_settings_summary">强制旧式应用程序使用全屏长宽比</string> - <string name="long_screen_settings_summary">强制旧式应用程序使用全屏长宽比</string>
- <string name="long_screen_settings_no_apps">无应用</string> - <string name="long_screen_settings_no_apps">无应用</string>
@@ -41,14 +41,14 @@ index 9340e57..63a4b71 100644
+ <string name="inverse_long_screen_settings_summary">对选定的应用禁用拉伸全屏</string> + <string name="inverse_long_screen_settings_summary">对选定的应用禁用拉伸全屏</string>
+ <string name="inverse_long_screen_settings_no_apps">无应用</string> + <string name="inverse_long_screen_settings_no_apps">无应用</string>
<string name="charging_sounds_settings_title">充电提示音</string> <string name="charging_sounds_settings_title">充电提示音</string>
<string name="charging_sounds_enable_title">启用充电提示音</string> <string name="charging_sounds_enabled_title">启用</string>
<string name="charging_sounds_summary">连接或断开电源时发出声音</string> <string name="charging_sounds_enabled_summary">连接或断开电源时发出声音</string>
diff --git a/res/values/strings.xml b/res/values/strings.xml diff --git a/res/values/strings.xml b/res/values/strings.xml
index 9fe4181..998a5f6 100644 index 65d799a..ff23ae9 100644
--- a/res/values/strings.xml --- a/res/values/strings.xml
+++ b/res/values/strings.xml +++ b/res/values/strings.xml
@@ -567,9 +567,9 @@ @@ -579,9 +579,9 @@
<string name="display_rotation_270_title">270 degrees</string> <string name="auto_power_save_never">Never</string>
<!-- Applications: Long screen --> <!-- Applications: Long screen -->
- <string name="long_screen_settings_title">Full screen apps</string> - <string name="long_screen_settings_title">Full screen apps</string>
@@ -73,11 +73,11 @@ index ec947fa..20da90a 100644
</PreferenceScreen> </PreferenceScreen>
diff --git a/res/xml/parts_catalog.xml b/res/xml/parts_catalog.xml diff --git a/res/xml/parts_catalog.xml b/res/xml/parts_catalog.xml
index 803b214..6f61e9d 100644 index a4346c7..e21d7d5 100644
--- a/res/xml/parts_catalog.xml --- a/res/xml/parts_catalog.xml
+++ b/res/xml/parts_catalog.xml +++ b/res/xml/parts_catalog.xml
@@ -81,8 +81,8 @@ @@ -92,8 +92,8 @@
lineage:xmlRes="@xml/power_menu_settings" /> lineage:xmlRes="@xml/perf_profile_settings" />
<part android:key="long_screen_settings" <part android:key="long_screen_settings"
- android:title="@string/long_screen_settings_title" - android:title="@string/long_screen_settings_title"
@@ -101,5 +101,5 @@ index ac04058..50ff8f6 100644
} }
-- --
2.25.1 2.17.1
@@ -1,31 +1,368 @@
From d8f9f479012d522aed7377e5996cf7a5265ea268 Mon Sep 17 00:00:00 2001 From 69e5c49e18b9f33cebde3d54c69477ef2c18a756 Mon Sep 17 00:00:00 2001
From: Vachounet <vachounet@live.fr> From: Vachounet <vachounet@live.fr>
Date: Mon, 26 Oct 2020 17:05:18 +0100 Date: Tue, 24 Nov 2020 05:49:46 +0000
Subject: [PATCH] Trebuchet: Move clear all button to actions view Subject: [PATCH] Trebuchet: Move clear all button to actions view
@AndyCGYan: Instead of removing the original, hide it in a simple way Change-Id: I9d13247501ca8e1610c17adc204ad64dd4a04cec
Change-Id: I7a0b2729c163169f7606ad4644870d07d5165e8e
--- ---
.../res/drawable/ic_recents_clear_all.xml | 18 ++++++++++++++++++ .../RecentsViewStateController.java | 3 -
.../res/layout/overview_actions_container.xml | 17 ++++++++++++++++- .../FallbackRecentsStateController.java | 3 -
.../quickstep/fallback/RecentsState.java | 2 +- .../quickstep/views/ClearAllButton.java | 112 ------------------
.../quickstep/views/LauncherRecentsView.java | 3 +-- .../android/quickstep/views/RecentsView.java | 52 ++------
.../android/quickstep/views/RecentsView.java | 6 +++++- .../res/drawable/ic_clear_all_recents.xml | 21 ++++
5 files changed, 41 insertions(+), 5 deletions(-) .../res/layout/overview_actions_container.xml | 17 ++-
create mode 100644 quickstep/res/drawable/ic_recents_clear_all.xml .../res/layout/overview_clear_all_button.xml | 27 -----
7 files changed, 44 insertions(+), 191 deletions(-)
delete mode 100644 quickstep/recents_ui_overrides/src/com/android/quickstep/views/ClearAllButton.java
create mode 100644 quickstep/res/drawable/ic_clear_all_recents.xml
delete mode 100644 quickstep/res/layout/overview_clear_all_button.xml
diff --git a/quickstep/res/drawable/ic_recents_clear_all.xml b/quickstep/res/drawable/ic_recents_clear_all.xml diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/RecentsViewStateController.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
index 5ccc1e868..bc47c5a00 100644
--- a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
+++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
@@ -35,7 +35,6 @@ import com.android.launcher3.anim.PendingAnimation;
import com.android.launcher3.anim.PropertySetter;
import com.android.launcher3.states.StateAnimationConfig;
import com.android.launcher3.util.MultiValueAlpha;
-import com.android.quickstep.views.ClearAllButton;
import com.android.quickstep.views.LauncherRecentsView;
import com.android.quickstep.views.RecentsView;
@@ -84,8 +83,6 @@ public final class RecentsViewStateController extends
private void setAlphas(PropertySetter propertySetter, StateAnimationConfig config,
LauncherState state) {
float buttonAlpha = (state.getVisibleElements(mLauncher) & OVERVIEW_BUTTONS) != 0 ? 1 : 0;
- propertySetter.setFloat(mRecentsView.getClearAllButton(), ClearAllButton.VISIBILITY_ALPHA,
- buttonAlpha, LINEAR);
propertySetter.setFloat(mLauncher.getActionsView().getVisibilityAlpha(),
MultiValueAlpha.VALUE, buttonAlpha, config.getInterpolator(
ANIM_OVERVIEW_ACTIONS_FADE, LINEAR));
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/fallback/FallbackRecentsStateController.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/fallback/FallbackRecentsStateController.java
index 24a761066..7af77ef60 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/fallback/FallbackRecentsStateController.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/fallback/FallbackRecentsStateController.java
@@ -35,7 +35,6 @@ import com.android.launcher3.statemanager.StateManager.StateHandler;
import com.android.launcher3.states.StateAnimationConfig;
import com.android.launcher3.util.MultiValueAlpha;
import com.android.quickstep.RecentsActivity;
-import com.android.quickstep.views.ClearAllButton;
/**
* State controller for fallback recents activity
@@ -78,8 +77,6 @@ public class FallbackRecentsStateController implements StateHandler<RecentsState
private void setProperties(RecentsState state, StateAnimationConfig config,
PropertySetter setter) {
float buttonAlpha = state.hasButtons() ? 1 : 0;
- setter.setFloat(mRecentsView.getClearAllButton(), ClearAllButton.VISIBILITY_ALPHA,
- buttonAlpha, LINEAR);
setter.setFloat(mActivity.getActionsView().getVisibilityAlpha(),
MultiValueAlpha.VALUE, buttonAlpha, LINEAR);
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/ClearAllButton.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/ClearAllButton.java
deleted file mode 100644
index fd74357f3..000000000
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/ClearAllButton.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (C) 2018 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.
- */
-
-package com.android.quickstep.views;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.util.FloatProperty;
-import android.widget.Button;
-
-import com.android.launcher3.touch.PagedOrientationHandler;
-import com.android.quickstep.views.RecentsView.PageCallbacks;
-import com.android.quickstep.views.RecentsView.ScrollState;
-
-public class ClearAllButton extends Button implements PageCallbacks {
-
- public static final FloatProperty<ClearAllButton> VISIBILITY_ALPHA =
- new FloatProperty<ClearAllButton>("visibilityAlpha") {
- @Override
- public Float get(ClearAllButton view) {
- return view.mVisibilityAlpha;
- }
-
- @Override
- public void setValue(ClearAllButton view, float v) {
- view.setVisibilityAlpha(v);
- }
- };
-
- private float mScrollAlpha = 1;
- private float mContentAlpha = 1;
- private float mVisibilityAlpha = 1;
-
- private boolean mIsRtl;
-
- private int mScrollOffset;
-
- public ClearAllButton(Context context, AttributeSet attrs) {
- super(context, attrs);
- mIsRtl = getLayoutDirection() == LAYOUT_DIRECTION_RTL;
- }
-
- @Override
- protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
- super.onLayout(changed, left, top, right, bottom);
- PagedOrientationHandler orientationHandler = getRecentsView().getPagedOrientationHandler();
- mScrollOffset = orientationHandler.getClearAllScrollOffset(getRecentsView(), mIsRtl);
- }
-
- private RecentsView getRecentsView() {
- return (RecentsView) getParent();
- }
-
- @Override
- public void onRtlPropertiesChanged(int layoutDirection) {
- super.onRtlPropertiesChanged(layoutDirection);
- mIsRtl = getLayoutDirection() == LAYOUT_DIRECTION_RTL;
- }
-
- @Override
- public boolean hasOverlappingRendering() {
- return false;
- }
-
- public void setContentAlpha(float alpha) {
- if (mContentAlpha != alpha) {
- mContentAlpha = alpha;
- updateAlpha();
- }
- }
-
- public void setVisibilityAlpha(float alpha) {
- if (mVisibilityAlpha != alpha) {
- mVisibilityAlpha = alpha;
- updateAlpha();
- }
- }
-
- @Override
- public void onPageScroll(ScrollState scrollState) {
- PagedOrientationHandler orientationHandler = getRecentsView().getPagedOrientationHandler();
- float orientationSize = orientationHandler.getPrimaryValue(getWidth(), getHeight());
- if (orientationSize == 0) {
- return;
- }
-
- float shift = Math.min(scrollState.scrollFromEdge, orientationSize);
- float translation = mIsRtl ? (mScrollOffset - shift) : (mScrollOffset + shift);
- orientationHandler.setPrimaryAndResetSecondaryTranslate(this, translation);
- mScrollAlpha = 1 - shift / orientationSize;
- updateAlpha();
- }
-
- private void updateAlpha() {
- final float alpha = mScrollAlpha * mContentAlpha * mVisibilityAlpha;
- setAlpha(alpha);
- setClickable(alpha == 1);
- }
-}
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
index 0130cae47..bfdd79e5f 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
@@ -85,6 +85,7 @@ import android.view.ViewGroup;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.animation.Interpolator;
+import android.widget.Button;
import android.widget.ListView;
import androidx.annotation.Nullable;
@@ -268,8 +269,7 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
private final float mFastFlingVelocity;
private final RecentsModel mModel;
private final int mTaskTopMargin;
- private final ClearAllButton mClearAllButton;
- private final Rect mClearAllButtonDeadZoneRect = new Rect();
+ private Button mClearAllButton;
private final Rect mTaskViewDeadZoneRect = new Rect();
private final ScrollState mScrollState = new ScrollState();
@@ -442,9 +442,6 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
mModel = RecentsModel.INSTANCE.get(context);
mIdp = InvariantDeviceProfile.INSTANCE.get(context);
- mClearAllButton = (ClearAllButton) LayoutInflater.from(context)
- .inflate(R.layout.overview_clear_all_button, this, false);
- mClearAllButton.setOnClickListener(this::dismissAllTasks);
mTaskViewPool = new ViewPool<>(context, this, R.layout.task, 20 /* max size */,
10 /* initial size */);
@@ -550,6 +547,8 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
public void init(OverviewActionsView actionsView) {
mActionsView = actionsView;
mActionsView.updateHiddenFlags(HIDDEN_NO_TASKS, getTaskViewCount() == 0);
+ mClearAllButton = (Button) mActionsView.findViewById(R.id.clear_all);
+ mClearAllButton.setOnClickListener(this::dismissAllTasks);
}
@Override
@@ -620,7 +619,7 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
}
private void updateTaskStartIndex(View affectingView) {
- if (!(affectingView instanceof TaskView) && !(affectingView instanceof ClearAllButton)) {
+ if (!(affectingView instanceof TaskView)) {
int childCount = getChildCount();
mTaskViewStartIndex = 0;
@@ -674,7 +673,7 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
* button fully visible, center page is Clear All button.
*/
public boolean isClearAllHidden() {
- return mClearAllButton.getAlpha() != 1f;
+ return true;
}
@Override
@@ -732,11 +731,8 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
mTouchDownToStartHome = true;
} else {
updateDeadZoneRects();
- final boolean clearAllButtonDeadZoneConsumed =
- mClearAllButton.getAlpha() == 1
- && mClearAllButtonDeadZoneRect.contains(x, y);
final boolean cameFromNavBar = (ev.getEdgeFlags() & EDGE_NAV_BAR) != 0;
- if (!clearAllButtonDeadZoneConsumed && !cameFromNavBar
+ if (!cameFromNavBar
&& !mTaskViewDeadZoneRect.contains(x + getScrollX(), y)) {
mTouchDownToStartHome = true;
}
@@ -783,18 +779,12 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
final int requiredTaskCount = tasks.size();
if (getTaskViewCount() != requiredTaskCount) {
- if (indexOfChild(mClearAllButton) != -1) {
- removeView(mClearAllButton);
- }
for (int i = getTaskViewCount(); i < requiredTaskCount; i++) {
addView(mTaskViewPool.getView());
}
while (getTaskViewCount() > requiredTaskCount) {
removeView(getChildAt(getChildCount() - 1));
}
- if (requiredTaskCount > 0) {
- addView(mClearAllButton);
- }
}
// Rebind and reset all task views
@@ -834,16 +824,10 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
for (int i = getTaskViewCount() - 1; i >= 0; i--) {
removeView(getTaskViewAt(i));
}
- if (indexOfChild(mClearAllButton) != -1) {
- removeView(mClearAllButton);
- }
}
public int getTaskViewCount() {
int taskViewCount = getChildCount() - mTaskViewStartIndex;
- if (indexOfChild(mClearAllButton) != -1) {
- taskViewCount--;
- }
return taskViewCount;
}
@@ -1199,9 +1183,6 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
// Add an empty view for now until the task plan is loaded and applied
final TaskView taskView = mTaskViewPool.getView();
addView(taskView, mTaskViewStartIndex);
- if (wasEmpty) {
- addView(mClearAllButton);
- }
// The temporary running task is only used for the duration between the start of the
// gesture and the task list is loaded and applied
mTmpRunningTask = Task.from(new TaskKey(runningTaskInfo), runningTaskInfo, false);
@@ -1538,7 +1519,6 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
removeViewInLayout(taskView);
if (getTaskViewCount() == 0) {
- removeViewInLayout(mClearAllButton);
startHome();
} else {
snapToPageImmediately(pageToSnapTo);
@@ -1677,7 +1657,6 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
child.setStableAlpha(alpha);
}
}
- mClearAllButton.setContentAlpha(mContentAlpha);
int alphaInt = Math.round(alpha * 255);
mEmptyMessagePaint.setAlpha(alphaInt);
mEmptyIcon.setAlpha(alphaInt);
@@ -1740,10 +1719,6 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
setLayoutDirection(mIsRtl
? View.LAYOUT_DIRECTION_RTL
: View.LAYOUT_DIRECTION_LTR);
- mClearAllButton.setLayoutDirection(mIsRtl
- ? View.LAYOUT_DIRECTION_LTR
- : View.LAYOUT_DIRECTION_RTL);
- mClearAllButton.setRotation(mOrientationHandler.getDegreesRotated());
mActivity.getDragLayer().recreateControllers();
boolean isInLandscape = mOrientationState.getTouchRotation() != ROTATION_0
|| mOrientationState.getRecentsActivityRotation() != ROTATION_0;
@@ -1963,15 +1938,6 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
}
private void updateDeadZoneRects() {
- // Get the deadzone rect surrounding the clear all button to not dismiss overview to home
- mClearAllButtonDeadZoneRect.setEmpty();
- if (mClearAllButton.getWidth() > 0) {
- int verticalMargin = getResources()
- .getDimensionPixelSize(R.dimen.recents_clear_all_deadzone_vertical_margin);
- mClearAllButton.getHitRect(mClearAllButtonDeadZoneRect);
- mClearAllButtonDeadZoneRect.inset(-getPaddingRight() / 2, -verticalMargin);
- }
-
// Get the deadzone rect between the task views
mTaskViewDeadZoneRect.setEmpty();
int count = getTaskViewCount();
@@ -2304,10 +2270,6 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
return super.computeMaxScroll();
}
- public ClearAllButton getClearAllButton() {
- return mClearAllButton;
- }
-
@Override
protected boolean onOverscroll(int amount) {
// overscroll should only be accepted on -1 direction (for clear all button)
diff --git a/quickstep/res/drawable/ic_clear_all_recents.xml b/quickstep/res/drawable/ic_clear_all_recents.xml
new file mode 100644 new file mode 100644
index 0000000000..2ad0bb824d index 000000000..7cba0220b
--- /dev/null --- /dev/null
+++ b/quickstep/res/drawable/ic_recents_clear_all.xml +++ b/quickstep/res/drawable/ic_clear_all_recents.xml
@@ -0,0 +1,18 @@ @@ -0,0 +1,21 @@
+<!-- Copyright (C) 2020 The Android Open Source Project +<!-- Copyright (C) 2020 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License"); + Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License. + you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at + You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software + Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS, + distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -40,103 +377,72 @@ index 0000000000..2ad0bb824d
+ <path android:fillColor="#FF000000" android:pathData="M5,13H19V11H5M3,17H17V15H3M7,7V9H21V7" /> + <path android:fillColor="#FF000000" android:pathData="M5,13H19V11H5M3,17H17V15H3M7,7V9H21V7" />
+</vector> +</vector>
diff --git a/quickstep/res/layout/overview_actions_container.xml b/quickstep/res/layout/overview_actions_container.xml diff --git a/quickstep/res/layout/overview_actions_container.xml b/quickstep/res/layout/overview_actions_container.xml
index 0fda0bf8d4..9a6f5ae062 100644 index 258f24a54..302cabf8a 100644
--- a/quickstep/res/layout/overview_actions_container.xml --- a/quickstep/res/layout/overview_actions_container.xml
+++ b/quickstep/res/layout/overview_actions_container.xml +++ b/quickstep/res/layout/overview_actions_container.xml
@@ -40,6 +40,21 @@ @@ -45,6 +45,21 @@
android:text="@string/action_screenshot" android:layout_height="1dp"
android:theme="@style/ThemeControlHighlightWorkspaceColor" /> android:layout_weight="1" />
+ <Space
+ android:id="@+id/action_clear_all_space"
+ android:layout_width="@dimen/overview_actions_button_spacing"
+ android:layout_height="1dp" />
+
+ <Button + <Button
+ android:id="@+id/action_clear_all"
+ style="@style/OverviewActionButton" + style="@style/OverviewActionButton"
+ android:id="@+id/clear_all"
+ android:layout_width="wrap_content" + android:layout_width="wrap_content"
+ android:layout_height="wrap_content" + android:layout_height="wrap_content"
+ android:drawableStart="@drawable/ic_recents_clear_all"
+ android:text="@string/recents_clear_all" + android:text="@string/recents_clear_all"
+ android:theme="@style/ThemeControlHighlightWorkspaceColor" + android:theme="@style/ThemeControlHighlightWorkspaceColor"
+ android:drawableStart="@drawable/ic_clear_all_recents"
+ /> + />
+ +
<Space + <Space
android:id="@+id/action_split_space" + android:layout_width="0dp"
android:layout_width="@dimen/overview_actions_button_spacing" + android:layout_height="1dp"
@@ -68,4 +83,4 @@ + android:layout_weight="1" />
+
<Button
android:id="@+id/action_share"
style="@style/OverviewActionButton"
@@ -63,4 +78,4 @@
android:visibility="gone" /> android:visibility="gone" />
</LinearLayout> </LinearLayout>
-</com.android.quickstep.views.OverviewActionsView> -</com.android.quickstep.views.OverviewActionsView>
\ No newline at end of file \ No newline at end of file
+</com.android.quickstep.views.OverviewActionsView> +</com.android.quickstep.views.OverviewActionsView>
diff --git a/quickstep/src/com/android/quickstep/fallback/RecentsState.java b/quickstep/src/com/android/quickstep/fallback/RecentsState.java diff --git a/quickstep/res/layout/overview_clear_all_button.xml b/quickstep/res/layout/overview_clear_all_button.xml
index 223eba5b95..75f8baed6b 100644 deleted file mode 100644
--- a/quickstep/src/com/android/quickstep/fallback/RecentsState.java index fc06ba057..000000000
+++ b/quickstep/src/com/android/quickstep/fallback/RecentsState.java --- a/quickstep/res/layout/overview_clear_all_button.xml
@@ -105,7 +105,7 @@ public class RecentsState implements BaseState<RecentsState> { +++ /dev/null
* For this state, whether clear all button should be shown. @@ -1,27 +0,0 @@
*/ -<?xml version="1.0" encoding="utf-8"?>
public boolean hasClearAllButton() { -<!--
- return hasFlag(FLAG_CLEAR_ALL_BUTTON); - Copyright (C) 2018 The Android Open Source Project
+ return false; -
} - 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
diff --git a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java -
index bb8506d26f..e8c18f1d45 100644 - http://www.apache.org/licenses/LICENSE-2.0
--- a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java -
+++ b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java - Unless required by applicable law or agreed to in writing, software
@@ -143,8 +143,7 @@ public class LauncherRecentsView extends RecentsView<QuickstepLauncher, Launcher - distributed under the License is distributed on an "AS IS" BASIS,
super.setOverviewStateEnabled(enabled); - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
if (enabled) { - See the License for the specific language governing permissions and
LauncherState state = mActivity.getStateManager().getState(); - limitations under the License.
- boolean hasClearAllButton = (state.getVisibleElements(mActivity) --->
- & CLEAR_ALL_BUTTON) != 0; -<com.android.quickstep.views.ClearAllButton
+ boolean hasClearAllButton = false; - xmlns:android="http://schemas.android.com/apk/res/android"
setDisallowScrollToClearAll(!hasClearAllButton); - style="@android:style/Widget.DeviceDefault.Button.Borderless"
} - android:id="@+id/clear_all"
} - android:layout_width="wrap_content"
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java - android:layout_height="wrap_content"
index 7ad0e48ccb..e888aa2c74 100644 - android:text="@string/recents_clear_all"
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java - android:textColor="?attr/workspaceTextColor"
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java - android:textSize="14sp"
@@ -110,6 +110,7 @@ import android.view.ViewTreeObserver.OnScrollChangedListener; - android:translationY="@dimen/task_thumbnail_half_top_margin"
import android.view.accessibility.AccessibilityEvent; - />
import android.view.accessibility.AccessibilityNodeInfo; \ No newline at end of file
import android.view.animation.Interpolator;
+import android.widget.Button;
import android.widget.ListView;
import android.widget.OverScroller;
import android.widget.Toast;
@@ -464,6 +465,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
private final RecentsModel mModel;
private final int mSplitPlaceholderSize;
private final int mSplitPlaceholderInset;
+ private Button mActionClearAllButton;
private final ClearAllButton mClearAllButton;
private final Rect mClearAllButtonDeadZoneRect = new Rect();
private final Rect mTaskViewDeadZoneRect = new Rect();
@@ -911,6 +913,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
mActionsView = actionsView;
mActionsView.updateHiddenFlags(HIDDEN_NO_TASKS, getTaskViewCount() == 0);
mSplitSelectStateController = splitController;
+ mActionClearAllButton = (Button) mActionsView.findViewById(R.id.action_clear_all);
+ mActionClearAllButton.setOnClickListener(this::dismissAllTasks);
}
public SplitSelectStateController getSplitSelectController() {
@@ -1230,7 +1234,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
* button fully visible, center page is Clear All button.
*/
public boolean isClearAllHidden() {
- return mClearAllButton.getAlpha() != 1f;
+ return true;
}
@Override
-- --
2.25.1 2.25.1
@@ -1,8 +1,8 @@
From e330d170e8e64c5c7849d0a0c288fb167ee828a8 Mon Sep 17 00:00:00 2001 From 7a633a53d8e20e2d976597a332bf5ba855ec1f75 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com> From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 5 Sep 2019 02:08:22 +0000 Date: Thu, 5 Sep 2019 02:08:22 +0000
Subject: [PATCH 1/2] vendor_lineage: Log privapp-permissions whitelist Subject: [PATCH] vendor_lineage: Log privapp-permissions whitelist violations
violations instead instead
Change-Id: I49dba61f332253e291a65e79ca70d9a07d45bb07 Change-Id: I49dba61f332253e291a65e79ca70d9a07d45bb07
--- ---
@@ -10,12 +10,12 @@ Change-Id: I49dba61f332253e291a65e79ca70d9a07d45bb07
1 file changed, 2 insertions(+), 2 deletions(-) 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/config/common.mk b/config/common.mk diff --git a/config/common.mk b/config/common.mk
index 43c36252..52a4bfd4 100644 index 2fe9cb01..7d971bba 100644
--- a/config/common.mk --- a/config/common.mk
+++ b/config/common.mk +++ b/config/common.mk
@@ -74,9 +74,9 @@ PRODUCT_COPY_FILES += \ @@ -70,9 +70,9 @@ PRODUCT_COPY_FILES += \
PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \
vendor/lineage/config/permissions/org.lineageos.android.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/org.lineageos.android.xml vendor/lineage/config/permissions/org.lineageos.android.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/org.lineageos.android.xml
-# Enforce privapp-permissions whitelist -# Enforce privapp-permissions whitelist
+# Log privapp-permissions whitelist violations +# Log privapp-permissions whitelist violations
@@ -26,5 +26,5 @@ index 43c36252..52a4bfd4 100644
# Include AOSP audio files # Include AOSP audio files
include vendor/lineage/config/aosp_audio.mk include vendor/lineage/config/aosp_audio.mk
-- --
2.25.1 2.17.1
@@ -1,34 +0,0 @@
From 77bae190086a8c75bd80800487955bb7577cd374 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Mon, 14 Mar 2022 03:44:59 +0000
Subject: [PATCH 2/2] Revert "overlay: Default to night mode"
This reverts commit 4d4e39a845d54e37b20728f1448ae6e3fde4b97d.
Change-Id: I036bdd576e536392cf41e3c536d5ca2eb04e5a0f
---
.../common/frameworks/base/core/res/res/values/config.xml | 8 --------
1 file changed, 8 deletions(-)
diff --git a/overlay/common/frameworks/base/core/res/res/values/config.xml b/overlay/common/frameworks/base/core/res/res/values/config.xml
index 3b6eedce..fccecf90 100644
--- a/overlay/common/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/common/frameworks/base/core/res/res/values/config.xml
@@ -146,14 +146,6 @@
<!-- Whether this device is supporting the camera toggle -->
<bool name="config_supportsCamToggle">true</bool>
- <!-- Control the default night mode to use when there is no other mode override set.
- One of the following values (see UiModeManager.java):
- 0 - MODE_NIGHT_AUTO
- 1 - MODE_NIGHT_NO
- 2 - MODE_NIGHT_YES
- -->
- <integer name="config_defaultNightMode">2</integer>
-
<!-- Boolean indicating whether the HWC setColorTransform function can be performed efficiently
in hardware. -->
<bool name="config_setColorTransformAccelerated">true</bool>
--
2.25.1
@@ -1,7 +1,7 @@
From 45ce666776f48f82151a4fc3c8a3219f3e4c210f Mon Sep 17 00:00:00 2001 From f451664bce7527eb460615dfba0a5e4ad14a1847 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com> From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 20 Jun 2021 09:08:43 +0000 Date: Sun, 20 Jun 2021 09:08:43 +0000
Subject: [PATCH 1/2] build: Integrate prop modifications (1/2) Subject: [PATCH] build: Integrate prop modifications (1/2)
Change-Id: I24f54937e3e542b7c29ea86d24e3f523583a0c61 Change-Id: I24f54937e3e542b7c29ea86d24e3f523583a0c61
--- ---
@@ -9,19 +9,19 @@ Change-Id: I24f54937e3e542b7c29ea86d24e3f523583a0c61
1 file changed, 7 insertions(+), 2 deletions(-) 1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/tools/buildinfo.sh b/tools/buildinfo.sh diff --git a/tools/buildinfo.sh b/tools/buildinfo.sh
index c00e1e98b..490d15215 100755 index 954a01fb2..b3705cb6b 100755
--- a/tools/buildinfo.sh --- a/tools/buildinfo.sh
+++ b/tools/buildinfo.sh +++ b/tools/buildinfo.sh
@@ -9,7 +9,7 @@ if [ "$BOARD_USE_VBMETA_DIGTEST_IN_FINGERPRINT" = "true" ] ; then @@ -4,7 +4,7 @@ echo "# begin build properties"
else echo "# autogenerated by buildinfo.sh"
echo "ro.build.id=$BUILD_ID"
fi echo "ro.build.id=$BUILD_ID"
-echo "ro.build.display.id=$BUILD_DISPLAY_ID" -echo "ro.build.display.id=$BUILD_DISPLAY_ID"
+echo "ro.build.display.id=$BUILD_ID" +echo "ro.build.display.id=$BUILD_ID"
echo "ro.build.version.incremental=$BUILD_NUMBER" echo "ro.build.version.incremental=$BUILD_NUMBER"
echo "ro.build.version.sdk=$PLATFORM_SDK_VERSION" echo "ro.build.version.sdk=$PLATFORM_SDK_VERSION"
echo "ro.build.version.preview_sdk=$PLATFORM_PREVIEW_SDK_VERSION" echo "ro.build.version.preview_sdk=$PLATFORM_PREVIEW_SDK_VERSION"
@@ -23,7 +23,7 @@ echo "ro.build.version.release_or_preview_display=$PLATFORM_DISPLAY_VERSION" @@ -16,7 +16,7 @@ echo "ro.build.version.release_or_codename=$PLATFORM_VERSION"
echo "ro.build.version.security_patch=$PLATFORM_SECURITY_PATCH" echo "ro.build.version.security_patch=$PLATFORM_SECURITY_PATCH"
echo "ro.build.version.base_os=$PLATFORM_BASE_OS" echo "ro.build.version.base_os=$PLATFORM_BASE_OS"
echo "ro.build.version.min_supported_target_sdk=$PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION" echo "ro.build.version.min_supported_target_sdk=$PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION"
@@ -30,13 +30,13 @@ index c00e1e98b..490d15215 100755
echo "ro.build.date.utc=`$DATE +%s`" echo "ro.build.date.utc=`$DATE +%s`"
echo "ro.build.type=$TARGET_BUILD_TYPE" echo "ro.build.type=$TARGET_BUILD_TYPE"
echo "ro.build.user=$BUILD_USERNAME" echo "ro.build.user=$BUILD_USERNAME"
@@ -58,5 +58,10 @@ if [ -n "$BUILD_THUMBPRINT" ] ; then @@ -54,5 +54,10 @@ if [ -n "$BUILD_THUMBPRINT" ] ; then
fi fi
echo "ro.lineage.device=$LINEAGE_DEVICE" echo "ro.lineage.device=$LINEAGE_DEVICE"
+echo "ro.lineage.version=LineageOS 20 Self-built CGMod" +echo "ro.lineage.version=LineageOS 18.1 Self-built CGMod"
+echo "ro.lineage.display.version=LineageOS 20 Self-built CGMod" +echo "ro.lineage.display.version=LineageOS 18.1 Self-built CGMod"
+echo "ro.modversion=LineageOS 20 Self-built CGMod" +echo "ro.modversion=LineageOS 18.1 Self-built CGMod"
+ +
+echo "lockscreen.rot_override=true" +echo "lockscreen.rot_override=true"
@@ -1,25 +0,0 @@
From 1c0c37fd29fb20537eca319cd5c3874127414d8a Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 16 Oct 2021 00:39:15 +0000
Subject: [PATCH 2/2] build: Remove Stk (1/2)
Change-Id: I24ef17c74c3137a11b463cde96c74d0edc853edd
---
target/product/generic_system.mk | 1 -
1 file changed, 1 deletion(-)
diff --git a/target/product/generic_system.mk b/target/product/generic_system.mk
index 1a639ef71..49a080076 100644
--- a/target/product/generic_system.mk
+++ b/target/product/generic_system.mk
@@ -32,7 +32,6 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \
LiveWallpapersPicker \
PartnerBookmarksProvider \
- Stk \
Tag \
# OTA support
--
2.25.1
@@ -0,0 +1,57 @@
From 2743f5130c127f18977c83c7fa2401a0776ec478 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Fri, 9 Mar 2018 15:41:26 +0800
Subject: [PATCH 01/18] UI: Disable left (seascape) navigation bar optionally
Toggle this behaviour with property "persist.ui.seascape.disable"
Change-Id: Ieb58efa4b59feeb0c4ac70e497f4c59aa04210d6
---
.../systemui/statusbar/phone/ReverseLinearLayout.java | 6 ++++++
services/core/java/com/android/server/wm/DisplayPolicy.java | 5 +++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ReverseLinearLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ReverseLinearLayout.java
index d3ec187ef20..01d87cd12f7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ReverseLinearLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ReverseLinearLayout.java
@@ -16,6 +16,7 @@ package com.android.systemui.statusbar.phone;
import android.annotation.Nullable;
import android.content.Context;
+import android.os.SystemProperties;
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.View;
@@ -86,6 +87,11 @@ public class ReverseLinearLayout extends LinearLayout {
boolean isLayoutRtl = getLayoutDirection() == LAYOUT_DIRECTION_RTL;
boolean isLayoutReverse = isLayoutRtl ^ mIsAlternativeOrder;
+ boolean isSeascapeDisabled = SystemProperties.getBoolean("persist.ui.seascape.disable", false);
+ if (isSeascapeDisabled) {
+ isLayoutReverse = isLayoutRtl ^ true;
+ }
+
if (mIsLayoutReverse != isLayoutReverse) {
// reversity changed, swap the order of all views.
int childCount = getChildCount();
diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java
index 97e4a9595da..18119560cd1 100644
--- a/services/core/java/com/android/server/wm/DisplayPolicy.java
+++ b/services/core/java/com/android/server/wm/DisplayPolicy.java
@@ -3413,9 +3413,10 @@ public class DisplayPolicy {
@NavigationBarPosition
int navigationBarPosition(int displayWidth, int displayHeight, int displayRotation) {
if (navigationBarCanMove() && displayWidth > displayHeight) {
- if (displayRotation == Surface.ROTATION_270) {
+ boolean isSeascapeDisabled = SystemProperties.getBoolean("persist.ui.seascape.disable", false);
+ if (displayRotation == Surface.ROTATION_270 && !isSeascapeDisabled) {
return NAV_BAR_LEFT;
- } else if (displayRotation == Surface.ROTATION_90) {
+ } else {
return NAV_BAR_RIGHT;
}
}
--
2.25.1
@@ -1,26 +0,0 @@
From 8c24a74eb289bdf3abeed57d490ccf1073f14677 Mon Sep 17 00:00:00 2001
From: Hikari-no-Tenshi <kyryljan.serhij@gmail.com>
Date: Thu, 30 Jan 2020 22:20:54 +0200
Subject: [PATCH 02/21] Disable Bluetooth by default
Change-Id: Iea5d24f977928bf01cd7a46b98c75c0a4bd6a23c
---
packages/SettingsProvider/res/values/defaults.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
index 7732da40aac2..1d2c343a4514 100644
--- a/packages/SettingsProvider/res/values/defaults.xml
+++ b/packages/SettingsProvider/res/values/defaults.xml
@@ -36,7 +36,7 @@
<fraction name="def_window_transition_scale">100%</fraction>
<bool name="def_haptic_feedback">true</bool>
- <bool name="def_bluetooth_on">true</bool>
+ <bool name="def_bluetooth_on">false</bool>
<bool name="def_wifi_display_on">false</bool>
<bool name="def_install_non_market_apps">false</bool>
<!-- 0 == off, 3 == on -->
--
2.25.1
@@ -1,7 +1,7 @@
From 69581c7e2ab9106877b8c8951244c63c14ea97e4 Mon Sep 17 00:00:00 2001 From 46a9bb999137ed1a0722f119970524cbce496183 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com> From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 26 Apr 2020 08:56:13 +0000 Date: Sun, 26 Apr 2020 08:56:13 +0000
Subject: [PATCH 11/14] UI: Use SNAP_FIXED_RATIO for multi-window globally Subject: [PATCH 02/18] UI: Use SNAP_FIXED_RATIO for multi-window globally
Enables multiple snap targets under landscape for phone UI Enables multiple snap targets under landscape for phone UI
@@ -15,7 +15,7 @@ Change-Id: I36e08f1e277dca0b0f9f99418671026e61b01496
diff --git a/core/res/res/values-land/config.xml b/core/res/res/values-land/config.xml diff --git a/core/res/res/values-land/config.xml b/core/res/res/values-land/config.xml
deleted file mode 100644 deleted file mode 100644
index 7308dc5882c1..000000000000 index 7308dc5882c..00000000000
--- a/core/res/res/values-land/config.xml --- a/core/res/res/values-land/config.xml
+++ /dev/null +++ /dev/null
@@ -1,19 +0,0 @@ @@ -1,19 +0,0 @@
@@ -40,7 +40,7 @@ index 7308dc5882c1..000000000000
-</resources> -</resources>
\ No newline at end of file \ No newline at end of file
diff --git a/core/res/res/values-sw600dp/config.xml b/core/res/res/values-sw600dp/config.xml diff --git a/core/res/res/values-sw600dp/config.xml b/core/res/res/values-sw600dp/config.xml
index 34b6a54be493..3921c9edfeac 100644 index 34b6a54be49..3921c9edfea 100644
--- a/core/res/res/values-sw600dp/config.xml --- a/core/res/res/values-sw600dp/config.xml
+++ b/core/res/res/values-sw600dp/config.xml +++ b/core/res/res/values-sw600dp/config.xml
@@ -3,16 +3,16 @@ @@ -3,16 +3,16 @@
@@ -78,10 +78,10 @@ index 34b6a54be493..3921c9edfeac 100644
Only applies if the device display is not square. --> Only applies if the device display is not square. -->
<bool name="config_navBarCanMove">false</bool> <bool name="config_navBarCanMove">false</bool>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 272df37188bf..58cd819b9404 100644 index f761d28e68d..b1ee670fc6a 100644
--- a/core/res/res/values/config.xml --- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml
@@ -3790,7 +3790,7 @@ @@ -3313,7 +3313,7 @@
1 - 3 snap targets: fixed ratio, 1:1, (1 - fixed ratio) 1 - 3 snap targets: fixed ratio, 1:1, (1 - fixed ratio)
2 - 1 snap target: 1:1 2 - 1 snap target: 1:1
--> -->
@@ -1,28 +0,0 @@
From c15f13abb5819da69fc6906d30f8507fd27f1e4b Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Mon, 27 Sep 2021 16:30:00 +0000
Subject: [PATCH 03/21] Disable cursor drag by default for editable TextViews
Requested by @TadiT7
Change-Id: Id54e38ee418174af8cde4113c849bc292f5fc96d
---
core/java/android/widget/WidgetFlags.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/java/android/widget/WidgetFlags.java b/core/java/android/widget/WidgetFlags.java
index fb40ee5ec843..c0c6fb6e9431 100644
--- a/core/java/android/widget/WidgetFlags.java
+++ b/core/java/android/widget/WidgetFlags.java
@@ -38,7 +38,7 @@ public final class WidgetFlags {
/**
* Default value for the flag {@link #ENABLE_CURSOR_DRAG_FROM_ANYWHERE}.
*/
- public static final boolean ENABLE_CURSOR_DRAG_FROM_ANYWHERE_DEFAULT = true;
+ public static final boolean ENABLE_CURSOR_DRAG_FROM_ANYWHERE_DEFAULT = false;
/**
* Threshold for the direction of a swipe gesture in order for it to be handled as a cursor drag
--
2.25.1
@@ -0,0 +1,26 @@
From dcbba0a8db63f78730b01606462a92653ef18ae3 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 3 Jun 2020 01:31:34 +0000
Subject: [PATCH 03/18] UI: Increase default status bar height
Change-Id: Ibbcf63159e19bb2bb2b1094ea07ab85917630b07
---
core/res/res/values/dimens.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index d165930d3c9..eb537474b97 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -35,7 +35,7 @@
<dimen name="status_bar_height">@dimen/status_bar_height_portrait</dimen>
<!-- Height of the status bar in portrait. The height should be
Max((status bar content height + waterfall top size), top cutout size) -->
- <dimen name="status_bar_height_portrait">24dp</dimen>
+ <dimen name="status_bar_height_portrait">28dp</dimen>
<!-- Height of the status bar in landscape. The height should be
Max((status bar content height + waterfall top size), top cutout size) -->
<dimen name="status_bar_height_landscape">@dimen/status_bar_height_portrait</dimen>
--
2.25.1
@@ -1,44 +0,0 @@
From 89c3645edd918789933549bf9be38ea7a7cd1184 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 3 Jul 2022 00:08:42 +0000
Subject: [PATCH 04/21] Disable "RESTRICTED bucket" toast
Change-Id: I20a328d3c77962f3a6095bfca42d0b165a093ce8
---
.../server/usage/AppStandbyController.java | 20 +------------------
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java b/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java
index 5d9f3357125a..49d3c8de7b80 100644
--- a/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java
+++ b/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java
@@ -1759,25 +1759,7 @@ public class AppStandbyController
.noteRestrictionAttempt(packageName, userId, elapsedRealtime, reason);
if (isForcedByUser) {
- // Only user force can bypass the delay restriction. If the user forced the
- // app into the RESTRICTED bucket, then a toast confirming the action
- // shouldn't be surprising.
- // Exclude REASON_SUB_FORCED_USER_FLAG_INTERACTION since the RESTRICTED bucket
- // isn't directly visible in that flow.
- if (Build.IS_DEBUGGABLE
- && (reason & REASON_SUB_MASK)
- != REASON_SUB_FORCED_USER_FLAG_INTERACTION) {
- Toast.makeText(mContext,
- // Since AppStandbyController sits low in the lock hierarchy,
- // make sure not to call out with the lock held.
- mHandler.getLooper(),
- mContext.getResources().getString(
- R.string.as_app_forced_to_restricted_bucket, packageName),
- Toast.LENGTH_SHORT)
- .show();
- } else {
- Slog.i(TAG, packageName + " restricted by user");
- }
+ Slog.i(TAG, packageName + " restricted by user");
} else {
final long timeUntilRestrictPossibleMs = app.lastUsedByUserElapsedTime
+ mInjector.getAutoRestrictedBucketDelayMs() - elapsedRealtime;
--
2.25.1
@@ -0,0 +1,46 @@
From 39e612fc6c8c818da613564cb284d6881b53603e Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 7 Oct 2020 14:00:35 +0000
Subject: [PATCH 04/18] UI: Always render windows into cutouts
Eliminates black/white letterboxing
Quick and dirty way to do the latter - wait for proper fix from Google
Change-Id: I4661c7979bfa7de453329fcddbaeefc2009e2da3
---
services/core/java/com/android/server/wm/DisplayPolicy.java | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java
index 18119560cd1..6f18d102019 100644
--- a/services/core/java/com/android/server/wm/DisplayPolicy.java
+++ b/services/core/java/com/android/server/wm/DisplayPolicy.java
@@ -1702,7 +1702,6 @@ public class DisplayPolicy {
void simulateLayoutDisplay(DisplayFrames displayFrames, InsetsState insetsState,
SparseArray<Rect> barContentFrames) {
displayFrames.onBeginLayout();
- updateInsetsStateForDisplayCutout(displayFrames, insetsState);
insetsState.setDisplayFrame(displayFrames.mUnrestricted);
final WindowFrames simulatedWindowFrames = new WindowFrames();
if (mNavigationBar != null) {
@@ -1731,8 +1730,6 @@ public class DisplayPolicy {
*/
public void beginLayoutLw(DisplayFrames displayFrames, int uiMode) {
displayFrames.onBeginLayout();
- updateInsetsStateForDisplayCutout(displayFrames,
- mDisplayContent.getInsetsStateController().getRawInsetsState());
mSystemGestures.screenWidth = displayFrames.mUnrestricted.width();
mSystemGestures.screenHeight = displayFrames.mUnrestricted.height();
@@ -2593,7 +2590,7 @@ public class DisplayPolicy {
}
}
- final int cutoutMode = attrs.layoutInDisplayCutoutMode;
+ final int cutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
final boolean attachedInParent = attached != null && !layoutInScreen;
final boolean requestedFullscreen = (fl & FLAG_FULLSCREEN) != 0
|| (requestedSysUiFl & View.SYSTEM_UI_FLAG_FULLSCREEN) != 0
--
2.25.1
@@ -1,169 +0,0 @@
From 3eb0073c25efb72c691cf8058385ebb74259ccac Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 2 Sep 2021 16:15:19 +0000
Subject: [PATCH 05/21] Keyguard: Adjust clock style
Thinner font, less padding and unintrusive colors
Change-Id: I21e5d5bf37d724e75ebce4cd89349e0cc4dfc910
---
.../SystemUI/res-keyguard/layout/keyguard_slice_view.xml | 2 +-
packages/SystemUI/res-keyguard/values/dimens.xml | 6 +++---
packages/SystemUI/res-keyguard/values/styles.xml | 2 --
packages/SystemUI/res/layout/keyguard_status_bar.xml | 2 +-
packages/SystemUI/res/values/styles.xml | 4 ++--
packages/SystemUI/shared/res/layout/clock_default_large.xml | 1 +
packages/SystemUI/shared/res/layout/clock_default_small.xml | 2 +-
packages/SystemUI/shared/res/values/colors.xml | 5 +++++
.../android/systemui/shared/clocks/AnimatableClockView.kt | 2 +-
.../android/systemui/shared/clocks/DefaultClockProvider.kt | 4 ++--
10 files changed, 17 insertions(+), 13 deletions(-)
create mode 100644 packages/SystemUI/shared/res/values/colors.xml
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_slice_view.xml b/packages/SystemUI/res-keyguard/layout/keyguard_slice_view.xml
index 7c5dbc247428..64657547621f 100644
--- a/packages/SystemUI/res-keyguard/layout/keyguard_slice_view.xml
+++ b/packages/SystemUI/res-keyguard/layout/keyguard_slice_view.xml
@@ -38,7 +38,7 @@
android:id="@+id/row"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="horizontal"
+ android:orientation="vertical"
android:gravity="start"
/>
</com.android.keyguard.KeyguardSliceView>
diff --git a/packages/SystemUI/res-keyguard/values/dimens.xml b/packages/SystemUI/res-keyguard/values/dimens.xml
index 46f6ab2399d1..6fce16ced94f 100644
--- a/packages/SystemUI/res-keyguard/values/dimens.xml
+++ b/packages/SystemUI/res-keyguard/values/dimens.xml
@@ -91,10 +91,10 @@
<dimen name="num_pad_key_margin_end">12dp</dimen>
<!-- additional offset for clock switch area items -->
- <dimen name="clock_padding_start">28dp</dimen>
- <dimen name="below_clock_padding_start">32dp</dimen>
+ <dimen name="clock_padding_start">22dp</dimen>
+ <dimen name="below_clock_padding_start">28dp</dimen>
<dimen name="below_clock_padding_end">16dp</dimen>
- <dimen name="below_clock_padding_start_icons">28dp</dimen>
+ <dimen name="below_clock_padding_start_icons">22dp</dimen>
<!-- Proportion of the screen height to use to set the maximum height of the bouncer to when
the device is in the DEVICE_POSTURE_HALF_OPENED posture, for the PIN/pattern entry. 0 will
diff --git a/packages/SystemUI/res-keyguard/values/styles.xml b/packages/SystemUI/res-keyguard/values/styles.xml
index a1d12668d27a..955e24e01a9a 100644
--- a/packages/SystemUI/res-keyguard/values/styles.xml
+++ b/packages/SystemUI/res-keyguard/values/styles.xml
@@ -117,8 +117,6 @@
<item name="android:ellipsize">end</item>
<item name="android:maxLines">2</item>
<item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
- <item name="android:shadowColor">@color/keyguard_shadow_color</item>
- <item name="android:shadowRadius">?attr/shadowRadius</item>
</style>
<style name="TextAppearance.Keyguard.Secondary">
diff --git a/packages/SystemUI/res/layout/keyguard_status_bar.xml b/packages/SystemUI/res/layout/keyguard_status_bar.xml
index d27fa192e741..2480d0189e16 100644
--- a/packages/SystemUI/res/layout/keyguard_status_bar.xml
+++ b/packages/SystemUI/res/layout/keyguard_status_bar.xml
@@ -91,7 +91,7 @@
android:gravity="center_vertical"
android:ellipsize="marquee"
android:textDirection="locale"
- android:textAppearance="@style/TextAppearance.StatusBar.Clock"
+ android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?attr/wallpaperTextColorSecondary"
android:singleLine="true"
systemui:showMissingSim="true"
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index a10878709364..78fd8ab3b324 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -276,7 +276,7 @@
<item name="darkIconTheme">@style/DualToneDarkTheme</item>
<item name="wallpaperTextColor">@*android:color/primary_text_material_dark</item>
<item name="wallpaperTextColorSecondary">@*android:color/secondary_text_material_dark</item>
- <item name="wallpaperTextColorAccent">@color/material_dynamic_primary90</item>
+ <item name="wallpaperTextColorAccent">@*android:color/primary_text_material_dark</item>
<item name="android:colorError">@*android:color/error_color_material_dark</item>
<item name="*android:lockPatternStyle">@style/LockPatternStyle</item>
<item name="passwordStyle">@style/PasswordTheme</item>
@@ -292,7 +292,7 @@
<style name="Theme.SystemUI.LightWallpaper">
<item name="wallpaperTextColor">@*android:color/primary_text_material_light</item>
<item name="wallpaperTextColorSecondary">@*android:color/secondary_text_material_light</item>
- <item name="wallpaperTextColorAccent">@color/material_dynamic_secondary40</item>
+ <item name="wallpaperTextColorAccent">@*android:color/primary_text_material_light</item>
<item name="android:colorError">@*android:color/error_color_material_light</item>
<item name="shadowRadius">0</item>
diff --git a/packages/SystemUI/shared/res/layout/clock_default_large.xml b/packages/SystemUI/shared/res/layout/clock_default_large.xml
index 0139d50dcfba..9f5ca7b89213 100644
--- a/packages/SystemUI/shared/res/layout/clock_default_large.xml
+++ b/packages/SystemUI/shared/res/layout/clock_default_large.xml
@@ -26,6 +26,7 @@
android:fontFamily="@*android:string/config_clockFontFamily"
android:typeface="monospace"
android:elegantTextHeight="false"
+ android:fontFeatureSettings="tnum"
chargeAnimationDelay="200"
dozeWeight="200"
lockScreenWeight="400" />
diff --git a/packages/SystemUI/shared/res/layout/clock_default_small.xml b/packages/SystemUI/shared/res/layout/clock_default_small.xml
index ff6d7f9e2240..b63ffce20671 100644
--- a/packages/SystemUI/shared/res/layout/clock_default_small.xml
+++ b/packages/SystemUI/shared/res/layout/clock_default_small.xml
@@ -27,7 +27,7 @@
android:elegantTextHeight="false"
android:ellipsize="none"
android:singleLine="true"
- android:fontFeatureSettings="pnum"
+ android:fontFeatureSettings="tnum"
chargeAnimationDelay="350"
dozeWeight="200"
lockScreenWeight="400" />
diff --git a/packages/SystemUI/shared/res/values/colors.xml b/packages/SystemUI/shared/res/values/colors.xml
new file mode 100644
index 000000000000..f80af4376ff1
--- /dev/null
+++ b/packages/SystemUI/shared/res/values/colors.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <color name="clock_default_color_dark">@*android:color/primary_text_material_dark</color>
+ <color name="clock_default_color_light">@*android:color/primary_text_material_light</color>
+</resources>
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/clocks/AnimatableClockView.kt b/packages/SystemUI/shared/src/com/android/systemui/shared/clocks/AnimatableClockView.kt
index c2e74456c032..555c20bfed9c 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/clocks/AnimatableClockView.kt
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/clocks/AnimatableClockView.kt
@@ -148,7 +148,7 @@ class AnimatableClockView @JvmOverloads constructor(
fun refreshTime() {
time.timeInMillis = timeOverrideInMillis ?: System.currentTimeMillis()
contentDescription = DateFormat.format(descFormat, time)
- val formattedText = DateFormat.format(format, time)
+ val formattedText = DateFormat.format(format, time).toString() + ' '
// Setting text actually triggers a layout pass (because the text view is set to
// wrap_content width and TextView always relayouts for this). Avoid needless
// relayout if the text didn't actually change.
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/clocks/DefaultClockProvider.kt b/packages/SystemUI/shared/src/com/android/systemui/shared/clocks/DefaultClockProvider.kt
index 19ac2e479bcb..92a05c540f94 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/clocks/DefaultClockProvider.kt
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/clocks/DefaultClockProvider.kt
@@ -230,9 +230,9 @@ class DefaultClock(
private fun updateClockColor(clock: AnimatableClockView, isRegionDark: Boolean) {
val color = if (isRegionDark) {
- resources.getColor(android.R.color.system_accent1_100)
+ resources.getColor(R.color.clock_default_color_dark)
} else {
- resources.getColor(android.R.color.system_accent2_600)
+ resources.getColor(R.color.clock_default_color_light)
}
clock.setColors(DOZE_COLOR, color)
clock.animateAppearOnLockscreen()
--
2.25.1
@@ -0,0 +1,34 @@
From 9a8d7eada09d1940b3e12dcbbb95b1e6cfdafb18 Mon Sep 17 00:00:00 2001
From: Vachounet <vachounet@live.fr>
Date: Wed, 14 Oct 2020 11:43:10 +0200
Subject: [PATCH 05/18] UI: Remove black background from power menu
Change-Id: I87092d57ea457e6d6783c87b8a64b4e69dec2d8a
---
.../android/systemui/globalactions/GlobalActionsDialog.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
index f8f94b0bff6..04d35341c41 100644
--- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
@@ -2696,7 +2696,7 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,
initializeWalletView();
if (mBackgroundDrawable == null) {
mBackgroundDrawable = new ScrimDrawable();
- mScrimAlpha = 1.0f;
+ mScrimAlpha = 0.45f;
}
getWindow().setBackgroundDrawable(mBackgroundDrawable);
}
@@ -2733,7 +2733,6 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,
if (!(mBackgroundDrawable instanceof ScrimDrawable)) {
return;
}
- ((ScrimDrawable) mBackgroundDrawable).setColor(Color.BLACK, animate);
View decorView = getWindow().getDecorView();
if (colors.supportsDarkText()) {
decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR |
--
2.25.1
@@ -1,43 +0,0 @@
From a75f9906f81debf9940b3e9b54ddb05205d1b5fc Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 2 Nov 2019 06:41:03 +0000
Subject: [PATCH 06/21] Keyguard: Hide padlock unless UDFPS is in use
Fair enough Google, but don't give me that otherwise
Change-Id: Ie91e80ca5c6637a51a8acc72fb28cd6ac2a7abb6
---
.../com/android/keyguard/LockIconViewController.java | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
index 2a3667610f9c..12905c70fc21 100644
--- a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
+++ b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
@@ -254,20 +254,14 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
return;
}
- boolean wasShowingFpIcon = mUdfpsEnrolled && !mShowUnlockIcon && !mShowLockIcon
+ boolean wasShowingFpIcon = mUdfpsEnrolled && !mShowUnlockIcon
&& !mShowAodUnlockedIcon && !mShowAodLockIcon;
- mShowLockIcon = !mCanDismissLockScreen && !mUserUnlockedWithBiometric && isLockScreen()
- && (!mUdfpsEnrolled || !mRunningFPS);
- mShowUnlockIcon = (mCanDismissLockScreen || mUserUnlockedWithBiometric) && isLockScreen();
+ mShowUnlockIcon = (mCanDismissLockScreen || mUserUnlockedWithBiometric) && isLockScreen() && mUdfpsEnrolled;
mShowAodUnlockedIcon = mIsDozing && mUdfpsEnrolled && !mRunningFPS && mCanDismissLockScreen;
mShowAodLockIcon = mIsDozing && mUdfpsEnrolled && !mRunningFPS && !mCanDismissLockScreen;
final CharSequence prevContentDescription = mView.getContentDescription();
- if (mShowLockIcon) {
- mView.updateIcon(ICON_LOCK, false);
- mView.setContentDescription(mLockedLabel);
- mView.setVisibility(View.VISIBLE);
- } else if (mShowUnlockIcon) {
+ if (mShowUnlockIcon) {
if (wasShowingFpIcon) {
// fp icon was shown by UdfpsView, and now we still want to animate the transition
// in this drawable
--
2.25.1
@@ -0,0 +1,88 @@
From 508d9e0843d9519344d76cd32e38148ee8975833 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Mon, 26 Oct 2020 14:06:56 +0000
Subject: [PATCH 06/18] UI: Reconfigure power menu items
- Show only the important items (GTFO Emergency)
- Make 4 columns
- Always include screenshot
Change-Id: I32cca6e2c6bb64d891efee959127edf7c0802cbc
---
core/res/res/values/config.xml | 5 +----
packages/SystemUI/res/values-land/config.xml | 19 ++++++++-----------
packages/SystemUI/res/values/config.xml | 2 +-
3 files changed, 10 insertions(+), 16 deletions(-)
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index b1ee670fc6a..5efb4156466 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -2779,13 +2779,10 @@
"logout" = Logout the current user
-->
<string-array translatable="false" name="config_globalActionsList">
- <item>emergency</item>
- <item>lockdown</item>
<item>power</item>
<item>restart</item>
- <item>logout</item>
<item>screenshot</item>
- <item>bugreport</item>
+ <item>airplane</item>
</string-array>
<!-- Number of milliseconds to hold a wake lock to ensure that drawing is fully
diff --git a/packages/SystemUI/res/values-land/config.xml b/packages/SystemUI/res/values-land/config.xml
index 2f7fbaff4ed..8b7ae652846 100644
--- a/packages/SystemUI/res/values-land/config.xml
+++ b/packages/SystemUI/res/values-land/config.xml
@@ -3,16 +3,16 @@
/*
** Copyright 2011, 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
+** 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
+** 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
+** 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.
*/
-->
@@ -34,7 +34,4 @@
<!-- Max number of columns for quick controls area -->
<integer name="controls_max_columns">4</integer>
-
- <!-- Max number of columns for power menu -->
- <integer name="power_menu_max_columns">4</integer>
</resources>
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index d86f3fa277f..fd9ec3166fb 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -572,7 +572,7 @@
<integer name="controls_max_columns">2</integer>
<!-- Max number of columns for power menu -->
- <integer name="power_menu_max_columns">3</integer>
+ <integer name="power_menu_max_columns">4</integer>
<!-- If the dp width of the available space is <= this value, potentially adjust the number
of columns-->
--
2.25.1
@@ -1,28 +0,0 @@
From 9f0dbda9fb7f965f994a374c2194c81fc2a36c65 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 1 Sep 2021 14:41:53 +0000
Subject: [PATCH 07/21] Keyguard: Never switch to large clock
It looks alright actually, but as always breaks under landscape
Change-Id: I434d033ecae597ed2a7b2ed71e96ba1a963e9cc3
---
.../src/com/android/keyguard/KeyguardClockSwitchController.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
index 2165099b474e..3b137c932139 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
@@ -376,7 +376,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
private void updateDoubleLineClock() {
mCanShowDoubleLineClock = mSecureSettings.getIntForUser(
- Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK, 1,
+ Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK, 0,
UserHandle.USER_CURRENT) != 0;
if (!mCanShowDoubleLineClock) {
--
2.25.1
@@ -0,0 +1,34 @@
From 2253b5c60f551017965f7d6131ce777ac56713ce Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 15 May 2021 10:15:12 +0000
Subject: [PATCH 07/18] UI: Tap outside to dismiss power menu
Change-Id: Id713b84a2edb3facc184394963f98291abe6ae2c
---
.../systemui/globalactions/GlobalActionsDialog.java | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
index 04d35341c41..4552792b3f5 100644
--- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
@@ -2699,6 +2699,16 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,
mScrimAlpha = 0.45f;
}
getWindow().setBackgroundDrawable(mBackgroundDrawable);
+
+ ViewGroup root = findViewById(com.android.systemui.R.id.global_actions_grid_root);
+ if (root != null) {
+ root.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ dismiss();
+ }
+ });
+ }
}
private void fixNavBarClipping() {
--
2.25.1
@@ -1,133 +0,0 @@
From 5ccbd8949c23e2d21ff0dc36d1915418803c2d19 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 2 Nov 2019 08:31:36 +0000
Subject: [PATCH 08/21] Keyguard: Refine indication text
Change-Id: Ib771c35610f712a1de34736e817bcfe616ac37d8
---
packages/SystemUI/res-keyguard/values/styles.xml | 2 --
.../SystemUI/res/layout/keyguard_bottom_area.xml | 1 +
packages/SystemUI/res/values/dimens.xml | 3 +--
.../KeyguardIndicationRotateTextViewController.java | 12 +++++++++++-
.../statusbar/KeyguardIndicationController.java | 7 ++++---
.../statusbar/phone/KeyguardIndicationTextView.java | 2 +-
6 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/packages/SystemUI/res-keyguard/values/styles.xml b/packages/SystemUI/res-keyguard/values/styles.xml
index 955e24e01a9a..58c6919971a1 100644
--- a/packages/SystemUI/res-keyguard/values/styles.xml
+++ b/packages/SystemUI/res-keyguard/values/styles.xml
@@ -132,8 +132,6 @@
<item name="android:maxLines">1</item>
<item name="android:gravity">center</item>
<item name="android:textColor">?attr/wallpaperTextColor</item>
- <item name="android:shadowColor">@color/keyguard_shadow_color</item>
- <item name="android:shadowRadius">?attr/shadowRadius</item>
</style>
<style name="TextAppearance.Keyguard.BottomArea.Button">
diff --git a/packages/SystemUI/res/layout/keyguard_bottom_area.xml b/packages/SystemUI/res/layout/keyguard_bottom_area.xml
index 8df8c49ee057..ff616b66790d 100644
--- a/packages/SystemUI/res/layout/keyguard_bottom_area.xml
+++ b/packages/SystemUI/res/layout/keyguard_bottom_area.xml
@@ -35,6 +35,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
+ android:minHeight="48dp"
android:paddingStart="@dimen/keyguard_indication_text_padding"
android:paddingEnd="@dimen/keyguard_indication_text_padding"
android:textAppearance="@style/TextAppearance.Keyguard.BottomArea"
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 9c85fbc4b391..44766f3b6a6d 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -760,11 +760,10 @@
<dimen name="keyguard_lock_height">42dp</dimen>
<dimen name="keyguard_lock_padding">20dp</dimen>
- <dimen name="keyguard_indication_margin_bottom">32dp</dimen>
+ <dimen name="keyguard_indication_margin_bottom">16dp</dimen>
<dimen name="lock_icon_margin_bottom">110dp</dimen>
<dimen name="ambient_indication_margin_bottom">71dp</dimen>
-
<!-- How much two taps can be apart to still be recognized as a double tap on the lockscreen -->
<dimen name="double_tap_slop">32dp</dimen>
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
index f84a5e39163f..38baa611cf07 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
@@ -220,12 +220,22 @@ public class KeyguardIndicationRotateTextViewController extends
}
/**
- * @return true if there are available indications to show
+ * @return true if there are available non-resting indications to show.
*/
public boolean hasIndications() {
+ if (hasIndication(INDICATION_TYPE_RESTING)) {
+ return mIndicationMessages.keySet().size() > 1;
+ }
return mIndicationMessages.keySet().size() > 0;
}
+ /**
+ * @return true if there is an indication of the following type.
+ */
+ public boolean hasIndication(@IndicationType int type) {
+ return mIndicationMessages.containsKey(type);
+ }
+
/**
* Clears all messages in the queue and sets the current message to an empty string.
*/
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
index 073ab8b16864..5fb3c05c4a2a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
@@ -267,10 +267,12 @@ public class KeyguardIndicationController {
public void handleMessage(Message msg) {
if (msg.what == MSG_HIDE_TRANSIENT) {
hideTransientIndication();
+ updateLockScreenIndications(false /* animate */, KeyguardUpdateMonitor.getCurrentUser());
} else if (msg.what == MSG_SHOW_ACTION_TO_UNLOCK) {
showActionToUnlock();
} else if (msg.what == MSG_HIDE_BIOMETRIC_MESSAGE) {
hideBiometricMessage();
+ updateLockScreenIndications(false /* animate */, KeyguardUpdateMonitor.getCurrentUser());
} else if (msg.what == MSG_RESET_ERROR_MESSAGE_ON_SCREEN_ON) {
mBiometricErrorMessageToShowOnScreenOn = null;
}
@@ -588,12 +590,11 @@ public class KeyguardIndicationController {
}
private void updateLockScreenRestingMsg() {
- if (!TextUtils.isEmpty(mRestingIndication)
- && !mRotateTextViewController.hasIndications()) {
+ if (!mRotateTextViewController.hasIndications()) {
mRotateTextViewController.updateIndication(
INDICATION_TYPE_RESTING,
new KeyguardIndication.Builder()
- .setMessage(mRestingIndication)
+ .setMessage(mContext.getResources().getString(R.string.keyguard_unlock))
.setTextColor(mInitialTextColorState)
.build(),
false);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java
index d24469e8421e..647c766aa0f0 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java
@@ -46,7 +46,7 @@ public class KeyguardIndicationTextView extends TextView {
@StyleRes
private static int sButtonStyleId = R.style.TextAppearance_Keyguard_BottomArea_Button;
- private boolean mAnimationsEnabled = true;
+ private boolean mAnimationsEnabled = false;
private CharSequence mMessage;
private KeyguardIndication mKeyguardIndicationInfo;
--
2.25.1
@@ -1,7 +1,7 @@
From 6616bcdd57fa5a9f3f482d41ba7667995f083c61 Mon Sep 17 00:00:00 2001 From 557c1fd05415a15beb4c1d6f6c021dc66a28957d Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com> From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Tue, 29 Jun 2021 22:57:01 +0000 Date: Tue, 29 Jun 2021 22:57:01 +0000
Subject: [PATCH 19/21] UI: Relax requirement for HINT_SUPPORTS_DARK_TEXT Subject: [PATCH 08/18] UI: Relax requirement for HINT_SUPPORTS_DARK_TEXT
I decide what's good enough for a wallpaper! I decide what's good enough for a wallpaper!
@@ -11,10 +11,10 @@ Change-Id: I5ccd85b3df12e53746a4ac6cbc37ba8d11f6c336
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/java/android/app/WallpaperColors.java b/core/java/android/app/WallpaperColors.java diff --git a/core/java/android/app/WallpaperColors.java b/core/java/android/app/WallpaperColors.java
index 067a4c3c047e..a8d3c14e1d9d 100644 index e4818b27434..67208f0ebed 100644
--- a/core/java/android/app/WallpaperColors.java --- a/core/java/android/app/WallpaperColors.java
+++ b/core/java/android/app/WallpaperColors.java +++ b/core/java/android/app/WallpaperColors.java
@@ -577,7 +577,7 @@ public final class WallpaperColors implements Parcelable { @@ -413,7 +413,7 @@ public final class WallpaperColors implements Parcelable {
int hints = 0; int hints = 0;
double meanLuminance = totalLuminance / pixels.length; double meanLuminance = totalLuminance / pixels.length;
@@ -1,128 +0,0 @@
From cccdc9392402135535e81d35bb1c8d62222f061f Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 29 Dec 2022 02:53:16 +0000
Subject: [PATCH 09/21] Revert "SystemUI: Align QS header with status bar"
This reverts commit 8658042a3c1c662f6a14ea3bf311e1e6b07f785e.
---
.../res/layout/quick_qs_status_icons.xml | 3 +++
.../quick_status_bar_header_date_privacy.xml | 4 +++-
.../systemui/qs/QuickStatusBarHeader.java | 23 ++++++++-----------
3 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/packages/SystemUI/res/layout/quick_qs_status_icons.xml b/packages/SystemUI/res/layout/quick_qs_status_icons.xml
index 9feec09dd52a..7a370d8cbc48 100644
--- a/packages/SystemUI/res/layout/quick_qs_status_icons.xml
+++ b/packages/SystemUI/res/layout/quick_qs_status_icons.xml
@@ -21,6 +21,7 @@
android:layout_height="@*android:dimen/quick_qs_offset_height"
android:clipChildren="false"
android:clipToPadding="false"
+ android:minHeight="@dimen/qs_header_row_min_height"
android:clickable="false"
android:focusable="true"
android:theme="@style/QSHeaderTheme">
@@ -38,6 +39,7 @@
android:id="@+id/clock"
android:layout_width="wrap_content"
android:layout_height="match_parent"
+ android:minHeight="@dimen/qs_header_row_min_height"
android:gravity="center_vertical|start"
android:paddingStart="@dimen/status_bar_left_clock_starting_padding"
android:paddingEnd="@dimen/status_bar_left_clock_end_padding"
@@ -62,6 +64,7 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
+ android:minHeight="@dimen/qs_header_row_min_height"
android:minWidth="48dp"
android:layout_marginStart="8dp"
android:layout_gravity="end|center_vertical"
diff --git a/packages/SystemUI/res/layout/quick_status_bar_header_date_privacy.xml b/packages/SystemUI/res/layout/quick_status_bar_header_date_privacy.xml
index 2220bbbb76a5..60bc3732cde0 100644
--- a/packages/SystemUI/res/layout/quick_status_bar_header_date_privacy.xml
+++ b/packages/SystemUI/res/layout/quick_status_bar_header_date_privacy.xml
@@ -25,12 +25,14 @@
android:gravity="center"
android:layout_gravity="top"
android:orientation="horizontal"
- android:clickable="true">
+ android:clickable="true"
+ android:minHeight="48dp">
<FrameLayout
android:id="@+id/date_container"
android:layout_width="0dp"
android:layout_height="match_parent"
+ android:minHeight="48dp"
android:layout_weight="1"
android:gravity="center_vertical|start" >
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
index 04ace4dc2f3a..614b0c03c696 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
@@ -106,7 +106,6 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
private StatusBarContentInsetsProvider mInsetsProvider;
private int mRoundedCornerPadding = 0;
- private int mStatusBarPaddingTop;
private int mWaterfallTopInset;
private int mCutOutPaddingLeft;
private int mCutOutPaddingRight;
@@ -270,20 +269,19 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
mRoundedCornerPadding = resources.getDimensionPixelSize(
R.dimen.rounded_corner_content_padding);
- int statusBarHeight = SystemBarUtils.getStatusBarHeight(mContext);
+ int qsOffsetHeight = SystemBarUtils.getQuickQsOffsetHeight(mContext);
- mStatusBarPaddingTop = resources.getDimensionPixelSize(
- R.dimen.status_bar_padding_top);
-
- mDatePrivacyView.getLayoutParams().height = statusBarHeight;
+ mDatePrivacyView.getLayoutParams().height =
+ Math.max(qsOffsetHeight, mDatePrivacyView.getMinimumHeight());
mDatePrivacyView.setLayoutParams(mDatePrivacyView.getLayoutParams());
- mStatusIconsView.getLayoutParams().height = statusBarHeight;
+ mStatusIconsView.getLayoutParams().height =
+ Math.max(qsOffsetHeight, mStatusIconsView.getMinimumHeight());
mStatusIconsView.setLayoutParams(mStatusIconsView.getLayoutParams());
ViewGroup.LayoutParams lp = getLayoutParams();
if (mQsDisabled) {
- lp.height = mStatusIconsView.getLayoutParams().height - mWaterfallTopInset;
+ lp.height = mStatusIconsView.getLayoutParams().height;
} else {
lp.height = WRAP_CONTENT;
}
@@ -307,9 +305,8 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
}
MarginLayoutParams qqsLP = (MarginLayoutParams) mHeaderQsPanel.getLayoutParams();
- qqsLP.topMargin = largeScreenHeaderActive || !mUseCombinedQSHeader
- ? mContext.getResources().getDimensionPixelSize(R.dimen.qqs_layout_margin_top)
- : SystemBarUtils.getQuickQsOffsetHeight(mContext);
+ qqsLP.topMargin = largeScreenHeaderActive || !mUseCombinedQSHeader ? mContext.getResources()
+ .getDimensionPixelSize(R.dimen.qqs_layout_margin_top) : qsOffsetHeight;
mHeaderQsPanel.setLayoutParams(qqsLP);
updateBatteryMode();
@@ -556,11 +553,11 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
}
mDatePrivacyView.setPadding(paddingLeft,
- mStatusBarPaddingTop,
+ mWaterfallTopInset,
paddingRight,
0);
mStatusIconsView.setPadding(paddingLeft,
- mStatusBarPaddingTop,
+ mWaterfallTopInset,
paddingRight,
0);
}
--
2.25.1
@@ -0,0 +1,107 @@
From e894e06a986225263ec0828595edc5f22f01d59b Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Tue, 29 Jun 2021 23:01:07 +0000
Subject: [PATCH 09/18] UI: Force dark QS scrim
Side effect from using light wallpapers
Change-Id: I241dfd7cf8d8bfce1503e7872c5359c380fdbfed
---
.../systemui/qs/QuickStatusBarHeader.java | 5 -----
.../stack/NotificationStackScrollLayout.java | 2 +-
.../statusbar/phone/ScrimController.java | 21 ++++++-------------
3 files changed, 7 insertions(+), 21 deletions(-)
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
index 94fd996d085..f82ec46c1ea 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
@@ -411,11 +411,6 @@ public class QuickStatusBarHeader extends RelativeLayout implements
protected void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
updateResources();
-
- // Update color schemes in landscape to use wallpaperTextColor
- boolean shouldUseWallpaperTextColor =
- newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE;
- mClockView.useWallpaperTextColor(shouldUseWallpaperTextColor);
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
index a4a58194a46..05199cec01a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
@@ -541,7 +541,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
private SysuiColorExtractor.OnColorsChangedListener mOnColorsChangedListener =
(colorExtractor, which) -> {
- final boolean useDarkText = mColorExtractor.getNeutralColors().supportsDarkText();
+ final boolean useDarkText = false;
updateDecorViews(useDarkText);
};
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
index 686b8712723..96702a831cd 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
@@ -35,9 +35,7 @@ import android.view.animation.DecelerateInterpolator;
import android.view.animation.Interpolator;
import com.android.internal.annotations.VisibleForTesting;
-import com.android.internal.colorextraction.ColorExtractor;
import com.android.internal.colorextraction.ColorExtractor.GradientColors;
-import com.android.internal.colorextraction.ColorExtractor.OnColorsChangedListener;
import com.android.internal.graphics.ColorUtils;
import com.android.internal.util.function.TriConsumer;
import com.android.keyguard.KeyguardUpdateMonitor;
@@ -69,8 +67,7 @@ import javax.inject.Singleton;
* security method gets shown).
*/
@Singleton
-public class ScrimController implements ViewTreeObserver.OnPreDrawListener, OnColorsChangedListener,
- Dumpable {
+public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dumpable {
static final String TAG = "ScrimController";
private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
@@ -149,7 +146,6 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, OnCo
private final KeyguardVisibilityCallback mKeyguardVisibilityCallback;
private final Handler mHandler;
- private final SysuiColorExtractor mColorExtractor;
private GradientColors mColors;
private boolean mNeedsDrawableColorUpdate;
@@ -226,9 +222,11 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, OnCo
}
});
- mColorExtractor = sysuiColorExtractor;
- mColorExtractor.addOnColorsChangedListener(this);
- mColors = mColorExtractor.getNeutralColors();
+ mColors = new GradientColors();
+ mColors.setMainColor(-14671580);
+ mColors.setSecondaryColor(-14671580);
+ mColors.setColorPalette(new int[] {-14671580});
+ mColors.setSupportsDarkText(false);
mNeedsDrawableColorUpdate = true;
}
@@ -941,13 +939,6 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, OnCo
// Don't care in the base class.
}
- @Override
- public void onColorsChanged(ColorExtractor colorExtractor, int which) {
- mColors = mColorExtractor.getNeutralColors();
- mNeedsDrawableColorUpdate = true;
- scheduleUpdate();
- }
-
@Override
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
pw.println(" ScrimController: ");
--
2.25.1
@@ -0,0 +1,30 @@
From 5ad738126de00c6c36b6a00ad0cc0afa5546fe56 Mon Sep 17 00:00:00 2001
From: AndyCGYan <GeForce8800Ultra@gmail.com>
Date: Thu, 27 Dec 2018 16:38:19 +0800
Subject: [PATCH 10/18] Keyguard: Show shortcuts by default
Change-Id: I5655e0be26cec61214735719dffcda810286cd41
---
packages/SystemUI/res/values/config.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index fd9ec3166fb..2fb057cb635 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -69,10 +69,10 @@
<integer translatable="false" name="config_search_panel_view_vibration_duration">20</integer>
<!-- Show mic or phone affordance on Keyguard -->
- <bool name="config_keyguardShowLeftAffordance">false</bool>
+ <bool name="config_keyguardShowLeftAffordance">true</bool>
<!-- Show camera affordance on Keyguard -->
- <bool name="config_keyguardShowCameraAffordance">false</bool>
+ <bool name="config_keyguardShowCameraAffordance">true</bool>
<!-- The length of the vibration when the notification pops open. -->
<integer name="one_finger_pop_duration_ms">10</integer>
--
2.25.1
@@ -1,263 +0,0 @@
From 790f729ba423a331c05ead93c0baadc0cc3a5eff Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 20 Mar 2021 10:35:14 +0000
Subject: [PATCH 10/21] Keyguard/UI: Fix status bar / quick settings margins
and paddings
Last revised on 2022/09/24, targeting T
The way I think SB/QS margins/paddings should work:
- Devices with left notch: [notch_definition][status_bar_padding_start][content]...[content][status_bar_padding_end][rounded_corner_content_padding]
- Devices with center or no notch: [rounded_corner_content_padding][status_bar_padding_start][content]...[content][status_bar_padding_end][rounded_corner_content_padding]
Key point being:
- SB (including keyguard) and QS should always act uniformly
- Notch definition should only be the notch itself, without additional padding
- Instead, these paddings should be covered by status_bar_padding_{start|end}
As a result, below changes have been made:
- Change keyguard_carrier_text_margin into a padding
- Link keyguard paddings to status_bar_padding_{start|end}
- Add status_bar_padding_{start|end} to quick settings header
- Remove several unnecessary margins and paddings
- Animate padding for new QS clock in s-qpr1
Change-Id: Ic91fa398813e1907297bb0892c444d96405950e7
---
.../res/layout/keyguard_status_bar.xml | 2 +-
.../res/layout/quick_qs_status_icons.xml | 6 ---
.../quick_status_bar_header_date_privacy.xml | 5 +-
.../SystemUI/res/values-sw600dp/dimens.xml | 3 --
packages/SystemUI/res/values/dimens.xml | 2 +-
.../systemui/qs/QuickStatusBarHeader.java | 50 ++++++++++++-------
.../phone/KeyguardStatusBarView.java | 7 ---
7 files changed, 35 insertions(+), 40 deletions(-)
diff --git a/packages/SystemUI/res/layout/keyguard_status_bar.xml b/packages/SystemUI/res/layout/keyguard_status_bar.xml
index 2480d0189e16..5561271d4733 100644
--- a/packages/SystemUI/res/layout/keyguard_status_bar.xml
+++ b/packages/SystemUI/res/layout/keyguard_status_bar.xml
@@ -86,7 +86,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="@dimen/status_bar_padding_top"
- android:layout_marginStart="@dimen/keyguard_carrier_text_margin"
+ android:paddingStart="@dimen/keyguard_carrier_text_margin"
android:layout_toStartOf="@id/system_icons_container"
android:gravity="center_vertical"
android:ellipsize="marquee"
diff --git a/packages/SystemUI/res/layout/quick_qs_status_icons.xml b/packages/SystemUI/res/layout/quick_qs_status_icons.xml
index 7a370d8cbc48..0247eebea131 100644
--- a/packages/SystemUI/res/layout/quick_qs_status_icons.xml
+++ b/packages/SystemUI/res/layout/quick_qs_status_icons.xml
@@ -21,7 +21,6 @@
android:layout_height="@*android:dimen/quick_qs_offset_height"
android:clipChildren="false"
android:clipToPadding="false"
- android:minHeight="@dimen/qs_header_row_min_height"
android:clickable="false"
android:focusable="true"
android:theme="@style/QSHeaderTheme">
@@ -39,10 +38,7 @@
android:id="@+id/clock"
android:layout_width="wrap_content"
android:layout_height="match_parent"
- android:minHeight="@dimen/qs_header_row_min_height"
android:gravity="center_vertical|start"
- android:paddingStart="@dimen/status_bar_left_clock_starting_padding"
- android:paddingEnd="@dimen/status_bar_left_clock_end_padding"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.QS.Status" />
@@ -50,7 +46,6 @@
android:id="@+id/date_clock"
android:layout_width="wrap_content"
android:layout_height="match_parent"
- android:layout_marginStart="@dimen/status_bar_left_clock_end_padding"
android:gravity="center_vertical|start"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.QS.Status"
@@ -64,7 +59,6 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
- android:minHeight="@dimen/qs_header_row_min_height"
android:minWidth="48dp"
android:layout_marginStart="8dp"
android:layout_gravity="end|center_vertical"
diff --git a/packages/SystemUI/res/layout/quick_status_bar_header_date_privacy.xml b/packages/SystemUI/res/layout/quick_status_bar_header_date_privacy.xml
index 60bc3732cde0..6ba9382bea94 100644
--- a/packages/SystemUI/res/layout/quick_status_bar_header_date_privacy.xml
+++ b/packages/SystemUI/res/layout/quick_status_bar_header_date_privacy.xml
@@ -25,14 +25,12 @@
android:gravity="center"
android:layout_gravity="top"
android:orientation="horizontal"
- android:clickable="true"
- android:minHeight="48dp">
+ android:clickable="true">
<FrameLayout
android:id="@+id/date_container"
android:layout_width="0dp"
android:layout_height="match_parent"
- android:minHeight="48dp"
android:layout_weight="1"
android:gravity="center_vertical|start" >
@@ -64,7 +62,6 @@
android:id="@+id/privacy_container"
android:layout_width="0dp"
android:layout_height="match_parent"
- android:minHeight="48dp"
android:layout_weight="1"
android:gravity="center_vertical|end" >
diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml
index 599bf30a5135..f9911fda7dbe 100644
--- a/packages/SystemUI/res/values-sw600dp/dimens.xml
+++ b/packages/SystemUI/res/values-sw600dp/dimens.xml
@@ -27,9 +27,6 @@
<!-- The width of user avatar when on Keyguard -->
<dimen name="multi_user_avatar_keyguard_size">30dp</dimen>
- <!-- Margin on the left side of the carrier text on Keyguard -->
- <dimen name="keyguard_carrier_text_margin">24dp</dimen>
-
<!-- The width/height of the phone/camera/unlock icon on keyguard. -->
<dimen name="keyguard_affordance_height">80dp</dimen>
<dimen name="keyguard_affordance_width">120dp</dimen>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 44766f3b6a6d..569926a1e1a0 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -736,7 +736,7 @@
<dimen name="kg_framed_avatar_size">32dp</dimen>
<!-- Margin on the left side of the carrier text on Keyguard -->
- <dimen name="keyguard_carrier_text_margin">16dp</dimen>
+ <dimen name="keyguard_carrier_text_margin">@dimen/status_bar_padding_start</dimen>
<!-- Additional translation (downwards) for appearing notifications when going to the full shade
from Keyguard. -->
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
index 614b0c03c696..55d7336e5c39 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
@@ -106,6 +106,10 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
private StatusBarContentInsetsProvider mInsetsProvider;
private int mRoundedCornerPadding = 0;
+ private int mStatusBarPaddingStart;
+ private int mStatusBarPaddingEnd;
+ private int mHeaderPaddingLeft;
+ private int mHeaderPaddingRight;
private int mWaterfallTopInset;
private int mCutOutPaddingLeft;
private int mCutOutPaddingRight;
@@ -269,6 +273,11 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
mRoundedCornerPadding = resources.getDimensionPixelSize(
R.dimen.rounded_corner_content_padding);
+ mStatusBarPaddingStart = resources.getDimensionPixelSize(
+ R.dimen.status_bar_padding_start);
+ mStatusBarPaddingEnd = resources.getDimensionPixelSize(
+ R.dimen.status_bar_padding_end);
+
int qsOffsetHeight = SystemBarUtils.getQuickQsOffsetHeight(mContext);
mDatePrivacyView.getLayoutParams().height =
@@ -359,6 +368,9 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
.addFloat(mDateView, "alpha", 0, 0, 1)
.addFloat(mClockDateView, "alpha", 1, 0, 0)
.addFloat(mQSCarriers, "alpha", 0, 1)
+ // Use statusbar paddings when collapsed, align with QS when expanded, and animate translation
+ .addFloat(mClockContainer, "translationX", mHeaderPaddingLeft + mStatusBarPaddingStart, 0)
+ .addFloat(mRightLayout, "translationX", -(mHeaderPaddingRight + mStatusBarPaddingEnd), 0)
.setListener(new TouchAnimator.ListenerAdapter() {
@Override
public void onAnimationAtEnd() {
@@ -466,8 +478,6 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
.getStatusBarContentInsetsForCurrentRotation();
boolean hasCornerCutout = mInsetsProvider.currentRotationHasCornerCutout();
- mDatePrivacyView.setPadding(sbInsets.first, 0, sbInsets.second, 0);
- mStatusIconsView.setPadding(sbInsets.first, 0, sbInsets.second, 0);
LinearLayout.LayoutParams datePrivacySeparatorLayoutParams =
(LinearLayout.LayoutParams) mDatePrivacySeparator.getLayoutParams();
LinearLayout.LayoutParams mClockIconsSeparatorLayoutParams =
@@ -531,34 +541,38 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
private void updateHeadersPadding() {
setContentMargins(mDatePrivacyView, 0, 0);
setContentMargins(mStatusIconsView, 0, 0);
- int paddingLeft = 0;
- int paddingRight = 0;
FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) getLayoutParams();
+ // Note: these are supposedly notification_side_paddings
int leftMargin = lp.leftMargin;
int rightMargin = lp.rightMargin;
// The clock might collide with cutouts, let's shift it out of the way.
- // We only do that if the inset is bigger than our own padding, since it's nicer to
- // align with
- if (mCutOutPaddingLeft > 0) {
- // if there's a cutout, let's use at least the rounded corner inset
- int cutoutPadding = Math.max(mCutOutPaddingLeft, mRoundedCornerPadding);
- paddingLeft = Math.max(cutoutPadding - leftMargin, 0);
+ // Margin will be the reference point of paddings/translations
+ // and will have to be subtracted from cutout paddings
+ boolean headerPaddingUpdated = false;
+ int headerPaddingLeft = Math.max(mCutOutPaddingLeft, mRoundedCornerPadding) - leftMargin;
+ if (headerPaddingLeft != mHeaderPaddingLeft) {
+ mHeaderPaddingLeft = headerPaddingLeft;
+ headerPaddingUpdated = true;
}
- if (mCutOutPaddingRight > 0) {
- // if there's a cutout, let's use at least the rounded corner inset
- int cutoutPadding = Math.max(mCutOutPaddingRight, mRoundedCornerPadding);
- paddingRight = Math.max(cutoutPadding - rightMargin, 0);
+ int headerPaddingRight = Math.max(mCutOutPaddingRight, mRoundedCornerPadding) - rightMargin;
+ if (headerPaddingRight != mHeaderPaddingRight) {
+ mHeaderPaddingRight = headerPaddingRight;
+ headerPaddingUpdated = true;
}
- mDatePrivacyView.setPadding(paddingLeft,
+ // Update header animator with new paddings
+ if (headerPaddingUpdated) {
+ updateAnimators();
+ }
+ mDatePrivacyView.setPadding(mHeaderPaddingLeft + mStatusBarPaddingStart,
mWaterfallTopInset,
- paddingRight,
+ mHeaderPaddingRight + mStatusBarPaddingEnd,
0);
- mStatusIconsView.setPadding(paddingLeft,
+ mStatusIconsView.setPadding(0,
mWaterfallTopInset,
- paddingRight,
+ 0,
0);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
index cc8b2d5c0913..f829fb421fc7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
@@ -157,14 +157,7 @@ public class KeyguardStatusBarView extends RelativeLayout {
mCarrierLabel.setTextSize(TypedValue.COMPLEX_UNIT_PX,
getResources().getDimensionPixelSize(
com.android.internal.R.dimen.text_size_small_material));
- lp = (MarginLayoutParams) mCarrierLabel.getLayoutParams();
- int marginStart = calculateMargin(
- getResources().getDimensionPixelSize(R.dimen.keyguard_carrier_text_margin),
- mPadding.first);
- lp.setMarginStart(marginStart);
-
- mCarrierLabel.setLayoutParams(lp);
updateKeyguardStatusBarHeight();
}
--
2.25.1
@@ -0,0 +1,260 @@
From 205d654cd20275c36b5d0826bfe8648ab80118ea Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 2 Nov 2019 07:52:36 +0000
Subject: [PATCH 11/18] Keyguard: Revert date and clock to Lollipop style
Also ported dynamic date format based on alarm presence from Oreo
Change-Id: I0f61c641ffb2a3e1e6b4da738792ee4ac1d77434
---
.../layout/keyguard_clock_switch.xml | 3 ---
.../layout/keyguard_status_view.xml | 1 -
.../res-keyguard/values-h560dp/dimens.xml | 2 +-
.../res-keyguard/values-h650dp/dimens.xml | 2 +-
.../SystemUI/res-keyguard/values/dimens.xml | 6 ++---
.../SystemUI/res-keyguard/values/strings.xml | 4 ++--
.../SystemUI/res-keyguard/values/styles.xml | 18 ++++-----------
.../res/layout/keyguard_status_bar.xml | 2 +-
.../android/keyguard/KeyguardSliceView.java | 2 +-
.../keyguard/KeyguardSliceProvider.java | 22 +++++++++++--------
10 files changed, 26 insertions(+), 36 deletions(-)
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml b/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml
index bf2963cd0b7..5fb06f38bd4 100644
--- a/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml
+++ b/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml
@@ -36,8 +36,6 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
- android:paddingBottom="@dimen/title_clock_padding"
- android:letterSpacing="0.02"
android:textColor="?attr/wallpaperTextColor"
android:singleLine="true"
style="@style/widget_big"
@@ -51,7 +49,6 @@
android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal"
android:gravity="center_horizontal"
- android:letterSpacing="0.03"
android:textColor="?attr/wallpaperTextColor"
android:singleLine="true"
style="@style/widget_title_bold"
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_status_view.xml b/packages/SystemUI/res-keyguard/layout/keyguard_status_view.xml
index 10cd3cba713..9845a02399b 100644
--- a/packages/SystemUI/res-keyguard/layout/keyguard_status_view.xml
+++ b/packages/SystemUI/res-keyguard/layout/keyguard_status_view.xml
@@ -67,7 +67,6 @@
android:layout_centerHorizontal="true"
android:textColor="?attr/wallpaperTextColorSecondary"
android:textSize="@dimen/widget_label_font_size"
- android:letterSpacing="0.05"
android:ellipsize="marquee"
android:singleLine="true" />
<com.android.systemui.statusbar.phone.NotificationIconContainer
diff --git a/packages/SystemUI/res-keyguard/values-h560dp/dimens.xml b/packages/SystemUI/res-keyguard/values-h560dp/dimens.xml
index 669f8fb642d..345b3d9c707 100644
--- a/packages/SystemUI/res-keyguard/values-h560dp/dimens.xml
+++ b/packages/SystemUI/res-keyguard/values-h560dp/dimens.xml
@@ -16,5 +16,5 @@
-->
<resources>
- <dimen name="widget_big_font_size">54dp</dimen>
+ <dimen name="widget_big_font_size">88dp</dimen>
</resources>
diff --git a/packages/SystemUI/res-keyguard/values-h650dp/dimens.xml b/packages/SystemUI/res-keyguard/values-h650dp/dimens.xml
index 669f8fb642d..345b3d9c707 100644
--- a/packages/SystemUI/res-keyguard/values-h650dp/dimens.xml
+++ b/packages/SystemUI/res-keyguard/values-h650dp/dimens.xml
@@ -16,5 +16,5 @@
-->
<resources>
- <dimen name="widget_big_font_size">54dp</dimen>
+ <dimen name="widget_big_font_size">88dp</dimen>
</resources>
diff --git a/packages/SystemUI/res-keyguard/values/dimens.xml b/packages/SystemUI/res-keyguard/values/dimens.xml
index f9389ce24d9..cf3a8d79712 100644
--- a/packages/SystemUI/res-keyguard/values/dimens.xml
+++ b/packages/SystemUI/res-keyguard/values/dimens.xml
@@ -42,13 +42,13 @@
<dimen name="eca_overlap">-10dip</dimen>
<!-- Slice header -->
- <dimen name="widget_title_font_size">24dp</dimen>
+ <dimen name="widget_title_font_size">16dp</dimen>
<dimen name="header_subtitle_padding">12dp</dimen>
<dimen name="header_icon_size">16dp</dimen>
<!-- Slice subtitle -->
- <dimen name="widget_label_font_size">18dp</dimen>
+ <dimen name="widget_label_font_size">16dp</dimen>
<!-- Clock without header -->
- <dimen name="widget_big_font_size">54dp</dimen>
+ <dimen name="widget_big_font_size">88dp</dimen>
<dimen name="bottom_text_spacing_digital">0dp</dimen>
<dimen name="title_clock_padding">4dp</dimen>
<!-- Clock with header -->
diff --git a/packages/SystemUI/res-keyguard/values/strings.xml b/packages/SystemUI/res-keyguard/values/strings.xml
index 4b6621379b4..3f7b909bf8e 100644
--- a/packages/SystemUI/res-keyguard/values/strings.xml
+++ b/packages/SystemUI/res-keyguard/values/strings.xml
@@ -115,9 +115,9 @@
<string name="keyguard_carrier_name_with_sim_locked_template" translatable="false"><xliff:g id="carrier">%s</xliff:g> (<xliff:g id="message">%s</xliff:g>)</string>
<!-- Time format strings for fall-back clock widget -->
- <string name="keyguard_widget_12_hours_format" translatable="false">h:mm</string>
+ <string name="keyguard_widget_12_hours_format" translatable="false">hh:mm</string>
<!-- Time format strings for fall-back clock widget -->
- <string name="keyguard_widget_24_hours_format" translatable="false">kk:mm</string>
+ <string name="keyguard_widget_24_hours_format" translatable="false">HH:mm</string>
<!-- The character used in keyguard_widget_12_hours_format and keyguard_widget_24_hours_format
to represent a ":". -->
<string name="keyguard_fancy_colon" translatable="false"></string>
diff --git a/packages/SystemUI/res-keyguard/values/styles.xml b/packages/SystemUI/res-keyguard/values/styles.xml
index 401f3e3e068..6ad077aaa5a 100644
--- a/packages/SystemUI/res-keyguard/values/styles.xml
+++ b/packages/SystemUI/res-keyguard/values/styles.xml
@@ -65,29 +65,23 @@
<style name="widget_big">
<item name="android:textSize">@dimen/widget_big_font_size</item>
<item name="android:paddingBottom">@dimen/bottom_text_spacing_digital</item>
- <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
+ <item name="android:fontFamily">sans-serif-thin</item>
<item name="android:fontFeatureSettings">@*android:string/config_headlineFontFeatureSettings</item>
<item name="android:ellipsize">none</item>
- <item name="android:shadowColor">@color/keyguard_shadow_color</item>
- <item name="android:shadowRadius">?attr/shadowRadius</item>
</style>
<style name="widget_title_bold">
<item name="android:textStyle">bold</item>
<item name="android:textSize">@dimen/widget_title_font_size</item>
<item name="android:paddingBottom">@dimen/widget_vertical_padding_clock</item>
- <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
+ <item name="android:fontFamily">sans-serif</item>
<item name="android:ellipsize">none</item>
- <item name="android:shadowColor">@color/keyguard_shadow_color</item>
- <item name="android:shadowRadius">?attr/shadowRadius</item>
</style>
<style name="widget_small_bold">
<item name="android:textStyle">bold</item>
<item name="android:textSize">@dimen/widget_small_font_size</item>
<item name="android:paddingBottom">@dimen/bottom_text_spacing_digital</item>
- <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
+ <item name="android:fontFamily">sans-serif</item>
<item name="android:ellipsize">none</item>
- <item name="android:shadowColor">@color/keyguard_shadow_color</item>
- <item name="android:shadowRadius">?attr/shadowRadius</item>
</style>
<style name="BouncerSecurityContainer">
@@ -119,9 +113,7 @@
<item name="android:gravity">center</item>
<item name="android:ellipsize">end</item>
<item name="android:maxLines">2</item>
- <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
- <item name="android:shadowColor">@color/keyguard_shadow_color</item>
- <item name="android:shadowRadius">?attr/shadowRadius</item>
+ <item name="android:fontFamily">sans-serif</item>
</style>
<style name="TextAppearance.Keyguard.Secondary">
@@ -135,8 +127,6 @@
<item name="android:textSize">14sp</item>
<item name="android:maxLines">1</item>
<item name="android:textColor">?attr/wallpaperTextColor</item>
- <item name="android:shadowColor">@color/keyguard_shadow_color</item>
- <item name="android:shadowRadius">?attr/shadowRadius</item>
</style>
</resources>
diff --git a/packages/SystemUI/res/layout/keyguard_status_bar.xml b/packages/SystemUI/res/layout/keyguard_status_bar.xml
index 2b22cc196db..58343800c2e 100644
--- a/packages/SystemUI/res/layout/keyguard_status_bar.xml
+++ b/packages/SystemUI/res/layout/keyguard_status_bar.xml
@@ -73,7 +73,7 @@
android:gravity="center_vertical"
android:ellipsize="marquee"
android:textDirection="locale"
- android:textAppearance="@style/TextAppearance.StatusBar.Clock"
+ android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?attr/wallpaperTextColorSecondary"
android:singleLine="true"
systemui:showMissingSim="true"
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
index f639c880c97..5c42937eb6a 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
@@ -502,7 +502,7 @@ public class KeyguardSliceView extends LinearLayout implements View.OnClickListe
for (int i = 0; i < childCount; i++) {
View child = getChildAt(i);
if (child instanceof KeyguardSliceTextView) {
- ((KeyguardSliceTextView) child).setMaxWidth(width / 3);
+ ((KeyguardSliceTextView) child).setMaxWidth(width);
}
}
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardSliceProvider.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardSliceProvider.java
index 3a37c0fd463..70b7e5354e2 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardSliceProvider.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardSliceProvider.java
@@ -95,7 +95,7 @@ public class KeyguardSliceProvider extends SliceProvider implements
* Only show alarms that will ring within N hours.
*/
@VisibleForTesting
- static final int ALARM_VISIBILITY_HOURS = 12;
+ static final int ALARM_VISIBILITY_HOURS = 24;
private static final Object sInstanceLock = new Object();
private static KeyguardSliceProvider sInstance;
@@ -304,7 +304,10 @@ public class KeyguardSliceProvider extends SliceProvider implements
if (oldInstance != null) {
oldInstance.onDestroy();
}
- mDatePattern = getContext().getString(R.string.system_ui_aod_date_pattern);
+ boolean isNextAlarmPresent = withinNHoursLocked(mNextAlarmInfo, ALARM_VISIBILITY_HOURS);
+ mDatePattern = getContext().getString(isNextAlarmPresent
+ ? R.string.abbrev_wday_month_day_no_year_alarm
+ : R.string.abbrev_wday_month_day_no_year);
mPendingIntent = PendingIntent.getActivity(getContext(), 0,
new Intent(getContext(), KeyguardSliceProvider.class), 0);
mMediaManager.addCallback(this);
@@ -355,14 +358,17 @@ public class KeyguardSliceProvider extends SliceProvider implements
synchronized (this) {
if (withinNHoursLocked(mNextAlarmInfo, ALARM_VISIBILITY_HOURS)) {
String pattern = android.text.format.DateFormat.is24HourFormat(getContext(),
- ActivityManager.getCurrentUser()) ? "HH:mm" : "h:mm";
+ ActivityManager.getCurrentUser()) ? "E HH:mm" : "E hh:mm";
mNextAlarm = android.text.format.DateFormat.format(pattern,
mNextAlarmInfo.getTriggerTime()).toString();
+ mDatePattern = getContext().getString(R.string.abbrev_wday_month_day_no_year_alarm);
} else {
mNextAlarm = "";
+ mDatePattern = getContext().getString(R.string.abbrev_wday_month_day_no_year);
}
}
notifyChange();
+ updateClockLocked();
}
private boolean withinNHoursLocked(AlarmManager.AlarmClockInfo alarmClockInfo, int hours) {
@@ -411,12 +417,10 @@ public class KeyguardSliceProvider extends SliceProvider implements
}
protected String getFormattedDateLocked() {
- if (mDateFormat == null) {
- final Locale l = Locale.getDefault();
- DateFormat format = DateFormat.getInstanceForSkeleton(mDatePattern, l);
- format.setContext(DisplayContext.CAPITALIZATION_FOR_STANDALONE);
- mDateFormat = format;
- }
+ final Locale l = Locale.getDefault();
+ DateFormat format = DateFormat.getInstanceForSkeleton(mDatePattern, l);
+ format.setContext(DisplayContext.CAPITALIZATION_FOR_STANDALONE);
+ mDateFormat = format;
mCurrentTime.setTime(System.currentTimeMillis());
return mDateFormat.format(mCurrentTime);
}
--
2.25.1
@@ -1,26 +0,0 @@
From a8a6e151d39736c5e73394839e476c5b82630d3a Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 17 Apr 2022 08:48:42 +0000
Subject: [PATCH 11/21] Replace NTP server
Change-Id: I938ab46026d841e7536d8fc02b0ef6b28ebb6ea1
---
core/res/res/values/config.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 80fa6013ee77..9410897a24a0 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -2390,7 +2390,7 @@
<bool name="config_actionMenuItemAllCaps">true</bool>
<!-- Remote server that can provide NTP responses. -->
- <string translatable="false" name="config_ntpServer">time.android.com</string>
+ <string translatable="false" name="config_ntpServer">cn.pool.ntp.org</string>
<!-- Normal polling frequency in milliseconds -->
<integer name="config_ntpPollingInterval">64800000</integer>
<!-- Try-again polling interval in milliseconds, in case the network request failed -->
--
2.25.1
@@ -0,0 +1,54 @@
From 535b165f24d4166c515d2ad61ec65874d786fef5 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 2 Nov 2019 11:11:07 +0000
Subject: [PATCH 12/18] Keyguard: Fix clock position
New method - way easier than what was done on Pie
Still not perfect:
- Notification padding has to be taken care of in some other way - directly altering stackScrollerPadding causes visual glitches
Change-Id: Ia5cebd04c2cb4b324c04019afdf045d5489cf2b8
---
.../statusbar/phone/KeyguardClockPositionAlgorithm.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithm.java
index a3f14ba28dc..d1982ae5ad2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithm.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithm.java
@@ -177,7 +177,8 @@ public class KeyguardClockPositionAlgorithm {
}
private int getMaxClockY() {
- return mHeight / 2 - mKeyguardStatusHeight - mClockNotificationsMargin;
+ // Align the center of the clock at 1/3 of the screen
+ return mHeight / 3 - mKeyguardStatusHeight / 2;
}
private int getPreferredClockY() {
@@ -214,12 +215,11 @@ public class KeyguardClockPositionAlgorithm {
}
private int getClockY(float panelExpansion) {
- // Dark: Align the bottom edge of the clock at about half of the screen:
float clockYDark = (mHasCustomClock ? getPreferredClockY() : getMaxClockY())
+ burnInPreventionOffsetY();
clockYDark = MathUtils.max(0, clockYDark);
- float clockYRegular = getExpandedPreferredClockY();
+ float clockYRegular = getMaxClockY();
float clockYBouncer = -mKeyguardStatusHeight;
// Move clock up while collapsing the shade
@@ -240,7 +240,7 @@ public class KeyguardClockPositionAlgorithm {
* @return Alpha from 0 to 1.
*/
private float getClockAlpha(int y) {
- float alphaKeyguard = Math.max(0, y / Math.max(1f, getClockY(1f)));
+ float alphaKeyguard = Math.max(0, y / Math.max(1f, getMaxClockY()));
alphaKeyguard = Interpolators.ACCELERATE.getInterpolation(alphaKeyguard);
return MathUtils.lerp(alphaKeyguard, 1f, mDarkAmount);
}
--
2.25.1
@@ -1,44 +0,0 @@
From 2406fad099bf603dd754a0e279210b606517b77d Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Tue, 31 May 2022 00:00:08 +0000
Subject: [PATCH 12/21] Revert "SystemUI: Add left padding for keyguard slices"
This reverts commit 4a7a4426944e28e70a3eca6a696ff6c7599fb896.
---
.../src/com/android/keyguard/KeyguardSliceView.java | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
index 31d22eb38a24..65a71664e245 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
@@ -49,7 +49,6 @@ import com.android.internal.graphics.ColorUtils;
import com.android.settingslib.Utils;
import com.android.systemui.R;
import com.android.systemui.animation.Interpolators;
-import com.android.systemui.keyguard.KeyguardSliceProvider;
import com.android.systemui.util.wakelock.KeepAwakeAnimationListener;
import java.io.PrintWriter;
@@ -446,15 +445,13 @@ public class KeyguardSliceView extends LinearLayout {
private void updatePadding() {
boolean hasText = !TextUtils.isEmpty(getText());
- boolean isDate = Uri.parse(KeyguardSliceProvider.KEYGUARD_DATE_URI).equals(getTag());
int padding = (int) getContext().getResources()
.getDimension(R.dimen.widget_horizontal_padding) / 2;
- int iconPadding = (int) mContext.getResources()
- .getDimension(R.dimen.widget_icon_padding);
// orientation is vertical, so add padding to top & bottom
- setPadding(!isDate ? iconPadding : 0, padding, 0, hasText ? padding : 0);
+ setPadding(0, padding, 0, hasText ? padding : 0);
- setCompoundDrawablePadding(iconPadding);
+ setCompoundDrawablePadding((int) mContext.getResources()
+ .getDimension(R.dimen.widget_icon_padding));
}
@Override
--
2.25.1
@@ -0,0 +1,31 @@
From 525d4852c431af17570f778b4294876393a6c615 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 2 Nov 2019 06:41:03 +0000
Subject: [PATCH 13/18] Keyguard: Hide padlock
It's just fking ugly.
Please Google, stop your UI designers.
Change-Id: Ie91e80ca5c6637a51a8acc72fb28cd6ac2a7abb6
---
packages/SystemUI/res/values/dimens.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index e414861b0cd..19341fdb415 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -823,8 +823,8 @@
<dimen name="keyguard_affordance_width">56dp</dimen>
<!-- The width/height of the unlock icon view on keyguard. -->
- <dimen name="keyguard_lock_height">42dp</dimen>
- <dimen name="keyguard_lock_width">42dp</dimen>
+ <dimen name="keyguard_lock_height">0dp</dimen>
+ <dimen name="keyguard_lock_width">0dp</dimen>
<dimen name="keyguard_lock_padding">20dp</dimen>
<dimen name="keyguard_indication_margin_bottom">40dp</dimen>
--
2.25.1
@@ -1,273 +0,0 @@
From fba26224a6d73d49389a8eddad477950a729ee59 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 5 Sep 2021 01:20:12 +0000
Subject: [PATCH 13/21] Revert "Update RAT icons to match Silk design"
This reverts commit 084c13c8216f6a899cd3eda04fc1d7acff3d1248.
---
.../res/drawable/ic_3g_mobiledata.xml | 19 ++++++-----
.../res/drawable/ic_4g_mobiledata.xml | 19 ++++++-----
.../res/drawable/ic_5g_mobiledata.xml | 20 +++++------
.../res/drawable/ic_5g_uc_mobiledata.xml | 33 -------------------
.../res/drawable/ic_5g_uw_mobiledata.xml | 33 -------------------
.../res/drawable/ic_carrier_wifi.xml | 15 +++++----
.../res/drawable/ic_lte_mobiledata.xml | 23 +++++++------
.../res/drawable/stat_sys_roaming_large.xml | 10 +++---
8 files changed, 59 insertions(+), 113 deletions(-)
delete mode 100644 packages/SettingsLib/res/drawable/ic_5g_uc_mobiledata.xml
delete mode 100644 packages/SettingsLib/res/drawable/ic_5g_uw_mobiledata.xml
diff --git a/packages/SettingsLib/res/drawable/ic_3g_mobiledata.xml b/packages/SettingsLib/res/drawable/ic_3g_mobiledata.xml
index 413a3873f438..0c942bdf993c 100644
--- a/packages/SettingsLib/res/drawable/ic_3g_mobiledata.xml
+++ b/packages/SettingsLib/res/drawable/ic_3g_mobiledata.xml
@@ -14,14 +14,17 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="21dp"
- android:height="16dp"
- android:viewportWidth="21.0"
- android:viewportHeight="16.0">
+ android:width="12.35dp"
+ android:height="15dp"
+ android:viewportWidth="14"
+ android:viewportHeight="17">
+
+ <path
+ android:fillColor="#FFFFFFFF"
+ android:pathData="M1.9,7.88h0.77c0.5,0,0.88-0.15,1.15-0.46s0.4-0.72,0.4-1.25c0-1.17-0.45-1.75-1.35-1.75c-0.43,0-0.77,0.16-1.02,0.47 S1.49,5.62,1.49,6.13h-1.2c0-0.8,0.24-1.46,0.73-1.97s1.11-0.78,1.86-0.78c0.78,0,1.41,0.25,1.87,0.73S5.43,5.31,5.43,6.2 c0,0.46-0.12,0.89-0.36,1.29S4.52,8.18,4.14,8.37c0.94,0.35,1.41,1.12,1.41,2.33c0,0.89-0.25,1.6-0.74,2.12 c-0.49,0.53-1.14,0.79-1.94,0.79c-0.79,0-1.43-0.25-1.91-0.75c-0.49-0.5-0.73-1.17-0.73-2.01h1.21c0,0.53,0.13,0.95,0.38,1.26 c0.26,0.31,0.6,0.47,1.05,0.47c0.45,0,0.81-0.15,1.08-0.46s0.4-0.77,0.4-1.39c0-1.21-0.57-1.81-1.72-1.81H1.9V7.88z" />
<path
- android:fillColor="#FF000000"
- android:pathData="M5.29,13.22c-0.57,0 -1.09,-0.11 -1.57,-0.34c-0.47,-0.22 -0.85,-0.54 -1.16,-0.95C2.25,11.52 2.07,11.01 2,10.42l1.47,-0.34c0.07,0.51 0.27,0.92 0.59,1.23c0.32,0.31 0.73,0.46 1.23,0.46c0.52,0 0.94,-0.15 1.26,-0.46c0.33,-0.31 0.49,-0.71 0.49,-1.22c0,-0.51 -0.18,-0.92 -0.53,-1.22c-0.35,-0.31 -0.8,-0.46 -1.36,-0.46H4.37V7.06h0.73c0.47,0 0.86,-0.13 1.18,-0.38c0.32,-0.26 0.48,-0.63 0.48,-1.11c0,-0.42 -0.14,-0.77 -0.41,-1.04C6.08,4.27 5.7,4.14 5.21,4.14c-0.43,0 -0.79,0.13 -1.08,0.38C3.85,4.76 3.67,5.08 3.6,5.48L2.17,5.3C2.23,4.81 2.4,4.38 2.67,4c0.27,-0.38 0.62,-0.69 1.05,-0.91c0.44,-0.22 0.94,-0.34 1.5,-0.34c0.62,0 1.15,0.12 1.6,0.35c0.45,0.23 0.79,0.55 1.04,0.95C8.1,4.46 8.23,4.9 8.23,5.4C8.23,6 8.1,6.48 7.84,6.81C7.58,7.14 7.29,7.4 6.97,7.6v0.08c0.46,0.2 0.84,0.5 1.13,0.91c0.3,0.4 0.45,0.93 0.45,1.58c0,0.58 -0.14,1.1 -0.42,1.55c-0.27,0.46 -0.65,0.82 -1.15,1.09C6.5,13.09 5.93,13.22 5.29,13.22z"/>
+ android:fillColor="#FFFFFFFF"
+ android:pathData="M13.77,12.24l-0.22,0.27c-0.63,0.73-1.55,1.1-2.76,1.1c-1.08,0-1.92-0.36-2.53-1.07c-0.61-0.71-0.93-1.72-0.94-3.02V7.56 c0-1.39,0.28-2.44,0.84-3.13s1.39-1.04,2.51-1.04c0.95,0,1.69,0.26,2.23,0.79s0.83,1.28,0.89,2.26h-1.25 C12.47,5.82,12.3,5.33,12,4.98s-0.74-0.52-1.34-0.52c-0.72,0-1.24,0.23-1.57,0.7S8.59,6.37,8.58,7.4v2.03c0,1,0.19,1.77,0.57,2.31 c0.38,0.54,0.93,0.8,1.65,0.8c0.67,0,1.19-0.16,1.54-0.49l0.18-0.17V9.59H10.7V8.52h3.07V12.24z" />
<path
- android:fillColor="#FF000000"
- android:pathData="M14.44,13.22c-0.88,0 -1.66,-0.21 -2.34,-0.64c-0.67,-0.44 -1.2,-1.05 -1.6,-1.83c-0.38,-0.79 -0.57,-1.71 -0.57,-2.76c0,-1.05 0.21,-1.96 0.62,-2.74c0.41,-0.79 0.97,-1.4 1.67,-1.83c0.7,-0.44 1.5,-0.66 2.39,-0.66c1.09,0 2.01,0.25 2.74,0.76c0.75,0.5 1.22,1.21 1.41,2.11L17.3,6.01c-0.17,-0.56 -0.48,-1 -0.94,-1.32c-0.45,-0.33 -1.03,-0.49 -1.75,-0.49c-0.57,0 -1.09,0.14 -1.57,0.43c-0.48,0.29 -0.85,0.71 -1.13,1.27s-0.42,1.25 -0.42,2.07c0,0.81 0.14,1.5 0.41,2.07c0.28,0.56 0.65,0.98 1.11,1.27c0.47,0.29 0.98,0.43 1.54,0.43c0.57,0 1.06,-0.11 1.47,-0.34c0.42,-0.23 0.75,-0.55 0.99,-0.94c0.25,-0.4 0.41,-0.85 0.46,-1.36h-2.88V7.79h4.37c0,0.87 0,1.74 0,2.6c0,0.87 0,1.74 0,2.6h-1.41v-1.4h-0.08c-0.28,0.49 -0.67,0.88 -1.18,1.18C15.78,13.07 15.17,13.22 14.44,13.22z"/>
+ android:pathData="M 0 0 H 14 V 17 H 0 V 0 Z" />
</vector>
diff --git a/packages/SettingsLib/res/drawable/ic_4g_mobiledata.xml b/packages/SettingsLib/res/drawable/ic_4g_mobiledata.xml
index 1de7d78ff5f2..535f3589ea6b 100644
--- a/packages/SettingsLib/res/drawable/ic_4g_mobiledata.xml
+++ b/packages/SettingsLib/res/drawable/ic_4g_mobiledata.xml
@@ -14,14 +14,17 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="22dp"
- android:height="16dp"
- android:viewportWidth="22.0"
- android:viewportHeight="16.0">
+ android:width="12.35dp"
+ android:height="15dp"
+ android:viewportWidth="14"
+ android:viewportHeight="17">
+
+ <path
+ android:fillColor="#FFFFFFFF"
+ android:pathData="M5.07,10.13h1.11v1.03H5.07v2.31H3.86v-2.31H0.1v-0.75l3.7-6.9h1.27V10.13z M1.44,10.13h2.42V5.4L1.44,10.13z" />
<path
- android:fillColor="#FF000000"
- android:pathData="M2,10.98V9.81l4.28,-6.83h1.6v6.59h1.19v1.41H7.88V13H6.4v-2.02H2zM3.68,9.57H6.4V5.33H6.31L3.68,9.57z"/>
+ android:fillColor="#FFFFFFFF"
+ android:pathData="M13.9,12.24l-0.22,0.27c-0.63,0.73-1.55,1.1-2.76,1.1c-1.08,0-1.92-0.36-2.53-1.07c-0.61-0.71-0.93-1.72-0.94-3.02V7.56 c0-1.39,0.28-2.44,0.84-3.13s1.39-1.04,2.51-1.04c0.95,0,1.69,0.26,2.23,0.79s0.83,1.28,0.89,2.26h-1.25 c-0.05-0.62-0.22-1.1-0.52-1.45s-0.74-0.52-1.34-0.52c-0.72,0-1.24,0.23-1.57,0.7S8.72,6.37,8.71,7.4v2.03 c0,1,0.19,1.77,0.57,2.31c0.38,0.54,0.93,0.8,1.65,0.8c0.67,0,1.19-0.16,1.54-0.49l0.18-0.17V9.59h-1.82V8.52h3.07V12.24z" />
<path
- android:fillColor="#FF000000"
- android:pathData="M15,13.22c-0.88,0 -1.66,-0.21 -2.34,-0.64c-0.67,-0.44 -1.2,-1.05 -1.6,-1.83c-0.38,-0.79 -0.57,-1.71 -0.57,-2.76c0,-1.05 0.21,-1.96 0.62,-2.74c0.41,-0.79 0.97,-1.4 1.67,-1.83c0.7,-0.44 1.5,-0.66 2.39,-0.66c1.09,0 2.01,0.25 2.74,0.76c0.75,0.5 1.22,1.21 1.41,2.11l-1.47,0.39c-0.17,-0.56 -0.48,-1 -0.94,-1.32c-0.45,-0.33 -1.03,-0.49 -1.75,-0.49c-0.57,0 -1.09,0.14 -1.57,0.43c-0.48,0.29 -0.85,0.71 -1.13,1.27c-0.28,0.56 -0.42,1.25 -0.42,2.07c0,0.81 0.14,1.5 0.41,2.07c0.28,0.56 0.65,0.98 1.11,1.27c0.47,0.29 0.98,0.43 1.54,0.43c0.57,0 1.06,-0.11 1.47,-0.34c0.42,-0.23 0.75,-0.55 0.99,-0.94c0.25,-0.4 0.41,-0.85 0.46,-1.36h-2.88V7.79h4.37c0,0.87 0,1.74 0,2.6c0,0.87 0,1.74 0,2.6h-1.41v-1.4h-0.08c-0.28,0.49 -0.67,0.88 -1.18,1.18C16.34,13.07 15.73,13.22 15,13.22z"/>
+ android:pathData="M 0 0 H 14 V 17 H 0 V 0 Z" />
</vector>
diff --git a/packages/SettingsLib/res/drawable/ic_5g_mobiledata.xml b/packages/SettingsLib/res/drawable/ic_5g_mobiledata.xml
index d961c6c2266f..2aa6e57f6f82 100644
--- a/packages/SettingsLib/res/drawable/ic_5g_mobiledata.xml
+++ b/packages/SettingsLib/res/drawable/ic_5g_mobiledata.xml
@@ -14,14 +14,14 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="21dp"
- android:height="16dp"
- android:viewportWidth="21.0"
- android:viewportHeight="16.0">
- <path
- android:fillColor="#FF000000"
- android:pathData="M5.3,13.22c-0.57,0 -1.1,-0.11 -1.58,-0.34c-0.48,-0.22 -0.87,-0.55 -1.18,-0.98C2.24,11.47 2.06,10.93 2,10.3l1.48,-0.2c0.07,0.5 0.25,0.92 0.56,1.25c0.32,0.32 0.74,0.48 1.26,0.48c0.57,0 1.02,-0.18 1.34,-0.55c0.33,-0.37 0.49,-0.87 0.49,-1.48c0,-0.61 -0.16,-1.09 -0.49,-1.46C6.32,7.96 5.88,7.78 5.32,7.78C5,7.78 4.7,7.85 4.42,8C4.15,8.14 3.93,8.33 3.76,8.56L2.28,7.92l0.6,-4.94h5.26v1.36H4.1L3.72,7.02l0.08,0.03C4,6.87 4.25,6.73 4.55,6.62c0.3,-0.12 0.63,-0.18 1.01,-0.18c0.6,0 1.13,0.14 1.6,0.41C7.62,7.11 7.98,7.5 8.24,8c0.27,0.5 0.41,1.1 0.41,1.79c0,0.66 -0.14,1.26 -0.43,1.78c-0.28,0.51 -0.67,0.92 -1.18,1.22C6.55,13.08 5.97,13.22 5.3,13.22z"/>
- <path
- android:fillColor="#FF000000"
- android:pathData="M14.51,13.22c-0.88,0 -1.66,-0.21 -2.34,-0.64c-0.67,-0.44 -1.2,-1.05 -1.6,-1.83C10.19,9.95 10,9.03 10,7.99c0,-1.05 0.21,-1.96 0.62,-2.74c0.41,-0.79 0.97,-1.4 1.67,-1.83c0.7,-0.44 1.5,-0.66 2.39,-0.66c1.09,0 2.01,0.25 2.74,0.76c0.75,0.5 1.22,1.21 1.41,2.11l-1.47,0.39c-0.17,-0.56 -0.48,-1 -0.94,-1.32c-0.45,-0.33 -1.03,-0.49 -1.75,-0.49c-0.57,0 -1.09,0.14 -1.57,0.43c-0.48,0.29 -0.85,0.71 -1.13,1.27s-0.42,1.25 -0.42,2.07c0,0.81 0.14,1.5 0.41,2.07c0.28,0.56 0.65,0.98 1.11,1.27c0.47,0.29 0.98,0.43 1.54,0.43c0.57,0 1.06,-0.11 1.47,-0.34c0.42,-0.23 0.75,-0.55 0.99,-0.94c0.25,-0.4 0.41,-0.85 0.46,-1.36h-2.88V7.79h4.37c0,0.87 0,1.74 0,2.6c0,0.87 0,1.74 0,2.6H17.6v-1.4h-0.08c-0.28,0.49 -0.67,0.88 -1.18,1.18C15.85,13.07 15.24,13.22 14.51,13.22z"/>
+ android:width="14dp"
+ android:height="17dp"
+ android:viewportWidth="14"
+ android:viewportHeight="17">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M13.9,12.24l-0.22,0.27c-0.63,0.73 -1.55,1.1 -2.76,1.1c-1.08,0 -1.92,-0.36 -2.53,-1.07s-0.93,-1.72 -0.94,-3.02V7.56c0,-1.39 0.28,-2.44 0.84,-3.13s1.39,-1.04 2.51,-1.04c0.95,0 1.69,0.26 2.23,0.79s0.83,1.28 0.89,2.26h-1.25c-0.05,-0.62 -0.22,-1.1 -0.52,-1.45s-0.74,-0.52 -1.34,-0.52c-0.72,0 -1.24,0.23 -1.57,0.7S8.72,6.37 8.71,7.4v2.03c0,1 0.19,1.77 0.57,2.31c0.38,0.54 0.93,0.8 1.65,0.8c0.67,0 1.19,-0.16 1.54,-0.49l0.18,-0.17V9.59h-1.82V8.52h3.07V12.24z"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M1.15,8.47l0.43,-4.96h4.33v1.17H2.6L2.37,7.39C2.78,7.1 3.22,6.96 3.69,6.96c0.77,0 1.38,0.3 1.83,0.9s0.66,1.41 0.66,2.43c0,1.03 -0.24,1.84 -0.72,2.43S4.32,13.6 3.48,13.6c-0.75,0 -1.36,-0.24 -1.83,-0.73s-0.74,-1.16 -0.81,-2.02h1.13c0.07,0.57 0.23,1 0.49,1.29c0.26,0.29 0.59,0.43 1.01,0.43c0.47,0 0.84,-0.2 1.1,-0.61c0.26,-0.41 0.4,-0.96 0.4,-1.65c0,-0.65 -0.14,-1.18 -0.43,-1.59S3.88,8.09 3.4,8.09c-0.4,0 -0.72,0.1 -0.96,0.31L2.11,8.73L1.15,8.47z"/>
</vector>
diff --git a/packages/SettingsLib/res/drawable/ic_5g_uc_mobiledata.xml b/packages/SettingsLib/res/drawable/ic_5g_uc_mobiledata.xml
deleted file mode 100644
index 93fcad298c3f..000000000000
--- a/packages/SettingsLib/res/drawable/ic_5g_uc_mobiledata.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<!--
- Copyright (C) 2021 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.
--->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="27dp"
- android:height="16dp"
- android:viewportWidth="27.0"
- android:viewportHeight="16.0">
- <path
- android:fillColor="#FF000000"
- android:pathData="M5.3,13.22c-0.57,0 -1.1,-0.11 -1.58,-0.34c-0.48,-0.22 -0.87,-0.55 -1.18,-0.98C2.24,11.47 2.06,10.93 2,10.3l1.48,-0.2c0.07,0.5 0.25,0.92 0.56,1.25c0.32,0.32 0.74,0.48 1.26,0.48c0.57,0 1.02,-0.18 1.34,-0.55c0.33,-0.37 0.49,-0.87 0.49,-1.48c0,-0.61 -0.16,-1.09 -0.49,-1.46C6.32,7.96 5.88,7.78 5.32,7.78C5,7.78 4.7,7.85 4.42,8C4.15,8.14 3.93,8.33 3.76,8.56L2.28,7.92l0.6,-4.94h5.26v1.36H4.1L3.72,7.02l0.08,0.03C4,6.87 4.25,6.73 4.55,6.62c0.3,-0.12 0.63,-0.18 1.01,-0.18c0.6,0 1.13,0.14 1.6,0.41C7.62,7.11 7.98,7.5 8.24,8c0.27,0.5 0.41,1.1 0.41,1.79c0,0.66 -0.14,1.26 -0.43,1.78c-0.28,0.51 -0.67,0.92 -1.18,1.22C6.55,13.08 5.97,13.22 5.3,13.22z"/>
- <path
- android:fillColor="#FF000000"
- android:pathData="M14.51,13.22c-0.88,0 -1.66,-0.21 -2.34,-0.64c-0.67,-0.44 -1.2,-1.05 -1.6,-1.83C10.19,9.95 10,9.03 10,7.99c0,-1.05 0.21,-1.96 0.62,-2.74c0.41,-0.79 0.97,-1.4 1.67,-1.83c0.7,-0.44 1.5,-0.66 2.39,-0.66c1.09,0 2.01,0.25 2.74,0.76c0.75,0.5 1.22,1.21 1.41,2.11l-1.47,0.39c-0.17,-0.56 -0.48,-1 -0.94,-1.32c-0.45,-0.33 -1.03,-0.49 -1.75,-0.49c-0.57,0 -1.09,0.14 -1.57,0.43c-0.48,0.29 -0.85,0.71 -1.13,1.27s-0.42,1.25 -0.42,2.07c0,0.81 0.14,1.5 0.41,2.07c0.28,0.56 0.65,0.98 1.11,1.27c0.47,0.29 0.98,0.43 1.54,0.43c0.57,0 1.06,-0.11 1.47,-0.34c0.42,-0.23 0.75,-0.55 0.99,-0.94c0.25,-0.4 0.41,-0.85 0.46,-1.36h-2.88V7.79h4.37c0,0.87 0,1.74 0,2.6c0,0.87 0,1.74 0,2.6H17.6v-1.4h-0.08c-0.28,0.49 -0.67,0.88 -1.18,1.18C15.85,13.07 15.24,13.22 14.51,13.22z"/>
- <path
- android:fillColor="#FF000000"
- android:pathData="M23,7.39c-0.53,0 -0.94,-0.16 -1.25,-0.47C21.45,6.6 21.3,6.16 21.3,5.6V3h0.8v2.66c0,0.3 0.08,0.54 0.23,0.71C22.48,6.54 22.7,6.62 23,6.62c0.3,0 0.52,-0.08 0.67,-0.25c0.15,-0.17 0.23,-0.41 0.23,-0.71V3h0.8v2.6c0,0.36 -0.07,0.67 -0.2,0.94s-0.33,0.48 -0.58,0.62C23.65,7.32 23.35,7.39 23,7.39z"/>
- <path
- android:fillColor="#FF000000"
- android:pathData="M22.99,13.1c-0.39,0 -0.73,-0.09 -1.03,-0.28c-0.3,-0.19 -0.53,-0.45 -0.7,-0.79C21.08,11.7 21,11.3 21,10.85c0,-0.46 0.08,-0.85 0.25,-1.19c0.17,-0.34 0.41,-0.6 0.71,-0.78c0.3,-0.18 0.65,-0.28 1.04,-0.28c0.31,0 0.59,0.05 0.86,0.16c0.26,0.11 0.48,0.27 0.65,0.48c0.18,0.21 0.28,0.48 0.32,0.8l-0.83,0.14c-0.06,-0.26 -0.17,-0.46 -0.35,-0.6C23.49,9.44 23.27,9.37 23,9.37c-0.22,0 -0.42,0.06 -0.61,0.17c-0.18,0.11 -0.32,0.28 -0.43,0.5c-0.1,0.22 -0.16,0.49 -0.16,0.81c0,0.32 0.05,0.58 0.16,0.8s0.25,0.39 0.43,0.5c0.18,0.11 0.38,0.17 0.61,0.17c0.26,0 0.47,-0.07 0.65,-0.21c0.18,-0.14 0.3,-0.34 0.35,-0.59l0.85,0.09c-0.06,0.29 -0.17,0.54 -0.32,0.77c-0.15,0.22 -0.36,0.39 -0.61,0.52C23.66,13.03 23.35,13.1 22.99,13.1z"/>
-</vector>
diff --git a/packages/SettingsLib/res/drawable/ic_5g_uw_mobiledata.xml b/packages/SettingsLib/res/drawable/ic_5g_uw_mobiledata.xml
deleted file mode 100644
index ca47b6ff2edb..000000000000
--- a/packages/SettingsLib/res/drawable/ic_5g_uw_mobiledata.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<!--
- Copyright (C) 2021 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.
--->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="27dp"
- android:height="16dp"
- android:viewportWidth="27.0"
- android:viewportHeight="16.0">
- <path
- android:fillColor="#FF000000"
- android:pathData="M5.3,13.22c-0.57,0 -1.1,-0.11 -1.58,-0.34c-0.48,-0.22 -0.87,-0.55 -1.18,-0.98C2.24,11.47 2.06,10.93 2,10.3l1.48,-0.2c0.07,0.5 0.25,0.92 0.56,1.25c0.32,0.32 0.74,0.48 1.26,0.48c0.57,0 1.02,-0.18 1.34,-0.55c0.33,-0.37 0.49,-0.87 0.49,-1.48c0,-0.61 -0.16,-1.09 -0.49,-1.46C6.32,7.96 5.88,7.78 5.32,7.78C5,7.78 4.7,7.85 4.42,8C4.15,8.14 3.93,8.33 3.76,8.56L2.28,7.92l0.6,-4.94h5.26v1.36H4.1L3.72,7.02l0.08,0.03C4,6.87 4.25,6.73 4.55,6.62c0.3,-0.12 0.63,-0.18 1.01,-0.18c0.6,0 1.13,0.14 1.6,0.41C7.62,7.11 7.98,7.5 8.24,8c0.27,0.5 0.41,1.1 0.41,1.79c0,0.66 -0.14,1.26 -0.43,1.78c-0.28,0.51 -0.67,0.92 -1.18,1.22C6.55,13.08 5.97,13.22 5.3,13.22z"/>
- <path
- android:fillColor="#FF000000"
- android:pathData="M14.51,13.22c-0.88,0 -1.66,-0.21 -2.34,-0.64c-0.67,-0.44 -1.2,-1.05 -1.6,-1.83C10.19,9.95 10,9.03 10,7.99c0,-1.05 0.21,-1.96 0.62,-2.74c0.41,-0.79 0.97,-1.4 1.67,-1.83c0.7,-0.44 1.5,-0.66 2.39,-0.66c1.09,0 2.01,0.25 2.74,0.76c0.75,0.5 1.22,1.21 1.41,2.11l-1.47,0.39c-0.17,-0.56 -0.48,-1 -0.94,-1.32c-0.45,-0.33 -1.03,-0.49 -1.75,-0.49c-0.57,0 -1.09,0.14 -1.57,0.43c-0.48,0.29 -0.85,0.71 -1.13,1.27s-0.42,1.25 -0.42,2.07c0,0.81 0.14,1.5 0.41,2.07c0.28,0.56 0.65,0.98 1.11,1.27c0.47,0.29 0.98,0.43 1.54,0.43c0.57,0 1.06,-0.11 1.47,-0.34c0.42,-0.23 0.75,-0.55 0.99,-0.94c0.25,-0.4 0.41,-0.85 0.46,-1.36h-2.88V7.79h4.37c0,0.87 0,1.74 0,2.6c0,0.87 0,1.74 0,2.6H17.6v-1.4h-0.08c-0.28,0.49 -0.67,0.88 -1.18,1.18C15.85,13.07 15.24,13.22 14.51,13.22z"/>
- <path
- android:fillColor="#FF000000"
- android:pathData="M23,7.39c-0.53,0 -0.94,-0.16 -1.25,-0.47C21.45,6.6 21.3,6.16 21.3,5.6V3h0.8v2.66c0,0.3 0.08,0.54 0.23,0.71C22.48,6.54 22.7,6.62 23,6.62c0.3,0 0.52,-0.08 0.67,-0.25c0.15,-0.17 0.23,-0.41 0.23,-0.71V3h0.8v2.6c0,0.36 -0.07,0.67 -0.2,0.94s-0.33,0.48 -0.58,0.62C23.65,7.32 23.35,7.39 23,7.39z"/>
- <path
- android:fillColor="#FF000000"
- android:pathData="M21.41,13L20.3,8.7h0.73l0.64,2.78l0.07,0.38h0.04l0.09,-0.38l0.81,-2.78h0.66l0.79,2.78l0.09,0.37h0.04l0.07,-0.37l0.65,-2.78h0.72L24.59,13H23.9l-0.78,-2.84l-0.1,-0.41h-0.04l-0.1,0.41L22.08,13H21.41z"/>
-</vector>
diff --git a/packages/SettingsLib/res/drawable/ic_carrier_wifi.xml b/packages/SettingsLib/res/drawable/ic_carrier_wifi.xml
index 22bcf7b8c8a3..ed9d85e3cbe4 100644
--- a/packages/SettingsLib/res/drawable/ic_carrier_wifi.xml
+++ b/packages/SettingsLib/res/drawable/ic_carrier_wifi.xml
@@ -14,14 +14,17 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24dp"
- android:height="16dp"
- android:viewportWidth="24.0"
- android:viewportHeight="16.0">
+ android:width="38dp"
+ android:height="24dp"
+ android:viewportWidth="38.0"
+ android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
- android:pathData="M4.59,13L2,2.98h1.69l1.5,6.48l0.17,0.88h0.08l0.21,-0.88l1.89,-6.48h1.54l1.83,6.48l0.21,0.87h0.08l0.15,-0.87l1.51,-6.48h1.68L12.01,13H10.4L8.58,6.36L8.36,5.4H8.27L8.05,6.36L6.16,13H4.59z"/>
+ android:pathData="M9.45,14.48h1.8c-0.05,0.98 -0.24,1.82 -0.6,2.53c-0.35,0.7 -0.85,1.24 -1.51,1.62c-0.66,0.38 -1.48,0.57 -2.47,0.57c-0.71,0 -1.35,-0.14 -1.92,-0.42c-0.57,-0.28 -1.06,-0.68 -1.47,-1.2c-0.4,-0.53 -0.71,-1.16 -0.93,-1.89c-0.21,-0.74 -0.32,-1.56 -0.32,-2.48v-2.63c0,-0.91 0.11,-1.74 0.32,-2.47c0.22,-0.74 0.54,-1.36 0.95,-1.88C3.71,5.69 4.21,5.29 4.8,5.01c0.6,-0.28 1.28,-0.42 2.03,-0.42c0.92,0 1.71,0.19 2.34,0.56c0.64,0.36 1.14,0.9 1.48,1.61c0.35,0.7 0.55,1.57 0.59,2.59h-1.8C9.41,8.59 9.29,7.98 9.1,7.52C8.91,7.04 8.63,6.69 8.26,6.47C7.9,6.24 7.42,6.13 6.84,6.13c-0.52,0 -0.97,0.1 -1.36,0.31C5.1,6.65 4.79,6.95 4.54,7.34C4.3,7.72 4.12,8.19 3.99,8.74c-0.12,0.54 -0.18,1.15 -0.18,1.82v2.65c0,0.62 0.05,1.21 0.15,1.75c0.1,0.54 0.27,1.02 0.49,1.43c0.23,0.4 0.52,0.72 0.89,0.95c0.36,0.23 0.81,0.34 1.33,0.34c0.66,0 1.18,-0.11 1.56,-0.32c0.38,-0.21 0.67,-0.56 0.85,-1.03C9.27,15.85 9.39,15.23 9.45,14.48z"/>
<path
android:fillColor="#FF000000"
- android:pathData="M15.77,9.85V8.56h2.46V6.1h1.3v2.46H22v1.29h-2.46v2.46h-1.3V9.85H15.77z"/>
+ android:pathData="M24.87,4.78l-1.74,9.72l-0.2,1.64l-0.29,-1.44l-2.21,-9.92l-0.2,0l-1.06,0l-0.22,0l-2.28,9.92l-0.28,1.4l-0.18,-1.59l-1.78,-9.73l-1.79,0l2.83,14.22l0.34,0l0.92,0l0.35,0l2.48,-10.36l0.14,-0.84l0.15,0.84l2.36,10.36l0.36,0l0.92,0l0.34,0l2.82,-14.22z"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M35.72,6.32l0,-1.54l-5.61,0l-0.34,0l-1.45,0l0,14.22l1.79,0l0,-6.28l4.8,0l0,-1.54l-4.8,0l0,-4.86z"/>
</vector>
diff --git a/packages/SettingsLib/res/drawable/ic_lte_mobiledata.xml b/packages/SettingsLib/res/drawable/ic_lte_mobiledata.xml
index 739e29d886c2..e6b4fb698242 100644
--- a/packages/SettingsLib/res/drawable/ic_lte_mobiledata.xml
+++ b/packages/SettingsLib/res/drawable/ic_lte_mobiledata.xml
@@ -14,17 +14,20 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="26dp"
- android:height="16dp"
- android:viewportWidth="26.0"
- android:viewportHeight="16.0">
+ android:width="15.88dp"
+ android:height="15dp"
+ android:viewportWidth="18"
+ android:viewportHeight="17">
+
+ <path
+ android:fillColor="#FFFFFFFF"
+ android:pathData="M1.34,12.4h3.9v1.07H0.08V3.52h1.26V12.4z" />
<path
- android:fillColor="#FF000000"
- android:pathData="M2,13V2.98h1.53v8.57H8.3V13H2z"/>
+ android:fillColor="#FFFFFFFF"
+ android:pathData="M11.1,4.6H8.48v8.88H7.23V4.6H4.62V3.52h6.48V4.6z" />
<path
- android:fillColor="#FF000000"
- android:pathData="M11.24,13V4.43H8.19V2.98h7.63v1.46h-3.05V13H11.24z"/>
+ android:fillColor="#FFFFFFFF"
+ android:pathData="M17.34,8.88h-3.52v3.53h4.1v1.07h-5.35V3.52h5.28V4.6h-4.03V7.8h3.52V8.88z" />
<path
- android:fillColor="#FF000000"
- android:pathData="M17.41,13V2.98h6.36v1.46h-4.83v2.65h4.4v1.46h-4.4v3.01h4.83V13H17.41z"/>
+ android:pathData="M 0 0 H 18 V 17 H 0 V 0 Z" />
</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_roaming_large.xml b/packages/SystemUI/res/drawable/stat_sys_roaming_large.xml
index 48faeb22416f..1511659ea42f 100644
--- a/packages/SystemUI/res/drawable/stat_sys_roaming_large.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_roaming_large.xml
@@ -14,11 +14,11 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="16dp"
- android:height="16dp"
- android:viewportWidth="16.0"
- android:viewportHeight="16.0">
+ android:width="@dimen/signal_icon_size"
+ android:height="@dimen/signal_icon_size"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
- android:pathData="M4.5,13.02V3h3.93c0.97,0 1.75,0.27 2.34,0.81c0.6,0.53 0.9,1.28 0.9,2.25c0,0.63 -0.19,1.2 -0.56,1.74c-0.37,0.53 -0.95,0.91 -1.74,1.12l2.45,4.02v0.08h-1.69L7.75,9.09H6.03v3.93H4.5zM8.46,4.44H6.03v3.23h2.44c0.49,0 0.9,-0.14 1.2,-0.41c0.31,-0.28 0.46,-0.69 0.46,-1.22s-0.15,-0.93 -0.45,-1.2C9.38,4.58 8.98,4.44 8.46,4.44z"/>
+ android:pathData="M14.21,12.81c0.36,-0.16 0.69,-0.36 0.97,-0.61c0.41,-0.38 0.72,-0.83 0.94,-1.37c0.21,-0.54 0.32,-1.14 0.32,-1.79c0,-0.92 -0.16,-1.7 -0.49,-2.33c-0.32,-0.64 -0.79,-1.12 -1.43,-1.45c-0.62,-0.33 -1.4,-0.49 -2.32,-0.49H8.23V19h1.8v-5.76h2.5L15.06,19h1.92v-0.12L14.21,12.81zM10.03,11.71V6.32h2.18c0.59,0 1.06,0.11 1.42,0.34c0.36,0.22 0.62,0.54 0.78,0.95c0.16,0.41 0.24,0.89 0.24,1.44c0,0.49 -0.09,0.93 -0.27,1.34c-0.18,0.4 -0.46,0.73 -0.82,0.97c-0.36,0.23 -0.82,0.35 -1.37,0.35H10.03z"/>
</vector>
--
2.25.1
@@ -0,0 +1,89 @@
From 62e1f218db18a9bcacba85c479a2c40625e958f6 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 2 Nov 2019 08:31:36 +0000
Subject: [PATCH 14/18] Keyguard: Refine indication text
- Always show "Swipe up to unlock" hint
- Put the text in-line with bottom shortcuts
- Don't show charging state alongside other hints
Change-Id: Ib771c35610f712a1de34736e817bcfe616ac37d8
---
packages/SystemUI/res/values-sw600dp-land/dimens.xml | 2 +-
packages/SystemUI/res/values-sw600dp/dimens.xml | 2 +-
packages/SystemUI/res/values/dimens.xml | 2 +-
.../statusbar/KeyguardIndicationController.java | 12 ++----------
4 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/packages/SystemUI/res/values-sw600dp-land/dimens.xml b/packages/SystemUI/res/values-sw600dp-land/dimens.xml
index f2df4b9023b..7719a0ae0ba 100644
--- a/packages/SystemUI/res/values-sw600dp-land/dimens.xml
+++ b/packages/SystemUI/res/values-sw600dp-land/dimens.xml
@@ -18,7 +18,7 @@
<resources>
<dimen name="keyguard_clock_notifications_margin">36dp</dimen>
- <dimen name="keyguard_indication_margin_bottom">80dp</dimen>
+ <dimen name="keyguard_indication_margin_bottom">40dp</dimen>
<!-- Screen pinning request width (just a little bit bigger than the three buttons here -->
<dimen name="screen_pinning_request_width">490dp</dimen>
diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml
index aa574c7d9f6..d06906bab08 100644
--- a/packages/SystemUI/res/values-sw600dp/dimens.xml
+++ b/packages/SystemUI/res/values-sw600dp/dimens.xml
@@ -71,7 +71,7 @@
phone hints. -->
<dimen name="edge_tap_area_width">80dp</dimen>
- <dimen name="keyguard_indication_margin_bottom">90dp</dimen>
+ <dimen name="keyguard_indication_margin_bottom">40dp</dimen>
<!-- Margin on the right side of the system icon group on Keyguard. -->
<dimen name="system_icons_keyguard_padding_end">2dp</dimen>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 19341fdb415..7190def8786 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -827,7 +827,7 @@
<dimen name="keyguard_lock_width">0dp</dimen>
<dimen name="keyguard_lock_padding">20dp</dimen>
- <dimen name="keyguard_indication_margin_bottom">40dp</dimen>
+ <dimen name="keyguard_indication_margin_bottom">20dp</dimen>
<!-- The text size for battery level -->
<dimen name="battery_level_text_size">12sp</dimen>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
index dd6a0f053f9..1c67f914105 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
@@ -447,15 +447,7 @@ public class KeyguardIndicationController implements StateListener,
isError = mTransientTextIsError;
} else if (!TextUtils.isEmpty(trustGrantedIndication)
&& mKeyguardUpdateMonitor.getUserHasTrust(userId)) {
- if (powerIndication != null) {
- String indication = mContext.getResources().getString(
- R.string.keyguard_indication_trust_unlocked_plugged_in,
- trustGrantedIndication, powerIndication);
- mTextView.switchIndication(indication);
- hideIndication = !mBatteryPresent;
- } else {
- mTextView.switchIndication(trustGrantedIndication);
- }
+ mTextView.switchIndication(trustGrantedIndication);
} else if (!TextUtils.isEmpty(mAlignmentIndication)) {
mTextView.switchIndication(mAlignmentIndication);
isError = true;
@@ -475,7 +467,7 @@ public class KeyguardIndicationController implements StateListener,
&& !mKeyguardUpdateMonitor.getUserHasTrust(userId)) {
mTextView.switchIndication(trustManagedIndication);
} else {
- mTextView.switchIndication(mRestingIndication);
+ mTextView.switchIndication(R.string.keyguard_unlock);
}
mTextView.setTextColor(isError ? Utils.getColorError(mContext)
: mInitialTextColorState);
--
2.25.1
@@ -1,29 +0,0 @@
From 2760ca8d2b0c8920b60d7d4f9ee8f2ae2cabd8b6 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 29 Sep 2022 11:27:57 +0000
Subject: [PATCH 14/21] Revert "Use the default top clock margin on h800
devices"
This reverts commits 50ba380f4d8d1c2523e0f76295ca556038796bfd
and 2a254b4d479029aec46f79a0ed14ffab6d0424bc.
---
packages/SystemUI/res/values-h800dp/dimens.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/packages/SystemUI/res/values-h800dp/dimens.xml b/packages/SystemUI/res/values-h800dp/dimens.xml
index 94fe20955ce6..1d6f279afc66 100644
--- a/packages/SystemUI/res/values-h800dp/dimens.xml
+++ b/packages/SystemUI/res/values-h800dp/dimens.xml
@@ -15,6 +15,9 @@
-->
<resources>
+ <!-- Minimum margin between clock and top of screen or ambient indication -->
+ <dimen name="keyguard_clock_top_margin">38dp</dimen>
+
<!-- Large clock maximum font size (dp is intentional, to prevent any further scaling) -->
<dimen name="large_clock_text_size">200dp</dimen>
--
2.25.1
@@ -0,0 +1,133 @@
From 00720384d76b0a650014db49705df71e055b18ec Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 20 Mar 2021 10:35:14 +0000
Subject: [PATCH 15/18] Keyguard/UI: Fix status bar margins and paddings
- Change keyguard_carrier_text_margin into a padding
- Link keyguard paddings to status_bar_padding_{start|end}
- Add status_bar_padding_{start|end} to quick settings header
Change-Id: Ic91fa398813e1907297bb0892c444d96405950e7
---
packages/SystemUI/res/layout/keyguard_status_bar.xml | 2 +-
.../layout/quick_status_bar_header_system_icons.xml | 6 ++++--
packages/SystemUI/res/values-sw600dp/dimens.xml | 6 ------
packages/SystemUI/res/values/dimens.xml | 4 ++--
.../statusbar/phone/KeyguardStatusBarView.java | 11 -----------
5 files changed, 7 insertions(+), 22 deletions(-)
diff --git a/packages/SystemUI/res/layout/keyguard_status_bar.xml b/packages/SystemUI/res/layout/keyguard_status_bar.xml
index 58343800c2e..3782df2539e 100644
--- a/packages/SystemUI/res/layout/keyguard_status_bar.xml
+++ b/packages/SystemUI/res/layout/keyguard_status_bar.xml
@@ -68,7 +68,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="@dimen/status_bar_padding_top"
- android:layout_marginStart="@dimen/keyguard_carrier_text_margin"
+ android:paddingStart="@dimen/keyguard_carrier_text_margin"
android:layout_toStartOf="@id/system_icons_container"
android:gravity="center_vertical"
android:ellipsize="marquee"
diff --git a/packages/SystemUI/res/layout/quick_status_bar_header_system_icons.xml b/packages/SystemUI/res/layout/quick_status_bar_header_system_icons.xml
index 3c748018187..74bcbf2685e 100644
--- a/packages/SystemUI/res/layout/quick_status_bar_header_system_icons.xml
+++ b/packages/SystemUI/res/layout/quick_status_bar_header_system_icons.xml
@@ -32,7 +32,8 @@
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="horizontal"
- android:gravity="center_vertical|start" >
+ android:gravity="center_vertical|start"
+ android:paddingStart="@dimen/status_bar_padding_start" >
<com.android.systemui.statusbar.policy.Clock
android:id="@+id/clock"
@@ -59,7 +60,8 @@
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="horizontal"
- android:gravity="center_vertical|end" >
+ android:gravity="center_vertical|end"
+ android:paddingEnd="@dimen/status_bar_padding_end" >
<include layout="@layout/ongoing_privacy_chip" />
diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml
index d06906bab08..75fd4abba84 100644
--- a/packages/SystemUI/res/values-sw600dp/dimens.xml
+++ b/packages/SystemUI/res/values-sw600dp/dimens.xml
@@ -60,9 +60,6 @@
<!-- end margin for multi user switch in collapsed quick settings -->
<dimen name="multi_user_switch_keyguard_margin">6dp</dimen>
- <!-- Margin on the left side of the carrier text on Keyguard -->
- <dimen name="keyguard_carrier_text_margin">24dp</dimen>
-
<!-- The width/height of the phone/camera/unlock icon on keyguard. -->
<dimen name="keyguard_affordance_height">80dp</dimen>
<dimen name="keyguard_affordance_width">120dp</dimen>
@@ -73,9 +70,6 @@
<dimen name="keyguard_indication_margin_bottom">40dp</dimen>
- <!-- Margin on the right side of the system icon group on Keyguard. -->
- <dimen name="system_icons_keyguard_padding_end">2dp</dimen>
-
<!-- Screen pinning request width -->
<dimen name="screen_pinning_request_width">400dp</dimen>
<!-- Screen pinning request bottom button circle widths -->
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 7190def8786..9172bfa823e 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -784,7 +784,7 @@
<dimen name="kg_framed_avatar_size">54dp</dimen>
<!-- Margin on the left side of the carrier text on Keyguard -->
- <dimen name="keyguard_carrier_text_margin">16dp</dimen>
+ <dimen name="keyguard_carrier_text_margin">@dimen/status_bar_padding_start</dimen>
<!-- Margin on the left side of the battery % in the header. -->
<dimen name="header_battery_margin_expanded">6dp</dimen>
@@ -793,7 +793,7 @@
<dimen name="header_battery_margin_keyguard">6dp</dimen>
<!-- Margin on the right side of the system icon group on Keyguard. -->
- <dimen name="system_icons_keyguard_padding_end">4dp</dimen>
+ <dimen name="system_icons_keyguard_padding_end">@dimen/status_bar_padding_end</dimen>
<!-- Additional translation (downwards) for appearing notifications when going to the full shade
from Keyguard. -->
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
index 9baac56410a..c75cab3d469 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
@@ -238,7 +238,6 @@ public class KeyguardStatusBarView extends RelativeLayout
Pair<Integer, Integer> cornerCutoutMargins =
StatusBarWindowView.cornerCutoutMargins(mDisplayCutout, getDisplay());
updatePadding(cornerCutoutMargins);
- updateCarrierLabelParams();
if (mDisplayCutout == null || cornerCutoutMargins != null) {
return updateLayoutParamsNoCutout();
} else {
@@ -255,16 +254,6 @@ public class KeyguardStatusBarView extends RelativeLayout
setPadding(mPadding.first, waterfallTop, mPadding.second, 0);
}
- private void updateCarrierLabelParams() {
- int marginStart = calculateMargin(
- getResources().getDimensionPixelSize(R.dimen.keyguard_carrier_text_margin),
- mPadding.first);
- MarginLayoutParams lp = (MarginLayoutParams) mCarrierLabel.getLayoutParams();
- lp.setMarginStart(marginStart);
-
- mCarrierLabel.setLayoutParams(lp);
- }
-
private boolean updateLayoutParamsNoCutout() {
if (mLayoutState == LAYOUT_NO_CUTOUT) {
return false;
--
2.25.1
@@ -1,68 +0,0 @@
From 8fd984bf1c1a79ed4f7d97ace689f0b6718968bb Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 7 Oct 2020 14:00:35 +0000
Subject: [PATCH 15/21] UI: Always render windows into cutouts
Eliminates black/white letterboxing
Quick and dirty way to do the latter - wait for proper fix from Google
Change-Id: I4661c7979bfa7de453329fcddbaeefc2009e2da3
---
.../com/android/server/wm/DisplayFrames.java | 28 +++----------------
.../com/android/server/wm/DisplayPolicy.java | 1 +
2 files changed, 5 insertions(+), 24 deletions(-)
diff --git a/services/core/java/com/android/server/wm/DisplayFrames.java b/services/core/java/com/android/server/wm/DisplayFrames.java
index 33641f72b2ff..6e201970ac03 100644
--- a/services/core/java/com/android/server/wm/DisplayFrames.java
+++ b/services/core/java/com/android/server/wm/DisplayFrames.java
@@ -92,30 +92,10 @@ public class DisplayFrames {
state.setRoundedCorners(roundedCorners);
state.setPrivacyIndicatorBounds(indicatorBounds);
state.getDisplayCutoutSafe(safe);
- if (safe.left > unrestricted.left) {
- state.getSource(ITYPE_LEFT_DISPLAY_CUTOUT).setFrame(
- unrestricted.left, unrestricted.top, safe.left, unrestricted.bottom);
- } else {
- state.removeSource(ITYPE_LEFT_DISPLAY_CUTOUT);
- }
- if (safe.top > unrestricted.top) {
- state.getSource(ITYPE_TOP_DISPLAY_CUTOUT).setFrame(
- unrestricted.left, unrestricted.top, unrestricted.right, safe.top);
- } else {
- state.removeSource(ITYPE_TOP_DISPLAY_CUTOUT);
- }
- if (safe.right < unrestricted.right) {
- state.getSource(ITYPE_RIGHT_DISPLAY_CUTOUT).setFrame(
- safe.right, unrestricted.top, unrestricted.right, unrestricted.bottom);
- } else {
- state.removeSource(ITYPE_RIGHT_DISPLAY_CUTOUT);
- }
- if (safe.bottom < unrestricted.bottom) {
- state.getSource(ITYPE_BOTTOM_DISPLAY_CUTOUT).setFrame(
- unrestricted.left, safe.bottom, unrestricted.right, unrestricted.bottom);
- } else {
- state.removeSource(ITYPE_BOTTOM_DISPLAY_CUTOUT);
- }
+ state.removeSource(ITYPE_LEFT_DISPLAY_CUTOUT);
+ state.removeSource(ITYPE_TOP_DISPLAY_CUTOUT);
+ state.removeSource(ITYPE_RIGHT_DISPLAY_CUTOUT);
+ state.removeSource(ITYPE_BOTTOM_DISPLAY_CUTOUT);
return true;
}
diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java
index f4cb23d5f369..a4cd2fbcc89f 100644
--- a/services/core/java/com/android/server/wm/DisplayPolicy.java
+++ b/services/core/java/com/android/server/wm/DisplayPolicy.java
@@ -1639,6 +1639,7 @@ public class DisplayPolicy {
displayFrames = win.getDisplayFrames(displayFrames);
final WindowManager.LayoutParams attrs = win.mAttrs.forRotation(displayFrames.mRotation);
+ attrs.layoutInDisplayCutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
sTmpClientFrames.attachedFrame = attached != null ? attached.getFrame() : null;
// If this window has different LayoutParams for rotations, we cannot trust its requested
--
2.25.1
@@ -0,0 +1,53 @@
From 0d94e66575aa5c5eda8a4a93b8747fd335db5dce Mon Sep 17 00:00:00 2001
From: AndyCGYan <GeForce8800Ultra@gmail.com>
Date: Fri, 22 Mar 2019 00:41:20 +0800
Subject: [PATCH 16/18] Disable FP lockouts
Both timed and permanent lockouts - GET THE FUCK OUT
Android 10 seems to have unified biometrics procedures - only disable lockouts for FP for now
Change-Id: I2d4b091f3546d4d7903bfb4d5585629212dc9915
---
.../fingerprint/FingerprintService.java | 19 +------------------
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/services/core/java/com/android/server/biometrics/fingerprint/FingerprintService.java b/services/core/java/com/android/server/biometrics/fingerprint/FingerprintService.java
index def1a873590..e8362580510 100644
--- a/services/core/java/com/android/server/biometrics/fingerprint/FingerprintService.java
+++ b/services/core/java/com/android/server/biometrics/fingerprint/FingerprintService.java
@@ -173,15 +173,7 @@ public class FingerprintService extends BiometricServiceBase {
@Override
public int handleFailedAttempt() {
- final int currentUser = ActivityManager.getCurrentUser();
- mFailedAttempts.put(currentUser, mFailedAttempts.get(currentUser, 0) + 1);
- mTimedLockoutCleared.put(ActivityManager.getCurrentUser(), false);
-
- if (getLockoutMode() != AuthenticationClient.LOCKOUT_NONE) {
- scheduleLockoutResetForUser(currentUser);
- }
-
- return super.handleFailedAttempt();
+ return AuthenticationClient.LOCKOUT_NONE;
}
boolean isDetectOnly() {
@@ -983,15 +975,6 @@ public class FingerprintService extends BiometricServiceBase {
@Override
protected int getLockoutMode() {
- final int currentUser = ActivityManager.getCurrentUser();
- final int failedAttempts = mFailedAttempts.get(currentUser, 0);
- if (failedAttempts >= MAX_FAILED_ATTEMPTS_LOCKOUT_PERMANENT) {
- return AuthenticationClient.LOCKOUT_PERMANENT;
- } else if (failedAttempts > 0
- && !mTimedLockoutCleared.get(currentUser, false)
- && (failedAttempts % MAX_FAILED_ATTEMPTS_LOCKOUT_TIMED == 0)) {
- return AuthenticationClient.LOCKOUT_TIMED;
- }
return AuthenticationClient.LOCKOUT_NONE;
}
--
2.25.1
@@ -1,28 +0,0 @@
From 06472eb420c14153266aca7dc2487f33c32f2f44 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 1 Sep 2021 14:10:50 +0000
Subject: [PATCH 16/21] UI: Kill rounded corners in notification scrim
Rounded corners in S is nicely implemented, but this is one occasion where it looks out of place
Change-Id: I09ed59e0e658ebd512a9d02a8ef3edfe2c9888da
---
packages/SystemUI/res/values/dimens.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 569926a1e1a0..09dd8ed9ef9d 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -672,7 +672,7 @@
<!-- With the large clock, move up slightly from the center -->
<dimen name="keyguard_large_clock_top_margin">-60dp</dimen>
- <dimen name="notification_scrim_corner_radius">32dp</dimen>
+ <dimen name="notification_scrim_corner_radius">0dp</dimen>
<!-- The minimum amount the user needs to swipe to go to the camera / phone. -->
<dimen name="keyguard_min_swipe_amount">110dp</dimen>
--
2.25.1
@@ -1,13 +1,13 @@
From cfdeeceda335538663684b6a3d7bc7c2ad25eaf9 Mon Sep 17 00:00:00 2001 From 8670dcd137ae5b202cb97e83e60f8ba672395a82 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com> From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 20 Jun 2021 03:39:32 +0000 Date: Sun, 20 Jun 2021 03:39:32 +0000
Subject: [PATCH 01/21] Add MiuiNavbarOverlay Subject: [PATCH 17/18] Add MiuiNavbarOverlay
Change-Id: I0e6791abc3c9521d7dc612df2fec2b041affe7e9 Change-Id: I0e6791abc3c9521d7dc612df2fec2b041affe7e9
--- ---
packages/overlays/Android.mk | 1 + packages/overlays/Android.mk | 1 +
.../overlays/MiuiNavbarOverlay/Android.bp | 28 ++++++++++++++++++ .../overlays/MiuiNavbarOverlay/Android.mk | 27 ++++++++++++++++++
.../MiuiNavbarOverlay/AndroidManifest.xml | 22 ++++++++++++++ .../MiuiNavbarOverlay/AndroidManifest.xml | 21 ++++++++++++++
.../res/drawable-440dpi-v4/ic_sysbar_back.png | Bin 0 -> 2756 bytes .../res/drawable-440dpi-v4/ic_sysbar_back.png | Bin 0 -> 2756 bytes
.../ic_sysbar_back_darkmode.png | Bin 0 -> 2547 bytes .../ic_sysbar_back_darkmode.png | Bin 0 -> 2547 bytes
.../drawable-440dpi-v4/ic_sysbar_docked.png | Bin 0 -> 3642 bytes .../drawable-440dpi-v4/ic_sysbar_docked.png | Bin 0 -> 3642 bytes
@@ -16,8 +16,8 @@ Change-Id: I0e6791abc3c9521d7dc612df2fec2b041affe7e9
.../ic_sysbar_home_darkmode.png | Bin 0 -> 980 bytes .../ic_sysbar_home_darkmode.png | Bin 0 -> 980 bytes
.../drawable-440dpi-v4/ic_sysbar_recent.png | Bin 0 -> 278 bytes .../drawable-440dpi-v4/ic_sysbar_recent.png | Bin 0 -> 278 bytes
.../ic_sysbar_recent_darkmode.png | Bin 0 -> 205 bytes .../ic_sysbar_recent_darkmode.png | Bin 0 -> 205 bytes
11 files changed, 51 insertions(+) 11 files changed, 49 insertions(+)
create mode 100644 packages/overlays/MiuiNavbarOverlay/Android.bp create mode 100644 packages/overlays/MiuiNavbarOverlay/Android.mk
create mode 100644 packages/overlays/MiuiNavbarOverlay/AndroidManifest.xml create mode 100644 packages/overlays/MiuiNavbarOverlay/AndroidManifest.xml
create mode 100644 packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_back.png create mode 100644 packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_back.png
create mode 100644 packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_back_darkmode.png create mode 100644 packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_back_darkmode.png
@@ -29,59 +29,58 @@ Change-Id: I0e6791abc3c9521d7dc612df2fec2b041affe7e9
create mode 100644 packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_recent_darkmode.png create mode 100644 packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_recent_darkmode.png
diff --git a/packages/overlays/Android.mk b/packages/overlays/Android.mk diff --git a/packages/overlays/Android.mk b/packages/overlays/Android.mk
index 69641e69a9f2..1efc296d9689 100644 index 999ab080246..de3afebac43 100644
--- a/packages/overlays/Android.mk --- a/packages/overlays/Android.mk
+++ b/packages/overlays/Android.mk +++ b/packages/overlays/Android.mk
@@ -26,6 +26,7 @@ LOCAL_REQUIRED_MODULES := \ @@ -72,6 +72,7 @@ LOCAL_REQUIRED_MODULES := \
DisplayCutoutEmulationTallOverlay \ IconShapeTaperedRectOverlay \
DisplayCutoutEmulationWaterfallOverlay \ IconShapeTeardropOverlay \
FontNotoSerifSourceOverlay \ IconShapeVesselOverlay \
+ MiuiNavbarOverlay \ + MiuiNavbarOverlay \
NavigationBarMode3ButtonOverlay \ NavigationBarMode3ButtonOverlay \
NavigationBarModeGesturalOverlay \ NavigationBarModeGesturalOverlay \
NavigationBarModeGesturalOverlayNarrowBack \ NavigationBarModeGesturalOverlayNarrowBack \
diff --git a/packages/overlays/MiuiNavbarOverlay/Android.bp b/packages/overlays/MiuiNavbarOverlay/Android.bp diff --git a/packages/overlays/MiuiNavbarOverlay/Android.mk b/packages/overlays/MiuiNavbarOverlay/Android.mk
new file mode 100644 new file mode 100644
index 000000000000..fc724fb7a686 index 00000000000..3a577ef5920
--- /dev/null --- /dev/null
+++ b/packages/overlays/MiuiNavbarOverlay/Android.bp +++ b/packages/overlays/MiuiNavbarOverlay/Android.mk
@@ -0,0 +1,28 @@ @@ -0,0 +1,27 @@
+// +#
+// Copyright 2021, The Android Open Source Project +# Copyright (C) 2020, The Android Open Source Project
+// +#
+// Licensed under the Apache License, Version 2.0 (the "License"); +# Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License. +# you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at +# You may obtain a copy of the License at
+// +#
+// http://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0
+// +#
+// Unless required by applicable law or agreed to in writing, software +# Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, +# distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and +# See the License for the specific language governing permissions and
+// limitations under the License. +# limitations under the License.
+// +#
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "frameworks_base_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["frameworks_base_license"],
+}
+ +
+runtime_resource_overlay { +LOCAL_PATH:= $(call my-dir)
+ name: "MiuiNavbarOverlay", +include $(CLEAR_VARS)
+ product_specific: true, +
+} +LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := MiuiNavbarOverlay
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/MiuiNavbarOverlay/AndroidManifest.xml b/packages/overlays/MiuiNavbarOverlay/AndroidManifest.xml diff --git a/packages/overlays/MiuiNavbarOverlay/AndroidManifest.xml b/packages/overlays/MiuiNavbarOverlay/AndroidManifest.xml
new file mode 100644 new file mode 100644
index 000000000000..3f10e2e03675 index 00000000000..3956effddfb
--- /dev/null --- /dev/null
+++ b/packages/overlays/MiuiNavbarOverlay/AndroidManifest.xml +++ b/packages/overlays/MiuiNavbarOverlay/AndroidManifest.xml
@@ -0,0 +1,22 @@ @@ -0,0 +1,21 @@
+<!-- +<!--
+ ~ Copyright (C) 2021 The Android Open Source Project + ~ Copyright (C) 2020 The Android Open Source Project
+ ~ + ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License. + ~ you may not use this file except in compliance with the License.
@@ -95,11 +94,10 @@ index 000000000000..3f10e2e03675
+ ~ See the License for the specific language governing permissions and + ~ See the License for the specific language governing permissions and
+ ~ limitations under the License. + ~ limitations under the License.
+ --> + -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" +<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.miui.systemui.navbar.overlay" + package="com.miui.systemui.navbar.overlay"
+ android:versionCode="1" + android:versionCode="1"
+ android:versionName="1.0"> + android:versionName="1.0">
+ <overlay android:targetPackage="com.android.systemui" android:priority="1337" android:isStatic="true"/> + <overlay android:targetPackage="com.android.systemui" android:priority="1337" android:isStatic="true"/>
+</manifest> +</manifest>
diff --git a/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_back.png b/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_back.png diff --git a/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_back.png b/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_back.png
@@ -1,32 +0,0 @@
From eef68c9e3faad07776544f152946ad299be23d51 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Mon, 26 Oct 2020 14:06:56 +0000
Subject: [PATCH 17/21] UI: Reconfigure power menu items
Change-Id: I32cca6e2c6bb64d891efee959127edf7c0802cbc
---
core/res/res/values/config.xml | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 9410897a24a0..a6e437b1efd6 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -3213,13 +3213,10 @@
"logout" = Logout the current user
-->
<string-array translatable="false" name="config_globalActionsList">
- <item>emergency</item>
- <item>lockdown</item>
<item>power</item>
<item>restart</item>
- <item>logout</item>
<item>screenshot</item>
- <item>bugreport</item>
+ <item>airplane</item>
</string-array>
<!-- Number of milliseconds to hold a wake lock to ensure that drawing is fully
--
2.25.1
@@ -0,0 +1,81 @@
From e799f913b42c58821408527a73aac4115d69df11 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 8 Aug 2021 01:43:42 +0000
Subject: [PATCH 18/18] Revert "[DO NOT MERGE] Reduce padding in QS for small
screens"
This reverts commit c3182c54802105c614848b26250c2682eb9900bf.
---
.../res/values-h740dp-port/dimens.xml | 27 -------------------
packages/SystemUI/res/values/dimens.xml | 11 ++++----
2 files changed, 5 insertions(+), 33 deletions(-)
delete mode 100644 packages/SystemUI/res/values-h740dp-port/dimens.xml
diff --git a/packages/SystemUI/res/values-h740dp-port/dimens.xml b/packages/SystemUI/res/values-h740dp-port/dimens.xml
deleted file mode 100644
index 966066ffe56..00000000000
--- a/packages/SystemUI/res/values-h740dp-port/dimens.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
- ~ Copyright (C) 2020 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>
- <dimen name="qs_tile_height">106dp</dimen>
- <dimen name="qs_tile_margin_vertical">24dp</dimen>
-
- <!-- The height of the qs customize header. Should be
- (qs_panel_padding_top (48dp) + brightness_mirror_height (48dp) + qs_tile_margin_top (18dp)) -
- (Toolbar_minWidth (56dp) + qs_tile_margin_top_bottom (12dp))
- -->
- <dimen name="qs_customize_header_min_height">46dp</dimen>
- <dimen name="qs_tile_margin_top">18dp</dimen>
-</resources>
\ No newline at end of file
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 9172bfa823e..cb6f550ec49 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -490,21 +490,20 @@
<!-- The size of the gesture span needed to activate the "pull" notification expansion -->
<dimen name="pull_span_min">25dp</dimen>
- <dimen name="qs_tile_height">96dp</dimen>
+ <dimen name="qs_tile_height">106dp</dimen>
<!--notification_side_paddings + notification_content_margin_start - (qs_quick_tile_size - qs_tile_background_size) / 2 -->
<dimen name="qs_tile_layout_margin_side">18dp</dimen>
<dimen name="qs_tile_margin_horizontal">18dp</dimen>
<dimen name="qs_tile_margin_horizontal_two_line">2dp</dimen>
- <dimen name="qs_tile_margin_vertical">2dp</dimen>
+ <dimen name="qs_tile_margin_vertical">24dp</dimen>
<dimen name="qs_tile_margin_top_bottom">12dp</dimen>
<dimen name="qs_tile_margin_top_bottom_negative">-12dp</dimen>
<!-- The height of the qs customize header. Should be
- (qs_panel_padding_top (48dp) + brightness_mirror_height (48dp) + qs_tile_margin_top (0dp)) -
+ (qs_panel_padding_top (48dp) + brightness_mirror_height (48dp) + qs_tile_margin_top (18dp)) -
(Toolbar_minWidth (56dp) + qs_tile_margin_top_bottom (12dp))
-->
- <dimen name="qs_customize_header_min_height">28dp</dimen>
- <dimen name="qs_tile_margin_top">0dp</dimen>
- <dimen name="qs_tile_icon_background_stroke_width">-1dp</dimen>
+ <dimen name="qs_customize_header_min_height">46dp</dimen>
+ <dimen name="qs_tile_margin_top">18dp</dimen>
<dimen name="qs_tile_background_size">44dp</dimen>
<dimen name="qs_quick_tile_size">48dp</dimen>
<dimen name="qs_quick_tile_padding">12dp</dimen>
--
2.25.1
@@ -1,26 +0,0 @@
From be8f19801ee144b27fdd74ddfa8f7ecb9c60bfaa Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 5 Mar 2022 01:43:37 +0000
Subject: [PATCH 18/21] UI: Reconfigure quick settings tiles
Change-Id: I743f52ef3a95db0ca2c02ae973faa4629e41885d
---
packages/SystemUI/res/values/config.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index d7d6fa34cce8..61c7613baadc 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -68,7 +68,7 @@
<!-- The default tiles to display in QuickSettings -->
<string name="quick_settings_tiles_default" translatable="false">
- internet,bt,flashlight,dnd,alarm,airplane,controls,wallet,rotation,battery,cast,screenrecord,mictoggle,cameratoggle
+ wifi,cell,hotspot,location,rotation,flashlight
</string>
<!-- The class path of the Safety Quick Settings Tile -->
--
2.25.1
@@ -1,26 +0,0 @@
From d329a8c0310ece234f68f1bf271e27b6a3ef948c Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Tue, 19 Oct 2021 12:09:34 +0000
Subject: [PATCH 20/21] UI: Remove privacy dot padding
Change-Id: I5d2e2b3e36f027b4348a83030d4b4d3c4f0209d1
---
packages/SystemUI/res/values/dimens.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 09dd8ed9ef9d..4515539bb4b4 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -1002,7 +1002,7 @@
<dimen name="ongoing_appops_chip_animation_in_status_bar_translation_x">15dp</dimen>
<dimen name="ongoing_appops_chip_animation_out_status_bar_translation_x">7dp</dimen>
<!-- Total minimum padding to enforce to ensure that the dot can always show -->
- <dimen name="ongoing_appops_dot_min_padding">20dp</dimen>
+ <dimen name="ongoing_appops_dot_min_padding">0dp</dimen>
<dimen name="ongoing_appops_dialog_side_margins">@dimen/notification_shade_content_margin_horizontal</dimen>
--
2.25.1
@@ -1,47 +0,0 @@
From 12c19b3e96fde96dab5093ac2134ad1453bb59b8 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Fri, 30 Sep 2022 16:02:16 +0000
Subject: [PATCH 21/21] UI: Revert to HSL luminance for wallpaper dark hints
Y U no test for consistency, Google?
Change-Id: Ie5663bdf518b4ef93d6deb634e707a32d052ac55
---
core/java/android/app/WallpaperColors.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/core/java/android/app/WallpaperColors.java b/core/java/android/app/WallpaperColors.java
index a8d3c14e1d9d..88609f3d7052 100644
--- a/core/java/android/app/WallpaperColors.java
+++ b/core/java/android/app/WallpaperColors.java
@@ -552,15 +552,15 @@ public final class WallpaperColors implements Parcelable {
float[] tmpHsl = new float[3];
for (int i = 0; i < pixels.length; i++) {
int pixelColor = pixels[i];
- ColorUtils.colorToHSL(pixelColor, tmpHsl);
final int alpha = Color.alpha(pixelColor);
// Apply composite colors where the foreground is a black layer with an alpha value of
// the dim amount and the background is the wallpaper pixel color.
int compositeColors = ColorUtils.compositeColors(blackTransparent, pixelColor);
- // Calculate the adjusted luminance of the dimmed wallpaper pixel color.
- double adjustedLuminance = ColorUtils.calculateLuminance(compositeColors);
+ // Calculate the luminance of the dimmed wallpaper pixel color.
+ ColorUtils.colorToHSL(compositeColors, tmpHsl);
+ double luminance = tmpHsl[2];
// Make sure we don't have a dark pixel mass that will
// make text illegible.
@@ -572,7 +572,7 @@ public final class WallpaperColors implements Parcelable {
pixels[i] = Color.RED;
}
}
- totalLuminance += adjustedLuminance;
+ totalLuminance += luminance;
}
int hints = 0;
--
2.25.1
@@ -0,0 +1,28 @@
From e89e2d8f376fcb77078ba06138afa395f91ab55d Mon Sep 17 00:00:00 2001
From: AndyCGYan <GeForce8800Ultra@gmail.com>
Date: Wed, 5 Jun 2019 05:10:00 +0000
Subject: [PATCH] WiFi: Relax throttling greatly for foreground apps
...to the extent that it virtually doesn't exist
Change-Id: Ic01d08ef9c09de128ac08ecebb52aa7f90cf9e4e
---
service/java/com/android/server/wifi/ScanRequestProxy.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/service/java/com/android/server/wifi/ScanRequestProxy.java b/service/java/com/android/server/wifi/ScanRequestProxy.java
index 0a9a446ab..3cedc343e 100644
--- a/service/java/com/android/server/wifi/ScanRequestProxy.java
+++ b/service/java/com/android/server/wifi/ScanRequestProxy.java
@@ -67,7 +67,7 @@ public class ScanRequestProxy {
private static final String TAG = "WifiScanRequestProxy";
@VisibleForTesting
- public static final int SCAN_REQUEST_THROTTLE_TIME_WINDOW_FG_APPS_MS = 120 * 1000;
+ public static final int SCAN_REQUEST_THROTTLE_TIME_WINDOW_FG_APPS_MS = 1;
@VisibleForTesting
public static final int SCAN_REQUEST_THROTTLE_MAX_IN_TIME_WINDOW_FG_APPS = 4;
@VisibleForTesting
--
2.17.1
@@ -1,587 +0,0 @@
From 2a0ca4dab02447bb8fdabb480ed94de15107e22b Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 19 Jan 2022 18:04:36 +0000
Subject: [PATCH 2/3] DeskClock: Adapt digital clocks to S style
Lollipop is so yesterday...
Bring the layouts of various digital clocks (app, widget, daydream)
in-line, and adjust their styles to match the custom keyguard on S
Caveats/TODO:
- Widget swallows all touch events, even when touching an empty area
- World clocks in widgets are left untouched
Change-Id: I10c6fa213c89ac2f6e342be13fdd6390f7f787b0
---
res/layout-land/main_clock_frame.xml | 19 ++---
res/layout/date_and_next_alarm_time.xml | 57 +++++++-------
res/layout/desk_clock_saver.xml | 12 +--
res/layout/digital_widget.xml | 71 ++++++++---------
res/layout/digital_widget_sizer.xml | 77 ++++++++-----------
res/layout/main_clock_frame.xml | 23 +++---
res/values/dimens.xml | 12 ++-
res/values/styles.xml | 19 +++++
.../alarmclock/DigitalAppWidgetProvider.java | 31 ++++----
src/com/android/deskclock/AlarmUtils.java | 2 +-
10 files changed, 167 insertions(+), 156 deletions(-)
diff --git a/res/layout-land/main_clock_frame.xml b/res/layout-land/main_clock_frame.xml
index 6abfdddd6..8ad98c0cf 100644
--- a/res/layout-land/main_clock_frame.xml
+++ b/res/layout-land/main_clock_frame.xml
@@ -21,10 +21,11 @@
android:gravity="center_horizontal"
android:orientation="vertical">
- <FrameLayout
+ <LinearLayout
android:layout_width="wrap_content"
- android:layout_height="0dp"
- android:layout_weight="1">
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical|start"
+ android:orientation="vertical">
<com.android.deskclock.AnalogClock
android:id="@+id/analog_clock"
@@ -38,19 +39,13 @@
<com.android.deskclock.widget.AutoSizingTextClock
android:id="@+id/digital_clock"
- style="@style/display_time"
+ style="@style/sc_keyguard_clock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:ellipsize="none"
- android:singleLine="true"
- android:textSize="@dimen/main_clock_digital_font_size"
tools:text="01:23" />
- </FrameLayout>
+ <include layout="@layout/date_and_next_alarm_time" />
- <include layout="@layout/date_and_next_alarm_time"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"/>
+ </LinearLayout>
</LinearLayout>
diff --git a/res/layout/date_and_next_alarm_time.xml b/res/layout/date_and_next_alarm_time.xml
index 23df1cd3b..b29ffedcf 100644
--- a/res/layout/date_and_next_alarm_time.xml
+++ b/res/layout/date_and_next_alarm_time.xml
@@ -18,36 +18,41 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
xmlns:tools="http://schemas.android.com/tools"
- android:layout_gravity="center_vertical"
- android:gravity="center">
+ android:gravity="center_vertical|start"
+ android:orientation="vertical">
<TextView
android:id="@+id/date"
- style="@style/body"
+ style="@style/sc_keyguard_row"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textAllCaps="true"
+ android:paddingTop="@dimen/sc_keyguard_status_area_top_padding"
+ android:paddingStart="@dimen/sc_keyguard_row_date_start_padding"
tools:text="Sa., 01.01."/>
- <TextView
- android:id="@+id/nextAlarmIcon"
- style="@style/body"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:layout_marginEnd="@dimen/alarm_icon_padding"
- android:layout_marginStart="@dimen/alarm_icon_padding"
- android:ellipsize="none"
- android:includeFontPadding="false"
- android:maxLines="1"
- android:text="@string/clock_emoji" />
-
- <TextView
- android:id="@+id/nextAlarm"
- style="@style/body"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAllCaps="true"
- tools:text="Mo., 07:00"/>
-
-</LinearLayout>
\ No newline at end of file
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingTop="@dimen/sc_keyguard_row_top_padding"
+ android:paddingStart="@dimen/sc_keyguard_row_alarm_start_padding">
+
+ <TextView
+ android:id="@+id/nextAlarmIcon"
+ style="@style/sc_keyguard_row"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:layout_marginEnd="@dimen/alarm_icon_padding"
+ android:text="@string/clock_emoji"
+ android:textSize="@dimen/sc_keyguard_alarm_icon_size" />
+
+ <TextView
+ android:id="@+id/nextAlarm"
+ style="@style/sc_keyguard_row"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ tools:text="Mo., 07:00"/>
+
+ </LinearLayout>
+
+</LinearLayout>
diff --git a/res/layout/desk_clock_saver.xml b/res/layout/desk_clock_saver.xml
index dafabfddf..d24219dbb 100644
--- a/res/layout/desk_clock_saver.xml
+++ b/res/layout/desk_clock_saver.xml
@@ -42,19 +42,13 @@
<TextClock
android:id="@+id/digital_clock"
- style="@style/big_thin"
+ style="@style/sc_keyguard_clock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:layout_marginBottom="@dimen/bottom_text_spacing_digital"
- android:ellipsize="none"
- android:gravity="center"
- android:singleLine="true"
- android:textColor="@color/white"
- android:textSize="@dimen/main_clock_font_size" />
+ android:fontFamily="sans-serif-thin" />
<include layout="@layout/date_and_next_alarm_time" />
</LinearLayout>
-</FrameLayout>
\ No newline at end of file
+</FrameLayout>
diff --git a/res/layout/digital_widget.xml b/res/layout/digital_widget.xml
index c5b4837a6..e376a5a7a 100644
--- a/res/layout/digital_widget.xml
+++ b/res/layout/digital_widget.xml
@@ -19,58 +19,53 @@
android:id="@+id/digital_widget"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:gravity="top|center_horizontal"
+ android:gravity="center"
android:orientation="vertical">
- <TextClock
- android:id="@+id/clock"
- style="@style/widget_big_thin"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal|top"
- android:ellipsize="none"
- android:format12Hour="@string/lock_screen_12_hour_format"
- android:format24Hour="@string/lock_screen_24_hour_format"
- android:includeFontPadding="false"
- android:singleLine="true"
- android:textColor="@color/white" />
-
<LinearLayout
+ android:id="@+id/digital_widget_actual"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal|top">
+ android:gravity="center_vertical|start"
+ android:orientation="vertical">
<TextClock
- android:id="@+id/date"
- style="@style/widget_label"
+ android:id="@+id/clock"
+ style="@style/sc_keyguard_clock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:ellipsize="none"
- android:includeFontPadding="false"
- android:singleLine="true"
- android:textAllCaps="true"
- android:textColor="@color/white" />
+ android:format12Hour="@string/lock_screen_12_hour_format"
+ android:format24Hour="@string/lock_screen_24_hour_format" />
- <ImageView
- android:id="@+id/nextAlarmIcon"
+ <TextClock
+ android:id="@+id/date"
+ style="@style/sc_keyguard_row"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:contentDescription="@null"
- android:scaleType="center" />
+ android:paddingTop="@dimen/sc_keyguard_status_area_top_padding"
+ android:paddingStart="@dimen/sc_keyguard_row_date_start_padding" />
- <TextView
- android:id="@+id/nextAlarm"
- style="@style/widget_label"
+ <LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:ellipsize="none"
- android:includeFontPadding="false"
- android:singleLine="true"
- android:textAllCaps="true"
- android:textColor="@color/white" />
+ android:paddingTop="@dimen/sc_keyguard_row_top_padding"
+ android:paddingStart="@dimen/sc_keyguard_row_alarm_start_padding">
+
+ <ImageView
+ android:id="@+id/nextAlarmIcon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:contentDescription="@null"
+ android:scaleType="center" />
+
+ <TextView
+ android:id="@+id/nextAlarm"
+ style="@style/sc_keyguard_row"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+
+ </LinearLayout>
</LinearLayout>
@@ -82,4 +77,4 @@
android:layout_marginTop="20dp"
android:divider="@null" />
-</LinearLayout>
\ No newline at end of file
+</LinearLayout>
diff --git a/res/layout/digital_widget_sizer.xml b/res/layout/digital_widget_sizer.xml
index f524cf536..b9a28c79f 100644
--- a/res/layout/digital_widget_sizer.xml
+++ b/res/layout/digital_widget_sizer.xml
@@ -15,64 +15,55 @@
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="center"
android:orientation="vertical">
- <TextClock
- android:id="@+id/clock"
- style="@style/widget_big_thin"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal|top"
- android:includeFontPadding="false"
- android:ellipsize="none"
- android:format12Hour="@string/lock_screen_12_hour_format"
- android:format24Hour="@string/lock_screen_24_hour_format"
- android:singleLine="true"
- android:textColor="@color/white" />
-
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal|top">
+ android:gravity="center_vertical|start"
+ android:orientation="vertical">
<TextClock
- android:id="@+id/date"
- style="@style/widget_label"
+ android:id="@+id/clock"
+ style="@style/sc_keyguard_clock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:includeFontPadding="false"
- android:ellipsize="none"
- android:singleLine="true"
- android:textAllCaps="true"
- android:textColor="@color/white" />
+ android:format12Hour="@string/lock_screen_12_hour_format"
+ android:format24Hour="@string/lock_screen_24_hour_format" />
- <!-- This view is drawn to a Bitmap and sent to the widget as an icon. -->
- <TextView
- android:id="@+id/nextAlarmIcon"
- style="@style/widget_label"
+ <TextClock
+ android:id="@+id/date"
+ style="@style/sc_keyguard_row"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:includeFontPadding="false"
- android:ellipsize="none"
- android:singleLine="true"
- android:text="@string/clock_emoji"
- android:textColor="@color/white" />
+ android:paddingTop="@dimen/sc_keyguard_status_area_top_padding"
+ android:paddingStart="@dimen/sc_keyguard_row_date_start_padding" />
- <TextView
- android:id="@+id/nextAlarm"
- style="@style/widget_label"
+ <LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:includeFontPadding="false"
- android:ellipsize="none"
- android:singleLine="true"
- android:textAllCaps="true"
- android:textColor="@color/white" />
+ android:paddingTop="@dimen/sc_keyguard_row_top_padding"
+ android:paddingStart="@dimen/sc_keyguard_row_alarm_start_padding">
+
+ <!-- This view is drawn to a Bitmap and sent to the widget as an icon. -->
+ <TextView
+ android:id="@+id/nextAlarmIcon"
+ style="@style/sc_keyguard_row"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:text="@string/clock_emoji" />
+
+ <TextView
+ android:id="@+id/nextAlarm"
+ style="@style/sc_keyguard_row"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+
+ </LinearLayout>
</LinearLayout>
diff --git a/res/layout/main_clock_frame.xml b/res/layout/main_clock_frame.xml
index 159956f19..d0701eaf0 100644
--- a/res/layout/main_clock_frame.xml
+++ b/res/layout/main_clock_frame.xml
@@ -24,11 +24,11 @@
android:layout_marginEnd="24dp"
android:orientation="vertical">
- <FrameLayout
+ <LinearLayout
android:layout_width="wrap_content"
- android:layout_height="0dp"
- android:layout_weight="1"
- android:layout_gravity="start">
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical|start"
+ android:orientation="vertical">
<com.android.deskclock.AnalogClock
android:id="@+id/analog_clock"
@@ -42,17 +42,14 @@
<com.android.deskclock.widget.AutoSizingTextClock
android:id="@+id/digital_clock"
- style="@style/display_time"
- android:layout_width="match_parent"
+ style="@style/sc_keyguard_clock"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:ellipsize="none"
- android:includeFontPadding="false"
android:paddingTop="@dimen/main_clock_digital_padding"
- android:singleLine="true"
- android:textSize="@dimen/main_clock_digital_font_size"
tools:text="01:23" />
- </FrameLayout>
+ <include layout="@layout/date_and_next_alarm_time" />
+
+ </LinearLayout>
- <include layout="@layout/date_and_next_alarm_time" />
-</LinearLayout>
\ No newline at end of file
+</LinearLayout>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 856ef8241..3061e27f6 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -61,7 +61,7 @@
<dimen name="body_font_padding">4dp</dimen>
<dimen name="alarm_label_size">14sp</dimen>
- <dimen name="alarm_icon_padding">6dp</dimen>
+ <dimen name="alarm_icon_padding">7dp</dimen>
<dimen name="backspace_icon_size">24dp</dimen>
<dimen name="no_alarms_size">90dp</dimen>
@@ -140,4 +140,14 @@
<dimen name="alarm_clock_expanded_vertical_margin">8dp</dimen>
<dimen name="settings_padding">4dp</dimen>
+
+ <!-- Keyguard dimens, taken from S fwb -->
+ <dimen name="sc_keyguard_clock_text_size">86dp</dimen>
+ <dimen name="sc_keyguard_row_text_size">16dp</dimen>
+ <dimen name="sc_keyguard_alarm_icon_size">21dp</dimen>
+ <!-- Padding correction values, measured from S fwb -->
+ <dimen name="sc_keyguard_status_area_top_padding">9dp</dimen>
+ <dimen name="sc_keyguard_row_top_padding">11dp</dimen>
+ <dimen name="sc_keyguard_row_date_start_padding">6dp</dimen>
+ <dimen name="sc_keyguard_row_alarm_start_padding">5.5dp</dimen>
</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index f57bab2fa..28b68fd55 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -201,4 +201,23 @@
<item name="layout_constraintStart_toStartOf">parent</item>
<item name="layout_constraintTop_toBottomOf">@id/timer_setup_time</item>
</style>
+
+ <style name="sc_keyguard_clock">
+ <item name="android:fontFamily">sans-serif-light</item>
+ <item name="android:fontFeatureSettings">tnum</item>
+ <item name="android:textSize">@dimen/sc_keyguard_clock_text_size</item>
+ <item name="android:textColor">@color/white</item>
+ <item name="android:ellipsize">none</item>
+ <item name="android:includeFontPadding">false</item>
+ <item name="android:maxLines">1</item>
+ </style>
+
+ <style name="sc_keyguard_row">
+ <item name="android:textSize">@dimen/sc_keyguard_row_text_size</item>
+ <item name="android:textColor">@color/white</item>
+ <item name="android:ellipsize">none</item>
+ <item name="android:includeFontPadding">false</item>
+ <item name="android:maxLines">1</item>
+ </style>
+
</resources>
diff --git a/src/com/android/alarmclock/DigitalAppWidgetProvider.java b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
index 1005f0ac0..e97bb474a 100644
--- a/src/com/android/alarmclock/DigitalAppWidgetProvider.java
+++ b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
@@ -224,7 +224,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
if (Utils.isWidgetClickable(wm, widgetId)) {
final Intent openApp = new Intent(context, DeskClock.class);
final PendingIntent pi = PendingIntent.getActivity(context, 0, openApp, FLAG_IMMUTABLE);
- rv.setOnClickPendingIntent(R.id.digital_widget, pi);
+ rv.setOnClickPendingIntent(R.id.digital_widget_actual, pi);
}
// Configure child views of the remote view.
@@ -256,7 +256,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
final int targetWidthPx = portrait ? minWidthPx : maxWidthPx;
final int targetHeightPx = portrait ? maxHeightPx : minHeightPx;
final int largestClockFontSizePx =
- resources.getDimensionPixelSize(R.dimen.widget_max_clock_font_size);
+ resources.getDimensionPixelSize(R.dimen.sc_keyguard_clock_text_size);
// Create a size template that describes the widget bounds.
final Sizes template = new Sizes(targetWidthPx, targetHeightPx, largestClockFontSizePx);
@@ -328,13 +328,13 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
}
// Measure the widget at the largest possible size.
- Sizes high = measure(template, template.getLargestClockFontSizePx(), sizer);
+ Sizes high = measure(context, template, template.getLargestClockFontSizePx(), sizer);
if (!high.hasViolations()) {
return high;
}
// Measure the widget at the smallest possible size.
- Sizes low = measure(template, template.getSmallestClockFontSizePx(), sizer);
+ Sizes low = measure(context, template, template.getSmallestClockFontSizePx(), sizer);
if (low.hasViolations()) {
return low;
}
@@ -346,7 +346,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
return low;
}
- final Sizes midSize = measure(template, midFontSize, sizer);
+ final Sizes midSize = measure(context, template, midFontSize, sizer);
if (midSize.hasViolations()) {
high = midSize;
} else {
@@ -409,7 +409,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
* the offscreen {@code sizer} view. Measure the {@code sizer} view and return the resulting
* size measurements.
*/
- private static Sizes measure(Sizes template, int clockFontSize, View sizer) {
+ private static Sizes measure(Context context, Sizes template, int clockFontSize, View sizer) {
// Create a copy of the given template sizes.
final Sizes measuredSizes = template.newSize();
@@ -420,13 +420,13 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
final TextView nextAlarmIcon = (TextView) sizer.findViewById(R.id.nextAlarmIcon);
// Adjust the font sizes.
- measuredSizes.setClockFontSizePx(clockFontSize);
+ measuredSizes.setClockFontSizePx(context, clockFontSize);
clock.setText(getLongestTimeString(clock));
clock.setTextSize(COMPLEX_UNIT_PX, measuredSizes.mClockFontSizePx);
date.setTextSize(COMPLEX_UNIT_PX, measuredSizes.mFontSizePx);
nextAlarm.setTextSize(COMPLEX_UNIT_PX, measuredSizes.mFontSizePx);
nextAlarmIcon.setTextSize(COMPLEX_UNIT_PX, measuredSizes.mIconFontSizePx);
- nextAlarmIcon.setPadding(measuredSizes.mIconPaddingPx, 0, measuredSizes.mIconPaddingPx, 0);
+ nextAlarmIcon.setPadding(0, 0, measuredSizes.mIconPaddingPx, 0);
// Measure and layout the sizer.
final int widthSize = View.MeasureSpec.getSize(measuredSizes.mTargetWidthPx);
@@ -507,12 +507,17 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
private int getLargestClockFontSizePx() { return mLargestClockFontSizePx; }
private int getSmallestClockFontSizePx() { return mSmallestClockFontSizePx; }
private int getClockFontSizePx() { return mClockFontSizePx; }
- private void setClockFontSizePx(int clockFontSizePx) {
+ private void setClockFontSizePx(Context context, int clockFontSizePx) {
+ final Resources resources = context.getResources();
+ int keyguardClockTextSizePx = resources.getDimensionPixelSize(R.dimen.sc_keyguard_clock_text_size);
+ int keyguardRowTextSizePx = resources.getDimensionPixelSize(R.dimen.sc_keyguard_row_text_size);
+ int keyguardAlarmIconSizePx = resources.getDimensionPixelSize(R.dimen.sc_keyguard_alarm_icon_size);
+ int alarmIconPaddingPx = resources.getDimensionPixelSize(R.dimen.alarm_icon_padding);
mClockFontSizePx = clockFontSizePx;
- mFontSizePx = max(1, round(clockFontSizePx / 7.5f));
- mIconFontSizePx = (int) (mFontSizePx * 1.4f);
- mIconPaddingPx = mFontSizePx / 3;
- }
+ mFontSizePx = max(1, round(clockFontSizePx / (float) keyguardClockTextSizePx * (float) keyguardRowTextSizePx));
+ mIconFontSizePx = max(1, round(clockFontSizePx / (float) keyguardClockTextSizePx * (float) keyguardAlarmIconSizePx));
+ mIconPaddingPx = max(1, round(clockFontSizePx / (float) keyguardClockTextSizePx * (float) alarmIconPaddingPx));
+ }
/**
* @return the amount of widget height available to the world cities list
diff --git a/src/com/android/deskclock/AlarmUtils.java b/src/com/android/deskclock/AlarmUtils.java
index db60ace95..43767d313 100644
--- a/src/com/android/deskclock/AlarmUtils.java
+++ b/src/com/android/deskclock/AlarmUtils.java
@@ -37,7 +37,7 @@ import java.util.Locale;
public class AlarmUtils {
public static String getFormattedTime(Context context, Calendar time) {
- final String skeleton = DateFormat.is24HourFormat(context) ? "EHm" : "Ehma";
+ final String skeleton = DateFormat.is24HourFormat(context) ? "Hm" : "hma";
final String pattern = DateFormat.getBestDateTimePattern(Locale.getDefault(), skeleton);
return (String) DateFormat.format(pattern, time);
}
--
2.25.1
@@ -0,0 +1,561 @@
From 9dbc9d8105c3df1efe714d509622d338e7b9413f Mon Sep 17 00:00:00 2001
From: AndyCGYan <GeForce8800Ultra@gmail.com>
Date: Wed, 26 Dec 2018 22:38:54 +0800
Subject: [PATCH 2/3] DeskClock: Revert date and clock to Lollipop style
Also added dynamic date format based on alarm presence
Change-Id: I04ce41d4817c794edb1579dc3a493a1cf1e8d658
---
res/layout-land/main_clock_frame.xml | 1 +
res/layout/date_and_next_alarm_time.xml | 6 ++----
res/layout/digital_widget.xml | 4 ++--
res/layout/digital_widget_sizer.xml | 2 --
res/layout/main_clock_frame.xml | 1 +
res/layout/stopwatch_time.xml | 1 -
res/layout/timer_setup_time.xml | 2 +-
res/layout/world_clock_remote_list_item.xml | 8 +++----
res/values-h560dp/dimens.xml | 2 +-
res/values-h650dp/dimens.xml | 2 +-
res/values-v21/styles.xml | 8 +++----
res/values-v23/styles.xml | 2 --
res/values/dimens.xml | 10 ++++-----
res/values/styles.xml | 5 +++--
.../alarmclock/DigitalAppWidgetProvider.java | 10 +++++++--
src/com/android/deskclock/ClockFragment.java | 21 ++++++++++++-------
src/com/android/deskclock/Screensaver.java | 8 ++++---
.../deskclock/ScreensaverActivity.java | 8 ++++---
src/com/android/deskclock/Utils.java | 16 ++++++++++++--
19 files changed, 70 insertions(+), 47 deletions(-)
diff --git a/res/layout-land/main_clock_frame.xml b/res/layout-land/main_clock_frame.xml
index b72f62333..a1fa3557d 100644
--- a/res/layout-land/main_clock_frame.xml
+++ b/res/layout-land/main_clock_frame.xml
@@ -38,6 +38,7 @@
<com.android.deskclock.widget.AutoSizingTextClock
android:id="@+id/digital_clock"
style="@style/display_time"
+ android:fontFamily="sans-serif-thin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="none"
diff --git a/res/layout/date_and_next_alarm_time.xml b/res/layout/date_and_next_alarm_time.xml
index ad25502a8..e4edff237 100644
--- a/res/layout/date_and_next_alarm_time.xml
+++ b/res/layout/date_and_next_alarm_time.xml
@@ -25,8 +25,7 @@
android:id="@+id/date"
style="@style/body"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAllCaps="true" />
+ android:layout_height="wrap_content" />
<TextView
android:id="@+id/nextAlarmIcon"
@@ -45,7 +44,6 @@
android:id="@+id/nextAlarm"
style="@style/body"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAllCaps="true" />
+ android:layout_height="wrap_content" />
</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/digital_widget.xml b/res/layout/digital_widget.xml
index c5b4837a6..7e2bae454 100644
--- a/res/layout/digital_widget.xml
+++ b/res/layout/digital_widget.xml
@@ -43,13 +43,13 @@
<TextClock
android:id="@+id/date"
style="@style/widget_label"
+ android:fontFamily="sans-serif"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:ellipsize="none"
android:includeFontPadding="false"
android:singleLine="true"
- android:textAllCaps="true"
android:textColor="@color/white" />
<ImageView
@@ -63,13 +63,13 @@
<TextView
android:id="@+id/nextAlarm"
style="@style/widget_label"
+ android:fontFamily="sans-serif"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:ellipsize="none"
android:includeFontPadding="false"
android:singleLine="true"
- android:textAllCaps="true"
android:textColor="@color/white" />
</LinearLayout>
diff --git a/res/layout/digital_widget_sizer.xml b/res/layout/digital_widget_sizer.xml
index f524cf536..7b08ca590 100644
--- a/res/layout/digital_widget_sizer.xml
+++ b/res/layout/digital_widget_sizer.xml
@@ -46,7 +46,6 @@
android:includeFontPadding="false"
android:ellipsize="none"
android:singleLine="true"
- android:textAllCaps="true"
android:textColor="@color/white" />
<!-- This view is drawn to a Bitmap and sent to the widget as an icon. -->
@@ -71,7 +70,6 @@
android:includeFontPadding="false"
android:ellipsize="none"
android:singleLine="true"
- android:textAllCaps="true"
android:textColor="@color/white" />
</LinearLayout>
diff --git a/res/layout/main_clock_frame.xml b/res/layout/main_clock_frame.xml
index ab960728f..2042c5b04 100644
--- a/res/layout/main_clock_frame.xml
+++ b/res/layout/main_clock_frame.xml
@@ -51,6 +51,7 @@
<com.android.deskclock.widget.AutoSizingTextClock
android:id="@+id/digital_clock"
style="@style/display_time"
+ android:fontFamily="sans-serif-thin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="none"
diff --git a/res/layout/stopwatch_time.xml b/res/layout/stopwatch_time.xml
index c1895b488..71320fcd0 100644
--- a/res/layout/stopwatch_time.xml
+++ b/res/layout/stopwatch_time.xml
@@ -42,7 +42,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:duplicateParentState="true"
- android:fontFamily="sans-serif"
android:includeFontPadding="false"
android:paddingEnd="30dp"
android:paddingStart="3dp"
diff --git a/res/layout/timer_setup_time.xml b/res/layout/timer_setup_time.xml
index 572063fc6..14e9ea3bb 100644
--- a/res/layout/timer_setup_time.xml
+++ b/res/layout/timer_setup_time.xml
@@ -32,7 +32,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="none"
- android:fontFamily="sans-serif"
+ android:fontFamily="sans-serif-light"
android:fontFeatureSettings="tnum"
android:includeFontPadding="false"
android:singleLine="true"
diff --git a/res/layout/world_clock_remote_list_item.xml b/res/layout/world_clock_remote_list_item.xml
index 9a69cb517..f5f4eaa21 100644
--- a/res/layout/world_clock_remote_list_item.xml
+++ b/res/layout/world_clock_remote_list_item.xml
@@ -58,13 +58,13 @@
<TextView
android:id="@+id/city_name_left"
style="@style/widget_label"
+ android:fontFamily="sans-serif"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:ellipsize="end"
android:includeFontPadding="false"
android:singleLine="true"
- android:textAllCaps="true"
android:textColor="@color/white"
android:textSize="@dimen/city_widget_name_font_size" />
@@ -73,6 +73,7 @@
<TextView
android:id="@+id/city_day_left"
style="@style/widget_label"
+ android:fontFamily="sans-serif"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/style_label_space"
@@ -81,7 +82,6 @@
android:format24Hour="@string/abbrev_wday"
android:includeFontPadding="false"
android:singleLine="true"
- android:textAllCaps="true"
android:textColor="@color/white"
android:textSize="@dimen/city_widget_name_font_size" />
@@ -120,13 +120,13 @@
<TextView
android:id="@+id/city_name_right"
style="@style/widget_label"
+ android:fontFamily="sans-serif"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:ellipsize="end"
android:includeFontPadding="false"
android:singleLine="true"
- android:textAllCaps="true"
android:textColor="@color/white"
android:textSize="@dimen/city_widget_name_font_size" />
@@ -135,6 +135,7 @@
<TextView
android:id="@+id/city_day_right"
style="@style/widget_label"
+ android:fontFamily="sans-serif"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/style_label_space"
@@ -143,7 +144,6 @@
android:format24Hour="@string/abbrev_wday"
android:includeFontPadding="false"
android:singleLine="true"
- android:textAllCaps="true"
android:textColor="@color/white"
android:textSize="@dimen/city_widget_name_font_size" />
diff --git a/res/values-h560dp/dimens.xml b/res/values-h560dp/dimens.xml
index 003a5ad9f..6e25621ab 100644
--- a/res/values-h560dp/dimens.xml
+++ b/res/values-h560dp/dimens.xml
@@ -16,5 +16,5 @@
<resources>
<!-- The maximum size of the font for the time in widgets. -->
- <dimen name="widget_max_clock_font_size">96dp</dimen>
+ <dimen name="widget_max_clock_font_size">88dp</dimen>
</resources>
\ No newline at end of file
diff --git a/res/values-h650dp/dimens.xml b/res/values-h650dp/dimens.xml
index 2cc58cb32..6e25621ab 100644
--- a/res/values-h650dp/dimens.xml
+++ b/res/values-h650dp/dimens.xml
@@ -16,5 +16,5 @@
<resources>
<!-- The maximum size of the font for the time in widgets. -->
- <dimen name="widget_max_clock_font_size">100dp</dimen>
+ <dimen name="widget_max_clock_font_size">88dp</dimen>
</resources>
\ No newline at end of file
diff --git a/res/values-v21/styles.xml b/res/values-v21/styles.xml
index f1dca16c0..7bc382a4d 100644
--- a/res/values-v21/styles.xml
+++ b/res/values-v21/styles.xml
@@ -18,17 +18,17 @@
<resources>
<style name="body">
- <item name="android:textSize">14sp</item>
+ <item name="android:textSize">16sp</item>
<item name="android:textColor">@color/white</item>
- <item name="android:fontFamily">sans-serif-medium</item>
+ <item name="android:fontFamily">sans-serif</item>
</style>
<style name="PrimaryLabelTextAppearance" parent="PrimaryLabelTextParentAppearance">
- <item name="android:fontFamily">sans-serif-medium</item>
+ <item name="android:fontFamily">sans-serif</item>
</style>
<style name="SecondaryLabelTextAppearance" parent="SecondaryLabelTextParentAppearance">
- <item name="android:fontFamily">sans-serif-medium</item>
+ <item name="android:fontFamily">sans-serif</item>
</style>
</resources>
diff --git a/res/values-v23/styles.xml b/res/values-v23/styles.xml
index 34dcf5d73..6bf964256 100644
--- a/res/values-v23/styles.xml
+++ b/res/values-v23/styles.xml
@@ -26,8 +26,6 @@
</style>
<style name="widget_label" parent="label">
- <item name="android:textAllCaps">true</item>
- <item name="android:letterSpacing">0.15</item>
<item name="android:shadowRadius">@dimen/widget_shadow_radius</item>
<item name="android:shadowColor">@color/widget_shadow_color</item>
<item name="android:shadowDx">@dimen/widget_shadow_dx</item>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 6a384e94b..442fdb1cc 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -44,7 +44,7 @@
<dimen name="alarm_lockscreen_bottom_margin">40dp</dimen>
<dimen name="main_clock_font_size">64sp</dimen>
- <dimen name="main_clock_digital_font_size">90sp</dimen>
+ <dimen name="main_clock_digital_font_size">88sp</dimen>
<dimen name="main_clock_digital_padding">24dp</dimen>
<dimen name="big_font_size">32sp</dimen>
<dimen name="label_font_size">16sp</dimen>
@@ -93,15 +93,15 @@
<dimen name="digital_widget_city_24_medium_font_size">40sp</dimen>
<!-- The fixed size of the font for the city name / day of week in the city widget. -->
- <dimen name="city_widget_name_font_size">10dp</dimen>
+ <dimen name="city_widget_name_font_size">12dp</dimen>
<!-- The maximum size of the font for the time in widgets. -->
<dimen name="widget_max_clock_font_size">88dp</dimen>
<dimen name="widget_min_world_city_list_size">80dp</dimen>
<!-- shadow styles for widget text with drop shadows -->
- <item name="widget_shadow_radius" format="float" type="dimen">2.75</item>
- <item name="widget_shadow_dx" format="float" type="dimen">2.0</item>
- <item name="widget_shadow_dy" format="float" type="dimen">2.0</item>
+ <item name="widget_shadow_radius" format="float" type="dimen">0</item>
+ <item name="widget_shadow_dx" format="float" type="dimen">0</item>
+ <item name="widget_shadow_dy" format="float" type="dimen">0</item>
<!-- Divider height -->
<dimen name="hairline_height">1dp</dimen>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index fbe62ae3a..ca60e46b8 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -51,12 +51,13 @@
<style name="world_clock_time">
<item name="android:textSize">48sp</item>
<item name="android:textColor">@color/white</item>
- <item name="android:fontFamily">sans-serif-light</item>
+ <item name="android:fontFamily">sans-serif-thin</item>
</style>
<style name="body">
- <item name="android:textSize">14sp</item>
+ <item name="android:textSize">16sp</item>
<item name="android:textColor">@color/white</item>
+ <item name="android:fontFamily">sans-serif</item>
</style>
<style name="big_thin">
diff --git a/src/com/android/alarmclock/DigitalAppWidgetProvider.java b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
index 3be07eca7..86f1d991e 100644
--- a/src/com/android/alarmclock/DigitalAppWidgetProvider.java
+++ b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
@@ -453,7 +453,13 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
*/
private static String getDateFormat(Context context) {
final Locale locale = Locale.getDefault();
- final String skeleton = context.getString(R.string.abbrev_wday_month_day_no_year);
+ final String nextAlarmTime = Utils.getNextAlarm(context);
+ final String skeleton;
+ if (TextUtils.isEmpty(nextAlarmTime)) {
+ skeleton = context.getString(R.string.full_wday_month_day_no_year);
+ } else {
+ skeleton = context.getString(R.string.abbrev_wday_month_day_no_year);
+ }
return DateFormat.getBestDateTimePattern(locale, skeleton);
}
@@ -495,7 +501,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
private int getClockFontSizePx() { return mClockFontSizePx; }
private void setClockFontSizePx(int clockFontSizePx) {
mClockFontSizePx = clockFontSizePx;
- mFontSizePx = max(1, round(clockFontSizePx / 7.5f));
+ mFontSizePx = max(1, round(clockFontSizePx / 5.5f));
mIconFontSizePx = (int) (mFontSizePx * 1.4f);
mIconPaddingPx = mFontSizePx / 3;
}
diff --git a/src/com/android/deskclock/ClockFragment.java b/src/com/android/deskclock/ClockFragment.java
index b487e52be..1459094ee 100644
--- a/src/com/android/deskclock/ClockFragment.java
+++ b/src/com/android/deskclock/ClockFragment.java
@@ -80,6 +80,7 @@ public final class ClockFragment extends DeskClockFragment {
private SelectedCitiesAdapter mCityAdapter;
private RecyclerView mCityList;
private String mDateFormat;
+ private String mDateFormatAlarm;
private String mDateFormatForAccessibility;
/**
@@ -103,11 +104,12 @@ public final class ClockFragment extends DeskClockFragment {
final View fragmentView = inflater.inflate(R.layout.clock_fragment, container, false);
- mDateFormat = getString(R.string.abbrev_wday_month_day_no_year);
+ mDateFormat = getString(R.string.full_wday_month_day_no_year);
+ mDateFormatAlarm = getString(R.string.abbrev_wday_month_day_no_year);
mDateFormatForAccessibility = getString(R.string.full_wday_month_day_no_year);
mCityAdapter = new SelectedCitiesAdapter(getActivity(), mDateFormat,
- mDateFormatForAccessibility);
+ mDateFormatAlarm, mDateFormatForAccessibility);
mCityList = (RecyclerView) fragmentView.findViewById(R.id.cities);
mCityList.setLayoutManager(new LinearLayoutManager(getActivity()));
@@ -129,7 +131,7 @@ public final class ClockFragment extends DeskClockFragment {
mDigitalClock = (TextClock) mClockFrame.findViewById(R.id.digital_clock);
mAnalogClock = (AnalogClock) mClockFrame.findViewById(R.id.analog_clock);
Utils.setClockIconTypeface(mClockFrame);
- Utils.updateDate(mDateFormat, mDateFormatForAccessibility, mClockFrame);
+ Utils.updateDate(getActivity(), mDateFormat, mDateFormatAlarm, mDateFormatForAccessibility, mClockFrame);
Utils.setClockStyle(mDigitalClock, mAnalogClock);
Utils.setClockSecondsEnabled(mDigitalClock, mAnalogClock);
}
@@ -146,7 +148,8 @@ public final class ClockFragment extends DeskClockFragment {
final Activity activity = getActivity();
- mDateFormat = getString(R.string.abbrev_wday_month_day_no_year);
+ mDateFormat = getString(R.string.full_wday_month_day_no_year);
+ mDateFormatAlarm = getString(R.string.abbrev_wday_month_day_no_year);
mDateFormatForAccessibility = getString(R.string.full_wday_month_day_no_year);
// Watch for system events that effect clock time or format.
@@ -348,13 +351,15 @@ public final class ClockFragment extends DeskClockFragment {
private final Context mContext;
private final boolean mIsPortrait;
private final boolean mShowHomeClock;
- private final String mDateFormat;
- private final String mDateFormatForAccessibility;
+ private static String mDateFormat;
+ private static String mDateFormatAlarm;
+ private static String mDateFormatForAccessibility;
private SelectedCitiesAdapter(Context context, String dateFormat,
- String dateFormatForAccessibility) {
+ String dateFormatAlarm, String dateFormatForAccessibility) {
mContext = context;
mDateFormat = dateFormat;
+ mDateFormatAlarm = dateFormatAlarm;
mDateFormatForAccessibility = dateFormatForAccessibility;
mInflater = LayoutInflater.from(context);
mIsPortrait = Utils.isPortrait(context);
@@ -541,7 +546,7 @@ public final class ClockFragment extends DeskClockFragment {
String dateFormatForAccessibility, boolean showHairline) {
Utils.refreshAlarm(context, itemView);
- Utils.updateDate(dateFormat, dateFormatForAccessibility, itemView);
+ Utils.updateDate(context, mDateFormat, mDateFormatAlarm, mDateFormatForAccessibility, itemView);
Utils.setClockStyle(mDigitalClock, mAnalogClock);
mHairline.setVisibility(showHairline ? VISIBLE : GONE);
diff --git a/src/com/android/deskclock/Screensaver.java b/src/com/android/deskclock/Screensaver.java
index 68899d96e..7f01d880a 100644
--- a/src/com/android/deskclock/Screensaver.java
+++ b/src/com/android/deskclock/Screensaver.java
@@ -43,6 +43,7 @@ public final class Screensaver extends DreamService {
private MoveScreensaverRunnable mPositionUpdater;
private String mDateFormat;
+ private String mDateFormatAlarm;
private String mDateFormatForAccessibility;
private View mContentView;
@@ -63,7 +64,7 @@ public final class Screensaver extends DreamService {
private final Runnable mMidnightUpdater = new Runnable() {
@Override
public void run() {
- Utils.updateDate(mDateFormat, mDateFormatForAccessibility, mContentView);
+ Utils.updateDate(Screensaver.this, mDateFormat, mDateFormatAlarm, mDateFormatForAccessibility, mContentView);
}
};
@@ -84,7 +85,8 @@ public final class Screensaver extends DreamService {
setTheme(R.style.Theme_DeskClock);
super.onCreate();
- mDateFormat = getString(R.string.abbrev_wday_month_day_no_year);
+ mDateFormat = getString(R.string.full_wday_month_day_no_year);
+ mDateFormatAlarm = getString(R.string.abbrev_wday_month_day_no_year);
mDateFormatForAccessibility = getString(R.string.full_wday_month_day_no_year);
}
@@ -129,7 +131,7 @@ public final class Screensaver extends DreamService {
getContentResolver().registerContentObserver(uri, false, mSettingsContentObserver);
}
- Utils.updateDate(mDateFormat, mDateFormatForAccessibility, mContentView);
+ Utils.updateDate(this, mDateFormat, mDateFormatAlarm, mDateFormatForAccessibility, mContentView);
Utils.refreshAlarm(this, mContentView);
startPositionUpdater();
diff --git a/src/com/android/deskclock/ScreensaverActivity.java b/src/com/android/deskclock/ScreensaverActivity.java
index c7d54af3f..14c9bab00 100644
--- a/src/com/android/deskclock/ScreensaverActivity.java
+++ b/src/com/android/deskclock/ScreensaverActivity.java
@@ -87,11 +87,12 @@ public class ScreensaverActivity extends BaseActivity {
private final Runnable mMidnightUpdater = new Runnable() {
@Override
public void run() {
- Utils.updateDate(mDateFormat, mDateFormatForAccessibility, mContentView);
+ Utils.updateDate(ScreensaverActivity.this, mDateFormat, mDateFormatAlarm, mDateFormatForAccessibility, mContentView);
}
};
private String mDateFormat;
+ private String mDateFormatAlarm;
private String mDateFormatForAccessibility;
private View mContentView;
@@ -103,7 +104,8 @@ public class ScreensaverActivity extends BaseActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- mDateFormat = getString(R.string.abbrev_wday_month_day_no_year);
+ mDateFormat = getString(R.string.full_wday_month_day_no_year);
+ mDateFormatAlarm = getString(R.string.abbrev_wday_month_day_no_year);
mDateFormatForAccessibility = getString(R.string.full_wday_month_day_no_year);
setContentView(R.layout.desk_clock_saver);
@@ -160,7 +162,7 @@ public class ScreensaverActivity extends BaseActivity {
public void onResume() {
super.onResume();
- Utils.updateDate(mDateFormat, mDateFormatForAccessibility, mContentView);
+ Utils.updateDate(ScreensaverActivity.this, mDateFormat, mDateFormatAlarm, mDateFormatForAccessibility, mContentView);
Utils.refreshAlarm(ScreensaverActivity.this, mContentView);
startPositionUpdater();
diff --git a/src/com/android/deskclock/Utils.java b/src/com/android/deskclock/Utils.java
index 6d97912f7..cba5c0909 100644
--- a/src/com/android/deskclock/Utils.java
+++ b/src/com/android/deskclock/Utils.java
@@ -353,6 +353,11 @@ public class Utils {
nextAlarmView.setVisibility(View.GONE);
nextAlarmIconView.setVisibility(View.GONE);
}
+
+ String mDateFormat = context.getString(R.string.full_wday_month_day_no_year);
+ String mDateFormatAlarm = context.getString(R.string.abbrev_wday_month_day_no_year);
+ String mDateFormatForAccessibility = context.getString(R.string.full_wday_month_day_no_year);
+ Utils.updateDate(context, mDateFormat, mDateFormatAlarm, mDateFormatForAccessibility, clock);
}
public static void setClockIconTypeface(View clock) {
@@ -363,14 +368,21 @@ public class Utils {
/**
* Clock views can call this to refresh their date.
**/
- public static void updateDate(String dateSkeleton, String descriptionSkeleton, View clock) {
+ public static void updateDate(Context context, String dateSkeleton, String dateSkeletonAlarm, String descriptionSkeleton, View clock) {
final TextView dateDisplay = (TextView) clock.findViewById(R.id.date);
if (dateDisplay == null) {
return;
}
final Locale l = Locale.getDefault();
- final String datePattern = DateFormat.getBestDateTimePattern(l, dateSkeleton);
+ final String datePattern;
+ final String alarm = getNextAlarm(context);
+ if (!TextUtils.isEmpty(alarm)) {
+ datePattern = DateFormat.getBestDateTimePattern(l, dateSkeletonAlarm);
+ } else {
+ datePattern = DateFormat.getBestDateTimePattern(l, dateSkeleton);
+ }
+
final String descriptionPattern = DateFormat.getBestDateTimePattern(l, descriptionSkeleton);
final Date now = new Date();
--
2.25.1
@@ -1,7 +1,7 @@
From 02bc17bb2554380d7f7d76e3adffce05a2ba2444 Mon Sep 17 00:00:00 2001 From 5778373cb0bfbf81bfb264930a61435a1c5eda2a Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com> From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 5 Sep 2021 00:30:33 +0000 Date: Sun, 5 Sep 2021 00:30:33 +0000
Subject: [PATCH 1/3] DeskClock: Remove night mode Subject: [PATCH 3/3] DeskClock: Remove night mode
Change-Id: I885f39027e78fcda397f1be59d17bc24bc66671a Change-Id: I885f39027e78fcda397f1be59d17bc24bc66671a
--- ---
@@ -28,10 +28,10 @@ index 1680aab83..73375dcfa 100644
\ No newline at end of file \ No newline at end of file
+</PreferenceScreen> +</PreferenceScreen>
diff --git a/src/com/android/deskclock/Screensaver.java b/src/com/android/deskclock/Screensaver.java diff --git a/src/com/android/deskclock/Screensaver.java b/src/com/android/deskclock/Screensaver.java
index 29cc13ff9..8def22b30 100644 index 7f01d880a..b295d7a77 100644
--- a/src/com/android/deskclock/Screensaver.java --- a/src/com/android/deskclock/Screensaver.java
+++ b/src/com/android/deskclock/Screensaver.java +++ b/src/com/android/deskclock/Screensaver.java
@@ -141,9 +141,8 @@ public final class Screensaver extends DreamService { @@ -166,9 +166,8 @@ public final class Screensaver extends DreamService {
private void setClockStyle() { private void setClockStyle() {
Utils.setScreensaverClockStyle(mDigitalClock, mAnalogClock); Utils.setScreensaverClockStyle(mDigitalClock, mAnalogClock);
@@ -44,10 +44,10 @@ index 29cc13ff9..8def22b30 100644
/** /**
diff --git a/src/com/android/deskclock/ScreensaverActivity.java b/src/com/android/deskclock/ScreensaverActivity.java diff --git a/src/com/android/deskclock/ScreensaverActivity.java b/src/com/android/deskclock/ScreensaverActivity.java
index cf770086b..7a756df7d 100644 index 14c9bab00..912d59b2c 100644
--- a/src/com/android/deskclock/ScreensaverActivity.java --- a/src/com/android/deskclock/ScreensaverActivity.java
+++ b/src/com/android/deskclock/ScreensaverActivity.java +++ b/src/com/android/deskclock/ScreensaverActivity.java
@@ -107,7 +107,7 @@ public class ScreensaverActivity extends BaseActivity { @@ -119,7 +119,7 @@ public class ScreensaverActivity extends BaseActivity {
Utils.setClockIconTypeface(mMainClockView); Utils.setClockIconTypeface(mMainClockView);
Utils.setTimeFormat((TextClock) digitalClock, false); Utils.setTimeFormat((TextClock) digitalClock, false);
Utils.setClockStyle(digitalClock, analogClock); Utils.setClockStyle(digitalClock, analogClock);
@@ -1,118 +0,0 @@
From 8736347a89fc7e15e747ac5267c9f96b05bfaee8 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 20 Jan 2022 04:42:03 +0000
Subject: [PATCH 3/3] DeskClock: Wallpaper-based text coloring for digital
clock widget
RemoteViews is such a restrictive PITA
Change-Id: Ie22c4980526575f73ebb4e56780d4c2193cc45d3
---
.../alarmclock/DigitalAppWidgetProvider.java | 57 +++++++++++++++++++
1 file changed, 57 insertions(+)
diff --git a/src/com/android/alarmclock/DigitalAppWidgetProvider.java b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
index e97bb474a..d52693a1b 100644
--- a/src/com/android/alarmclock/DigitalAppWidgetProvider.java
+++ b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
@@ -19,6 +19,8 @@ package com.android.alarmclock;
import android.annotation.SuppressLint;
import android.app.AlarmManager;
import android.app.PendingIntent;
+import android.app.WallpaperColors;
+import android.app.WallpaperManager;
import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProvider;
import android.content.BroadcastReceiver;
@@ -112,12 +114,40 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
/** Intent used to deliver the {@link #ACTION_ON_DAY_CHANGE} callback. */
private static final Intent DAY_CHANGE_INTENT = new Intent(ACTION_ON_DAY_CHANGE);
+ private static WallpaperManager mWallpaperManager;
+ private static boolean mDarkText;
+
+ private static void relayoutAllWidgets(Context context) {
+ final AppWidgetManager wm = AppWidgetManager.getInstance(context);
+ final ComponentName provider = new ComponentName(context, DigitalAppWidgetProvider.class);
+ final int[] widgetIds = wm.getAppWidgetIds(provider);
+ for (int widgetId : widgetIds) {
+ relayoutWidget(context, wm, widgetId, wm.getAppWidgetOptions(widgetId));
+ }
+ }
+
+ private static void addOnColorsChangedListener(Context context) {
+ mWallpaperManager.addOnColorsChangedListener(new WallpaperManager.OnColorsChangedListener() {
+ @Override
+ public void onColorsChanged(WallpaperColors colors, int which) {
+ relayoutAllWidgets(context);
+ }
+ }, null);
+ }
+
@Override
public void onEnabled(Context context) {
super.onEnabled(context);
// Schedule the day-change callback if necessary.
updateDayChangeCallback(context);
+
+ // Listen for wallpaper color changes
+ mWallpaperManager = WallpaperManager.getInstance(context);
+ addOnColorsChangedListener(context);
+
+ // Force a relayout to pick up initial colors
+ relayoutAllWidgets(context);
}
@Override
@@ -216,6 +246,19 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
*/
private static RemoteViews relayoutWidget(Context context, AppWidgetManager wm, int widgetId,
Bundle options, boolean portrait) {
+ // Determine text colors.
+ if (mWallpaperManager == null) {
+ mWallpaperManager = WallpaperManager.getInstance(context);
+ addOnColorsChangedListener(context);
+ }
+ WallpaperColors wallpaperColors = mWallpaperManager.getWallpaperColors(WallpaperManager.FLAG_SYSTEM);
+ // Live wallpapers might not implement the WallpaperColors API.
+ if (wallpaperColors == null) {
+ mDarkText = false;
+ } else {
+ mDarkText = (wallpaperColors.getColorHints() & WallpaperColors.HINT_SUPPORTS_DARK_TEXT) != 0;
+ }
+
// Create a remote view for the digital clock.
final String packageName = context.getPackageName();
final RemoteViews rv = new RemoteViews(packageName, R.layout.digital_widget);
@@ -273,6 +316,17 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
rv.setTextViewTextSize(R.id.nextAlarm, COMPLEX_UNIT_PX, sizes.mFontSizePx);
rv.setTextViewTextSize(R.id.clock, COMPLEX_UNIT_PX, sizes.mClockFontSizePx);
+ // Apply the text color to the remote views.
+ if (mDarkText) {
+ rv.setTextColor(R.id.clock, resources.getColor(R.color.black));
+ rv.setTextColor(R.id.date, resources.getColor(R.color.black));
+ rv.setTextColor(R.id.nextAlarm, resources.getColor(R.color.black));
+ } else {
+ rv.setTextColor(R.id.clock, resources.getColor(R.color.white));
+ rv.setTextColor(R.id.date, resources.getColor(R.color.white));
+ rv.setTextColor(R.id.nextAlarm, resources.getColor(R.color.white));
+ }
+
final int smallestWorldCityListSizePx =
resources.getDimensionPixelSize(R.dimen.widget_min_world_city_list_size);
if (sizes.getListHeight() <= smallestWorldCityListSizePx) {
@@ -428,6 +482,9 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
nextAlarmIcon.setTextSize(COMPLEX_UNIT_PX, measuredSizes.mIconFontSizePx);
nextAlarmIcon.setPadding(0, 0, measuredSizes.mIconPaddingPx, 0);
+ // Adjust the alarm icon text color before generating its bitmap.
+ nextAlarmIcon.setTextColor(context.getResources().getColor(mDarkText ? R.color.black : R.color.white));
+
// Measure and layout the sizer.
final int widthSize = View.MeasureSpec.getSize(measuredSizes.mTargetWidthPx);
final int heightSize = View.MeasureSpec.getSize(measuredSizes.mTargetHeightPx);
--
2.25.1
@@ -1,26 +0,0 @@
From 99b3533fe66a7bdc71dd6c63c4ba6c75e2ef2082 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sat, 6 Jun 2015 10:40:51 -0400
Subject: [PATCH] NfcService: Disable NFC by default
Change-Id: Ibe6abec7fa84c6fde476b8a083f57a3f61b50909
---
src/com/android/nfc/NfcService.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/com/android/nfc/NfcService.java b/src/com/android/nfc/NfcService.java
index 3facdeeb..878b7e21 100644
--- a/src/com/android/nfc/NfcService.java
+++ b/src/com/android/nfc/NfcService.java
@@ -133,7 +133,7 @@ public class NfcService implements DeviceHostListener {
public static final String PREF = "NfcServicePrefs";
static final String PREF_NFC_ON = "nfc_on";
- static final boolean NFC_ON_DEFAULT = true;
+ static final boolean NFC_ON_DEFAULT = false;
static final String PREF_NDEF_PUSH_ON = "ndef_push_on";
static final boolean NDEF_PUSH_ON_DEFAULT = false;
static final String PREF_SECURE_NFC_ON = "secure_nfc_on";
--
2.25.1
@@ -1,227 +0,0 @@
From d94a28d2f9f88d3fee4f2a71b2364bca23f4be8b Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 13 Mar 2022 11:22:48 +0000
Subject: [PATCH] Revert "[DO NOT MERGE] Allow a settings override for
double-line clock"
Sorry but I SAID NEVER!
This reverts commit cb4836b4868adc1f06212ce82851a5f16169ab5c.
Change-Id: I8b4b1354f23981f6edbe7f3c81ec4f511da3cc1a
---
res/values/strings.xml | 4 -
res/xml/security_lockscreen_settings.xml | 6 --
.../LockscreenClockPreferenceController.java | 70 ---------------
...ckscreenClockPreferenceControllerTest.java | 90 -------------------
4 files changed, 170 deletions(-)
delete mode 100644 src/com/android/settings/display/LockscreenClockPreferenceController.java
delete mode 100644 tests/robotests/src/com/android/settings/display/LockscreenClockPreferenceControllerTest.java
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 09d80c8814..8e55b8a4b8 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -13520,10 +13520,6 @@
<string name="lockscreen_trivial_controls_summary">Control external devices without unlocking your phone or tablet if allowed by the device controls app</string>
<!-- Trivial Device disabled controls summary [CHAR LIMIT=NONE] -->
<string name="lockscreen_trivial_disabled_controls_summary">To use, first turn on \u0022Show device controls\u0022</string>
- <!-- Lockscreen double-line clock summary [CHAR LIMIT=NONE] -->
- <string name="lockscreen_double_line_clock_summary">Show double-line clock when available</string>
- <!-- Lockscreen double-line clock toggle [CHAR LIMIT=60] -->
- <string name="lockscreen_double_line_clock_setting_toggle">Double-line clock</string>
<!-- Title for RTT setting. [CHAR LIMIT=NONE] -->
<string name="rtt_settings_title"></string>
diff --git a/res/xml/security_lockscreen_settings.xml b/res/xml/security_lockscreen_settings.xml
index cb3c69172e..3b3635ac45 100644
--- a/res/xml/security_lockscreen_settings.xml
+++ b/res/xml/security_lockscreen_settings.xml
@@ -78,12 +78,6 @@
android:title="@string/lockscreen_trivial_controls_setting_toggle"
android:summary="@string/lockscreen_trivial_controls_summary"
settings:controller="com.android.settings.display.ControlsTrivialPrivacyPreferenceController"/>
-
- <SwitchPreference
- android:key="lockscreen_double_line_clock_switch"
- android:title="@string/lockscreen_double_line_clock_setting_toggle"
- android:summary="@string/lockscreen_double_line_clock_summary"
- settings:controller="com.android.settings.display.LockscreenClockPreferenceController" />
</PreferenceCategory>
<PreferenceCategory
diff --git a/src/com/android/settings/display/LockscreenClockPreferenceController.java b/src/com/android/settings/display/LockscreenClockPreferenceController.java
deleted file mode 100644
index 70ae55eaf9..0000000000
--- a/src/com/android/settings/display/LockscreenClockPreferenceController.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2021 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.
- */
-
-package com.android.settings.display;
-
-import android.content.Context;
-import android.provider.Settings;
-
-import androidx.preference.Preference;
-
-import com.android.settings.R;
-import com.android.settings.core.TogglePreferenceController;
-
-/**
- * Preference to enable/disable the large double-line clock on lockscreen
- */
-public class LockscreenClockPreferenceController extends TogglePreferenceController {
-
- private static final String SETTING_KEY = Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK;
-
- public LockscreenClockPreferenceController(Context context, String preferenceKey) {
- super(context, preferenceKey);
- }
-
- @Override
- public boolean isChecked() {
- return Settings.Secure.getInt(mContext.getContentResolver(), SETTING_KEY, 1) != 0;
- }
-
- @Override
- public boolean setChecked(boolean isChecked) {
- return Settings.Secure.putInt(mContext.getContentResolver(), SETTING_KEY,
- isChecked ? 1 : 0);
- }
-
- @Override
- public CharSequence getSummary() {
- return mContext.getText(R.string.lockscreen_double_line_clock_summary);
- }
-
- @Override
- public int getAvailabilityStatus() {
- return AVAILABLE;
- }
-
- @Override
- public void updateState(Preference preference) {
- super.updateState(preference);
- preference.setEnabled(true);
- refreshSummary(preference);
- }
-
- @Override
- public int getSliceHighlightMenuRes() {
- return R.string.menu_key_display;
- }
-}
diff --git a/tests/robotests/src/com/android/settings/display/LockscreenClockPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/display/LockscreenClockPreferenceControllerTest.java
deleted file mode 100644
index 94f2dc6655..0000000000
--- a/tests/robotests/src/com/android/settings/display/LockscreenClockPreferenceControllerTest.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (C) 2021 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.
- */
-
-package com.android.settings.display;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import android.content.ContentResolver;
-import android.content.Context;
-import android.provider.Settings;
-
-import androidx.preference.Preference;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-import org.robolectric.RobolectricTestRunner;
-import org.robolectric.RuntimeEnvironment;
-
-@RunWith(RobolectricTestRunner.class)
-public class LockscreenClockPreferenceControllerTest {
-
- private static final String TEST_KEY = "test_key";
- private static final String SETTING_KEY = Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK;
-
- private Context mContext;
- private ContentResolver mContentResolver;
- private LockscreenClockPreferenceController mController;
-
- @Mock
- private Preference mPreference;
-
- @Before
- public void setUp() {
- MockitoAnnotations.initMocks(this);
- mContext = RuntimeEnvironment.application;
- mContentResolver = mContext.getContentResolver();
- mController = new LockscreenClockPreferenceController(mContext, TEST_KEY);
- }
-
- @Test
- public void isChecked_SettingIs1_returnTrue() {
- Settings.Secure.putInt(mContentResolver, SETTING_KEY, 1);
-
- assertThat(mController.isChecked()).isTrue();
- }
-
- @Test
- public void isChecked_SettingIs0_returnFalse() {
- Settings.Secure.putInt(mContentResolver, SETTING_KEY, 0);
-
- assertThat(mController.isChecked()).isFalse();
- }
-
- @Test
- public void isChecked_SettingIsNotSet_returnTrue() {
- Settings.Secure.putString(mContentResolver, SETTING_KEY, null);
-
- assertThat(mController.isChecked()).isTrue();
- }
-
- @Test
- public void setChecked_true_SettingIsNot0() {
- mController.setChecked(true);
-
- assertThat(Settings.Secure.getInt(mContentResolver, SETTING_KEY, 0)).isNotEqualTo(0);
- }
-
- @Test
- public void setChecked_false_SettingIs0() {
- mController.setChecked(false);
-
- assertThat(Settings.Secure.getInt(mContentResolver, SETTING_KEY, 0)).isEqualTo(0);
- }
-}
--
2.25.1
@@ -1,93 +0,0 @@
From 1f218b4e6572822d99ec46c1bfd65e7ff023c0d3 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 28 Oct 2021 02:30:59 +0000
Subject: [PATCH 1/2] Trebuchet: Make overview scrim transparent again
Also revert texts/buttons to workspace color
Change-Id: I78c84865eb06b8e59c9c271cd2e267ae4cd7cc08
---
quickstep/res/values/styles.xml | 4 ++--
quickstep/src/com/android/quickstep/views/RecentsView.java | 2 +-
res/color-v31/overview_scrim.xml | 2 +-
res/color-v31/overview_scrim_dark.xml | 2 +-
res/color/overview_button.xml | 6 +++---
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/quickstep/res/values/styles.xml b/quickstep/res/values/styles.xml
index 7225220876..59cce932a2 100644
--- a/quickstep/res/values/styles.xml
+++ b/quickstep/res/values/styles.xml
@@ -142,7 +142,7 @@
parent="@android:style/Widget.DeviceDefault.Button.Borderless">
<item name="android:textColor">@color/overview_button</item>
<item name="android:drawableTint">@color/overview_button</item>
- <item name="android:tint">?android:attr/textColorPrimary</item>
+ <item name="android:tint">?attr/workspaceTextColor</item>
<item name="android:drawablePadding">8dp</item>
<item name="android:textAllCaps">false</item>
</style>
@@ -182,4 +182,4 @@
<item name="android:textSize">24sp</item>
<item name="android:lines">2</item>
</style>
-</resources>
\ No newline at end of file
+</resources>
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index 4a4202ecc6..58e8c2508a 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -717,7 +717,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
mEmptyIcon.setCallback(this);
mEmptyMessage = context.getText(R.string.recents_empty_message);
mEmptyMessagePaint = new TextPaint();
- mEmptyMessagePaint.setColor(Themes.getAttrColor(context, android.R.attr.textColorPrimary));
+ mEmptyMessagePaint.setColor(Themes.getAttrColor(context, R.attr.workspaceTextColor));
mEmptyMessagePaint.setTextSize(getResources()
.getDimension(R.dimen.recents_empty_message_text_size));
mEmptyMessagePaint.setTypeface(Typeface.create(Themes.getDefaultBodyFont(context),
diff --git a/res/color-v31/overview_scrim.xml b/res/color-v31/overview_scrim.xml
index 212518ff65..894997c59a 100644
--- a/res/color-v31/overview_scrim.xml
+++ b/res/color-v31/overview_scrim.xml
@@ -14,5 +14,5 @@
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:color="@android:color/system_neutral2_200" />
+ <item android:color="@android:color/transparent" />
</selector>
diff --git a/res/color-v31/overview_scrim_dark.xml b/res/color-v31/overview_scrim_dark.xml
index 2ab8ecdec9..894997c59a 100644
--- a/res/color-v31/overview_scrim_dark.xml
+++ b/res/color-v31/overview_scrim_dark.xml
@@ -14,5 +14,5 @@
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:color="@android:color/system_neutral1_500" android:lStar="35" />
+ <item android:color="@android:color/transparent" />
</selector>
diff --git a/res/color/overview_button.xml b/res/color/overview_button.xml
index aa48b78604..e638ac2d4a 100644
--- a/res/color/overview_button.xml
+++ b/res/color/overview_button.xml
@@ -2,10 +2,10 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:alpha="1"
- android:color="?android:attr/textColorPrimary"
+ android:color="?attr/workspaceTextColor"
android:state_enabled="true" />
<item
android:alpha="?android:disabledAlpha"
- android:color="?android:attr/textColorPrimary"
+ android:color="?attr/workspaceTextColor"
android:state_enabled="false" />
-</selector>
\ No newline at end of file
+</selector>
--
2.25.1
@@ -1,82 +0,0 @@
From 3b51af674b9aa916e86fcfe0034ba3dfc0359ae1 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Fri, 18 Mar 2022 08:42:18 +0000
Subject: [PATCH 2/2] Trebuchet: Kill haptics in recents
This partially reverts commit cc5c8843dfebfa92057b6ce8904ac58cd05ffaef.
Change-Id: Ie3b0eabe8cc0421e696720740edc492cae2f5153
---
.../NoButtonQuickSwitchTouchController.java | 8 --------
.../TaskViewTouchController.java | 5 -----
.../android/quickstep/views/RecentsView.java | 19 -------------------
3 files changed, 32 deletions(-)
diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java
index 53dc9dd873..c8d89edb97 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java
@@ -429,14 +429,6 @@ public class NoButtonQuickSwitchTouchController implements TouchController,
nonOverviewAnim.setFloatValues(startProgress, endProgress);
mNonOverviewAnim.dispatchOnStart();
}
- if (targetState == QUICK_SWITCH) {
- // Navigating to quick switch, add scroll feedback since the first time is not
- // considered a scroll by the RecentsView.
- VibratorWrapper.INSTANCE.get(mLauncher).vibrate(
- RecentsView.SCROLL_VIBRATION_PRIMITIVE,
- RecentsView.SCROLL_VIBRATION_PRIMITIVE_SCALE,
- RecentsView.SCROLL_VIBRATION_FALLBACK);
- }
nonOverviewAnim.setDuration(Math.max(xDuration, yDuration));
mNonOverviewAnim.setEndAction(() -> onAnimationToStateCompleted(targetState));
diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java
index ca7f633bbc..61ee609535 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java
@@ -367,11 +367,6 @@ public abstract class TaskViewTouchController<T extends BaseDraggingActivity>
mCurrentAnimation.startWithVelocity(mActivity, goingToEnd,
velocity * orientationHandler.getSecondaryTranslationDirectionFactor(),
mEndDisplacement, animationDuration);
- if (goingUp && goingToEnd && !mIsDismissHapticRunning) {
- VibratorWrapper.INSTANCE.get(mActivity).vibrate(TASK_DISMISS_VIBRATION_PRIMITIVE,
- TASK_DISMISS_VIBRATION_PRIMITIVE_SCALE, TASK_DISMISS_VIBRATION_FALLBACK);
- mIsDismissHapticRunning = true;
- }
}
private void clearState() {
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index 58e8c2508a..786db49be5 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -1339,25 +1339,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
}
}
- @Override
- protected void onEdgeAbsorbingScroll() {
- vibrateForScroll();
- }
-
- @Override
- protected void onScrollOverPageChanged() {
- vibrateForScroll();
- }
-
- private void vibrateForScroll() {
- long now = SystemClock.uptimeMillis();
- if (now - mScrollLastHapticTimestamp > mScrollHapticMinGapMillis) {
- mScrollLastHapticTimestamp = now;
- VibratorWrapper.INSTANCE.get(mContext).vibrate(SCROLL_VIBRATION_PRIMITIVE,
- SCROLL_VIBRATION_PRIMITIVE_SCALE, SCROLL_VIBRATION_FALLBACK);
- }
- }
-
@Override
protected void determineScrollingStart(MotionEvent ev, float touchSlopScale) {
// Enables swiping to the left or right only if the task overlay is not modal.
--
2.25.1
@@ -1,87 +0,0 @@
From b09034c7e5f9bbc2d29c3f10452259956fcb9f46 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 16 Oct 2021 00:33:15 +0000
Subject: [PATCH] Replace captive portal URLs globally
...so that it works even without a SIM inserted, which is a typical usecase of mine
URLs from Chinese OEM UIs are faster and more reliable than g.cn and other int'l ones
Change-Id: Ic3e124b2b62838a2bcf1dad0d670515f3d056964
---
res/values-mcc460/config.xml | 31 -------------------------------
res/values/config.xml | 7 +++----
2 files changed, 3 insertions(+), 35 deletions(-)
delete mode 100644 res/values-mcc460/config.xml
diff --git a/res/values-mcc460/config.xml b/res/values-mcc460/config.xml
deleted file mode 100644
index 3c4b4933..00000000
--- a/res/values-mcc460/config.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
- <!-- Network validation URL configuration for devices using a Chinese SIM (MCC 460).
- The below URLs are often whitelisted by captive portals, so they should not be used in the
- general case as this could degrade the user experience (portals not detected properly).
- However in China the default URLs are not accessible in general. The below alternatives
- should allow users to connect to local networks normally. -->
- <!-- default_captive_portal_http_url is not configured as overlayable so
- OEMs that wish to change captive_portal_http_url configuration must
- do so via configuring runtime resource overlay to
- config_captive_portal_http_url and *NOT* by changing or overlaying
- this resource. It will break if the enforcement of overlayable starts.
- -->
- <string name="default_captive_portal_http_url" translatable="false">http://connectivitycheck.gstatic.cn/generate_204</string>
- <!-- default_captive_portal_https_url is not configured as overlayable so
- OEMs that wish to change captive_portal_https_url configuration must
- do so via configuring runtime resource overlay to
- config_captive_portal_https_url and *NOT* by changing or overlaying
- this resource. It will break if the enforcement of overlayable starts.
- -->
- <string name="default_captive_portal_https_url" translatable="false">https://connectivitycheck.gstatic.cn/generate_204</string>
- <!-- default_captive_portal_fallback_urls is not configured as overlayable
- so OEMs that wish to change captive_portal_fallback_urls configuration
- must do so via configuring runtime resource overlay to
- config_captive_portal_fallback_urls and *NOT* by changing or overlaying
- this resource. It will break if the enforcement of overlayable starts.
- -->
- <string-array name="default_captive_portal_fallback_urls" translatable="false">
- <item>http://www.googleapis.cn/generate_204</item>
- </string-array>
-</resources>
diff --git a/res/values/config.xml b/res/values/config.xml
index 805ca041..61297dda 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -13,7 +13,7 @@
config_captive_portal_http_url and *NOT* by changing or overlaying
this resource. It will break if the enforcement of overlayable starts.
-->
- <string name="default_captive_portal_http_url" translatable="false">http://connectivitycheck.gstatic.com/generate_204</string>
+ <string name="default_captive_portal_http_url" translatable="false">http://conn4.coloros.com/generate204</string>
<!-- HTTPS URL for network validation, to use for confirming internet connectivity. -->
<!-- default_captive_portal_https_url is not configured as overlayable so
OEMs that wish to change captive_portal_https_url configuration must
@@ -21,7 +21,7 @@
config_captive_portal_https_url and *NOT* by changing or overlaying
this resource. It will break if the enforcement of overlayable starts.
-->
- <string name="default_captive_portal_https_url" translatable="false">https://www.google.com/generate_204</string>
+ <string name="default_captive_portal_https_url" translatable="false">https://conn4.coloros.com/generate204</string>
<!-- List of fallback URLs to use for detecting captive portals. -->
<!-- default_captive_portal_fallback_urls is not configured as overlayable
@@ -31,8 +31,7 @@
this resource. It will break if the enforcement of overlayable starts.
-->
<string-array name="default_captive_portal_fallback_urls" translatable="false">
- <item>http://www.google.com/gen_204</item>
- <item>http://play.googleapis.com/generate_204</item>
+ <item>http://connect.rom.miui.com/generate_204</item>
</string-array>
<!-- Configuration hooks for the above settings.
Empty by default but may be overridden by RROs. -->
--
2.25.1
@@ -1,7 +1,7 @@
From d9e352c11ee8738439b73ff5f02429da3f045cc5 Mon Sep 17 00:00:00 2001 From 734d1b69c62d1ab2e097da3e5c15ce041394d558 Mon Sep 17 00:00:00 2001
From: AndyCGYan <GeForce8800Ultra@gmail.com> From: AndyCGYan <GeForce8800Ultra@gmail.com>
Date: Mon, 1 Jul 2019 07:03:04 +0000 Date: Mon, 1 Jul 2019 07:03:04 +0000
Subject: [PATCH 3/4] vendor_lineage: Ignore neverallows... again Subject: [PATCH 1/2] vendor_lineage: Ignore neverallows... again
Because unofficial builds are better than no builds! Because unofficial builds are better than no builds!
@@ -1,7 +1,7 @@
From 2386227e0541aa061579dd9c34da867174a7d6a2 Mon Sep 17 00:00:00 2001 From f20707d1b08d3c6fbaf301e4fb621f081b7a81f1 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com> From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 20 Jun 2021 09:09:15 +0000 Date: Sun, 20 Jun 2021 09:09:15 +0000
Subject: [PATCH 1/4] build: Integrate prop modifications (2/2) Subject: [PATCH 2/2] build: Integrate prop modifications (2/2)
Change-Id: I076973f902ab20011964e50955e4326c18d5b34e Change-Id: I076973f902ab20011964e50955e4326c18d5b34e
--- ---
@@ -9,15 +9,15 @@ Change-Id: I076973f902ab20011964e50955e4326c18d5b34e
1 file changed, 1 insertion(+), 6 deletions(-) 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/build/core/main_version.mk b/build/core/main_version.mk diff --git a/build/core/main_version.mk b/build/core/main_version.mk
index 28044e2c..c5aa9617 100644 index dddeee77..dd86cbfd 100644
--- a/build/core/main_version.mk --- a/build/core/main_version.mk
+++ b/build/core/main_version.mk +++ b/build/core/main_version.mk
@@ -5,17 +5,12 @@ ADDITIONAL_SYSTEM_PROPERTIES += \ @@ -5,17 +5,12 @@ ADDITIONAL_BUILD_PROPERTIES += \
endif endif
# LineageOS System Version # LineageOS System Version
+# Do not set Display Versions here, due to Makefile not playing nice with spaces +# Do not set Display Versions here, due to Makefile not playing nice with spaces
ADDITIONAL_SYSTEM_PROPERTIES += \ ADDITIONAL_BUILD_PROPERTIES += \
- ro.lineage.version=$(LINEAGE_VERSION) \ - ro.lineage.version=$(LINEAGE_VERSION) \
ro.lineage.releasetype=$(LINEAGE_BUILDTYPE) \ ro.lineage.releasetype=$(LINEAGE_BUILDTYPE) \
ro.lineage.build.version=$(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR) \ ro.lineage.build.version=$(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR) \
@@ -25,11 +25,11 @@ index 28044e2c..c5aa9617 100644
ro.lineagelegal.url=https://lineageos.org/legal ro.lineagelegal.url=https://lineageos.org/legal
-# LineageOS Platform Display Version -# LineageOS Platform Display Version
-ADDITIONAL_SYSTEM_PROPERTIES += \ -ADDITIONAL_BUILD_PROPERTIES += \
- ro.lineage.display.version=$(LINEAGE_DISPLAY_VERSION) - ro.lineage.display.version=$(LINEAGE_DISPLAY_VERSION)
- -
# LineageOS Platform SDK Version # LineageOS Platform SDK Version
ADDITIONAL_SYSTEM_PROPERTIES += \ ADDITIONAL_BUILD_PROPERTIES += \
ro.lineage.build.version.plat.sdk=$(LINEAGE_PLATFORM_SDK_VERSION) ro.lineage.build.version.plat.sdk=$(LINEAGE_PLATFORM_SDK_VERSION)
-- --
2.25.1 2.25.1
@@ -1,40 +0,0 @@
From 209602b004deebac7846b67def29f3281d864080 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 16 Oct 2021 00:41:07 +0000
Subject: [PATCH 2/4] build: Remove Stk (2/2)
Change-Id: I4e1cfacd296e47ef1731f3c32555089a5fca6f0c
---
config/data_only.mk | 4 ----
config/telephony.mk | 3 +--
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/config/data_only.mk b/config/data_only.mk
index 5ff877c9..ab70301b 100644
--- a/config/data_only.mk
+++ b/config/data_only.mk
@@ -1,7 +1,3 @@
# World APN list
PRODUCT_PACKAGES += \
apns-conf.xml
-
-# Telephony packages
-PRODUCT_PACKAGES += \
- Stk
diff --git a/config/telephony.mk b/config/telephony.mk
index 6adf48d9..e63b320d 100644
--- a/config/telephony.mk
+++ b/config/telephony.mk
@@ -8,8 +8,7 @@ PRODUCT_PACKAGES += \
# Telephony packages
PRODUCT_PACKAGES += \
- messaging \
- Stk
+ messaging
# Default ringtone
PRODUCT_PRODUCT_PROPERTIES += \
--
2.25.1
@@ -0,0 +1,48 @@
From 44c6b955f1b787984bcddb53d35bf8eda20e02d1 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 8 Aug 2021 01:43:40 +0000
Subject: [PATCH] Revert "recovery: Allow custom bootloader msg offset in block
misc"
This reverts commit 0e369f42b82c4d12edba9a46dd20bee0d4b783ec.
---
bootloader_message/Android.bp | 1 -
.../include/bootloader_message/bootloader_message.h | 10 +++++-----
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/bootloader_message/Android.bp b/bootloader_message/Android.bp
index f23b1dea..6443a077 100644
--- a/bootloader_message/Android.bp
+++ b/bootloader_message/Android.bp
@@ -16,7 +16,6 @@
cc_defaults {
name: "libbootloader_message_defaults",
- defaults: ["bootloader_message_offset_defaults"],
srcs: ["bootloader_message.cpp"],
cflags: [
"-Wall",
diff --git a/bootloader_message/include/bootloader_message/bootloader_message.h b/bootloader_message/include/bootloader_message/bootloader_message.h
index 387692b9..e4cf09b2 100644
--- a/bootloader_message/include/bootloader_message/bootloader_message.h
+++ b/bootloader_message/include/bootloader_message/bootloader_message.h
@@ -29,11 +29,11 @@
// 32K - 64K System space, used for miscellanious AOSP features. See below.
// Note that these offsets are admitted by bootloader,recovery and uncrypt, so they
// are not configurable without changing all of them.
-constexpr size_t BOOTLOADER_MESSAGE_OFFSET_IN_MISC = BOARD_RECOVERY_BLDRMSG_OFFSET;
-constexpr size_t VENDOR_SPACE_OFFSET_IN_MISC = 2 * 1024 + BOARD_RECOVERY_BLDRMSG_OFFSET;
-constexpr size_t WIPE_PACKAGE_OFFSET_IN_MISC = 16 * 1024 + BOARD_RECOVERY_BLDRMSG_OFFSET;
-constexpr size_t SYSTEM_SPACE_OFFSET_IN_MISC = 32 * 1024 + BOARD_RECOVERY_BLDRMSG_OFFSET;
-constexpr size_t SYSTEM_SPACE_SIZE_IN_MISC = 32 * 1024 + BOARD_RECOVERY_BLDRMSG_OFFSET;
+constexpr size_t BOOTLOADER_MESSAGE_OFFSET_IN_MISC = 0;
+constexpr size_t VENDOR_SPACE_OFFSET_IN_MISC = 2 * 1024;
+constexpr size_t WIPE_PACKAGE_OFFSET_IN_MISC = 16 * 1024;
+constexpr size_t SYSTEM_SPACE_OFFSET_IN_MISC = 32 * 1024;
+constexpr size_t SYSTEM_SPACE_SIZE_IN_MISC = 32 * 1024;
/* Bootloader Message (2-KiB)
*
--
2.25.1
@@ -1,75 +0,0 @@
From faff60c8814e2d31519d86e92faf08761a1d1de1 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 8 Dec 2021 07:04:53 +0000
Subject: [PATCH] Remove init.vndk-nodef.rc
This partially reverts "Deprecate VNDK-lite support from Legacy GSI".
Paired with https://github.com/LineageOS/android_system_core/commit/0b265e35ddf42638fa807f5349a10c40e3d46446, it kicks permissive devices into bootloader.
Given that GSI+permissive won't ever be a Lineage official scenario, revert this only on our side.
Thanks @Kethen for the insight!
Change-Id: I7c14fe5229e953f620bb225fa5c981752d0ac5f9
---
target/product/gsi/Android.mk | 13 -------------
target/product/gsi/init.gsi.rc | 2 --
target/product/gsi/init.vndk-nodef.rc | 3 ---
target/product/gsi_release.mk | 1 -
4 files changed, 19 deletions(-)
delete mode 100644 target/product/gsi/init.vndk-nodef.rc
diff --git a/target/product/gsi/Android.mk b/target/product/gsi/Android.mk
index 85e551d3f..c1f37e07f 100644
--- a/target/product/gsi/Android.mk
+++ b/target/product/gsi/Android.mk
@@ -247,16 +247,3 @@ LOCAL_SYSTEM_EXT_MODULE := true
LOCAL_MODULE_RELATIVE_PATH := init
include $(BUILD_PREBUILT)
-
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := init.vndk-nodef.rc
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
-LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
-LOCAL_SRC_FILES := $(LOCAL_MODULE)
-LOCAL_MODULE_CLASS := ETC
-LOCAL_SYSTEM_EXT_MODULE := true
-LOCAL_MODULE_RELATIVE_PATH := gsi
-
-include $(BUILD_PREBUILT)
diff --git a/target/product/gsi/init.gsi.rc b/target/product/gsi/init.gsi.rc
index 69c8e467b..c6faba78d 100644
--- a/target/product/gsi/init.gsi.rc
+++ b/target/product/gsi/init.gsi.rc
@@ -1,5 +1,3 @@
#
# Android init script for GSI required initialization
#
-
-import /system/system_ext/etc/gsi/init.vndk-${ro.vndk.version:-nodef}.rc
diff --git a/target/product/gsi/init.vndk-nodef.rc b/target/product/gsi/init.vndk-nodef.rc
deleted file mode 100644
index 1b141a05e..000000000
--- a/target/product/gsi/init.vndk-nodef.rc
+++ /dev/null
@@ -1,3 +0,0 @@
-on early-init
- # Reboot if BOARD_VNDK_VERSION is not defined
- exec - root -- /system/bin/reboot bootloader
diff --git a/target/product/gsi_release.mk b/target/product/gsi_release.mk
index 74501cd1f..575e90b14 100644
--- a/target/product/gsi_release.mk
+++ b/target/product/gsi_release.mk
@@ -60,7 +60,6 @@ PRODUCT_PACKAGES += com.android.apex.cts.shim.v1_with_prebuilts.flattened
PRODUCT_PACKAGES += \
gsi_skip_mount.cfg \
init.gsi.rc \
- init.vndk-nodef.rc \
# Support additional VNDK snapshots
PRODUCT_EXTRA_VNDK_VERSIONS := \
--
2.25.1
@@ -0,0 +1,31 @@
From 9dd12aff1bdee7020ddd18c4821d390611dc2b5f Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 8 Aug 2021 01:43:40 +0000
Subject: [PATCH] Revert "mainline_system: Exclude vendor.lineage.power@1.0
from artifact path requirements"
This reverts commit 78c28df40f72fdcbe3f82a83828060ad19765fa1.
---
target/product/mainline_system.mk | 6 ------
1 file changed, 6 deletions(-)
diff --git a/target/product/mainline_system.mk b/target/product/mainline_system.mk
index e9f9dde13..a787707a0 100644
--- a/target/product/mainline_system.mk
+++ b/target/product/mainline_system.mk
@@ -135,12 +135,6 @@ _base_mk_allowed_list :=
_my_allowed_list := $(_base_mk_allowed_list)
-# vendor.lineage.power@1.0 currently violates the artifact path requirements
-# Exclude it from the check for now
-_my_allowed_list += \
- $(TARGET_COPY_OUT_SYSTEM_EXT)/lib/vendor.lineage.power@1.0.so \
- $(TARGET_COPY_OUT_SYSTEM_EXT)/lib64/vendor.lineage.power@1.0.so \
-
# For mainline, system.img should be mounted at /, so we include ROOT here.
_my_paths := \
$(TARGET_COPY_OUT_ROOT)/ \
--
2.25.1
@@ -1,7 +1,7 @@
From 05f4b920214c3d4145ca39d2c4334dc68c8faecb Mon Sep 17 00:00:00 2001 From f58f4704de0b4e9f9e650ca954de1bf971d897d1 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com> From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 8 Aug 2021 01:43:40 +0000 Date: Thu, 18 Nov 2021 02:19:52 +0000
Subject: [PATCH 1/7] treble: Lineage-ify Subject: [PATCH 1/3] treble: Lineage-ify
Squash of: Squash of:
- Proper target names - Proper target names
@@ -9,15 +9,14 @@ Squash of:
- treble: Add overlay-lineage - treble: Add overlay-lineage
- treble: Don't specify config_wallpaperCropperPackage - treble: Don't specify config_wallpaperCropperPackage
- treble: Don't handle apns-conf - treble: Don't handle apns-conf
Change-Id: I25eee7a3804f335430a447ae1424402d7e37851b
--- ---
base-pre.mk | 3 - base-pre.mk | 3 -
base.mk | 16 ++-- base.mk | 16 ++--
generate.sh | 4 +- generate.sh | 2 +-
.../lineage/res/res/values/config.xml | 81 +++++++++++++++++++ .../lineage/res/res/values/config.xml | 81 +++++++++++++++++++
.../base/core/res/res/values/config.xml | 1 - .../base/core/res/res/values/config.xml | 1 -
5 files changed, 92 insertions(+), 13 deletions(-) sepolicy/file_contexts | 3 -
6 files changed, 91 insertions(+), 15 deletions(-)
create mode 100644 overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml create mode 100644 overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
diff --git a/base-pre.mk b/base-pre.mk diff --git a/base-pre.mk b/base-pre.mk
@@ -29,18 +28,18 @@ index 6a317e4..e69de29 100644
-PRODUCT_COPY_FILES += \ -PRODUCT_COPY_FILES += \
- device/sample/etc/apns-full-conf.xml:system/etc/apns-conf.xml - device/sample/etc/apns-full-conf.xml:system/etc/apns-conf.xml
diff --git a/base.mk b/base.mk diff --git a/base.mk b/base.mk
index 5d4ed0b..6097e3d 100644 index 301fee9..e8ac0a3 100644
--- a/base.mk --- a/base.mk
+++ b/base.mk +++ b/base.mk
@@ -17,12 +17,14 @@ PRODUCT_COPY_FILES += \ @@ -8,12 +8,14 @@ PRODUCT_COPY_FILES := \
device/phh/treble/bluetooth/audio/config/sysbta_audio_policy_configuration.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysbta_audio_policy_configuration.xml \ frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \
device/phh/treble/bluetooth/audio/config/sysbta_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysbta_audio_policy_configuration_7_0.xml frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml \
-#Use a more decent APN config -#Use a more decent APN config
-PRODUCT_COPY_FILES += \ -PRODUCT_COPY_FILES += \
- device/sample/etc/apns-full-conf.xml:system/etc/apns-conf.xml - device/sample/etc/apns-full-conf.xml:system/etc/apns-conf.xml
- -
SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += device/phh/treble/sepolicy BOARD_PLAT_PRIVATE_SEPOLICY_DIR += device/phh/treble/sepolicy
-PRODUCT_PACKAGE_OVERLAYS += device/phh/treble/overlay -PRODUCT_PACKAGE_OVERLAYS += device/phh/treble/overlay
+ +
+PRODUCT_PACKAGE_OVERLAYS += \ +PRODUCT_PACKAGE_OVERLAYS += \
@@ -52,10 +51,10 @@ index 5d4ed0b..6097e3d 100644
$(call inherit-product, vendor/hardware_overlay/overlay.mk) $(call inherit-product, vendor/hardware_overlay/overlay.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
@@ -40,11 +42,11 @@ PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \ @@ -30,11 +32,11 @@ PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
ro.build.version.security_patch=$(PLATFORM_SECURITY_PATCH) \
ro.adb.secure=0 \ ro.adb.secure=0 \
ro.logd.auditd=true \ ro.logd.auditd=true
ro.logd.kernel=true \
- -
+ +
#Huawei HiSuite (also other OEM custom programs I guess) it's of no use in AOSP builds #Huawei HiSuite (also other OEM custom programs I guess) it's of no use in AOSP builds
@@ -67,18 +66,9 @@ index 5d4ed0b..6097e3d 100644
#VNDK config files #VNDK config files
PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \
diff --git a/generate.sh b/generate.sh diff --git a/generate.sh b/generate.sh
index 9c20eb5..89fa88b 100644 index c1494c7..2760fad 100644
--- a/generate.sh --- a/generate.sh
+++ b/generate.sh +++ b/generate.sh
@@ -54,7 +54,7 @@ for part in a ab;do
su_suffix='N'
if [ "$su" == "yes" ];then
su_suffix='S'
- extra_packages+=' phh-su me.phh.superuser'
+ extra_packages+=' phh-su me.phh.superuser su'
fi
part_suffix='a'
@@ -64,7 +64,7 @@ for part in a ab;do @@ -64,7 +64,7 @@ for part in a ab;do
optional_base='$(call inherit-product, device/phh/treble/base-sas.mk)' optional_base='$(call inherit-product, device/phh/treble/base-sas.mk)'
fi fi
@@ -176,7 +166,7 @@ index 0000000..8df673a
+ <integer name="config_deviceHardwareWakeKeys">127</integer> + <integer name="config_deviceHardwareWakeKeys">127</integer>
+</resources> +</resources>
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 479bff7..964524c 100644 index 2d5c21e..7a15163 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml --- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -22,7 +22,6 @@ @@ -22,7 +22,6 @@
@@ -187,6 +177,20 @@ index 479bff7..964524c 100644
<bool name="config_unplugTurnsOnScreen">true</bool> <bool name="config_unplugTurnsOnScreen">true</bool>
<integer name="config_multiuserMaximumUsers">5</integer> <integer name="config_multiuserMaximumUsers">5</integer>
<bool name="config_enableMultiUserUI">true</bool> <bool name="config_enableMultiUserUI">true</bool>
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index 4ae5095..5e39d5b 100644
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -6,9 +6,6 @@
/system/bin/phh-on-data.sh u:object_r:phhsu_exec:s0
/system/bin/asus-motor u:object_r:phhsu_exec:s0
-#/system/bin/fsck\.exfat u:object_r:fsck_exec:s0
-/system/bin/fsck\.ntfs u:object_r:fsck_exec:s0
-
/bt_firmware(/.*)? u:object_r:bt_firmware_file:s0
/sec_storage(/.*)? u:object_r:teecd_data_file:s0
-- --
2.25.1 2.25.1
@@ -1,22 +1,21 @@
From 53244ebbb4a2da9fbcf02834f40b8083549e3ca7 Mon Sep 17 00:00:00 2001 From 3003b3b500c33aca047d5c61e5d9bf1db9980faf Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com> From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 8 Aug 2021 09:29:32 +0000 Date: Sun, 8 Aug 2021 09:29:32 +0000
Subject: [PATCH 2/7] treble: Set BOARD_EXT4_SHARE_DUP_BLOCKS explicitly Subject: [PATCH 2/3] treble: Set BOARD_EXT4_SHARE_DUP_BLOCKS explicitly
Change-Id: I725443154fabde548d2e6c1b072d34c27596c421 Change-Id: I725443154fabde548d2e6c1b072d34c27596c421
--- ---
board-base.mk | 2 ++ board-base.mk | 1 +
1 file changed, 2 insertions(+) 1 file changed, 1 insertion(+)
diff --git a/board-base.mk b/board-base.mk diff --git a/board-base.mk b/board-base.mk
index 2cb5dbc..e493d1c 100644 index 0da1061..e270068 100644
--- a/board-base.mk --- a/board-base.mk
+++ b/board-base.mk +++ b/board-base.mk
@@ -10,3 +10,5 @@ BOARD_ROOT_EXTRA_FOLDERS += bt_firmware sec_storage efs persist @@ -4,3 +4,4 @@ TARGET_EXFAT_DRIVER := exfat
BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true DEVICE_FRAMEWORK_MANIFEST_FILE := device/phh/treble/framework_manifest.xml
BOARD_ROOT_EXTRA_SYMLINKS := $(filter-out $(BOARD_ROOT_EXTRA_SYMLINKS),/mnt/vendor/persist:/persist) BOARD_ROOT_EXTRA_FOLDERS += bt_firmware sec_storage efs
+
+BOARD_EXT4_SHARE_DUP_BLOCKS := true +BOARD_EXT4_SHARE_DUP_BLOCKS := true
-- --
2.25.1 2.25.1
@@ -0,0 +1,20 @@
From 384487e08861871d0cdccadecc01abb14cfa8709 Mon Sep 17 00:00:00 2001
From: Victor Bo <bvoid@yandex.ru>
Date: Tue, 15 Sep 2020 21:26:45 -0400
Subject: [PATCH 3/3] add offline charger sepolicy
---
sepolicy/gsicharger.te | 1 +
1 file changed, 1 insertion(+)
create mode 100644 sepolicy/gsicharger.te
diff --git a/sepolicy/gsicharger.te b/sepolicy/gsicharger.te
new file mode 100644
index 0000000..91cfb5c
--- /dev/null
+++ b/sepolicy/gsicharger.te
@@ -0,0 +1 @@
+permissive charger;
--
2.25.1
@@ -1,25 +0,0 @@
From 515176d3ca472dd8ffe122ebf91af4ecc5533c3f Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 20 Oct 2021 11:30:25 +0000
Subject: [PATCH 3/7] treble: Set TARGET_NO_KERNEL_OVERRIDE
Taken from Lineage generic targets - skips building kernel cleanly
Change-Id: Id71d3a3aed56fd4e815a64ef4191b125fc5026ce
---
board-base.mk | 2 ++
1 file changed, 2 insertions(+)
diff --git a/board-base.mk b/board-base.mk
index e493d1c..9d1d45e 100644
--- a/board-base.mk
+++ b/board-base.mk
@@ -12,3 +12,5 @@ BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true
BOARD_ROOT_EXTRA_SYMLINKS := $(filter-out $(BOARD_ROOT_EXTRA_SYMLINKS),/mnt/vendor/persist:/persist)
BOARD_EXT4_SHARE_DUP_BLOCKS := true
+
+TARGET_NO_KERNEL_OVERRIDE := true
--
2.25.1
@@ -1,40 +0,0 @@
From 027b59c5b6d68570be7025632f985d8569f6dc85 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Tue, 11 Oct 2022 11:29:02 +0000
Subject: [PATCH 4/7] treble: Enable call recording
Change-Id: I57ca3604363547419a566b37b5151b6b30c46d28
---
.../dialer/callrecord/res/values/config.xml | 20 +++++++++++++++++++
1 file changed, 20 insertions(+)
create mode 100644 overlay-lineage/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml
diff --git a/overlay-lineage/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml b/overlay-lineage/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml
new file mode 100644
index 0000000..4cacde5
--- /dev/null
+++ b/overlay-lineage/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2021 The LineageOS 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>
+ <bool name="call_recording_enabled">true</bool>
+ <integer name="call_recording_audio_source">4</integer>
+</resources>
--
2.25.1
@@ -1,26 +0,0 @@
From b77fda8daa3632ef92f3299180506bcbd7c53189 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 5 Nov 2022 23:49:11 +0000
Subject: [PATCH 5/7] treble: Switch to MindTheGapps
Change-Id: I1b80d4c5176cbf4af21d147c71b0abce6027c7c7
---
generate.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/generate.sh b/generate.sh
index 89fa88b..d847430 100644
--- a/generate.sh
+++ b/generate.sh
@@ -26,7 +26,7 @@ for part in a ab;do
optional_base=""
if [ "$apps" == "gapps" ];then
apps_suffix="g"
- apps_script='$(call inherit-product, device/phh/treble/gapps.mk)'
+ apps_script='$(call inherit-product, vendor/gapps/arm64/arm64-vendor.mk)'
apps_name="with GApps"
fi
if [ "$apps" == "gapps-go" ];then
--
2.25.1
@@ -1,36 +0,0 @@
From 2a9382e9a122f3a34adfed4da687e2bf23383d58 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Tue, 22 Nov 2022 00:36:15 +0000
Subject: [PATCH 6/7] treble: Stop securing ADB
Seems to kill USB Debugging altogether on certain devices,
and unrelated to SN anyway
Build-time macro coupled with vendor/lineage might do better...
Change-Id: I0215b3ed970dd53a124f48e30ca2cf4b0c6d2899
---
rw-system.sh | 4 ----
1 file changed, 4 deletions(-)
diff --git a/rw-system.sh b/rw-system.sh
index 42d315f..798e5e3 100644
--- a/rw-system.sh
+++ b/rw-system.sh
@@ -764,14 +764,10 @@ if [ -f /system/phh/secure ] || [ -f /metadata/phh/secure ];then
resetprop_phh ro.boot.veritymode enforcing
resetprop_phh ro.boot.warranty_bit 0
resetprop_phh ro.warranty_bit 0
- resetprop_phh ro.debuggable 0
resetprop_phh ro.secure 1
resetprop_phh ro.build.type user
resetprop_phh ro.build.selinux 0
- resetprop_phh ro.adb.secure 1
- setprop ctl.restart adbd
-
# Hide system/xbin/su
mount /mnt/phh/empty_dir /system/xbin
mount /mnt/phh/empty_dir /system/app/me.phh.superuser
--
2.25.1
@@ -1,48 +0,0 @@
From f57a44efd56ca41a593e6d1ebb948f486960f714 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 29 Dec 2022 15:12:03 +0000
Subject: [PATCH 7/7] treble: Securize on-demand
Status is stored in /metadata and controlled by persist prop
Change-Id: I8069b6f471ad87ab34c18b743689ab3584cee35b
---
phh-prop-handler.sh | 14 ++++++++++++++
vndk.rc | 2 ++
2 files changed, 16 insertions(+)
diff --git a/phh-prop-handler.sh b/phh-prop-handler.sh
index 4371632..a8cea3f 100644
--- a/phh-prop-handler.sh
+++ b/phh-prop-handler.sh
@@ -210,3 +210,17 @@ if [ "$1" == "persist.sys.phh.disable_soundvolume_effect" ];then
restartAudio
exit
fi
+
+if [ "$1" == "persist.sys.phh.securize" ];then
+ if [[ "$prop_value" != "true" && "$prop_value" != "false" ]]; then
+ exit 1
+ fi
+
+ if [[ "$prop_value" == "true" ]]; then
+ mkdir /metadata/phh
+ touch /metadata/phh/secure
+ else
+ rm /metadata/phh/secure
+ fi
+ exit
+fi
diff --git a/vndk.rc b/vndk.rc
index d1fffde..7db62b7 100644
--- a/vndk.rc
+++ b/vndk.rc
@@ -82,3 +82,5 @@ on property:sys.phh.uninstall-ota=true
on property:ro.vendor.radio.default_network=*
setprop ro.telephony.default_network ${ro.vendor.radio.default_network}
+on property:persist.sys.phh.securize=*
+ exec u:r:phhsu_daemon:s0 root -- /system/bin/phh-prop-handler.sh "persist.sys.phh.securize"
--
2.25.1
@@ -0,0 +1,51 @@
From 0ec12cb7e70f7a0cbeee9934d9b9aa5680359491 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 8 Aug 2021 01:43:40 +0000
Subject: [PATCH] Revert "camera: Allow devices to load custom CameraParameter
code"
This reverts commit 5a5606dbd92f01de322c797a7128fce69902d067.
---
camera/Android.bp | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/camera/Android.bp b/camera/Android.bp
index 21ef9eed70..fa36bb31b1 100644
--- a/camera/Android.bp
+++ b/camera/Android.bp
@@ -14,7 +14,6 @@
cc_library_shared {
name: "libcamera_client",
- defaults: ["camera_parameter_library_defaults"],
aidl: {
export_aidl_headers: true,
@@ -33,6 +32,7 @@ cc_library_shared {
// Source for camera interface parcelables, and manually-written interfaces
"Camera.cpp",
"CameraMetadata.cpp",
+ "CameraParameters.cpp",
"CaptureResult.cpp",
"CameraParameters2.cpp",
"ICamera.cpp",
@@ -77,16 +77,6 @@ cc_library_shared {
}
-cc_library_static {
- name: "libcamera_parameters",
-
- export_include_dirs: [
- "include",
- ],
- srcs: ["CameraParameters.cpp"],
-
-}
-
// AIDL interface between camera clients and the camera service.
filegroup {
name: "libcamera_client_aidl",
--
2.25.1
@@ -0,0 +1,40 @@
From 15c6984df105af4e92c20c33ef53451eb99524a9 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 8 Aug 2021 01:43:40 +0000
Subject: [PATCH] Revert "Add suspend_resume trace events to the atrace 'freq'
category."
This reverts commit 581c22f979af05e48ad4843cdfa9605186d286da.
---
cmds/atrace/atrace.cpp | 1 -
cmds/atrace/atrace.rc | 2 --
2 files changed, 3 deletions(-)
diff --git a/cmds/atrace/atrace.cpp b/cmds/atrace/atrace.cpp
index 28fdaa430..36a35f9f7 100644
--- a/cmds/atrace/atrace.cpp
+++ b/cmds/atrace/atrace.cpp
@@ -171,7 +171,6 @@ static const TracingCategory k_categories[] = {
{ OPT, "events/clk/clk_disable/enable" },
{ OPT, "events/clk/clk_enable/enable" },
{ OPT, "events/power/cpu_frequency_limits/enable" },
- { OPT, "events/power/suspend_resume/enable" },
} },
{ "membus", "Memory Bus Utilization", 0, {
{ REQ, "events/memory_bus/enable" },
diff --git a/cmds/atrace/atrace.rc b/cmds/atrace/atrace.rc
index f442dae66..3fb58275e 100644
--- a/cmds/atrace/atrace.rc
+++ b/cmds/atrace/atrace.rc
@@ -49,8 +49,6 @@ on late-init
chmod 0666 /sys/kernel/tracing/events/power/cpu_frequency_limits/enable
chmod 0666 /sys/kernel/debug/tracing/events/power/gpu_frequency/enable
chmod 0666 /sys/kernel/tracing/events/power/gpu_frequency/enable
- chmod 0666 /sys/kernel/debug/tracing/events/power/suspend_resume/enable
- chmod 0666 /sys/kernel/tracing/events/power/suspend_resume/enable
chmod 0666 /sys/kernel/debug/tracing/events/cpufreq_interactive/enable
chmod 0666 /sys/kernel/tracing/events/cpufreq_interactive/enable
chmod 0666 /sys/kernel/debug/tracing/events/vmscan/mm_vmscan_direct_reclaim_begin/enable
--
2.25.1
@@ -1,28 +1,23 @@
From fb307d91da795de9de3804f5b5f4f57bbd2e061f Mon Sep 17 00:00:00 2001 From 3680359ce25f87c626687ce391ba1d01f593f4b1 Mon Sep 17 00:00:00 2001
From: Raphael Mounier <mounierr07@gmail.com> From: Raphael Mounier <mounierr07@gmail.com>
Date: Thu, 6 Oct 2022 08:35:38 +0200 Date: Fri, 26 Nov 2021 07:53:04 +0100
Subject: [PATCH 5/7] Fix signalstrength for huawei kirin (hi6250, hi3670) Subject: [PATCH] Huawei cell signal strength indicator not working
The RILUtils.convertHalSignalStrength function does not work correctly under Huawei hi6250 and hi3660 platform. We have therefore replaced this function with a new one specifically for this Kirin platform. This patch fixes a problem concerning all Huawei kirin devices (MediaPad, Prague, Warsaw ..). On these devices the signal quality is not recovered correctly from the modem layer
23/11/2021 :
Initial release for Android 11
06/10/2022 :
Android 13 release
--- ---
.../com/android/internal/telephony/RIL.java | 119 ++++++++++++++++++ .../com/android/internal/telephony/RIL.java | 122 ++++++++++++++++++
.../internal/telephony/RadioIndication.java | 21 +++- .../internal/telephony/RadioIndication.java | 27 +++-
2 files changed, 136 insertions(+), 4 deletions(-) 2 files changed, 143 insertions(+), 6 deletions(-)
diff --git a/src/java/com/android/internal/telephony/RIL.java b/src/java/com/android/internal/telephony/RIL.java diff --git a/src/java/com/android/internal/telephony/RIL.java b/src/java/com/android/internal/telephony/RIL.java
index 70431f6a0c..ffb9b4a71c 100644 index 782cd9ebb..417740343 100644
--- a/src/java/com/android/internal/telephony/RIL.java --- a/src/java/com/android/internal/telephony/RIL.java
+++ b/src/java/com/android/internal/telephony/RIL.java +++ b/src/java/com/android/internal/telephony/RIL.java
@@ -5940,6 +5940,125 @@ public class RIL extends BaseCommands implements CommandsInterface { @@ -6706,6 +6706,128 @@ public class RIL extends BaseCommands implements CommandsInterface {
new CellSignalStrengthNr()); new CellSignalStrengthNr());
} }
+
+ /** + /**
+ * Fixup for SignalStrength for Huawei device + * Fixup for SignalStrength for Huawei device
+ * @param signalStrength the initial signal strength + * @param signalStrength the initial signal strength
@@ -97,6 +92,7 @@ index 70431f6a0c..ffb9b4a71c 100644
+ } + }
+ +
+ +
+
+ // 4G - LTE + // 4G - LTE
+ // .lte = {.signalStrength = 99, .rsrp = -104, .rsrq = -16, .rssnr = -4, .cqi = 2147483647, .timingAdvance = -1}, + // .lte = {.signalStrength = 99, .rsrp = -104, .rsrq = -16, .rssnr = -4, .cqi = 2147483647, .timingAdvance = -1},
+ // public CellSignalStrengthLte(int rssi, int rsrp, int rsrq, int rssnr, int cqi, int timingAdvance) { + // public CellSignalStrengthLte(int rssi, int rsrp, int rsrq, int rssnr, int cqi, int timingAdvance) {
@@ -141,45 +137,51 @@ index 70431f6a0c..ffb9b4a71c 100644
+ +
+ } + }
+ +
+
+ +
/** /**
* Get the HAL version. * Convert CellInfo defined in 1.4/types.hal to CellInfo type.
* * @param records List of CellInfo defined in 1.4/types.hal.
diff --git a/src/java/com/android/internal/telephony/RadioIndication.java b/src/java/com/android/internal/telephony/RadioIndication.java diff --git a/src/java/com/android/internal/telephony/RadioIndication.java b/src/java/com/android/internal/telephony/RadioIndication.java
index d947d53611..b74103f594 100644 index bf8ae5f02..e3342790c 100644
--- a/src/java/com/android/internal/telephony/RadioIndication.java --- a/src/java/com/android/internal/telephony/RadioIndication.java
+++ b/src/java/com/android/internal/telephony/RadioIndication.java +++ b/src/java/com/android/internal/telephony/RadioIndication.java
@@ -241,13 +241,26 @@ public class RadioIndication extends IRadioIndication.Stub { @@ -233,14 +233,29 @@ public class RadioIndication extends IRadioIndication.Stub {
public void currentSignalStrength(int indicationType, public void currentSignalStrength(int indicationType,
android.hardware.radio.V1_0.SignalStrength signalStrength) { android.hardware.radio.V1_0.SignalStrength signalStrength) {
- mRil.processIndication(RIL.RADIO_SERVICE, indicationType); - mRil.processIndication(indicationType);
-
- SignalStrength ssInitial = RILUtils.convertHalSignalStrength(signalStrength); - SignalStrength ssInitial = new SignalStrength(signalStrength);
+ SignalStrength ss = null; + SignalStrength ss = null;
+
+ mRil.processIndication(RIL.RADIO_SERVICE, indicationType);
- SignalStrength ss = mRil.fixupSignalStrength10(ssInitial); - SignalStrength ss = mRil.fixupSignalStrength10(ssInitial);
// Note this is set to "verbose" because it happens frequently - // Note this is set to "verbose" because it happens frequently
- if (mRil.isLogvOrTrace()) mRil.unsljLogvRet(RIL_UNSOL_SIGNAL_STRENGTH, ss); - if (RIL.RILJ_LOGV) mRil.unsljLogvRet(RIL_UNSOL_SIGNAL_STRENGTH, ss);
+ if (mRil.isLogvOrTrace()) mRil.unsljLogvRet(RIL_UNSOL_SIGNAL_STRENGTH, signalStrength); + mRil.processIndication(indicationType);
+
+ // Fix signalStrength for Huawei
+ String hardware = android.os.SystemProperties.get("ro.hardware", "");
+ if(hardware.contains("hi3660") || hardware.contains("hi6250") || hardware.contains("hi3670") || hardware.contains("kirin"))
+ {
+ if (RIL.RILJ_LOGV) mRil.riljLog("currentSignalStrength Found Huawei device");
+ ss = mRil.fixupSignalStrengthHuawei(signalStrength);
+ }
+ else
+ {
+ SignalStrength ssInitial = RILUtils.convertHalSignalStrength(signalStrength);
+ ss = mRil.fixupSignalStrength10(ssInitial);
+ }
+ // Note this is set to "verbose" because it happens frequently
+ if (RIL.RILJ_LOGV) mRil.unsljLogvRet(RIL_UNSOL_SIGNAL_STRENGTH, signalStrength);
+
+ // Fix signalStrength for Huawei
+ String hardware = android.os.SystemProperties.get("ro.hardware", "");
+ if(hardware.contains("hi3660") || hardware.contains("hi6250") || hardware.contains("hi3670") || hardware.contains("kirin"))
+ {
+ if (RIL.RILJ_LOGV) mRil.riljLog("currentSignalStrength Found Huawei device");
+ ss = mRil.fixupSignalStrengthHuawei(signalStrength);
+ }
+ else
+ {
+ SignalStrength ssInitial = new SignalStrength(signalStrength);
+ ss = mRil.fixupSignalStrength10(ssInitial);
+ }
+
+
+ // Note this is set to "verbose" because it happens frequently
+ if (RIL.RILJ_LOGV) mRil.unsljLogvRet(RIL_UNSOL_SIGNAL_STRENGTH, ss);
if (mRil.mSignalStrengthRegistrant != null) { if (mRil.mSignalStrengthRegistrant != null) {
mRil.mSignalStrengthRegistrant.notifyRegistrant(new AsyncResult (null, ss, null)); mRil.mSignalStrengthRegistrant.notifyRegistrant(new AsyncResult (null, ss, null));
}
-- --
2.25.1 2.30.2
@@ -0,0 +1,43 @@
From 0b1838a0019eae94f2c2e1d9931bbdb33ac28dad Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 8 Aug 2021 01:43:40 +0000
Subject: [PATCH] Revert "Bluetooth: Reset packages/apps/Bluetooth to upstream"
This reverts commit 4ceb47e32c1be30640e40f81b6f741942f8598ed.
---
Android.bp | 5 -----
tests/robotests/Android.mk | 4 ----
2 files changed, 9 deletions(-)
diff --git a/Android.bp b/Android.bp
index c16faff96..08e0ee116 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,8 +1,3 @@
-// Bluetooth is in it's own namespace to allow it to be replaced with an
-// alternate implementation.
-soong_namespace {
-}
-
// MAP API module
java_library {
diff --git a/tests/robotests/Android.mk b/tests/robotests/Android.mk
index 678ab4bc1..0cb6917ce 100644
--- a/tests/robotests/Android.mk
+++ b/tests/robotests/Android.mk
@@ -1,5 +1,3 @@
-ifneq ($(TARGET_USE_QTI_BT_STACK),true)
-
#############################################################
# Bluetooth Robolectric test target. #
#############################################################
@@ -47,5 +45,3 @@ LOCAL_TEST_PACKAGE := Bluetooth
LOCAL_INSTRUMENT_SOURCE_DIRS := $(dir $(LOCAL_PATH))../src
include external/robolectric-shadows/run_robotests.mk
-
-endif
--
2.25.1
@@ -0,0 +1,186 @@
From e587d5f4e924737b481095925d152d9d31adf2cc Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 19 Dec 2020 15:57:27 +0000
Subject: [PATCH 1/4] Revert "init: Add vendor-specific initialization hooks."
This reverts commit 7bc78d1354cd2e8df1ba693c627d5be39206e375.
Change-Id: I0c3241ef3626bc989b34723e30b2339e4a62399d
---
init/Android.bp | 9 ---------
init/NOTICE | 26 --------------------------
init/property_service.cpp | 4 ----
init/vendor_init.cpp | 37 -------------------------------------
init/vendor_init.h | 33 ---------------------------------
5 files changed, 109 deletions(-)
delete mode 100644 init/vendor_init.cpp
delete mode 100644 init/vendor_init.h
diff --git a/init/Android.bp b/init/Android.bp
index e28d9f026..827a8293f 100644
--- a/init/Android.bp
+++ b/init/Android.bp
@@ -71,14 +71,6 @@ init_host_sources = [
"host_init_verifier.cpp",
]
-cc_library_static {
- name: "vendor_init",
- recovery_available: true,
- srcs: [
- "vendor_init.cpp",
- ],
-}
-
cc_defaults {
name: "init_defaults",
cpp_std: "experimental",
@@ -169,7 +161,6 @@ cc_library_static {
defaults: [
"init_defaults",
"selinux_policy_version",
- "vendor_init_defaults",
],
srcs: init_common_sources + init_device_sources,
whole_static_libs: [
diff --git a/init/NOTICE b/init/NOTICE
index 383d0f541..c5b1efa7a 100644
--- a/init/NOTICE
+++ b/init/NOTICE
@@ -188,29 +188,3 @@
END OF TERMS AND CONDITIONS
-Copyright (c) 2013, The Linux Foundation. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
- * Neither the name of The Linux Foundation nor the names of its
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/init/property_service.cpp b/init/property_service.cpp
index 44b51c2cf..019955b16 100644
--- a/init/property_service.cpp
+++ b/init/property_service.cpp
@@ -70,7 +70,6 @@
#include "subcontext.h"
#include "system/core/init/property_service.pb.h"
#include "util.h"
-#include "vendor_init.h"
using namespace std::literals;
@@ -976,9 +975,6 @@ void PropertyLoadBootDefaults() {
}
}
- // Update with vendor-specific property runtime overrides
- vendor_load_properties();
-
property_initialize_ro_product_props();
property_derive_build_fingerprint();
property_initialize_ro_cpu_abilist();
diff --git a/init/vendor_init.cpp b/init/vendor_init.cpp
deleted file mode 100644
index d3fd5ffe2..000000000
--- a/init/vendor_init.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-Copyright (c) 2013, The Linux Foundation. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
- * Neither the name of The Linux Foundation nor the names of its
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "vendor_init.h"
-
-/* init vendor override stubs */
-
-__attribute__ ((weak))
-void vendor_load_properties()
-{
-}
diff --git a/init/vendor_init.h b/init/vendor_init.h
deleted file mode 100644
index 9afb449be..000000000
--- a/init/vendor_init.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-Copyright (c) 2013, The Linux Foundation. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
- * Neither the name of The Linux Foundation nor the names of its
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef __INIT_VENDOR__H__
-#define __INIT_VENDOR__H__
-extern void vendor_load_properties(void);
-#endif /* __INIT_VENDOR__H__ */
--
2.25.1
@@ -0,0 +1,38 @@
From abbb1f38b347c8681cac4388d49c227e874ea3d9 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Wed, 4 Sep 2019 21:11:48 +0200
Subject: [PATCH 2/4] Panic into recovery rather than bootloader
Getting last_kmsg/pstore from bootloader isn't possible for other people
than the OEM, but we have TWRP to access last_kmsg/pstore
Change-Id: If04bb6572dc66677d7b44f7d302b2d69ce526200
---
init/reboot_utils.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/init/reboot_utils.cpp b/init/reboot_utils.cpp
index 76460a5df..5a12dd7af 100644
--- a/init/reboot_utils.cpp
+++ b/init/reboot_utils.cpp
@@ -34,7 +34,7 @@
namespace android {
namespace init {
-static std::string init_fatal_reboot_target = "bootloader";
+static std::string init_fatal_reboot_target = "recovery";
static bool init_fatal_panic = false;
void SetFatalRebootTarget() {
@@ -48,7 +48,7 @@ void SetFatalRebootTarget() {
const char kRebootTargetString[] = "androidboot.init_fatal_reboot_target=";
auto start_pos = cmdline.find(kRebootTargetString);
if (start_pos == std::string::npos) {
- return; // We already default to bootloader if no setting is provided.
+ return; // We already default to recovery if no setting is provided
}
start_pos += sizeof(kRebootTargetString) - 1;
--
2.25.1
@@ -1,7 +1,7 @@
From c4d992edc94f3db949b6146428c978bf8036f345 Mon Sep 17 00:00:00 2001 From 9a9baec3df926da5cf27c690590482e11172f821 Mon Sep 17 00:00:00 2001
From: Victor Bo <bvoid@yandex.ru> From: Victor Bo <bvoid@yandex.ru>
Date: Wed, 3 Mar 2021 06:31:17 -0500 Date: Wed, 3 Mar 2021 06:31:17 -0500
Subject: [PATCH 2/4] Restore /sbin for Magisk compatibility Subject: [PATCH 3/4] Restore /sbin for Magisk compatibility
Squash of: Squash of:
- Revert "Do not create /sbin" - Revert "Do not create /sbin"
@@ -30,7 +30,7 @@ index 0a534a2bd..81150a0fa 100644
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/product_services.img) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/product_services.img)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/product_services) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/product_services)
diff --git a/libcutils/fs_config.cpp b/libcutils/fs_config.cpp diff --git a/libcutils/fs_config.cpp b/libcutils/fs_config.cpp
index a703993f6..184c7da0f 100644 index 5805a4d19..b30707fc8 100644
--- a/libcutils/fs_config.cpp --- a/libcutils/fs_config.cpp
+++ b/libcutils/fs_config.cpp +++ b/libcutils/fs_config.cpp
@@ -80,6 +80,7 @@ static const struct fs_path_config android_dirs[] = { @@ -80,6 +80,7 @@ static const struct fs_path_config android_dirs[] = {
@@ -38,10 +38,10 @@ index a703993f6..184c7da0f 100644
{ 00755, AID_ROOT, AID_SYSTEM, 0, "mnt" }, { 00755, AID_ROOT, AID_SYSTEM, 0, "mnt" },
{ 00751, AID_ROOT, AID_SHELL, 0, "product/bin" }, { 00751, AID_ROOT, AID_SHELL, 0, "product/bin" },
+ { 00750, AID_ROOT, AID_SHELL, 0, "sbin" }, + { 00750, AID_ROOT, AID_SHELL, 0, "sbin" },
{ 00751, AID_ROOT, AID_SHELL, 0, "product/apex/*/bin" },
{ 00777, AID_ROOT, AID_ROOT, 0, "sdcard" }, { 00777, AID_ROOT, AID_ROOT, 0, "sdcard" },
{ 00751, AID_ROOT, AID_SDCARD_R, 0, "storage" }, { 00751, AID_ROOT, AID_SDCARD_R, 0, "storage" },
@@ -166,6 +167,7 @@ static const struct fs_path_config android_files[] = { { 00751, AID_ROOT, AID_SHELL, 0, "system/bin" },
@@ -164,6 +165,7 @@ static const struct fs_path_config android_files[] = {
{ 00600, AID_ROOT, AID_ROOT, 0, "system_ext/build.prop" }, { 00600, AID_ROOT, AID_ROOT, 0, "system_ext/build.prop" },
{ 00444, AID_ROOT, AID_ROOT, 0, system_ext_conf_dir + 1 }, { 00444, AID_ROOT, AID_ROOT, 0, system_ext_conf_dir + 1 },
{ 00444, AID_ROOT, AID_ROOT, 0, system_ext_conf_file + 1 }, { 00444, AID_ROOT, AID_ROOT, 0, system_ext_conf_file + 1 },
@@ -49,29 +49,29 @@ index a703993f6..184c7da0f 100644
{ 00755, AID_ROOT, AID_SHELL, 0, "system/bin/crash_dump32" }, { 00755, AID_ROOT, AID_SHELL, 0, "system/bin/crash_dump32" },
{ 00755, AID_ROOT, AID_SHELL, 0, "system/bin/crash_dump64" }, { 00755, AID_ROOT, AID_SHELL, 0, "system/bin/crash_dump64" },
{ 00755, AID_ROOT, AID_SHELL, 0, "system/bin/debuggerd" }, { 00755, AID_ROOT, AID_SHELL, 0, "system/bin/debuggerd" },
@@ -218,6 +220,7 @@ static const struct fs_path_config android_files[] = { @@ -209,6 +211,7 @@ static const struct fs_path_config android_files[] = {
{ 00750, AID_ROOT, AID_SHELL, 0, "init*" }, { 00750, AID_ROOT, AID_SHELL, 0, "init*" },
{ 00755, AID_ROOT, AID_SHELL, 0, "odm/bin/*" }, { 00755, AID_ROOT, AID_SHELL, 0, "odm/bin/*" },
{ 00755, AID_ROOT, AID_SHELL, 0, "product/bin/*" }, { 00755, AID_ROOT, AID_SHELL, 0, "product/bin/*" },
+ { 00750, AID_ROOT, AID_SHELL, 0, "sbin/*" }, + { 00750, AID_ROOT, AID_SHELL, 0, "sbin/*" },
{ 00755, AID_ROOT, AID_SHELL, 0, "product/apex/*bin/*" },
{ 00755, AID_ROOT, AID_SHELL, 0, "system/bin/*" }, { 00755, AID_ROOT, AID_SHELL, 0, "system/bin/*" },
{ 00755, AID_ROOT, AID_SHELL, 0, "system/xbin/*" }, { 00755, AID_ROOT, AID_SHELL, 0, "system/xbin/*" },
{ 00755, AID_ROOT, AID_SHELL, 0, "system/apex/*/bin/*" },
diff --git a/rootdir/Android.mk b/rootdir/Android.mk diff --git a/rootdir/Android.mk b/rootdir/Android.mk
index fe23b6206..81bd46342 100644 index 7d383f522..6d518dcb3 100644
--- a/rootdir/Android.mk --- a/rootdir/Android.mk
+++ b/rootdir/Android.mk +++ b/rootdir/Android.mk
@@ -91,7 +91,7 @@ endif @@ -77,7 +77,7 @@ endif
# #
# create some directories (some are mount points) and symlinks # create some directories (some are mount points) and symlinks
LOCAL_POST_INSTALL_CMD := mkdir -p $(addprefix $(TARGET_ROOT_OUT)/, \ LOCAL_POST_INSTALL_CMD := mkdir -p $(addprefix $(TARGET_ROOT_OUT)/, \
- dev proc sys system data data_mirror odm oem acct config storage mnt apex debug_ramdisk \ - dev proc sys system data data_mirror odm oem acct config storage mnt apex debug_ramdisk \
+ sbin dev proc sys system data data_mirror odm oem acct config storage mnt apex debug_ramdisk \ + sbin dev proc sys system data data_mirror odm oem acct config storage mnt apex debug_ramdisk \
linkerconfig second_stage_resources postinstall $(BOARD_ROOT_EXTRA_FOLDERS)); \ linkerconfig postinstall $(BOARD_ROOT_EXTRA_FOLDERS)); \
ln -sf /system/bin $(TARGET_ROOT_OUT)/bin; \ ln -sf /system/bin $(TARGET_ROOT_OUT)/bin; \
ln -sf /system/etc $(TARGET_ROOT_OUT)/etc; \ ln -sf /system/etc $(TARGET_ROOT_OUT)/etc; \
diff --git a/rootdir/init.environ.rc.in b/rootdir/init.environ.rc.in diff --git a/rootdir/init.environ.rc.in b/rootdir/init.environ.rc.in
index bf6e986c4..090fa5a78 100644 index fdaaf1abe..72ba861a8 100644
--- a/rootdir/init.environ.rc.in --- a/rootdir/init.environ.rc.in
+++ b/rootdir/init.environ.rc.in +++ b/rootdir/init.environ.rc.in
@@ -10,6 +10,7 @@ on early-init @@ -10,6 +10,7 @@ on early-init
@@ -79,9 +79,9 @@ index bf6e986c4..090fa5a78 100644
export EXTERNAL_STORAGE /sdcard export EXTERNAL_STORAGE /sdcard
export ASEC_MOUNTPOINT /mnt/asec export ASEC_MOUNTPOINT /mnt/asec
+ export PATH /sbin:/product/bin:/apex/com.android.runtime/bin:/apex/com.android.art/bin:/system_ext/bin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin + export PATH /sbin:/product/bin:/apex/com.android.runtime/bin:/apex/com.android.art/bin:/system_ext/bin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin
%EXPORT_GLOBAL_ASAN_OPTIONS% export BOOTCLASSPATH %BOOTCLASSPATH%
%EXPORT_GLOBAL_GCOV_OPTIONS% export DEX2OATBOOTCLASSPATH %DEX2OATBOOTCLASSPATH%
%EXPORT_GLOBAL_CLANG_COVERAGE_OPTIONS% export SYSTEMSERVERCLASSPATH %SYSTEMSERVERCLASSPATH%
-- --
2.25.1 2.25.1
@@ -0,0 +1,52 @@
From f2b0a4042521fc7ad60de242227fcbcf21691a3b Mon Sep 17 00:00:00 2001
From: Victor Bo <bvoid@yandex.ru>
Date: Wed, 26 Feb 2020 07:23:44 +0200
Subject: [PATCH 4/4] fix offline charger v7
modified: rootdir/init.rc
---
rootdir/init.rc | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/rootdir/init.rc b/rootdir/init.rc
index a9af0b094..b136f1059 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -11,6 +11,11 @@ import /vendor/etc/init/hw/init.${ro.hardware}.rc
import /system/etc/init/hw/init.usb.configfs.rc
import /system/etc/init/hw/init.${ro.zygote}.rc
+service gsicharger /bin/charger
+ class gsicharger
+ user system
+ group system shell input graphics wakelock
+
# Cgroups are mounted right before early-init using list from /etc/cgroups.json
on early-init
# Disable sysrq from keyboard
@@ -399,7 +404,7 @@ on init
# Healthd can trigger a full boot from charger mode by signaling this
# property when the power button is held.
on property:sys.boot_from_charger_mode=1
- class_stop charger
+ class_stop gsicharger
trigger late-init
on load_persist_props_action
@@ -945,8 +950,12 @@ on nonencrypted
on property:sys.init_log_level=*
loglevel ${sys.init_log_level}
+on charger && property:ro.hardware=mt*
+ write /sys/class/leds/lcd-backlight/trigger "backlight"
+ write /sys/class/android_usb/android0/enable 1
+
on charger
- class_start charger
+ class_start gsicharger
on property:vold.decrypt=trigger_load_persist_props
load_persist_props
--
2.25.1
@@ -0,0 +1,24 @@
From 4f035a6b34ee9f42774998de1c5008f6bce30a18 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 8 Aug 2021 01:43:40 +0000
Subject: [PATCH] Revert "system_suspend: start early"
This reverts commit cb732f9b635b5f6f79e447ddaf743ebb800b8535.
---
suspend/1.0/default/android.system.suspend@1.0-service.rc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/suspend/1.0/default/android.system.suspend@1.0-service.rc b/suspend/1.0/default/android.system.suspend@1.0-service.rc
index 965ca16..c5d3869 100644
--- a/suspend/1.0/default/android.system.suspend@1.0-service.rc
+++ b/suspend/1.0/default/android.system.suspend@1.0-service.rc
@@ -1,5 +1,5 @@
service system_suspend /system/bin/hw/android.system.suspend@1.0-service
- class early_hal
+ class hal
user system
group system wakelock
capabilities BLOCK_SUSPEND
--
2.25.1
@@ -0,0 +1,26 @@
From 7ac875c7930932e79db2e96a662c0db037a57122 Mon Sep 17 00:00:00 2001
From: Victor Bo <bvoid@yandex.ru>
Date: Fri, 17 Dec 2021 21:13:19 +0000
Subject: [PATCH] try to fix screen recording for some devices
based on https://github.com/eremitein/treble-patches/issues/40
---
Parcel.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Parcel.cpp b/Parcel.cpp
index 6be57d3..a0cb27b 100644
--- a/Parcel.cpp
+++ b/Parcel.cpp
@@ -1348,7 +1348,7 @@ bool Parcel::verifyBufferObject(const binder_buffer_object *buffer_obj,
ALOGE("Buffer in parent %p differs from embedded buffer %p",
bufferInParent, childBuffer);
android_errorWriteLog(0x534e4554, "179289794");
- return false;
+ return true;
}
}
--
2.25.1
@@ -0,0 +1,42 @@
From f12f94ae51ec13744bd2f93585ce744128ee192f Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Mon, 5 Oct 2020 01:29:18 +0000
Subject: [PATCH] Revert "sepolicy: Relabel wifi. properties as wifi_prop"
This reverts commit bf52f194873840546c996c232eb44c8427ddcd5c.
Change-Id: I0446540331684eb57f7e17bcc3273d6247915854
---
private/property_contexts | 1 -
private/system_server.te | 3 ---
2 files changed, 4 deletions(-)
diff --git a/private/property_contexts b/private/property_contexts
index a4fab1f22..cf0a2dee5 100644
--- a/private/property_contexts
+++ b/private/property_contexts
@@ -171,7 +171,6 @@ dalvik. u:object_r:dalvik_prop:s0
ro.dalvik. u:object_r:dalvik_prop:s0
# Shared between system server and wificond
-wifi. u:object_r:wifi_prop:s0
wlan. u:object_r:wifi_prop:s0
# Lowpan properties
diff --git a/private/system_server.te b/private/system_server.te
index 3c1d192d7..b63b47d3d 100644
--- a/private/system_server.te
+++ b/private/system_server.te
@@ -676,9 +676,6 @@ get_prop(system_server, mock_ota_prop)
# Read the property as feature flag for protecting apks with fs-verity.
get_prop(system_server, apk_verity_prop)
-# Read wifi.interface
-get_prop(system_server, wifi_prop)
-
# Read the vendor property that indicates if Incremental features is enabled
get_prop(system_server, incremental_prop)
--
2.25.1

Some files were not shown because too many files have changed in this diff Show More