Skip to content

Commit

Permalink
Merge branch 'LawnchairLauncher:14-dev' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
Goooler authored Oct 31, 2024
2 parents 06b44d4 + 5f05716 commit 06a853d
Show file tree
Hide file tree
Showing 13 changed files with 607 additions and 556 deletions.
16 changes: 8 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
id 'org.jetbrains.kotlin.plugin.compose' version "2.0.21"
id 'org.jetbrains.kotlin.plugin.parcelize' version "2.0.21"
id 'org.jetbrains.kotlin.plugin.serialization' version "2.0.21"
id "com.google.devtools.ksp" version "2.0.21-1.0.25"
id "com.google.devtools.ksp" version "2.0.21-1.0.26"
id 'com.google.protobuf' version "0.9.4"
id 'app.cash.licensee' version "1.12.0"
id 'dev.rikka.tools.refine' version "4.4.0"
Expand All @@ -36,12 +36,12 @@ allprojects {
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.13.1'
implementation 'androidx.core:core-ktx:1.15.0'
}
}

plugins.withId('com.google.protobuf') {
def protocVersion = '4.28.2'
def protocVersion = '4.28.3'
protobuf {
// Configure the protoc executable
protoc {
Expand Down Expand Up @@ -357,9 +357,9 @@ dependencies {
implementation 'androidx.compose.material3:material3'
implementation 'androidx.compose.material3:material3-window-size-class'
implementation "androidx.activity:activity-compose:1.9.3"
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.8.6"
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.8.7"
implementation "androidx.navigation:navigation-compose:2.8.3"
implementation "androidx.constraintlayout:constraintlayout:2.1.4"
implementation "androidx.constraintlayout:constraintlayout:2.2.0"
implementation "androidx.palette:palette-ktx:1.0.0"
implementation "androidx.slice:slice-core:1.1.0-alpha02"
def accompanistVersion = '0.36.0'
Expand Down Expand Up @@ -390,10 +390,10 @@ dependencies {
// Persian Date
implementation 'com.github.samanzamani:PersianDate:1.7.1'

implementation 'com.airbnb.android:lottie:6.5.2'
implementation 'com.airbnb.android:lottie:6.6.0'

// Compose drag and drop library
implementation 'sh.calvin.reorderable:reorderable:2.3.3'
implementation 'sh.calvin.reorderable:reorderable:2.4.0'

// Smartspacer
implementation('com.kieronquinn.smartspacer:sdk-client:1.0.11') {
Expand All @@ -418,7 +418,7 @@ spotless {
kotlin {
target("lawnchair/src/**/*.kt")
ktlint().customRuleSets([
"io.nlopez.compose.rules:ktlint:0.4.16",
"io.nlopez.compose.rules:ktlint:0.4.17",
]).editorConfigOverride([
"ktlint_compose_compositionlocal-allowlist": "disabled",
"ktlint_compose_lambda-param-event-trailing": "disabled",
Expand Down
114 changes: 57 additions & 57 deletions lawnchair/res/values-ja-rJP/strings.xml

Large diffs are not rendered by default.

550 changes: 275 additions & 275 deletions lawnchair/res/values-no-rNO/strings.xml

Large diffs are not rendered by default.

396 changes: 198 additions & 198 deletions lawnchair/res/values-th-rTH/strings.xml

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions lawnchair/res/values-vi-rVN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<!-- Miscellaneous -->
<string name="what_to_show">Những gì để hiển thị</string>
<!-- A11y description -->
<string name="accessibility_service_description">To lock your phone when performing a gesture, and to open Recents via gesture, Lawnchair requires accessibility access.\n\nLawnchair doesn\'t watch any user action, though the privilege to do so is required for all accessibility services. Lawnchair discards any event sent by the system.\n\nIn order to lock your phone, or to open Recents, Lawnchair uses the performGlobalAction Accessibility service.</string>
<string name="accessibility_service_description">Để mở khoá màn hình </string>
<string name="x_by_y">%1$d x %2$d</string>
<string name="x_and_y">%1$s &amp; %2$s</string>
<!--
Expand All @@ -81,17 +81,17 @@
-->
<string name="settings">Cài đặt</string>
<string name="general_label">Chung</string>
<string name="general_description">Colors, icon packs, notification dots</string>
<string name="general_description">Màu sắc, gói biểu tượng, dấu chấm thông báo</string>
<string name="home_screen_label">Trang chủ</string>
<string name="home_screen_description">Feed, grid, icons</string>
<string name="home_screen_description">Bản tin, lưới, biểu tượng</string>
<string name="dock_label">Khay</string>
<string name="dock_description">Thanh tìm kiếm, số biểu tượng</string>
<string name="app_drawer_label">Kho ứng dụng</string>
<string name="app_drawer_description">Ứng dụng bị ẩn, số cột, biểu tượng</string>
<string name="drawer_search_label">Drawer search</string>
<string name="drawer_search_description">Web suggestions, global search</string>
<string name="drawer_search_label">Ngăn tìm kiếm</string>
<string name="drawer_search_description">Gợi ý website, tìm kiếm chung</string>
<string name="folders_label">Thư mục</string>
<string name="folders_description">Row and column count</string>
<string name="folders_description">Số hàng và cột</string>
<string name="gestures_label">Cử chỉ</string>
<string name="gestures_description">Cử chỉ và chạm</string>
<string name="quickstep_label">Gần đây</string>
Expand All @@ -101,12 +101,12 @@
<string name="debug_restart_launcher">Restart Lawnchair</string>
<string name="experimental_features_label">Chức năng thử nghiệm</string>
<!-- Experimental features -->
<string name="font_picker_label">Font customization</string>
<string name="font_picker_label">Đổi phông chữ</string>
<string name="font_picker_description">Some text remains unchanged</string>
<string name="smartspace_calendar_label">At a Glance calendar customization</string>
<string name="smartspace_calendar_label">Tuỳ chỉnh lịch của xem nhanh</string>
<string name="smartspace_calendar_description">Allow showing date in non-Gregorian calendar systems</string>
<string name="workspace_increase_max_grid_size_label">Increase maximum grid size limit</string>
<string name="workspace_increase_max_grid_size_description">Increase maximum allowed home screen grid size from 10 x 10 to 20 x 20</string>
<string name="workspace_increase_max_grid_size_label">Tăng độ lớn tối đa của lưới</string>
<string name="workspace_increase_max_grid_size_description">Cho phép tăng kích thước từ 10x10 lên 20x20 trên màn hình chính</string>
<string name="always_reload_icons_label">Always reload icons</string>
<string name="always_reload_icons_description">Tránh sử dụng các biểu tượng được lưu trong bộ nhớ đệm từ các gói biểu tượng</string>
<string name="recents_lock_unlock">Lock/unlock</string>
Expand Down
11 changes: 11 additions & 0 deletions lawnchair/src/app/lawnchair/LawnchairLauncher.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ package app.lawnchair
import android.app.ActivityOptions
import android.content.Context
import android.content.Intent
import android.graphics.Color
import android.graphics.drawable.Drawable
import android.os.Bundle
import android.view.Display
import android.view.View
import android.view.ViewTreeObserver
import androidx.activity.SystemBarStyle
import androidx.activity.enableEdgeToEdge
import androidx.core.view.WindowInsetsCompat
import androidx.core.view.WindowInsetsControllerCompat
import androidx.lifecycle.lifecycleScope
Expand Down Expand Up @@ -109,6 +112,14 @@ class LawnchairLauncher : QuickstepLauncher() {
val gestureController by unsafeLazy { GestureController(this) }

override fun onCreate(savedInstanceState: Bundle?) {
if (!Utilities.ATLEAST_Q) {
enableEdgeToEdge(
navigationBarStyle = SystemBarStyle.auto(
Color.TRANSPARENT,
Color.TRANSPARENT,
),
)
}
layoutInflater.factory2 = LawnchairLayoutFactory(this)
super.onCreate(savedInstanceState)

Expand Down
18 changes: 18 additions & 0 deletions quickstep/src/com/android/launcher3/LauncherAnimationRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
import android.os.RemoteException;
import android.view.IRemoteAnimationFinishedCallback;
import android.view.RemoteAnimationTarget;
import android.view.SurfaceControl;
import android.window.TransitionInfo;

import androidx.annotation.BinderThread;
import androidx.annotation.Nullable;
Expand Down Expand Up @@ -102,6 +104,22 @@ public void onAnimationStart(
}
}

// Introduced in NothingOS 2.5.5, needed in 2.6
@BinderThread
public void onAnimationStartWithSurfaceTransaction(
int transit,
TransitionInfo transitionInfo,
SurfaceControl.Transaction transaction,
RemoteAnimationTarget[] appTargets,
RemoteAnimationTarget[] wallpaperTargets,
RemoteAnimationTarget[] nonAppTargets,
Runnable runnable) {
if (transaction != null) {
transaction.apply();
}
onAnimationStart(transit, appTargets, wallpaperTargets, nonAppTargets, runnable);
}

private RemoteAnimationFactory getFactory() {
RemoteAnimationFactory factory = mFactory.get();
return factory != null ? factory : DEFAULT_FACTORY;
Expand Down
14 changes: 14 additions & 0 deletions quickstep/src/com/android/quickstep/RecentsAnimationCallbacks.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
import android.graphics.Rect;
import android.util.ArraySet;
import android.view.RemoteAnimationTarget;
import android.view.SurfaceControl;
import android.window.TransitionInfo;

import androidx.annotation.BinderThread;
import androidx.annotation.NonNull;
Expand Down Expand Up @@ -99,6 +101,18 @@ public final void onAnimationStart(RecentsAnimationControllerCompat controller,
homeContentInsets, minimizedHomeBounds);
}

// Introduced in NothingOS 2.5.5, needed in 2.6
@BinderThread
public final void onAnimationStart(RecentsAnimationControllerCompat controller,
TransitionInfo transitionInfo, SurfaceControl.Transaction transaction,
RemoteAnimationTarget[] apps, RemoteAnimationTarget[] wallpapers,
Rect homeContentInsets, Rect minimizedHomeBounds) {
if (transaction != null) {
transaction.apply();
}
onAnimationStart(controller, apps, wallpapers, homeContentInsets, minimizedHomeBounds);
}

// Called only in R+ platform
@BinderThread
public final void onAnimationStart(RecentsAnimationControllerCompat animationController,
Expand Down
5 changes: 3 additions & 2 deletions quickstep/src/com/android/quickstep/SystemUiProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -1489,8 +1489,9 @@ public void onAnimationStartWithSurfaceTransaction(
RemoteAnimationTarget[] wallpapers,
Rect homeContentInsets,
Rect minimizedHomeBounds) {
listener.onAnimationStart(new RecentsAnimationControllerCompat(controller), apps,
wallpapers, homeContentInsets, minimizedHomeBounds);
listener.onAnimationStart(new RecentsAnimationControllerCompat(controller),
transitionInfo, transaction, apps, wallpapers,
homeContentInsets, minimizedHomeBounds);
}

@Override
Expand Down
7 changes: 3 additions & 4 deletions src/com/android/launcher3/views/OptionsPopupView.java
Original file line number Diff line number Diff line change
Expand Up @@ -322,11 +322,10 @@ private static boolean toggleHomeScreenLock(View v) {
return true;
}

private static boolean startSystemSettings(View view) {
final Launcher launcher = Launcher.getLauncher(view.getContext());
private static boolean startSystemSettings(View v) {
final Launcher launcher = Launcher.getLauncher(v.getContext());
final Intent intent = new Intent(Settings.ACTION_SETTINGS);
launcher.startActivity(intent);
return true;
return launcher.startActivitySafely(v, intent, placeholderInfo(intent)) != null;
}

static WorkspaceItemInfo placeholderInfo(Intent intent) {
Expand Down
2 changes: 1 addition & 1 deletion systemUILog/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ compileOnlyCommonJars()
dependencies {
compileOnly projects.systemUIPluginCore
compileOnly projects.systemUICommon
implementation 'com.google.errorprone:error_prone_annotations:2.33.0'
implementation 'com.google.errorprone:error_prone_annotations:2.35.1'
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

import android.graphics.Rect;
import android.view.RemoteAnimationTarget;
import android.view.SurfaceControl;
import android.window.TransitionInfo;

import com.android.systemui.shared.recents.model.ThumbnailData;

Expand All @@ -31,6 +33,12 @@ void onAnimationStart(RecentsAnimationControllerCompat controller,
RemoteAnimationTarget[] apps, RemoteAnimationTarget[] wallpapers,
Rect homeContentInsets, Rect minimizedHomeBounds);

// Introduced in NothingOS 2.5.5, needed in 2.6
void onAnimationStart(RecentsAnimationControllerCompat controller,
TransitionInfo transitionInfo, SurfaceControl.Transaction transaction,
RemoteAnimationTarget[] apps, RemoteAnimationTarget[] wallpapers,
Rect homeContentInsets, Rect minimizedHomeBounds);

/**
* Called when the animation into Recents was canceled. This call is made on the binder thread.
*/
Expand Down
2 changes: 1 addition & 1 deletion systemUnFold/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ dependencies {
ksp "com.google.dagger:hilt-compiler:$daggerVersion"

implementation "androidx.concurrent:concurrent-futures:1.2.0"
implementation "androidx.lifecycle:lifecycle-common:2.8.6"
implementation "androidx.lifecycle:lifecycle-common:2.8.7"
implementation "androidx.dynamicanimation:dynamicanimation:1.0.0"
}

0 comments on commit 06a853d

Please sign in to comment.