File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
mobile/src/main/java/io/syslogic/github Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 3
3
import android .accounts .Account ;
4
4
import android .accounts .AccountAuthenticatorResponse ;
5
5
import android .accounts .AccountManager ;
6
+ import android .content .pm .PackageManager ;
6
7
import android .os .Bundle ;
7
8
import android .text .Editable ;
8
9
import android .widget .Toast ;
@@ -40,10 +41,16 @@ public class AuthenticatorActivity extends BaseActivity {
40
41
* @param icicle the saved instance data of this Activity, may be null.
41
42
*/
42
43
@ Override
44
+ @ SuppressWarnings ({"deprecation" , "RedundantSuppression" })
43
45
protected void onCreate (@ Nullable Bundle icicle ) {
44
-
45
46
super .onCreate (icicle );
46
- this .mResponse = getIntent ().getParcelableExtra (AccountManager .KEY_ACCOUNT_AUTHENTICATOR_RESPONSE );
47
+
48
+ if (android .os .Build .VERSION .SDK_INT >= android .os .Build .VERSION_CODES .TIRAMISU ) {
49
+ this .mResponse = getIntent ().getParcelableExtra (AccountManager .KEY_ACCOUNT_AUTHENTICATOR_RESPONSE , AccountAuthenticatorResponse .class );
50
+ } else {
51
+ this .mResponse = getIntent ().getParcelableExtra (AccountManager .KEY_ACCOUNT_AUTHENTICATOR_RESPONSE );
52
+ }
53
+
47
54
if (this .mResponse != null ) {
48
55
this .mResponse .onRequestContinued ();
49
56
}
Original file line number Diff line number Diff line change 2
2
3
3
import android .accounts .Account ;
4
4
import android .accounts .AccountManager ;
5
+ import android .annotation .SuppressLint ;
5
6
import android .content .Context ;
6
7
import android .content .pm .ApplicationInfo ;
7
8
import android .content .pm .PackageManager ;
@@ -45,6 +46,7 @@ public static String getAccessToken(@NonNull Context context) {
45
46
}
46
47
}
47
48
49
+ @ SuppressWarnings ({"deprecation" , "RedundantSuppression" })
48
50
private static String loadPackageMeta (@ NonNull Context context , AccountManager accountManager ) {
49
51
String accessToken = null ;
50
52
try {
You can’t perform that action at this time.
0 commit comments