Skip to content

Commit 6e82316

Browse files
author
Rachel Prince
committed
Respond to PR review comments
1 parent 1962c0c commit 6e82316

File tree

6 files changed

+34
-25
lines changed

6 files changed

+34
-25
lines changed

firebase-appdistribution/src/main/java/com/google/firebase/appdistribution/BinaryType.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616

1717
/** Enum of Android app binary types, used in {@link AppDistributionRelease} */
1818
public enum BinaryType {
19+
/** Android App Bundle. */
1920
AAB,
21+
22+
/** Android Application Package. */
2023
APK
2124
}

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

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -140,15 +140,17 @@ public static FirebaseAppDistribution getInstance() {
140140
}
141141

142142
/**
143-
* Updates the app to the newest release, if one is available. Returns the release information or
144-
* null if no update is found. Performs the following actions:
143+
* Updates the app to the newest release, if one is available.
144+
*
145+
* <p>Returns the release information or null if no update is found. Performs the following
146+
* actions:
145147
*
146148
* <ol>
147-
* <li>1. If tester is not signed in, presents the tester with a Google sign in UI
148-
* <li>2. Checks if a newer release is available. If so, presents the tester with a confirmation
149+
* <li>If tester is not signed in, presents the tester with a Google sign in UI.
150+
* <li>Checks if a newer release is available. If so, presents the tester with a confirmation
149151
* dialog to begin the download.
150-
* <li>3. For APKs, downloads the binary and starts an installation intent.
151-
* <li>4. For AABs, directs the tester to the Play appto complete the download and installation.
152+
* <li>For APKs, downloads the binary and starts an installation intent. For AABs, directs the
153+
* tester to the Play app to complete the download and installation.
152154
* </ol>
153155
*/
154156
@NonNull
@@ -256,7 +258,7 @@ public Task<Void> signInTester() {
256258

257259
/**
258260
* Returns an {@link AppDistributionRelease} if an update is available for the current signed in
259-
* tester. If no update is found, returns null.
261+
* tester or {@code null} otherwise.
260262
*/
261263
@NonNull
262264
public synchronized Task<AppDistributionRelease> checkForNewRelease() {
@@ -289,13 +291,13 @@ public synchronized Task<AppDistributionRelease> checkForNewRelease() {
289291
}
290292

291293
/**
292-
* 1:24 PM Updates app to the {@link AppDistributionRelease} returned by {@link
293-
* #checkForNewRelease}. If the newest release is an APK, downloads the binary and starts an
294-
* installation. If the newest release is an AAB, directs the tester to the Play app to complete
295-
* the download and installation.
294+
* Updates app to the {@link AppDistributionRelease} returned by {@link #checkForNewRelease}. If
295+
* the newest release is an APK, downloads the binary and starts an installation. If the newest
296+
* release is an AAB, directs the tester to the Play app to complete the download and
297+
* installation.
296298
*
297-
* <p>Cancels task with {@link FirebaseAppDistributionException.Status.UPDATE_NOT_AVAILABLE} if no
298-
* new release is cached from {@link checkForNewRelease}.
299+
* <p>Cancels task with {@link Status#UPDATE_NOT_AVAILABLE} if no new release is cached from
300+
* {@link #checkForNewRelease}.
299301
*/
300302
@NonNull
301303
public UpdateTask updateApp() {
@@ -337,7 +339,7 @@ private UpdateTask updateApp(boolean showDownloadInNotificationManager) {
337339
}
338340
}
339341

340-
/** Returns {@code true} if the App Distribution tester is signed in */
342+
/** Returns {@code true} if the App Distribution tester is signed in. */
341343
public boolean isTesterSignedIn() {
342344
return this.signInStorage.getSignInStatus();
343345
}

firebase-appdistribution/src/main/java/com/google/firebase/appdistribution/FirebaseAppDistributionException.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
/** The class for all Exceptions thrown by {@link FirebaseAppDistribution}. */
2323
public class FirebaseAppDistributionException extends FirebaseException {
24+
/** Enum for potential error statuses that caused the {@link FirebaseAppDistributionException}. */
2425
public enum Status {
2526
/** Unknown error. */
2627
UNKNOWN,

firebase-appdistribution/src/main/java/com/google/firebase/appdistribution/UpdateProgress.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,22 @@ static UpdateProgress.Builder builder() {
2828
}
2929

3030
/**
31-
* The number of bytes downloaded so far for an APK. Returns -1 if called when updating to an AAB
32-
* or if no new release is available.
31+
* The number of bytes downloaded so far for an APK.
32+
*
33+
* @returns -1 if called when updating to an AAB or if no new release is available.
3334
*/
3435
@NonNull
3536
public abstract long getApkBytesDownloaded();
3637

3738
/**
38-
* The file size of the APK file to download in bytes. Returns -1 if called when updating to an
39-
* AAB or if no new release is available.
39+
* The file size of the APK file to download in bytes.
40+
*
41+
* @returns -1 if called when updating to an AAB or if no new release is available.
4042
*/
4143
@NonNull
4244
public abstract long getApkFileTotalBytes();
4345

44-
/** Returns the current {@link UpdateStatus} of the update */
46+
/** Returns the current {@link UpdateStatus} of the update. */
4547
@NonNull
4648
public abstract UpdateStatus getUpdateStatus();
4749

firebase-appdistribution/src/main/java/com/google/firebase/appdistribution/UpdateStatus.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,19 @@ public enum UpdateStatus {
2828
/** The new release failed to download. */
2929
DOWNLOAD_FAILED,
3030

31-
/** The new release installation was canceled */
31+
/** The new release installation was canceled. */
3232
INSTALL_CANCELED,
3333

34-
/** The new release installation failed */
34+
/** The new release installation failed. */
3535
INSTALL_FAILED,
3636

37-
/** The tester was redirected to Play to download an {@link BinaryType.AAB} file. */
37+
/** The tester was redirected to Play to download an {@link BinaryType#AAB} file. */
3838
REDIRECTED_TO_PLAY,
3939

4040
/** The tester is currently on the latest release they have access to for the current app. */
4141
NEW_RELEASE_NOT_AVAILABLE,
4242

43-
/** The call to {@link checkForNewRelease} failed. */
43+
/** The call to {@link FirebaseAppDistribution#checkForNewRelease} failed. */
4444
NEW_RELEASE_CHECK_FAILED,
4545

4646
/** The tester canceled the update. */

firebase-appdistribution/src/main/java/com/google/firebase/appdistribution/UpdateTask.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@
2020
import java.util.concurrent.Executor;
2121

2222
/**
23-
* Represents an asynchronous operation to update an app. This task also receives progress and other
24-
* state change notifications.
23+
* Represents an asynchronous operation to update an app.
24+
*
25+
* <p>This task also receives progress and other state change notifications.
2526
*/
2627
public abstract class UpdateTask extends Task<Void> {
2728
/**

0 commit comments

Comments
 (0)