mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-09-08 02:22:16 +00:00
![Tad](/assets/img/avatar_default.png)
- Disable patches with restrictive licenses by default - Update LICENSE - Fixup the fix for F-Droid building - 15.1: Fix forceencrypt on mako - 15.1: Fix crashes when accessing factory reset and development settings menus on devices without support for factory reset protection or oem unlocking
33 lines
1.3 KiB
Diff
33 lines
1.3 KiB
Diff
From 7b811853c5d2b05ec5db11786ab3f4b6a079e1a1 Mon Sep 17 00:00:00 2001
|
|
From: Daniel Micay <danielmicay@gmail.com>
|
|
Date: Thu, 16 Jun 2016 01:19:53 -0400
|
|
Subject: [PATCH] dynamic deny_new_usb toggle
|
|
|
|
Change-Id: Ie05bf2aaebd8660ec3ff9d823be93cd1202e22db
|
|
---
|
|
.../java/com/android/server/policy/keyguard/KeyguardStateMonitor.java | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
diff --git a/services/core/java/com/android/server/policy/keyguard/KeyguardStateMonitor.java b/services/core/java/com/android/server/policy/keyguard/KeyguardStateMonitor.java
|
|
index 941cd4441e2..80b79bd04da 100644
|
|
--- a/services/core/java/com/android/server/policy/keyguard/KeyguardStateMonitor.java
|
|
+++ b/services/core/java/com/android/server/policy/keyguard/KeyguardStateMonitor.java
|
|
@@ -19,6 +19,7 @@
|
|
import android.app.ActivityManager;
|
|
import android.content.Context;
|
|
import android.os.RemoteException;
|
|
+import android.os.SystemProperties;
|
|
import android.util.Slog;
|
|
|
|
import com.android.internal.policy.IKeyguardService;
|
|
@@ -85,6 +86,9 @@ public boolean hasLockscreenWallpaper() {
|
|
|
|
@Override // Binder interface
|
|
public void onShowingStateChanged(boolean showing) {
|
|
+ if ("dynamic".equals(SystemProperties.get("persist.security.deny_new_usb"))) {
|
|
+ SystemProperties.set("security.deny_new_usb", showing ? "1" : "0");
|
|
+ }
|
|
mIsShowing = showing;
|
|
}
|
|
|