From 0460613aea2d6421a29c330955b25c06919b37b0 Mon Sep 17 00:00:00 2001 From: ZhanGSKen Date: Tue, 15 Apr 2025 20:43:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BA=E5=AE=9A=E5=8F=82=E6=95=B0=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E5=88=9D=E5=A7=8B=E5=8C=96=E6=96=B9=E6=B3=95=E7=BB=BC?= =?UTF-8?q?=E5=90=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- powerbell/build.properties | 4 ++-- .../powerbell/activities/BackgroundPictureActivity.java | 9 +++++++-- .../dialogs/BackgroundPicturePreviewDialog.java | 9 +++++++-- .../studio/powerbell/fragments/MainViewFragment.java | 2 +- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/powerbell/build.properties b/powerbell/build.properties index 10ef7fc..49e2430 100644 --- a/powerbell/build.properties +++ b/powerbell/build.properties @@ -1,8 +1,8 @@ #Created by .winboll/winboll_app_build.gradle -#Mon Apr 14 14:22:32 GMT 2025 +#Tue Apr 15 12:41:31 GMT 2025 stageCount=3 libraryProject= baseVersion=15.2 publishVersion=15.2.2 -buildCount=6 +buildCount=9 baseBetaVersion=15.2.3 diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/activities/BackgroundPictureActivity.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/activities/BackgroundPictureActivity.java index e3f04d0..929e987 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/activities/BackgroundPictureActivity.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/activities/BackgroundPictureActivity.java @@ -59,11 +59,13 @@ implements BackgroundPicturePreviewDialog.IOnRecivedPictureListener { static String _mszCommonFileType = "jpeg"; // 背景图片的压缩比 int mnPictureCompress = 100; + static String _RecivedPictureFileName; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_backgroundpicture); + initEnv(); mBackgroundPictureUtils = BackgroundPictureUtils.getInstance(this); mfBackgroundDir = new File(mBackgroundPictureUtils.getBackgroundDir()); @@ -130,6 +132,10 @@ implements BackgroundPicturePreviewDialog.IOnRecivedPictureListener { dlg.show(); } } + + void initEnv() { + _RecivedPictureFileName = "Recived.data"; + } public static String getBackgroundFileName() { return _mszRecivedCropPicture; @@ -331,10 +337,9 @@ implements BackgroundPicturePreviewDialog.IOnRecivedPictureListener { } public static File getRecivedPictureFile(Context context) { - String szRecivedPictureFileName = "Recived.data"; BackgroundPictureUtils utils = BackgroundPictureUtils.getInstance(context); utils.loadBackgroundPictureBean(); - return new File(utils.getBackgroundDir(), szRecivedPictureFileName); + return new File(utils.getBackgroundDir(), _RecivedPictureFileName); } @Override diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/dialogs/BackgroundPicturePreviewDialog.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/dialogs/BackgroundPicturePreviewDialog.java index e746271..fe413f3 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/dialogs/BackgroundPicturePreviewDialog.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/dialogs/BackgroundPicturePreviewDialog.java @@ -37,6 +37,8 @@ public class BackgroundPicturePreviewDialog extends Dialog { public BackgroundPicturePreviewDialog(Context context) { super(context); setContentView(R.layout.dialog_backgroundpicturepreview); + initEnv(); + mContext = context; mBackgroundPictureUtils = ((BackgroundPictureActivity)context).mBackgroundPictureUtils; @@ -68,6 +70,10 @@ public class BackgroundPicturePreviewDialog extends Dialog { } }); } + + void initEnv() { + mszPreReceivedFileName = "PreReceived.data"; + } void copyAndViewRecivePicture(ImageView imageView) { //AppConfigUtils appConfigUtils = AppConfigUtils.getInstance((GlobalApplication)mContext.getApplicationContext()); @@ -87,7 +93,6 @@ public class BackgroundPicturePreviewDialog extends Dialog { } File fSrcImage = new File(szSrcImage); - mszPreReceivedFileName = "PreReceived.data"; //mszPreReceivedFileName = DateUtils.getDateNowString() + "-" + fSrcImage.getName(); File mfPreReceivedPhoto = new File(activity.mBackgroundPictureUtils.getBackgroundDir(), mszPreReceivedFileName); // 复制源图片到剪裁文件 @@ -96,7 +101,7 @@ public class BackgroundPicturePreviewDialog extends Dialog { LogUtils.d(TAG, "copyFileUsingFileChannels"); Drawable drawable = Drawable.createFromPath(mfPreReceivedPhoto.getPath()); imageView.setBackground(drawable); - LogUtils.d(TAG, "mszPreReceivedFileName : " + mszPreReceivedFileName); + //LogUtils.d(TAG, "mszPreReceivedFileName : " + mszPreReceivedFileName); } catch (IOException e) { LogUtils.d(TAG, e, Thread.currentThread().getStackTrace()); } diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/fragments/MainViewFragment.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/fragments/MainViewFragment.java index d8eaaa0..0e63a91 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/fragments/MainViewFragment.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/fragments/MainViewFragment.java @@ -32,7 +32,7 @@ import java.io.File; public class MainViewFragment extends Fragment { - public static final String TAG = MainViewFragment.class.getSimpleName(); + public static final String TAG = "MainViewFragment"; public static final int MSG_RELOAD_APPCONFIG = 0; public static final int MSG_CURRENTVALUEBATTERY = 1;