mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 15:26:58 +00:00
Copybara! (Lawnchair) v2
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
This commit is contained in:
16
build.gradle
16
build.gradle
@@ -4,8 +4,8 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
id 'com.android.application' version "8.12.0"
|
||||
id 'com.android.library' version "8.12.0" apply false
|
||||
id 'com.android.application' version '8.12.0'
|
||||
id 'com.android.library' version '8.12.0' apply false
|
||||
id 'com.android.test' version '8.12.0' apply false
|
||||
id 'androidx.baselineprofile' version '1.4.0'
|
||||
id 'org.jetbrains.kotlin.android' version "2.2.0"
|
||||
@@ -52,7 +52,7 @@ allprojects {
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
implementation 'androidx.core:core-ktx:1.17.0-beta01'
|
||||
implementation 'androidx.core:core-ktx:1.17.0-rc01'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -407,7 +407,7 @@ dependencies {
|
||||
|
||||
implementation "androidx.graphics:graphics-core:1.0.3"
|
||||
implementation "androidx.graphics:graphics-path:1.0.1"
|
||||
implementation "androidx.graphics:graphics-shapes:1.1.0-alpha01"
|
||||
implementation "androidx.graphics:graphics-shapes:1.1.0-beta01"
|
||||
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2'
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.9.0'
|
||||
@@ -428,10 +428,10 @@ dependencies {
|
||||
implementation "androidx.compose.ui:ui-text-google-fonts:1.8.3"
|
||||
implementation "androidx.compose.foundation:foundation:1.8.3"
|
||||
implementation "androidx.compose.material:material-icons-extended"
|
||||
implementation "androidx.compose.material:material:1.9.0-beta03"
|
||||
implementation "androidx.compose.runtime:runtime-livedata:1.9.0-beta03"
|
||||
implementation 'androidx.compose.material3:material3:1.4.0-alpha18'
|
||||
implementation 'androidx.compose.material3:material3-window-size-class:1.4.0-alpha18'
|
||||
implementation "androidx.compose.material:material:1.9.0-rc01"
|
||||
implementation "androidx.compose.runtime:runtime-livedata:1.9.0-rc01"
|
||||
implementation 'androidx.compose.material3:material3:1.4.0-beta01'
|
||||
implementation 'androidx.compose.material3:material3-window-size-class:1.4.0-beta01'
|
||||
implementation "androidx.activity:activity-compose:1.10.1"
|
||||
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.9.2"
|
||||
implementation "androidx.navigation:navigation-compose:2.9.3"
|
||||
|
||||
@@ -822,7 +822,6 @@ public class CustomFeatureFlags implements FeatureFlags {
|
||||
}
|
||||
|
||||
private boolean isOptimizationEnabled() {
|
||||
// LC-TODO: Maybe make it true for r8
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ android.defaults.buildfeatures.shaders=false
|
||||
android.useAndroidX=true
|
||||
android.enableHiddenApiCheck=false
|
||||
android.hideApiWarning=false
|
||||
android.nonTransitiveRClass=true
|
||||
# Improve build performance by enabling R8 parallelism.
|
||||
android.r8.maxWorkers=4
|
||||
|
||||
|
||||
@@ -493,7 +493,7 @@ class LawnchairLauncher : QuickstepLauncher() {
|
||||
|
||||
var sRestartFlags = 0
|
||||
|
||||
val instance get() = LauncherAppState.getInstanceNoCreate()
|
||||
val instance get() = LauncherAppState.getInstanceNoCreate() as? LawnchairLauncher
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -167,8 +167,7 @@ class DesktopTaskView @JvmOverloads constructor(context: Context, attrs: Attribu
|
||||
cornerRadius = contentViewFullscreenParams.currentCornerRadius
|
||||
backgroundView = findViewById(R.id.background)
|
||||
backgroundView.setBackgroundColor(
|
||||
// Lawnchair-TODO-Colour: ColorTokens.Neutral2_300.resolveColor(context)
|
||||
resources.getColor(android.R.color.system_neutral2_300, context.theme)
|
||||
resources.getColor(ColorTokens.Neutral2_300.resolveColor(context), context.theme)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,13 +18,16 @@ package com.android.systemui.shared.system;
|
||||
|
||||
import static android.app.ActivityManager.LOCK_TASK_MODE_LOCKED;
|
||||
import static android.app.ActivityManager.LOCK_TASK_MODE_NONE;
|
||||
import static android.app.ActivityManager.RECENT_IGNORE_UNAVAILABLE;
|
||||
import static android.app.ActivityTaskManager.getService;
|
||||
import static app.lawnchair.compat.LawnchairQuickstepCompat.ATLEAST_R;
|
||||
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
import android.app.Activity;
|
||||
import android.app.ActivityClient;
|
||||
import android.app.ActivityManager;
|
||||
import android.app.ActivityManager.RecentTaskInfo;
|
||||
import android.app.ActivityManager.RunningTaskInfo;
|
||||
import android.app.ActivityOptions;
|
||||
import android.app.ActivityTaskManager;
|
||||
@@ -36,6 +39,7 @@ import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.UserInfo;
|
||||
import android.os.Bundle;
|
||||
import android.os.DeadSystemException;
|
||||
import android.os.IBinder;
|
||||
import android.os.RemoteException;
|
||||
import android.os.ServiceManager;
|
||||
@@ -74,13 +78,17 @@ public class ActivityManagerWrapper {
|
||||
/**
|
||||
* @return the current user's id.
|
||||
*/
|
||||
public int getCurrentUserId() {
|
||||
public int getCurrentUserId() throws DeadSystemException {
|
||||
UserInfo ui;
|
||||
try {
|
||||
ui = ActivityManager.getService().getCurrentUser();
|
||||
return ui != null ? ui.id : 0;
|
||||
} catch (RemoteException e) {
|
||||
throw e.rethrowFromSystemServer();
|
||||
if (ATLEAST_R) {
|
||||
throw e.rethrowFromSystemServer();
|
||||
} else {
|
||||
throw new DeadSystemException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user