diff --git a/app/src/main/java/com/maary/shareas/activity/StartActivity.kt b/app/src/main/java/com/maary/shareas/activity/StartActivity.kt
index cc1aa1f..6382307 100644
--- a/app/src/main/java/com/maary/shareas/activity/StartActivity.kt
+++ b/app/src/main/java/com/maary/shareas/activity/StartActivity.kt
@@ -94,7 +94,7 @@ class StartActivity : AppCompatActivity(){
val homePFD:ParcelFileDescriptor?
var lockPFD:ParcelFileDescriptor?
val homeBitmap: Bitmap
- var lockBitmap: Bitmap?
+ var lockBitmap: Bitmap
if (checkPermission()){
homePFD = wallpaperManager.getWallpaperFile(WallpaperManager.FLAG_SYSTEM)
@@ -109,10 +109,15 @@ class StartActivity : AppCompatActivity(){
}else{
homeBitmap = (wallpaperManager.getBuiltInDrawable(WallpaperManager.FLAG_SYSTEM)).toBitmap()
- lockBitmap = (wallpaperManager.getBuiltInDrawable(WallpaperManager.FLAG_LOCK)).toBitmapOrNull()
- if (lockBitmap == null){
+ /**
+ * 持续产生
+ * java.lang.NullPointerException: wallpaperManager.getBuil…llpaperManager.FLAG_LOCK) must not be null
+ * 问题
+ * */
+// lockBitmap = (wallpaperManager.getBuiltInDrawable(WallpaperManager.FLAG_LOCK)).toBitmap()
+// if (lockBitmap == null){
lockBitmap = homeBitmap
- }
+// }
}
binding.homeContainer.setImageBitmap(homeBitmap)
binding.lockContainer.setImageBitmap(lockBitmap)
diff --git a/app/src/main/res/drawable/ic_center_horizontal.xml b/app/src/main/res/drawable/ic_center_horizontal.xml
index f036e81..95011fe 100644
--- a/app/src/main/res/drawable/ic_center_horizontal.xml
+++ b/app/src/main/res/drawable/ic_center_horizontal.xml
@@ -2,7 +2,8 @@
android:width="800dp"
android:height="800dp"
android:viewportWidth="24"
- android:viewportHeight="24">
+ android:viewportHeight="24"
+ android:tint="?android:attr/textColorPrimary">
diff --git a/app/src/main/res/drawable/ic_center_vertical.xml b/app/src/main/res/drawable/ic_center_vertical.xml
index eb5853f..b148d84 100644
--- a/app/src/main/res/drawable/ic_center_vertical.xml
+++ b/app/src/main/res/drawable/ic_center_vertical.xml
@@ -2,7 +2,8 @@
android:width="800dp"
android:height="800dp"
android:viewportWidth="24"
- android:viewportHeight="24">
+ android:viewportHeight="24"
+ android:tint="?android:attr/textColorPrimary">