some patch fixes
This commit is contained in:
parent
6619801fe6
commit
54ecd6b54b
@ -0,0 +1,32 @@
|
|||||||
|
From 4f11abf3aba60b64e8de5fd59fd019ce4bb86159 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Nehemiah of Zebulun <nehemiah-zb@mezimmah.net>
|
||||||
|
Date: Mon, 18 Mar 2024 11:49:11 -0400
|
||||||
|
Subject: [PATCH] Fixed external screen on Cat S22 Flip
|
||||||
|
|
||||||
|
Change-Id: I04c113a6158e2bf9654897e9c496b5e7dfc33dc1
|
||||||
|
---
|
||||||
|
phh-on-boot.sh | 8 ++++++++
|
||||||
|
1 file changed, 8 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/phh-on-boot.sh b/phh-on-boot.sh
|
||||||
|
index d2d5b0a..5446a05 100644
|
||||||
|
--- a/phh-on-boot.sh
|
||||||
|
+++ b/phh-on-boot.sh
|
||||||
|
@@ -7,6 +7,14 @@ vndk="$(getprop persist.sys.vndk)"
|
||||||
|
|
||||||
|
setprop ctl.start media.swcodec
|
||||||
|
|
||||||
|
+#Fix external screen on Cat S22 Flip
|
||||||
|
+if getprop ro.vendor.build.fingerprint | grep -iq -e S22FLIP; then
|
||||||
|
+ if ! getprop ro.vendor.gsi.image_running | grep -iq -F false; then
|
||||||
|
+ setprop ro.vendor.gsi.image_running false
|
||||||
|
+ setprop ctl.restart vendor.hwcomposer-2-1
|
||||||
|
+ fi
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
for i in wpa p2p;do
|
||||||
|
if [ ! -f /data/misc/wifi/${i}_supplicant.conf ];then
|
||||||
|
cp /vendor/etc/wifi/wpa_supplicant.conf /data/misc/wifi/${i}_supplicant.conf
|
||||||
|
--
|
||||||
|
2.39.2
|
||||||
|
|
@ -1,31 +0,0 @@
|
|||||||
From 023fc7d4c634d8a1a8eaa15a5187bd49d12d9726 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Nehemiah of Zebulun <nehemiah-zb@mezimmah.net>
|
|
||||||
Date: Wed, 24 Jan 2024 15:49:10 -0500
|
|
||||||
Subject: [PATCH] fix external screen cats22flip
|
|
||||||
|
|
||||||
Change-Id: Ia4f4c8d1d037fa031831aa4028cf94d5eb940c03
|
|
||||||
---
|
|
||||||
phh-on-data.sh | 7 +++++++
|
|
||||||
1 file changed, 7 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/phh-on-data.sh b/phh-on-data.sh
|
|
||||||
index 472d16e..9427514 100644
|
|
||||||
--- a/phh-on-data.sh
|
|
||||||
+++ b/phh-on-data.sh
|
|
||||||
@@ -13,6 +13,13 @@ if getprop persist.sys.phh.caf.media_profile |grep -q true;then
|
|
||||||
setprop media.settings.xml "/vendor/etc/media_profiles_vendor.xml"
|
|
||||||
fi
|
|
||||||
|
|
||||||
+#Fix external screen on Cat S22 Flip
|
|
||||||
+if getprop ro.vendor.build.fingerprint | grep -iq -e S22FLIP; then
|
|
||||||
+ if ! getprop ro.vendor.gsi.image_running | grep -iq -F false; then
|
|
||||||
+ setprop ro.vendor.gsi.image_running false
|
|
||||||
+ setprop ctl.restart vendor.hwcomposer-2-1
|
|
||||||
+ fi
|
|
||||||
+fi
|
|
||||||
|
|
||||||
minijailSrc=/system/system_ext/apex/com.android.vndk.v28/lib/libminijail.so
|
|
||||||
minijailSrc64=/system/system_ext/apex/com.android.vndk.v28/lib64/libminijail.so
|
|
||||||
--
|
|
||||||
2.39.2
|
|
||||||
|
|
@ -6,8 +6,7 @@ Subject: [PATCH] add presentation on external display
|
|||||||
Change-Id: I83ecae9888cec97a806bda9b5f9580724455d8cd
|
Change-Id: I83ecae9888cec97a806bda9b5f9580724455d8cd
|
||||||
---
|
---
|
||||||
.../keyguard/KeyguardDisplayManager.java | 24 ------
|
.../keyguard/KeyguardDisplayManager.java | 24 ------
|
||||||
.../com/android/systemui/SystemUIService.java | 81 +++++++++++++++++++
|
1 file changed, 24 deletions(-)
|
||||||
2 files changed, 81 insertions(+), 24 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardDisplayManager.java b/packages/SystemUI/src/com/android/keyguard/KeyguardDisplayManager.java
|
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardDisplayManager.java b/packages/SystemUI/src/com/android/keyguard/KeyguardDisplayManager.java
|
||||||
index d6fabd63420..26d08af339c 100644
|
index d6fabd63420..26d08af339c 100644
|
||||||
@ -44,110 +43,6 @@ index d6fabd63420..26d08af339c 100644
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIService.java b/packages/SystemUI/src/com/android/systemui/SystemUIService.java
|
|
||||||
index c56bab290ce..36fbf91189b 100644
|
|
||||||
--- a/packages/SystemUI/src/com/android/systemui/SystemUIService.java
|
|
||||||
+++ b/packages/SystemUI/src/com/android/systemui/SystemUIService.java
|
|
||||||
@@ -39,6 +39,20 @@ import java.io.PrintWriter;
|
|
||||||
|
|
||||||
import javax.inject.Inject;
|
|
||||||
|
|
||||||
+import android.widget.LinearLayout;
|
|
||||||
+import android.widget.LinearLayout.LayoutParams;
|
|
||||||
+import android.widget.TextClock;
|
|
||||||
+import android.util.TypedValue;
|
|
||||||
+import android.util.Log;
|
|
||||||
+import android.os.Bundle;
|
|
||||||
+import android.content.Context;
|
|
||||||
+import android.app.Presentation;
|
|
||||||
+import android.view.Display;
|
|
||||||
+import android.graphics.Color;
|
|
||||||
+import android.view.View;
|
|
||||||
+import android.view.Window;
|
|
||||||
+import android.media.MediaRouter;
|
|
||||||
+
|
|
||||||
public class SystemUIService extends Service {
|
|
||||||
|
|
||||||
private final Handler mMainHandler;
|
|
||||||
@@ -101,6 +115,18 @@ public class SystemUIService extends Service {
|
|
||||||
startServiceAsUser(
|
|
||||||
new Intent(getApplicationContext(), SystemUIAuxiliaryDumpService.class),
|
|
||||||
UserHandle.SYSTEM);
|
|
||||||
+ try {
|
|
||||||
+ MediaRouter mediaRouter = (MediaRouter) getSystemService(Context.MEDIA_ROUTER_SERVICE);
|
|
||||||
+ MediaRouter.RouteInfo selectedRoute = mediaRouter.getSelectedRoute(1);
|
|
||||||
+ Display presentationDisplay = selectedRoute != null ? selectedRoute.getPresentationDisplay() : null;
|
|
||||||
+ PresentationScreen mPresentation = new PresentationScreen(this, presentationDisplay);
|
|
||||||
+ Log.i("SystemUIService", "Showing presentation on display: " + presentationDisplay);
|
|
||||||
+ mPresentation.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
|
||||||
+ mPresentation.show();
|
|
||||||
+ Log.i("SystemUIService", "Showing presentation.");
|
|
||||||
+ } catch (Exception e) {
|
|
||||||
+ Log.w("SystemUIService", "Couldn't show presentation! Display was removed in the meantime.", e);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@@ -122,4 +148,59 @@ public class SystemUIService extends Service {
|
|
||||||
|
|
||||||
mDumpHandler.dump(fd, pw, massagedArgs);
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ static final class PresentationScreen extends Presentation {
|
|
||||||
+ private Context mOuterContext;
|
|
||||||
+
|
|
||||||
+ PresentationScreen(Context context, Display display) {
|
|
||||||
+ super(context, display, R.style.Theme_SystemUI_KeyguardPresentation);
|
|
||||||
+ setCancelable(false);
|
|
||||||
+ mOuterContext = context;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ @Override
|
|
||||||
+ public void cancel() {
|
|
||||||
+ // Do not allow anything to cancel KeyguardPresetation except KeyguardDisplayManager.
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ @Override
|
|
||||||
+ public void onDetachedFromWindow() {
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ @Override
|
|
||||||
+ protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
+ super.onCreate(savedInstanceState);
|
|
||||||
+
|
|
||||||
+ LinearLayout mLayout = new LinearLayout(mOuterContext);
|
|
||||||
+ mLayout.setLayoutParams(new LayoutParams(96, 96));
|
|
||||||
+ mLayout.setOrientation(LinearLayout.VERTICAL);
|
|
||||||
+ mLayout.setBackgroundColor(Color.BLACK);
|
|
||||||
+
|
|
||||||
+ LayoutParams mClockParams = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
|
|
||||||
+
|
|
||||||
+ TextClock mEmptyClock = new TextClock(mOuterContext);
|
|
||||||
+ mEmptyClock.setLayoutParams(mClockParams);
|
|
||||||
+ mEmptyClock.setTextSize(TypedValue.COMPLEX_UNIT_SP, 10);
|
|
||||||
+ mEmptyClock.setVisibility(View.INVISIBLE);
|
|
||||||
+ mLayout.addView(mEmptyClock);
|
|
||||||
+
|
|
||||||
+ TextClock mTextClock = new TextClock(mOuterContext);
|
|
||||||
+ mTextClock.setLayoutParams(mClockParams);
|
|
||||||
+ mTextClock.setFormat12Hour("hh:mm");
|
|
||||||
+ mTextClock.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);
|
|
||||||
+ mTextClock.setTextColor(Color.WHITE);
|
|
||||||
+ mTextClock.setTextSize(TypedValue.COMPLEX_UNIT_SP, 22);
|
|
||||||
+ mLayout.addView(mTextClock);
|
|
||||||
+
|
|
||||||
+ TextClock mDateClock = new TextClock(mOuterContext);
|
|
||||||
+ mDateClock.setLayoutParams(mClockParams);
|
|
||||||
+ mDateClock.setFormat12Hour("EEE, MMMM dd");
|
|
||||||
+ mDateClock.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);
|
|
||||||
+ mDateClock.setTextColor(Color.WHITE);
|
|
||||||
+ mDateClock.setTextSize(TypedValue.COMPLEX_UNIT_SP, 10);
|
|
||||||
+ mLayout.addView(mDateClock);
|
|
||||||
+
|
|
||||||
+ setContentView(mLayout);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
--
|
--
|
||||||
2.39.2
|
2.39.2
|
||||||
|
|
||||||
|
@ -0,0 +1,27 @@
|
|||||||
|
From 3aceacf62182951ef8cdcb88866aa77fad768687 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Nehemiah of Zebulun <nehemiah-zb@mezimmah.net>
|
||||||
|
Date: Fri, 22 Dec 2023 14:48:20 -0500
|
||||||
|
Subject: [PATCH] disable lock screen
|
||||||
|
|
||||||
|
Change-Id: I68fd449b67d2c3fbf6dd48db87e3ea06b3a7d3ee
|
||||||
|
---
|
||||||
|
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 51f69a95e16..278903e0c47 100644
|
||||||
|
--- a/packages/SettingsProvider/res/values/defaults.xml
|
||||||
|
+++ b/packages/SettingsProvider/res/values/defaults.xml
|
||||||
|
@@ -82,7 +82,7 @@
|
||||||
|
<integer name="def_max_sound_trigger_detection_service_ops_per_day" translatable="false">1000</integer>
|
||||||
|
<integer name="def_sound_trigger_detection_service_op_timeout" translatable="false">15000</integer>
|
||||||
|
|
||||||
|
- <bool name="def_lockscreen_disabled">false</bool>
|
||||||
|
+ <bool name="def_lockscreen_disabled">true</bool>
|
||||||
|
<bool name="def_device_provisioned">false</bool>
|
||||||
|
<integer name="def_dock_audio_media_enabled">1</integer>
|
||||||
|
|
||||||
|
--
|
||||||
|
2.39.2
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user