@@ -46,8 +46,8 @@ protected void onCreate(Bundle savedInstanceState) {
46
46
47
47
//初始化SDK
48
48
com .tds .TdsConfig .Builder configBuilder = new com .tds .TdsConfig .Builder ()
49
- .appContext (getApplicationContext ())
50
- .clientId ("FwFdCIr6u71WQDQwQN" );
49
+ .appContext (getApplicationContext ())
50
+ .clientId ("FwFdCIr6u71WQDQwQN" );
51
51
52
52
TdsInitializer .init (configBuilder .build ());
53
53
@@ -115,27 +115,26 @@ public void onLoginError(com.taptap.sdk.AccountGlobalError accountGlobalError) {
115
115
// 登录过程中出现异常
116
116
if (null != accountGlobalError ) {
117
117
// 执行 TapTap Token 失效后的相关处理操作
118
- if (AccountGlobalError .LOGIN_ERROR_ACCESS_DENIED .equals (accountGlobalError .getError ())
119
- || AccountGlobalError .LOGIN_ERROR_FORBIDDEN .equals (accountGlobalError .getError ())) {
118
+ if (AccountGlobalError .LOGIN_ERROR_ACCESS_DENIED .equals (accountGlobalError .getError ())) {
120
119
if (null != alertDialog && alertDialog .isShowing ()) {
121
120
return ;
122
121
}
123
122
alertDialog = new AlertDialog .Builder (MainActivity .this )
124
- .setTitle ("错误" )
125
- .setMessage ("当前用户已失效, 请重新登录!" )
126
- .setNegativeButton (
127
- "取消" , new OnClickListener () {
123
+ .setTitle ("错误" )
124
+ .setMessage ("当前用户已失效, 请重新登录!" )
125
+ .setNegativeButton (
126
+ "取消" , new OnClickListener () {
127
+ @ Override
128
+ public void onClick (DialogInterface dialog , int which ) {
129
+
130
+ }
131
+ })
132
+ .setPositiveButton ("重新登录" , new OnClickListener () {
128
133
@ Override
129
134
public void onClick (DialogInterface dialog , int which ) {
130
-
135
+ TapLoginHelper . startTapLogin ( MainActivity . this , TapLoginHelper . SCOPE_PUBLIC_PROFILE );
131
136
}
132
- })
133
- .setPositiveButton ("重新登录" , new OnClickListener () {
134
- @ Override
135
- public void onClick (DialogInterface dialog , int which ) {
136
- TapLoginHelper .startTapLogin (MainActivity .this , TapLoginHelper .SCOPE_PUBLIC_PROFILE );
137
- }
138
- }).create ();
137
+ }).create ();
139
138
alertDialog .show ();
140
139
}
141
140
}
0 commit comments