@onekeyfe/react-native-cloud-fs 3.0.16 → 3.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -18,7 +18,7 @@ import com.google.android.gms.auth.api.signin.GoogleSignInClient
|
|
|
18
18
|
import com.google.android.gms.auth.api.signin.GoogleSignInOptions
|
|
19
19
|
import com.google.android.gms.common.api.ApiException
|
|
20
20
|
import com.google.android.gms.common.api.Scope
|
|
21
|
-
import com.google.api.client.
|
|
21
|
+
import com.google.api.client.http.javanet.NetHttpTransport
|
|
22
22
|
import com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential
|
|
23
23
|
import com.google.api.client.googleapis.extensions.android.gms.auth.UserRecoverableAuthIOException
|
|
24
24
|
import com.google.api.client.json.gson.GsonFactory
|
|
@@ -28,7 +28,7 @@ import java.util.Collections
|
|
|
28
28
|
|
|
29
29
|
@ReactModule(name = RNCloudFsModule.NAME)
|
|
30
30
|
class RNCloudFsModule(private val reactContext: ReactApplicationContext) :
|
|
31
|
-
|
|
31
|
+
NativeCloudFsSpec(reactContext), LifecycleEventListener, ActivityEventListener {
|
|
32
32
|
|
|
33
33
|
private var mDriveServiceHelper: DriveServiceHelper? = null
|
|
34
34
|
private var signInPromise: Promise? = null
|
|
@@ -86,7 +86,7 @@ class RNCloudFsModule(private val reactContext: ReactApplicationContext) :
|
|
|
86
86
|
)
|
|
87
87
|
credential.selectedAccount = account.account
|
|
88
88
|
val googleDriveService = Drive.Builder(
|
|
89
|
-
|
|
89
|
+
NetHttpTransport(),
|
|
90
90
|
GsonFactory(),
|
|
91
91
|
credential
|
|
92
92
|
).build()
|
|
@@ -333,7 +333,7 @@ class RNCloudFsModule(private val reactContext: ReactApplicationContext) :
|
|
|
333
333
|
mPendingOptions = null
|
|
334
334
|
}
|
|
335
335
|
|
|
336
|
-
override fun onActivityResult(activity: Activity
|
|
336
|
+
override fun onActivityResult(activity: Activity, requestCode: Int, resultCode: Int, data: Intent?) {
|
|
337
337
|
when (requestCode) {
|
|
338
338
|
REQUEST_CODE_SIGN_IN -> {
|
|
339
339
|
val task = GoogleSignIn.getSignedInAccountFromIntent(data)
|
|
@@ -387,7 +387,7 @@ class RNCloudFsModule(private val reactContext: ReactApplicationContext) :
|
|
|
387
387
|
)
|
|
388
388
|
credential.selectedAccount = googleAccount.account
|
|
389
389
|
val googleDriveService = Drive.Builder(
|
|
390
|
-
|
|
390
|
+
NetHttpTransport(),
|
|
391
391
|
GsonFactory(),
|
|
392
392
|
credential
|
|
393
393
|
).build()
|
|
@@ -410,7 +410,7 @@ class RNCloudFsModule(private val reactContext: ReactApplicationContext) :
|
|
|
410
410
|
override fun onHostResume() {}
|
|
411
411
|
override fun onHostPause() {}
|
|
412
412
|
override fun onHostDestroy() {}
|
|
413
|
-
override fun onNewIntent(intent: Intent
|
|
413
|
+
override fun onNewIntent(intent: Intent) {}
|
|
414
414
|
|
|
415
415
|
// endregion
|
|
416
416
|
|