Skip to content

Commit 91401e9

Browse files
authored
chore: run formatter (#1629)
* chore: run formatter * chore: fix line lengths
1 parent 1d8304c commit 91401e9

File tree

151 files changed

+3629
-3782
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+3629
-3782
lines changed

google-api-client-android/src/main/java/com/google/api/client/googleapis/extensions/android/accounts/GoogleAccountManager.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import com.google.api.client.util.Preconditions;
2222

2323
/**
24-
* {@link Beta} <br/>
24+
* {@link Beta} <br>
2525
* Account manager wrapper for Google accounts.
2626
*
2727
* @since 1.11
@@ -36,16 +36,12 @@ public final class GoogleAccountManager {
3636
/** Account manager. */
3737
private final AccountManager manager;
3838

39-
/**
40-
* @param accountManager account manager
41-
*/
39+
/** @param accountManager account manager */
4240
public GoogleAccountManager(AccountManager accountManager) {
4341
this.manager = Preconditions.checkNotNull(accountManager);
4442
}
4543

46-
/**
47-
* @param context context from which to retrieve the account manager
48-
*/
44+
/** @param context context from which to retrieve the account manager */
4945
public GoogleAccountManager(Context context) {
5046
this(AccountManager.get(context));
5147
}

google-api-client-android/src/main/java/com/google/api/client/googleapis/extensions/android/accounts/package-info.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,11 @@
1313
*/
1414

1515
/**
16-
* {@link com.google.api.client.util.Beta} <br/>
16+
* {@link com.google.api.client.util.Beta} <br>
1717
* Utilities for Account Manager for Google accounts on Android Eclair (SDK 2.1) and later.
1818
*
1919
* @since 1.11
2020
* @author Yaniv Inbar
2121
*/
2222
@com.google.api.client.util.Beta
2323
package com.google.api.client.googleapis.extensions.android.accounts;
24-

google-api-client-android/src/main/java/com/google/api/client/googleapis/extensions/android/gms/auth/GoogleAccountCredential.java

Lines changed: 21 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,22 @@
3737
import java.util.Collection;
3838

3939
/**
40-
* {@link Beta} <br/>
40+
* {@link Beta} <br>
4141
* Manages authorization and account selection for Google accounts.
4242
*
43-
* <p>
44-
* When fetching a token, any thrown {@link GoogleAuthException} would be wrapped:
43+
* <p>When fetching a token, any thrown {@link GoogleAuthException} would be wrapped:
44+
*
4545
* <ul>
46-
* <li>{@link GooglePlayServicesAvailabilityException} would be wrapped inside of
47-
* {@link GooglePlayServicesAvailabilityIOException}</li>
48-
* <li>{@link UserRecoverableAuthException} would be wrapped inside of
49-
* {@link UserRecoverableAuthIOException}</li>
50-
* <li>{@link GoogleAuthException} when be wrapped inside of {@link GoogleAuthIOException}</li>
46+
* <li>{@link GooglePlayServicesAvailabilityException} would be wrapped inside of {@link
47+
* GooglePlayServicesAvailabilityIOException}
48+
* <li>{@link UserRecoverableAuthException} would be wrapped inside of {@link
49+
* UserRecoverableAuthIOException}
50+
* <li>{@link GoogleAuthException} when be wrapped inside of {@link GoogleAuthIOException}
5151
* </ul>
52-
* </p>
5352
*
54-
* <p>
55-
* Upgrade warning: in prior version 1.14 exponential back-off was enabled by default when I/O
53+
* <p>Upgrade warning: in prior version 1.14 exponential back-off was enabled by default when I/O
5654
* exception was thrown inside {@link #getToken}, but starting with version 1.15 you need to call
5755
* {@link #setBackOff} with {@link ExponentialBackOff} to enable it.
58-
* </p>
5956
*
6057
* @since 1.12
6158
* @author Yaniv Inbar
@@ -106,7 +103,6 @@ public GoogleAccountCredential(Context context, String scope) {
106103
* @param context context
107104
* @param scopes non empty OAuth 2.0 scope list
108105
* @return new instance
109-
*
110106
* @since 1.15
111107
*/
112108
public static GoogleAccountCredential usingOAuth2(Context context, Collection<String> scopes) {
@@ -128,8 +124,8 @@ public static GoogleAccountCredential usingAudience(Context context, String audi
128124
}
129125

130126
/**
131-
* Sets the selected Google account name (e-mail address) -- for example
132-
* {@code "[email protected]"} -- or {@code null} for none.
127+
* Sets the selected Google account name (e-mail address) -- for example {@code
128+
* "[email protected]"} -- or {@code null} for none.
133129
*/
134130
public final GoogleAccountCredential setSelectedAccountName(String accountName) {
135131
selectedAccount = accountManager.getAccountByName(accountName);
@@ -141,9 +137,7 @@ public final GoogleAccountCredential setSelectedAccountName(String accountName)
141137
/**
142138
* Sets the selected Google {@link Account} or {@code null} for none.
143139
*
144-
* <p>
145-
* Caller must ensure the given Google account exists.
146-
* </p>
140+
* <p>Caller must ensure the given Google account exists.
147141
*/
148142
public final GoogleAccountCredential setSelectedAccount(Account selectedAccount) {
149143
this.selectedAccount = selectedAccount;
@@ -184,8 +178,8 @@ public final Account getSelectedAccount() {
184178
}
185179

186180
/**
187-
* Returns the back-off policy which is used when an I/O exception is thrown inside
188-
* {@link #getToken} or {@code null} for none.
181+
* Returns the back-off policy which is used when an I/O exception is thrown inside {@link
182+
* #getToken} or {@code null} for none.
189183
*
190184
* @since 1.15
191185
*/
@@ -224,8 +218,8 @@ public final GoogleAccountCredential setSleeper(Sleeper sleeper) {
224218
}
225219

226220
/**
227-
* Returns the selected Google account name (e-mail address), for example
228-
* {@code "[email protected]"}, or {@code null} for none.
221+
* Returns the selected Google account name (e-mail address), for example {@code
222+
* "[email protected]"}, or {@code null} for none.
229223
*/
230224
public final String getSelectedAccountName() {
231225
return accountName;
@@ -235,12 +229,11 @@ public final String getSelectedAccountName() {
235229
* Returns an intent to show the user to select a Google account, or create a new one if there are
236230
* none on the device yet.
237231
*
238-
* <p>
239-
* Must be run from the main UI thread.
240-
* </p>
232+
* <p>Must be run from the main UI thread.
241233
*/
242234
public final Intent newChooseAccountIntent() {
243-
return AccountPicker.newChooseAccountIntent(selectedAccount,
235+
return AccountPicker.newChooseAccountIntent(
236+
selectedAccount,
244237
null,
245238
new String[] {GoogleAccountManager.ACCOUNT_TYPE},
246239
true,
@@ -253,9 +246,7 @@ public final Intent newChooseAccountIntent() {
253246
/**
254247
* Returns an OAuth 2.0 access token.
255248
*
256-
* <p>
257-
* Must be run from a background thread, not the main UI thread.
258-
* </p>
249+
* <p>Must be run from a background thread, not the main UI thread.
259250
*/
260251
public String getToken() throws IOException, GoogleAuthException {
261252
if (backOff != null) {
@@ -278,12 +269,12 @@ public String getToken() throws IOException, GoogleAuthException {
278269
}
279270
}
280271

281-
282272
@Beta
283273
class RequestHandler implements HttpExecuteInterceptor, HttpUnsuccessfulResponseHandler {
284274

285275
/** Whether we've received a 401 error code indicating the token is invalid. */
286276
boolean received401;
277+
287278
String token;
288279

289280
@Override

google-api-client-android/src/main/java/com/google/api/client/googleapis/extensions/android/gms/auth/GoogleAuthIOException.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,10 @@
1818
import java.io.IOException;
1919

2020
/**
21-
* {@link Beta} <br/>
21+
* {@link Beta} <br>
2222
* Wraps a {@link GoogleAuthException} into an {@link IOException} so it can be caught directly.
2323
*
24-
* <p>
25-
* Use {@link #getCause()} to get the wrapped {@link GoogleAuthException}.
26-
* </p>
24+
* <p>Use {@link #getCause()} to get the wrapped {@link GoogleAuthException}.
2725
*
2826
* @since 1.12
2927
* @author Yaniv Inbar

google-api-client-android/src/main/java/com/google/api/client/googleapis/extensions/android/gms/auth/GooglePlayServicesAvailabilityIOException.java

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,24 @@
1919
import java.io.IOException;
2020

2121
/**
22-
* {@link Beta} <br/>
22+
* {@link Beta} <br>
2323
* Wraps a {@link GooglePlayServicesAvailabilityException} into an {@link IOException} so it can be
2424
* caught directly.
2525
*
26-
* <p>
27-
* Use {@link #getConnectionStatusCode()} to display the error dialog. Alternatively, use
28-
* {@link #getCause()} to get the wrapped {@link GooglePlayServicesAvailabilityException}. Example
29-
* usage:
30-
* </p>
26+
* <p>Use {@link #getConnectionStatusCode()} to display the error dialog. Alternatively, use {@link
27+
* #getCause()} to get the wrapped {@link GooglePlayServicesAvailabilityException}. Example usage:
3128
*
3229
* <pre>
33-
} catch (final GooglePlayServicesAvailabilityIOException availabilityException) {
34-
myActivity.runOnUiThread(new Runnable() {
35-
public void run() {
36-
Dialog dialog = GooglePlayServicesUtil.getErrorDialog(
37-
availabilityException.getConnectionStatusCode(),
38-
myActivity,
39-
MyActivity.REQUEST_GOOGLE_PLAY_SERVICES);
40-
dialog.show();
41-
}
42-
});
30+
* } catch (final GooglePlayServicesAvailabilityIOException availabilityException) {
31+
* myActivity.runOnUiThread(new Runnable() {
32+
* public void run() {
33+
* Dialog dialog = GooglePlayServicesUtil.getErrorDialog(
34+
* availabilityException.getConnectionStatusCode(),
35+
* myActivity,
36+
* MyActivity.REQUEST_GOOGLE_PLAY_SERVICES);
37+
* dialog.show();
38+
* }
39+
* });
4340
* </pre>
4441
*
4542
* @since 1.12
@@ -50,9 +47,7 @@ public class GooglePlayServicesAvailabilityIOException extends UserRecoverableAu
5047

5148
private static final long serialVersionUID = 1L;
5249

53-
/**
54-
* @since 1.21.0
55-
*/
50+
/** @since 1.21.0 */
5651
public GooglePlayServicesAvailabilityIOException(
5752
GooglePlayServicesAvailabilityException wrapped) {
5853
super(wrapped);
@@ -64,8 +59,8 @@ public GooglePlayServicesAvailabilityException getCause() {
6459
}
6560

6661
/**
67-
* Returns the error code to use with
68-
* {@link GooglePlayServicesUtil#getErrorDialog(int, Activity, int)}.
62+
* Returns the error code to use with {@link GooglePlayServicesUtil#getErrorDialog(int, Activity,
63+
* int)}.
6964
*/
7065
public final int getConnectionStatusCode() {
7166
return getCause().getConnectionStatusCode();

google-api-client-android/src/main/java/com/google/api/client/googleapis/extensions/android/gms/auth/UserRecoverableAuthIOException.java

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,18 @@
1919
import java.io.IOException;
2020

2121
/**
22-
* {@link Beta} <br/>
22+
* {@link Beta} <br>
2323
* Wraps a {@link UserRecoverableAuthException} into an {@link IOException} so it can be caught
2424
* directly.
2525
*
26-
* <p>
27-
* Use {@link #getIntent()} to allow user interaction to recover. Alternatively, use
28-
* {@link #getCause()} to get the wrapped {@link UserRecoverableAuthException}. Example usage:
29-
* </p>
26+
* <p>Use {@link #getIntent()} to allow user interaction to recover. Alternatively, use {@link
27+
* #getCause()} to get the wrapped {@link UserRecoverableAuthException}. Example usage:
3028
*
3129
* <pre>
32-
} catch (UserRecoverableAuthIOException userRecoverableException) {
33-
myActivity.startActivityForResult(
34-
userRecoverableException.getIntent(), MyActivity.REQUEST_AUTHORIZATION);
35-
}
30+
* } catch (UserRecoverableAuthIOException userRecoverableException) {
31+
* myActivity.startActivityForResult(
32+
* userRecoverableException.getIntent(), MyActivity.REQUEST_AUTHORIZATION);
33+
* }
3634
* </pre>
3735
*
3836
* @since 1.12
@@ -43,9 +41,7 @@ public class UserRecoverableAuthIOException extends GoogleAuthIOException {
4341

4442
private static final long serialVersionUID = 1L;
4543

46-
/**
47-
* @since 1.21.0
48-
*/
44+
/** @since 1.21.0 */
4945
public UserRecoverableAuthIOException(UserRecoverableAuthException wrapped) {
5046
super(wrapped);
5147
}
@@ -56,8 +52,8 @@ public UserRecoverableAuthException getCause() {
5652
}
5753

5854
/**
59-
* Returns the {@link Intent} that when supplied to
60-
* {@link Activity#startActivityForResult(Intent, int)} will allow user intervention.
55+
* Returns the {@link Intent} that when supplied to {@link Activity#startActivityForResult(Intent,
56+
* int)} will allow user intervention.
6157
*/
6258
public final Intent getIntent() {
6359
return getCause().getIntent();

google-api-client-android/src/main/java/com/google/api/client/googleapis/extensions/android/gms/auth/package-info.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212

1313
/**
14-
* {@link com.google.api.client.util.Beta} <br/>
14+
* {@link com.google.api.client.util.Beta} <br>
1515
* Utilities based on <a href="https://developers.google.com/android/google-play-services/">Google
1616
* Play services</a>.
1717
*
@@ -20,4 +20,3 @@
2020
*/
2121
@com.google.api.client.util.Beta
2222
package com.google.api.client.googleapis.extensions.android.gms.auth;
23-

0 commit comments

Comments
 (0)