mirror of
https://github.com/yurisieucuti/treble_evolution.git
synced 2024-11-28 03:34:31 +00:00
30 lines
1.3 KiB
Diff
30 lines
1.3 KiB
Diff
From dc6088f136fe0e3162a9b36e3be1416594fedc1e Mon Sep 17 00:00:00 2001
|
|
From: Pierre-Hugues Husson <phh@phh.me>
|
|
Date: Wed, 18 Oct 2023 17:44:59 -0400
|
|
Subject: [PATCH] Don't crash when we get no DeviceLockManager
|
|
|
|
Change-Id: Iaba659694e706c82a95ec2e99feb26e2bc6314e0
|
|
---
|
|
.../devicelockcontroller/SystemDeviceLockManagerImpl.java | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/DeviceLockController/src/com/android/devicelockcontroller/SystemDeviceLockManagerImpl.java b/DeviceLockController/src/com/android/devicelockcontroller/SystemDeviceLockManagerImpl.java
|
|
index 9bde80b..fa3658c 100644
|
|
--- a/DeviceLockController/src/com/android/devicelockcontroller/SystemDeviceLockManagerImpl.java
|
|
+++ b/DeviceLockController/src/com/android/devicelockcontroller/SystemDeviceLockManagerImpl.java
|
|
@@ -48,7 +48,10 @@ public final class SystemDeviceLockManagerImpl implements SystemDeviceLockManage
|
|
final DeviceLockManager deviceLockManager =
|
|
context.getSystemService(DeviceLockManager.class);
|
|
|
|
- mIDeviceLockService = deviceLockManager.getService();
|
|
+ if (deviceLockManager != null)
|
|
+ mIDeviceLockService = deviceLockManager.getService();
|
|
+ else
|
|
+ mIDeviceLockService = null;
|
|
}
|
|
|
|
private SystemDeviceLockManagerImpl() {
|
|
--
|
|
2.25.1
|
|
|