You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge fad/next into master to prepare for next release (#4784)
* Some App Distribution javadoc updates (#4740)
* Support JPGs (in addition to PNGs) as feedback screenshots and set correct content-type/filename (#4783)
* Support PNGs as feedback screenshots
* Add tests and inject ContentResolver
* Address feedback
* Flip order of conditional
* Update changelog and version for M129
Copy file name to clipboardExpand all lines: firebase-appdistribution-api/src/main/java/com/google/firebase/appdistribution/FirebaseAppDistribution.java
+35-30Lines changed: 35 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ public interface FirebaseAppDistribution {
43
43
* following actions:
44
44
*
45
45
* <ol>
46
-
* <li>If tester is not signed in, presents the tester with a Google Sign-in UI.
46
+
* <li>If the tester is not signed in, presents the tester with a Google Sign-in UI.
47
47
* <li>Checks if a newer release is available. If so, presents the tester with a confirmation
48
48
* dialog to begin the download.
49
49
* <li>If the newest release is an APK, downloads the binary and starts an installation. If the
@@ -119,9 +119,9 @@ public interface FirebaseAppDistribution {
119
119
* <p>Performs the following actions:
120
120
*
121
121
* <ol>
122
-
* <li>Takes a screenshot of the current activity
123
-
* <li>If tester is not signed in, presents the tester with a Google Sign-in UI
124
-
* <li>Starts a full screen activity for the tester to compose and submit the feedback
122
+
* <li>Takes a screenshot of the current activity.
123
+
* <li>If the tester is not signed in, presents the tester with a Google Sign-in UI.
124
+
* <li>Starts a full screen activity for the tester to compose and submit the feedback.
125
125
* </ol>
126
126
*
127
127
* @param additionalFormText string resource ID of text that will be shown to the tester before
@@ -137,9 +137,9 @@ public interface FirebaseAppDistribution {
137
137
* <p>Performs the following actions:
138
138
*
139
139
* <ol>
140
-
* <li>Takes a screenshot of the current activity
141
-
* <li>If tester is not signed in, presents the tester with a Google Sign-in UI
142
-
* <li>Starts a full screen activity for the tester to compose and submit the feedback
140
+
* <li>Takes a screenshot of the current activity.
141
+
* <li>If the tester is not signed in, presents the tester with a Google Sign-in UI.
142
+
* <li>Starts a full screen activity for the tester to compose and submit the feedback.
143
143
* </ol>
144
144
*
145
145
* @param additionalFormText text that will be shown to the tester before they submit feedback. If
@@ -155,8 +155,8 @@ public interface FirebaseAppDistribution {
155
155
* <p>Performs the following actions:
156
156
*
157
157
* <ol>
158
-
* <li>If tester is not signed in, presents the tester with a Google Sign-in UI
159
-
* <li>Starts a full screen activity for the tester to compose and submit the feedback
158
+
* <li>If the tester is not signed in, presents the tester with a Google Sign-in UI.
159
+
* <li>Starts a full screen activity for the tester to compose and submit the feedback.
160
160
* </ol>
161
161
*
162
162
* @param additionalFormText string resource ID of text that will be shown to the tester before
@@ -175,8 +175,8 @@ public interface FirebaseAppDistribution {
175
175
* <p>Performs the following actions:
176
176
*
177
177
* <ol>
178
-
* <li>If tester is not signed in, presents the tester with a Google Sign-in UI
179
-
* <li>Starts a full screen activity for the tester to compose and submit the feedback
178
+
* <li>If the tester is not signed in, presents the tester with a Google Sign-in UI.
179
+
* <li>Starts a full screen activity for the tester to compose and submit the feedback.
180
180
* </ol>
181
181
*
182
182
* @param additionalFormText text that will be shown to the tester before they submit feedback. If
@@ -191,28 +191,29 @@ public interface FirebaseAppDistribution {
191
191
* Displays a notification that, when tapped, will take a screenshot of the current activity, then
192
192
* start a new activity to collect and submit feedback from the tester along with the screenshot.
193
193
*
194
-
* <p>On Android 13 and above, this method requires the <a
Copy file name to clipboardExpand all lines: firebase-appdistribution/src/main/java/com/google/firebase/appdistribution/impl/FirebaseAppDistributionImpl.java
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -381,6 +381,14 @@ private void startFeedback(
381
381
@NonNullCharSequenceadditionalFormText,
382
382
@NullableUriscreenshotUri,
383
383
FeedbackTriggertrigger) {
384
+
if (!screenshotUri.getScheme().equals("content") && !screenshotUri.getScheme().equals("file")) {
385
+
LogWrapper.e(
386
+
TAG,
387
+
String.format(
388
+
"Screenshot URI %s was not a content or file URI. Not starting feedback.",
389
+
screenshotUri));
390
+
return;
391
+
}
384
392
if (!feedbackInProgress.compareAndSet(/* expect= */false, /* update= */true)) {
385
393
LogWrapper.i(TAG, "Ignoring startFeedback() call because feedback is already in progress");
0 commit comments