Fix build

This commit is contained in:
Suphon Thanakornpakapong
2022-05-08 21:31:31 +07:00
parent 11e1a2fdc8
commit 28df5361d4
23 changed files with 67 additions and 64 deletions

View File

@@ -42,8 +42,11 @@ android {
}
dependencies {
compileOnly fileTree(dir: new File(rootProject.projectDir, 'prebuilts/libs'), include: 'wm_shell-aidls.jar')
compileOnly fileTree(dir: new File(rootProject.projectDir, 'prebuilts/libs'), include: 'WindowManager-Shell.jar')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "androidx.concurrent:concurrent-futures:1.1.0"
implementation "androidx.lifecycle:lifecycle-common-java8:2.4.1"
implementation "androidx.dynamicanimation:dynamicanimation:1.0.0"
implementation project(':CompatLib')
implementation project(':CompatLibVR')
implementation project(':CompatLibVS')

View File

@@ -76,7 +76,7 @@ public class PluginManagerImpl extends BroadcastReceiver implements PluginManage
PluginExceptionHandler uncaughtExceptionHandler = new PluginExceptionHandler(
defaultHandlerOptional);
invoke(sSetUncaughtExceptionPreHandler, uncaughtExceptionHandler);
invoke(sSetUncaughtExceptionPreHandler, null, uncaughtExceptionHandler);
}
public boolean isDebuggable() {

View File

@@ -42,6 +42,18 @@ allprojects {
tasks.withType(JavaCompile) {
options.bootstrapClasspath = files([frameworkJar] + (options.bootstrapClasspath.files as Iterable<File>))
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
def originalFiles = [] + it.classpath.files
def newFiles = []
originalFiles.each { file ->
if (file.path.endsWith('android.jar')) {
newFiles.add(frameworkJar)
} else {
newFiles.add(file)
}
}
it.classpath.setFrom(files(newFiles))
}
tasks.withType(org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask) {
it.classpath.from(files([frameworkJar] + (it.classpath.files as Iterable<File>)))
}
@@ -293,7 +305,7 @@ dependencies {
// Recents lib dependency
withQuickstepImplementation project(':SystemUIShared')
implementation fileTree(dir: "${FRAMEWORK_PREBUILTS_DIR}/libs", include: 'wm_shell-aidls.jar')
implementation fileTree(dir: "${FRAMEWORK_PREBUILTS_DIR}/libs", include: 'WindowManager-Shell.jar')
// Required for AOSP to compile. This is already included in the sysui_shared.jar
withoutQuickstepImplementation fileTree(dir: "${FRAMEWORK_PREBUILTS_DIR}/libs", include: 'plugin_core.jar')
@@ -314,12 +326,12 @@ dependencies {
implementation "androidx.compose.foundation:foundation:$compose_version"
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.compose.material3:material3:1.0.0-alpha06"
implementation "androidx.constraintlayout:constraintlayout:2.1.3"
implementation 'androidx.activity:activity-compose:1.4.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.4.1'
implementation "androidx.compose.runtime:runtime-livedata:$compose_version"
implementation "androidx.compose.runtime:runtime-rxjava2:$compose_version"
implementation "androidx.compose.compiler:compiler:$compose_version"
implementation "androidx.constraintlayout:constraintlayout:2.1.3"
implementation 'androidx.activity:activity-compose:1.4.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.4.1'
implementation "androidx.navigation:navigation-compose:2.4.1"
implementation "androidx.palette:palette-ktx:${ANDROID_X_VERSION}"
implementation "androidx.slice:slice-core:1.1.0-alpha02"
@@ -331,6 +343,7 @@ dependencies {
implementation "com.google.accompanist:accompanist-pager:$accompanist_version"
implementation "com.google.accompanist:accompanist-placeholder-material:$accompanist_version"
implementation "com.google.accompanist:accompanist-systemuicontroller:$accompanist_version"
implementation 'com.google.android.material:material:1.6.0'
implementation "com.github.devsideal:VectorChildFinder:1.0.0"
implementation "com.github.fornewid:material-motion-compose:0.8.0-beta01"
implementation 'dev.kdrag0n:colorkt:1.0.3'

View File

@@ -60,6 +60,21 @@
android:layout_height="1dp"
android:layout_weight="1" />
<Button
android:id="@+id/action_split"
style="@style/OverviewActionButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/action_split"
android:theme="@style/ThemeControlHighlightWorkspaceColor"
android:visibility="gone" />
<Space
android:id="@+id/action_split_space"
android:layout_width="@dimen/overview_actions_button_spacing"
android:layout_height="1dp"
android:visibility="gone" />
<app.lawnchair.views.CustomButton
android:id="@+id/action_lens"
style="@style/OverviewActionButton"

View File

@@ -18,9 +18,11 @@ package app.lawnchair;
import android.app.WallpaperColors;
import android.content.Context;
import android.graphics.Rect;
import android.graphics.RectF;
import android.os.Build;
import android.util.SparseIntArray;
import android.view.View;
import android.widget.RemoteViews;
import androidx.annotation.Keep;
@@ -29,7 +31,6 @@ import androidx.annotation.RequiresApi;
import com.android.launcher3.widget.LocalColorExtractor;
import java.util.List;
import java.util.Map;
import app.lawnchair.theme.ThemeProvider;
@@ -52,17 +53,12 @@ public class AccentColorExtractor extends LocalColorExtractor implements ThemePr
@Override
public void setListener(@Nullable Listener listener) {
mListener = listener;
notifyListener(mTmpRect, null);
notifyListener();
}
@Override
public void addLocation(List<RectF> locations) {
mThemeProvider.addListener(this);
}
public void setWorkspaceLocation(Rect pos, View child, int screenId) {
@Override
public void removeLocations() {
mThemeProvider.removeListener(this);
}
@Nullable
@@ -89,12 +85,12 @@ public class AccentColorExtractor extends LocalColorExtractor implements ThemePr
@Override
public void onColorSchemeChanged() {
notifyListener(mTmpRect, null);
notifyListener();
}
protected void notifyListener(RectF area, WallpaperColors colors) {
private void notifyListener() {
if (mListener != null) {
mListener.onColorsChanged(area, generateColorsOverride(mThemeProvider.getColorScheme()));
mListener.onColorsChanged(generateColorsOverride(mThemeProvider.getColorScheme()));
}
}

View File

@@ -43,16 +43,6 @@ class FallbackSearchInputView(context: Context, attrs: AttributeSet?) : Extended
background = if (showBackground) bg else null
}
override fun show() {
super.show()
shown = true
}
override fun hide() {
super.hide()
shown = false
}
override fun hideKeyboard() {
super.hideKeyboard()
this.appsView?.requestFocus()

View File

@@ -146,7 +146,7 @@ class SearchResultIcon(context: Context, attrs: AttributeSet?) : BubbleTextView(
if (bindIcon) {
MODEL_EXECUTOR.handler.postAtFrontOfQueue {
populateSearchActionItemInfo(target, info)
runOnMainThread { applyFromSearchActionItemInfo(info) }
runOnMainThread { applyFromItemInfoWithIcon(info) }
}
}
}
@@ -227,7 +227,7 @@ class SearchResultIcon(context: Context, attrs: AttributeSet?) : BubbleTextView(
private fun getPackageIcon(packageName: String, user: UserHandle): BitmapInfo {
val las = LauncherAppState.getInstance(context)
val info = PackageItemInfo(packageName)
val info = PackageItemInfo(packageName, user)
info.user = user
las.iconCache.getTitleAndIconForApp(info, false)
return info.bitmap

View File

@@ -136,7 +136,7 @@ fun CustomizeAppDialog(
componentKey.componentName.packageName,
componentKey.user,
)
context.launcher.onIdpChanged(idp)
context.launcher.onIdpChanged(true)
}
}
}

View File

@@ -251,6 +251,10 @@ class PreferenceManager2(private val context: Context) : PreferenceManager {
onSet = { reloadHelper.reloadGrid() },
)
init {
}
companion object {
private val Context.preferencesDataStore by preferencesDataStore(
name = "preferences",

View File

@@ -1,6 +1,5 @@
package app.lawnchair.qsb
import android.app.PendingIntent
import android.content.ComponentName
import android.content.Context
import android.content.Intent
@@ -94,7 +93,7 @@ class QsbLayout(context: Context, attrs: AttributeSet?) : FrameLayout(context, a
val dp = activity.deviceProfile
val cellWidth = DeviceProfile.calculateCellWidth(
requestedWidth,
dp.cellLayoutBorderSpacingPx,
dp.cellLayoutBorderSpacePx.x,
dp.numShownHotseatIcons
)
val iconSize = (dp.iconSizePx * 0.92f).toInt()

View File

@@ -12,17 +12,6 @@ object DrawableTokens {
val BgCellLayout = ResourceDrawableToken<Drawable>(R.drawable.bg_celllayout)
.setTint(ColorTokens.ColorAccent)
@JvmField
val BgWidgetsPickerHandle = ResourceDrawableToken<LayerDrawable>(R.drawable.bg_widgets_picker_handle)
.mutate { context, scheme, darkTheme ->
val shape = getDrawable(0) as GradientDrawable
shape.setColor(ColorTokens.ColorBackground.resolveColor(context, scheme, darkTheme))
}
@JvmField
val BgWidgetsSearchbox = ResourceDrawableToken<GradientDrawable>(R.drawable.bg_widgets_searchbox)
.setColor(ColorTokens.Surface)
@JvmField
val DropTargetBackground = ResourceDrawableToken<Drawable>(R.drawable.drop_target_background)
.setTint(ColorTokens.WorkspaceAccentColor)
@@ -64,7 +53,7 @@ object DrawableTokens {
.setColor(ColorTokens.ColorPrimary)
@JvmField
val WidgetsBottomSheetBackground = ResourceDrawableToken<GradientDrawable>(R.drawable.widgets_bottom_sheet_background)
val WidgetsBottomSheetBackground = ResourceDrawableToken<GradientDrawable>(R.drawable.bg_rounded_corner_bottom_sheet)
.setColor(ColorTokens.Surface)
@JvmField

View File

@@ -72,17 +72,15 @@ class LauncherPreviewView(
}
}.run()
} else {
object : ModelPreload() {
override fun onComplete(isSuccess: Boolean) {
if (isSuccess) {
MAIN_EXECUTOR.execute {
renderView(inflationContext, bgDataModel, null)
}
} else {
Log.e("LauncherPreviewView", "Model loading failed")
LauncherAppState.getInstance(inflationContext).model.loadAsync { dataModel ->
if (dataModel != null) {
MAIN_EXECUTOR.execute {
renderView(inflationContext, dataModel, null)
}
} else {
Log.e("LauncherPreviewView", "Model loading failed")
}
}.start(inflationContext)
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -215,7 +215,7 @@
<dimen name="floating_rotation_button_taskbar_bottom_margin">10dp</dimen>
<!-- Taskbar -->
<dimen name="taskbar_size">@*android:dimen/taskbar_frame_height</dimen>
<dimen name="taskbar_size">60dp</dimen>
<dimen name="taskbar_ime_size">48dp</dimen>
<dimen name="taskbar_icon_touch_size">48dp</dimen>
<dimen name="taskbar_icon_drag_icon_size">54dp</dimen>

View File

@@ -684,8 +684,8 @@ public class LauncherProvider extends ContentProvider {
}
protected void reInitIds() {
mMaxItemId = initializeMaxItemId(getWritableDatabase());
mMaxScreenId = initializeMaxScreenId(getWritableDatabase());
// mMaxItemId = initializeMaxItemId(getWritableDatabase());
// mMaxScreenId = initializeMaxScreenId(getWritableDatabase());
}
@Override

View File

@@ -464,10 +464,6 @@ public class AllAppsContainerView extends StretchRecyclerViewContainer implement
});
onActivePageChanged(mViewPager.getNextPage());
} else {
if (mWorkModeSwitch != null) {
removeView(mWorkModeSwitch);
mWorkModeSwitch = null;
}
mAH[AdapterHolder.MAIN].setup(findViewById(R.id.apps_list_view), null);
mAH[AdapterHolder.WORK].recyclerView = null;
}

View File

@@ -617,7 +617,6 @@ public class FolderIcon extends FrameLayout implements FolderListener, IconLabel
mPreviewItemManager.recomputePreviewDrawingParams();
if (!mBackground.drawingDelegated()) {
mBackground.setBgOpacity(previewBgOpacity);
mBackground.drawBackground(canvas);
}

View File

@@ -40,7 +40,6 @@ import android.content.Intent;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.graphics.Rect;
import android.graphics.drawable.AdaptiveIconDrawable;
import android.graphics.drawable.ColorDrawable;
import android.os.Build;
import android.os.Handler;
@@ -89,6 +88,7 @@ import com.android.launcher3.uioverrides.plugins.PluginManagerWrapper;
import com.android.launcher3.util.ComponentKey;
import com.android.launcher3.util.IntArray;
import com.android.launcher3.util.IntSet;
import com.android.launcher3.util.MainThreadInitializedObject;
import com.android.launcher3.util.MainThreadInitializedObject.SandboxContext;
import com.android.launcher3.views.ActivityContext;
import com.android.launcher3.views.BaseDragLayer;

View File

@@ -297,7 +297,7 @@ public class AddWorkspaceItemsTask extends BaseModelUpdateTask {
int screenCount = workspaceScreens.size();
// First check the preferred screen.
IntSet screensToExclude = new IntSet();
if (FeatureFlags.QSB_ON_FIRST_SCREEN) {
if (FeatureFlags.topQsbOnFirstScreenEnabled(app.getContext())) {
screensToExclude.add(FIRST_SCREEN_ID);
}

View File

@@ -16,6 +16,7 @@
package com.android.launcher3.popup;
import static androidx.core.content.ContextCompat.getColorStateList;
import static com.android.launcher3.anim.Interpolators.ACCELERATED_EASE;
import static com.android.launcher3.anim.Interpolators.DECELERATED_EASE;
import static com.android.launcher3.anim.Interpolators.LINEAR;