Issue:
"
Actual Results: [NGMS]Fail to add Gallery widgets to home screen
Expected Results: [NGMS]Gallery widgets should be added to home screen successfully
Reproduction Steps:
- Open camera app and capture some image
- Long Tap Gallery app
- Tap widget icon on the top
- Touch & hold to pick up Photo Gallery widget 3x3
- Drag it to home screen
Find, Fail to add Gallery widgets to home screen==>Problem
"
Solution:
"
Solution: Adjust the maximum bitmap size which allow to be returned through the intent.
"
packages/apps/Gallery2/src/com/android/gallery3d/filtershow/crop/CropActivity.java
diff --git a/src/com/android/gallery3d/filtershow/crop/CropActivity.java b/src/com/android/gallery3d/filtershow/crop/CropActivity.java
index 3a78296..6c4939c 100644
--- a/src/com/android/gallery3d/filtershow/crop/CropActivity.java
+++ b/src/com/android/gallery3d/filtershow/crop/CropActivity.java
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2013 The Android Open Source Project
+ * Copyright (c) 2023 Zebra Technologies Corporation and/or its affiliates. All rights reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -54,6 +55,8 @@
import java.io.InputStream;
import java.io.OutputStream;
+import com.xxx.util.XXXUtils;
+
/**
* Activity for cropping an image.
*/
@@ -440,7 +443,11 @@
assert (img != null);
Bitmap ret = getCroppedImage(img, mCrop, mPhoto);
if (ret != null) {
- ret = getDownsampledBitmap(ret, MAX_BMAP_IN_INTENT);
+ if (XXXUtils.isXXX().orElse(false)) {
+ ret = getDownsampledBitmap(ret, 490000);
+ } else {
+ ret = getDownsampledBitmap(ret, MAX_BMAP_IN_INTENT);
+ }
}
if (ret == null) {
Log.w(LOGTAG, "could not downsample bitmap to return in data");