fix: Get display context from private reference instead for Android 12.0 and above
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
This commit is contained in:
1 parent
62e7d9989b
commit
160d2d2d61
2 files changed
+2
-1
No files matched your search
@@ -24,6 +24,7 @@ Compatibility list:
|
||||
* [Launcher] Limited Android 11 support
|
||||
* [Launcher] Limited Android 10 support
|
||||
* [Launcher] Icon pack support (by SuperDragonXD @ https://github.com/LawnchairLauncher/lawnchair/pull/6066)
|
||||
* [Launcher] Crash when trying to grab display context from public reference in Android 12.0 and above
|
||||
|
||||
### 🥞 Development 4 Release 1 (Snapshot 10)
|
||||
|
||||
|
||||
@@ -672,7 +672,7 @@ constructor(
|
||||
private val controller = WeakReference(controller)
|
||||
private val displayManager: DisplayManager = context.getSystemService(DisplayManager::class.java)
|
||||
private val displayId = if (Utilities.ATLEAST_R) {
|
||||
context.display.displayId
|
||||
context.displayId
|
||||
} else {
|
||||
displayManager.displays[DEFAULT_DISPLAY].displayId
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user