Skip to content

Rename collectAndSendFeedback to startFeedback #3932

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion firebase-appdistribution-api/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ package com.google.firebase.appdistribution {

public interface FirebaseAppDistribution {
method @NonNull public com.google.android.gms.tasks.Task<com.google.firebase.appdistribution.AppDistributionRelease> checkForNewRelease();
method public void collectAndSendFeedback();
method @NonNull public static com.google.firebase.appdistribution.FirebaseAppDistribution getInstance();
method public boolean isTesterSignedIn();
method @NonNull public com.google.android.gms.tasks.Task<java.lang.Void> signInTester();
method public void signOutTester();
method public void startFeedback();
method @NonNull public com.google.firebase.appdistribution.UpdateTask updateApp();
method @NonNull public com.google.firebase.appdistribution.UpdateTask updateIfNewReleaseAvailable();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,10 @@ public interface FirebaseAppDistribution {
* <ol>
* <li>Takes a screenshot of the current activity
* <li>If tester is not signed in, presents the tester with a Google Sign-in UI
* <li>Looks up the currently installed App Distribution release
* <li>Starts a full screen activity for the tester to compose and submit the feedback
* </ol>
*/
void collectAndSendFeedback();
void startFeedback();

/** Gets the singleton {@link FirebaseAppDistribution} instance. */
@NonNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public UpdateTask updateApp() {
}

@Override
public void collectAndSendFeedback() {
delegate.collectAndSendFeedback();
public void startFeedback() {
delegate.startFeedback();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public UpdateTask updateApp() {
}

@Override
public void collectAndSendFeedback() {
public void startFeedback() {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,12 +306,12 @@ private UpdateTask updateApp(boolean showDownloadInNotificationManager) {
}

@Override
public void collectAndSendFeedback() {
collectAndSendFeedback(Executors.newSingleThreadExecutor());
public void startFeedback() {
startFeedback(Executors.newSingleThreadExecutor());
}

@VisibleForTesting
public void collectAndSendFeedback(Executor taskExecutor) {
public void startFeedback(Executor taskExecutor) {
screenshotTaker
.takeScreenshot()
.onSuccessTask(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -631,11 +631,11 @@ public void updateApp_withApkReleaseAvailable_returnsSameApkTask() {
}

@Test
public void collectAndSendFeedback_signsInTesterAndStartsActivity() throws InterruptedException {
public void startFeedback_signsInTesterAndStartsActivity() throws InterruptedException {
ExecutorService testExecutor = Executors.newSingleThreadExecutor();
when(mockReleaseIdentifier.identifyRelease()).thenReturn(Tasks.forResult("release-name"));

firebaseAppDistribution.collectAndSendFeedback(testExecutor);
firebaseAppDistribution.startFeedback(testExecutor);
TestUtils.awaitAsyncOperations(testExecutor);

ArgumentCaptor<Intent> argument = ArgumentCaptor.forClass(Intent.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import androidx.appcompat.widget.AppCompatButton
import com.google.android.gms.tasks.Task
import com.google.firebase.appdistribution.AppDistributionRelease
import com.google.firebase.appdistribution.FirebaseAppDistribution
import com.google.firebase.appdistribution.FirebaseAppDistributionException
import com.google.firebase.appdistribution.UpdateProgress
import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors
Expand Down Expand Up @@ -169,7 +168,7 @@ class MainActivity : AppCompatActivity() {
}

feedbackButton.setOnClickListener {
firebaseAppDistribution.collectAndSendFeedback()
firebaseAppDistribution.startFeedback()
}
}

Expand Down