Build success in Android Studio

This commit is contained in:
bryan.xiang
2020-02-29 10:12:43 +08:00
parent 6591b1156b
commit 834774b0b3
7 changed files with 21 additions and 17 deletions

View File

@@ -9,7 +9,7 @@ buildscript {
}
}
final String ANDROID_TOP = "${rootDir}/../../.."
final String ANDROID_TOP = "${rootDir}"
final String FRAMEWORK_PREBUILTS_DIR = "${ANDROID_TOP}/prebuilts/framework_intermediates/"
apply plugin: 'com.android.application'
@@ -56,7 +56,7 @@ android {
testApplicationId 'com.android.launcher3.tests'
}
withQuickstep {
/*withQuickstep {
dimension "recents"
minSdkVersion 28
@@ -66,7 +66,7 @@ android {
dimension "recents"
minSdkVersion 28
}
}*/
withoutQuickstep {
dimension "recents"
@@ -125,7 +125,7 @@ android {
java.srcDirs = ['src_ui_overrides']
}
withQuickstep {
/*withQuickstep {
res.srcDirs = ['quickstep/res', 'quickstep/recents_ui_overrides/res']
java.srcDirs = ['quickstep/src', 'quickstep/recents_ui_overrides/src']
manifest.srcFile "quickstep/AndroidManifest.xml"
@@ -135,7 +135,7 @@ android {
res.srcDirs = ['quickstep/res', 'go/quickstep/res']
java.srcDirs = ['quickstep/src', 'go/quickstep/src']
manifest.srcFile "quickstep/AndroidManifest.xml"
}
}*/
}
}
@@ -151,16 +151,16 @@ dependencies {
implementation "androidx.recyclerview:recyclerview:${ANDROID_X_VERSION}"
implementation "androidx.preference:preference:${ANDROID_X_VERSION}"
implementation project(':IconLoader')
implementation fileTree(dir: "${FRAMEWORK_PREBUILTS_DIR}/libs", include: 'launcher_protos.jar')
implementation fileTree(dir: "${ANDROID_TOP}/libs", include: 'launcher_protos.jar')
// Recents lib dependency
withQuickstepImplementation fileTree(dir: "${FRAMEWORK_PREBUILTS_DIR}/quickstep/libs", include: 'sysui_shared.jar')
//withQuickstepImplementation fileTree(dir: "${ANDROID_TOP}/libs", include: 'sysui_shared.jar')
// Recents lib dependency for Go
withQuickstepIconRecentsImplementation fileTree(dir: "${FRAMEWORK_PREBUILTS_DIR}/quickstep/libs", include: 'sysui_shared.jar')
//withQuickstepIconRecentsImplementation fileTree(dir: "${ANDROID_TOP}/libs", include: 'sysui_shared.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')
// Required for AOSP to compile. This is already included in ANDROID_TOP sysui_shared.jar
withoutQuickstepImplementation fileTree(dir: "${ANDROID_TOP}/libs", include: 'plugin_core.jar')
testImplementation 'junit:junit:4.12'
androidTestImplementation "org.mockito:mockito-core:1.9.5"

View File

@@ -10,4 +10,4 @@ PROTOBUF_CLASS_PATH=com.google.protobuf:protobuf-gradle-plugin:0.8.6
PROTOBUF_DEPENDENCY=com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7
BUILD_TOOLS_VERSION=28.0.3
COMPILE_SDK=android-Q
COMPILE_SDK=android-29

View File

@@ -37,3 +37,7 @@ android {
dependencies {
implementation "androidx.core:core:${ANDROID_X_VERSION}"
}
repositories {
google()
}

View File

@@ -66,12 +66,12 @@ public class SimpleIconCache extends BaseIconCache {
@Override
protected long getSerialNumberForUser(UserHandle user) {
synchronized (mUserSerialMap) {
int index = mUserSerialMap.indexOfKey(user.getIdentifier());
int index = mUserSerialMap.indexOfKey(user.hashCode());
if (index >= 0) {
return mUserSerialMap.valueAt(index);
}
long serial = mUserManager.getSerialNumberForUser(user);
mUserSerialMap.put(user.getIdentifier(), serial);
mUserSerialMap.put(user.hashCode(), serial);
return serial;
}
}
@@ -84,7 +84,7 @@ public class SimpleIconCache extends BaseIconCache {
@Override
protected boolean isInstantApp(ApplicationInfo info) {
return info.isInstantApp();
return mContext.getPackageManager().isInstantApp(info.packageName);
}
@Override

BIN
libs/launcher_protos.jar Normal file

Binary file not shown.

BIN
libs/plugin_core.jar Normal file

Binary file not shown.

View File

@@ -19,7 +19,7 @@
<resources>
<!-- Launcher theme -->
<style name="BaseLauncherTheme" parent="@android:style/Theme.DeviceDefault.DayNight">
<style name="BaseLauncherTheme" parent="@style/Theme.AppCompat.DayNight">
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:colorEdgeEffect">#FF757575</item>
<item name="android:windowActionBar">false</item>
@@ -28,7 +28,7 @@
<item name="android:windowShowWallpaper">true</item>
<item name="folderTextColor">?attr/workspaceTextColor</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
<item name="android:enforceStatusBarContrast">false</item>
<item name="android:enforceNavigationBarContrast">false</item>
<!-- <item name="android:enforceStatusBarContrast">false</item>
<item name="android:enforceNavigationBarContrast">false</item>-->
</style>
</resources>