updating and adding patches for external screen functionality
This commit is contained in:
parent
abe69f484e
commit
6619801fe6
@ -311,10 +311,10 @@ index bace9324ac9..1db2e32b8cd 100644
|
||||
|
||||
private final ViewConfiguration mViewConfiguration;
|
||||
private final SpringAnimation mSpringAnimation;
|
||||
@@ -265,10 +261,6 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
|
||||
mKeyguardStateController = Dependency.get(KeyguardStateController.class);
|
||||
@@ -268,10 +268,6 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
|
||||
mSecondaryLockScreenController = new AdminSecondaryLockScreenController(context, this,
|
||||
mUpdateMonitor, mCallback, new Handler(Looper.myLooper()));
|
||||
mDeviceProvisionedController = Dependency.get(DeviceProvisionedController.class);
|
||||
-
|
||||
- PackageManager packageManager = mContext.getPackageManager();
|
||||
- mHasFod = packageManager.hasSystemFeature(PackageManager.FEATURE_FINGERPRINT) &&
|
||||
|
@ -0,0 +1,31 @@
|
||||
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
|
||||
|
@ -0,0 +1,153 @@
|
||||
From 8765b97c6f66d449a4cee746abf015553877a153 Mon Sep 17 00:00:00 2001
|
||||
From: Nehemiah of Zebulun <nehemiah-zb@mezimmah.net>
|
||||
Date: Wed, 24 Jan 2024 15:25:52 -0500
|
||||
Subject: [PATCH] add presentation on external display
|
||||
|
||||
Change-Id: I83ecae9888cec97a806bda9b5f9580724455d8cd
|
||||
---
|
||||
.../keyguard/KeyguardDisplayManager.java | 24 ------
|
||||
.../com/android/systemui/SystemUIService.java | 81 +++++++++++++++++++
|
||||
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
|
||||
index d6fabd63420..26d08af339c 100644
|
||||
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardDisplayManager.java
|
||||
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardDisplayManager.java
|
||||
@@ -121,30 +121,6 @@ public class KeyguardDisplayManager {
|
||||
* was already there.
|
||||
*/
|
||||
private boolean showPresentation(Display display) {
|
||||
- if (!isKeyguardShowable(display)) return false;
|
||||
- if (DEBUG) Log.i(TAG, "Keyguard enabled on display: " + display);
|
||||
- final int displayId = display.getDisplayId();
|
||||
- Presentation presentation = mPresentations.get(displayId);
|
||||
- if (presentation == null) {
|
||||
- final Presentation newPresentation = new KeyguardPresentation(mContext, display,
|
||||
- mInjectableInflater.injectable(LayoutInflater.from(mContext)));
|
||||
- newPresentation.setOnDismissListener(dialog -> {
|
||||
- if (newPresentation.equals(mPresentations.get(displayId))) {
|
||||
- mPresentations.remove(displayId);
|
||||
- }
|
||||
- });
|
||||
- presentation = newPresentation;
|
||||
- try {
|
||||
- presentation.show();
|
||||
- } catch (WindowManager.InvalidDisplayException ex) {
|
||||
- Log.w(TAG, "Invalid display:", ex);
|
||||
- presentation = null;
|
||||
- }
|
||||
- if (presentation != null) {
|
||||
- mPresentations.append(displayId, presentation);
|
||||
- return true;
|
||||
- }
|
||||
- }
|
||||
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
|
||||
|
@ -1,26 +0,0 @@
|
||||
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