Skip to content

Commit 24f44b1

Browse files
authored
Merge fab390f into 4d64675
2 parents 4d64675 + fab390f commit 24f44b1

File tree

3 files changed

+147
-143
lines changed

3 files changed

+147
-143
lines changed

firebase-appdistribution-api/src/main/java/com/google/firebase/appdistribution/FirebaseAppDistribution.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public interface FirebaseAppDistribution {
177177
* @param screenshot URI to a bitmap containing a screenshot that will be included with the
178178
* report, or null to not include a screenshot
179179
*/
180-
void startFeedback(@NonNull CharSequence infoText, @Nullable Uri screenshotUri);
180+
void startFeedback(@NonNull CharSequence infoText, @Nullable Uri screenshot);
181181

182182
/** Gets the singleton {@link FirebaseAppDistribution} instance. */
183183
@NonNull

firebase-appdistribution/test-app/src/main/java/com/googletest/firebase/appdistribution/testapp/MainActivity.kt

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ class MainActivity : AppCompatActivity() {
4646
lateinit var feedbackTriggerMenu: TextInputLayout
4747

4848
var updateTask: Task<Void>? = null
49-
var release: AppDistributionRelease? = null
5049

5150
override fun onCreate(savedInstanceState: Bundle?) {
5251
super.onCreate(savedInstanceState)
@@ -67,6 +66,10 @@ class MainActivity : AppCompatActivity() {
6766
signInStatus = findViewById(R.id.sign_in_status)
6867
progressBar = findViewById(R.id.progress_bar)
6968

69+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
70+
NotificationFeedbackTrigger.requestPermission(this)
71+
}
72+
7073
// Set up feedback trigger menu
7174
feedbackTriggerMenu = findViewById(R.id.feedbackTriggerMenu)
7275
val items = listOf(
@@ -181,10 +184,11 @@ class MainActivity : AppCompatActivity() {
181184
firebaseAppDistribution
182185
.checkForNewRelease()
183186
.addOnSuccessListener {
184-
setupUI(
185-
isSignedIn = firebaseAppDistribution.isTesterSignedIn,
186-
isUpdateAvailable = it != null,
187-
release = it)
187+
release ->
188+
setupUI(
189+
isSignedIn = firebaseAppDistribution.isTesterSignedIn,
190+
isUpdateAvailable = release != null,
191+
release = release)
188192
}
189193
.addOnFailureListener { failureListener(it) }
190194
}
@@ -194,11 +198,11 @@ class MainActivity : AppCompatActivity() {
194198
firebaseAppDistribution
195199
.checkForNewRelease()
196200
.addOnSuccessListener {
197-
release = it
198-
setupUI(
199-
isSignedIn = firebaseAppDistribution.isTesterSignedIn,
200-
isUpdateAvailable = release != null,
201-
release = release)
201+
release ->
202+
setupUI(
203+
isSignedIn = firebaseAppDistribution.isTesterSignedIn,
204+
isUpdateAvailable = release != null,
205+
release = release)
202206
}
203207
.addOnFailureListener { failureListener(it) }
204208
}

0 commit comments

Comments
 (0)