1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-25 11:26:47 +01:00

Fossil Hybrid HR: Fix watchface background fuzziness due to resizing

This commit is contained in:
Arjan Schrijver 2022-07-31 22:53:32 +02:00
parent 305078f253
commit 44c087b666
2 changed files with 3 additions and 5 deletions

View File

@ -572,7 +572,7 @@ public class HybridHRWatchfaceDesignerActivity extends AbstractGBActivity implem
wfFactory = new HybridHRWatchfaceFactory(watchfaceName);
}
wfFactory.setSettings(watchfaceSettings);
wfFactory.setBackground(processedBackgroundImage);
wfFactory.setBackground(selectedBackgroundImage);
wfFactory.addWidgets(widgets);
try {
File tempFile = File.createTempFile("tmpWatchfaceFile", null);
@ -607,14 +607,14 @@ public class HybridHRWatchfaceDesignerActivity extends AbstractGBActivity implem
public void onClick(DialogInterface dialog, int which) {
findViewById(R.id.watchface_upload_progress_bar).setVisibility(View.VISIBLE);
GBApplication.deviceService().onInstallApp(tempAppFileUri);
FossilHRInstallHandler.saveAppInCache(fossilFile, processedBackgroundImage, wfFactory.getPreviewImage(mContext), mCoordinator, HybridHRWatchfaceDesignerActivity.this);
FossilHRInstallHandler.saveAppInCache(fossilFile, selectedBackgroundImage, wfFactory.getPreviewImage(mContext), mCoordinator, HybridHRWatchfaceDesignerActivity.this);
}
})
.show();
} else {
findViewById(R.id.watchface_upload_progress_bar).setVisibility(View.VISIBLE);
GBApplication.deviceService().onInstallApp(tempAppFileUri);
FossilHRInstallHandler.saveAppInCache(fossilFile, processedBackgroundImage, wfFactory.getPreviewImage(mContext), mCoordinator, HybridHRWatchfaceDesignerActivity.this);
FossilHRInstallHandler.saveAppInCache(fossilFile, selectedBackgroundImage, wfFactory.getPreviewImage(mContext), mCoordinator, HybridHRWatchfaceDesignerActivity.this);
}
}
} catch (IOException e) {

View File

@ -173,8 +173,6 @@ public class BitmapUtil {
float left = (squareBitmapWidth-srcBitmap.getWidth())/2;
float top = (squareBitmapWidth-srcBitmap.getHeight())/2;
canvas.drawBitmap(srcBitmap, left, top, paint);
// Free the native object associated with this bitmap.
srcBitmap.recycle();
// Return the circular bitmap
return dstBitmap;
}