|
|
|
|
@ -5,7 +5,6 @@ import android.content.DialogInterface; |
|
|
|
|
import android.content.Intent; |
|
|
|
|
import android.graphics.Color; |
|
|
|
|
import android.graphics.drawable.ColorDrawable; |
|
|
|
|
import android.os.Build; |
|
|
|
|
import android.os.SystemClock; |
|
|
|
|
import android.text.TextUtils; |
|
|
|
|
import android.view.Gravity; |
|
|
|
|
@ -235,7 +234,7 @@ public class API { |
|
|
|
|
JSONObject body = new JSONObject(); |
|
|
|
|
body.put("code", code); |
|
|
|
|
body.put("grant_type", "authorization_code"); |
|
|
|
|
return alist("https://api-cf.nn.ci/alist/ali_open/code", body); |
|
|
|
|
return alist("https://api.xhofe.top/alist/ali_open/code", body); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
oauth.clean().save(); |
|
|
|
|
@ -250,7 +249,7 @@ public class API { |
|
|
|
|
JSONObject body = new JSONObject(); |
|
|
|
|
body.put("grant_type", "refresh_token"); |
|
|
|
|
body.put("refresh_token", oauth.getRefreshToken()); |
|
|
|
|
return alist("https://api-cf.nn.ci/alist/ali_open/token", body); |
|
|
|
|
return alist("https://api.xhofe.top/alist/ali_open/token", body); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
oauth.clean().save(); |
|
|
|
|
@ -532,9 +531,9 @@ public class API { |
|
|
|
|
FrameLayout frame = new FrameLayout(Init.context()); |
|
|
|
|
params.gravity = Gravity.CENTER; |
|
|
|
|
frame.addView(image, params); |
|
|
|
|
AlertDialog.Builder builder = new AlertDialog.Builder(Init.getActivity()).setView(frame); |
|
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) builder.setOnDismissListener(this::dismiss); |
|
|
|
|
dialog = builder.show(); |
|
|
|
|
dialog = new AlertDialog.Builder(Init.getActivity()).setView(frame).create(); |
|
|
|
|
dialog.setOnDismissListener(this::dismiss); |
|
|
|
|
dialog.show(); |
|
|
|
|
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); |
|
|
|
|
Init.show("請使用阿里雲盤 App 掃描二維碼"); |
|
|
|
|
} catch (Exception ignored) { |
|
|
|
|
|