version:
fix: update:修复设置默认桌面报错
This commit is contained in:
26
build.gradle
26
build.gradle
@@ -40,19 +40,19 @@ apply plugin: 'com.google.protobuf'
|
|||||||
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
gradle.projectsEvaluated {
|
// gradle.projectsEvaluated {
|
||||||
tasks.withType(JavaCompile) {
|
// tasks.withType(JavaCompile) {
|
||||||
Set<File> fileSet = options.bootstrapClasspath.getFiles()
|
// Set<File> fileSet = options.bootstrapClasspath.getFiles()
|
||||||
List<File> newFileList = new ArrayList<>();
|
// List<File> newFileList = new ArrayList<>();
|
||||||
//JAVA语法,可连续调用,输入参数建议为相对路径
|
// //JAVA语法,可连续调用,输入参数建议为相对路径
|
||||||
newFileList.add(new File("libs/framework.jar"))
|
// newFileList.add(new File("libs/framework.jar"))
|
||||||
//最后将原始参数添加
|
// //最后将原始参数添加
|
||||||
newFileList.addAll(fileSet)
|
// newFileList.addAll(fileSet)
|
||||||
options.bootstrapClasspath = files(
|
// options.bootstrapClasspath = files(
|
||||||
newFileList.toArray()
|
// newFileList.toArray()
|
||||||
)
|
// )
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
lintOptions {
|
lintOptions {
|
||||||
checkReleaseBuilds false
|
checkReleaseBuilds false
|
||||||
|
|||||||
@@ -585,17 +585,13 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
public void setRoleHolderAsUser(Context context, String packageName) {
|
public void setRoleHolderAsUser(Context context, String packageName) {
|
||||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.P) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
String roleName = "android.app.role.HOME";
|
String roleName = "android.app.role.HOME";
|
||||||
boolean add = true;
|
boolean add = true;
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
UserHandle user = Process.myUserHandle();
|
UserHandle user = Process.myUserHandle();
|
||||||
|
|
||||||
Log.i("settingssssssstemf", (add ? "Adding" : "Removing") + " package as role holder, role: "
|
Log.i("settingssssssstemf", (add ? "Adding" : "Removing") + " package as role holder, role: "
|
||||||
+ roleName + ", package: " + packageName);
|
+ roleName + ", package: " + packageName);
|
||||||
|
|
||||||
if (JGYUtils.getInstance().checkAppPlatform() != JGYUtils.MTKPlatform) {
|
if (JGYUtils.getInstance().checkAppPlatform() != JGYUtils.MTKPlatform) {
|
||||||
RoleManager roleManager = context.getSystemService(RoleManager.class);
|
RoleManager roleManager = context.getSystemService(RoleManager.class);
|
||||||
Executor executor = context.getMainExecutor();
|
Executor executor = context.getMainExecutor();
|
||||||
@@ -609,12 +605,13 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
|
|||||||
+ packageName);
|
+ packageName);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
roleManager.addRoleHolderAsUser(roleName, packageName, flags, user, executor, callback);
|
roleManager.addRoleHolderAsUser(roleName, packageName, flags, user, executor, callback);
|
||||||
Log.i("settingssssssstemf", "addRoleHolderAsUser done");
|
Log.i("settingssssssstemf", "addRoleHolderAsUser done");
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private TimeChangedReceiver mTimeChangedReceiver;
|
private TimeChangedReceiver mTimeChangedReceiver;
|
||||||
|
|
||||||
|
|||||||
@@ -479,6 +479,7 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
|
|||||||
}
|
}
|
||||||
return folderCount >= MIN_FOLDERS_FOR_HARDWARE_OPTIMIZATION;
|
return folderCount >= MIN_FOLDERS_FOR_HARDWARE_OPTIMIZATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Bitmap blur(Bitmap image) {
|
public Bitmap blur(Bitmap image) {
|
||||||
int width = Math.round(image.getWidth() * 0.4f);
|
int width = Math.round(image.getWidth() * 0.4f);
|
||||||
int height = Math.round(image.getHeight() * 0.4f);
|
int height = Math.round(image.getHeight() * 0.4f);
|
||||||
@@ -528,8 +529,6 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
|
|||||||
return bitmap;
|
return bitmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Opens the user folder described by the specified tag. The opening of the folder
|
* Opens the user folder described by the specified tag. The opening of the folder
|
||||||
* is animated relative to the specified View. If the View is null, no animation
|
* is animated relative to the specified View. If the View is null, no animation
|
||||||
|
|||||||
Reference in New Issue
Block a user