add kotlin support for launcher

Bug: 193432925
Test: click on the app icon and check logcat
Change-Id: I2ca4d57105fe4e1b1dfc6c968a7c1bbd3cbd2151
This commit is contained in:
Thales Lima
2021-10-21 15:34:28 +01:00
parent 75c97f534b
commit 26f44911a6
5 changed files with 35 additions and 3 deletions

View File

@@ -20,6 +20,7 @@ import android.util.Log;
import com.android.systemui.shared.recents.model.Task.TaskKey;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.function.Predicate;
/**
@@ -117,7 +118,7 @@ public class TaskKeyLruCache<V> {
}
@Override
protected boolean removeEldestEntry(Entry<Integer, TaskKeyLruCache.Entry<V>> eldest) {
protected boolean removeEldestEntry(Map.Entry<Integer, TaskKeyLruCache.Entry<V>> eldest) {
return size() > mMaxSize;
}
}

View File

@@ -0,0 +1,14 @@
package com.android.quickstep.views
import android.util.Log
// TODO(http://b/193432925)
class TaskMenuViewWithArrow {
companion object {
const val TAG = "TaskMenuViewWithArrow"
fun logSomething() {
Log.d(TAG, "It worked!")
}
}
}

View File

@@ -115,6 +115,7 @@ import java.util.stream.Stream;
public class TaskView extends FrameLayout implements Reusable {
private static final String TAG = TaskView.class.getSimpleName();
private static final boolean DEBUG = false;
public static final int FLAG_UPDATE_ICON = 1;
public static final int FLAG_UPDATE_THUMBNAIL = FLAG_UPDATE_ICON << 1;
@@ -808,6 +809,8 @@ public class TaskView extends FrameLayout implements Reusable {
}
protected boolean showTaskMenuWithContainer(IconView iconView) {
// TODO(http://b/193432925)
if (DEBUG) TaskMenuViewWithArrow.Companion.logSomething();
return TaskMenuView.showForTask(mTaskIdAttributeContainer[0]);
}