From 3be553c78e85b6154424478c440dab22f2678b04 Mon Sep 17 00:00:00 2001 From: TheScarastic Date: Mon, 5 Sep 2022 18:51:26 +0530 Subject: [PATCH 1/2] eDrive: Fix userId being null * earlier userId could have been null due to various reasons so now directly fetch the saved id. --- .../java/foundation/e/drive/work/AccountUserInfoWorker.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/foundation/e/drive/work/AccountUserInfoWorker.java b/app/src/main/java/foundation/e/drive/work/AccountUserInfoWorker.java index d027aaac..957d5eeb 100644 --- a/app/src/main/java/foundation/e/drive/work/AccountUserInfoWorker.java +++ b/app/src/main/java/foundation/e/drive/work/AccountUserInfoWorker.java @@ -61,7 +61,6 @@ public class AccountUserInfoWorker extends Worker { private final Context mContext; private Account account; - private String userId; public AccountUserInfoWorker(@NonNull Context context, @NonNull WorkerParameters workerParams) { super(context, workerParams); @@ -98,10 +97,10 @@ public class AccountUserInfoWorker extends Worker { final UserInfo userInfo = ocsResult.getResultData(); if (accountManager.getUserData(account, ACCOUNT_USER_ID_KEY) == null) { - userId = userInfo.getId(); + final String userId = userInfo.getId(); client.setUserId(userId); AccountManager.get(mContext).setUserData(account, ACCOUNT_USER_ID_KEY, userId); - Log.v(TAG, "UserId "+userId+" saved for account"); + Log.v(TAG, "UserId "+ userId +" saved for account"); } final Quota userQuota = userInfo.getQuota(); final double relativeQuota = userQuota.getRelative(); @@ -185,6 +184,7 @@ public class AccountUserInfoWorker extends Worker { private boolean fetchAliases() { final OwnCloudClient ocClient = DavClientProvider.getInstance().getClientInstance(account, mContext); + final String userId = accountManager.getUserData(account, ACCOUNT_USER_ID_KEY); final GetAliasOperation getAliasOperation = new GetAliasOperation(userId); final RemoteOperationResult> ocsResult = getAliasOperation.execute(ocClient); String aliases = ""; -- GitLab From 8f2fcf6c7bb664221b523bc5524199520a118e28 Mon Sep 17 00:00:00 2001 From: TheScarastic Date: Fri, 22 Apr 2022 18:47:24 +0530 Subject: [PATCH 2/2] eDrive: Sign debug app with test keys --- app/build.gradle | 14 ++++++++++++++ keystore/platform.keystore | Bin 0 -> 2899 bytes 2 files changed, 14 insertions(+) create mode 100644 keystore/platform.keystore diff --git a/app/build.gradle b/app/build.gradle index bbcd73a2..1199d219 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -33,11 +33,25 @@ android { setProperty("archivesBaseName", "eDrive-$versionName") testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } + + signingConfigs { + debugConfig { + storeFile file("../keystore/platform.keystore") + storePassword 'android' + keyAlias 'platform' + keyPassword 'android' + } + } + buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } + + debug { + signingConfig signingConfigs.debugConfig + } } diff --git a/keystore/platform.keystore b/keystore/platform.keystore new file mode 100644 index 0000000000000000000000000000000000000000..574b2203d6dc78b3853cf899c3c7a1f60c773507 GIT binary patch literal 2899 zcmXqL;`V1^WHxBx=3wL0YV&CO&dbQoxS)yaCrcC8SA!<5j|NSwxhPVsaV$-&Q3g${ zVFpdCL2TSmT|8WjObeP=ej7Bgd^gZ!h6VK*c|q}j!lj&ZTWBSb*`fFj)Hnc zaPN-E?J@h)kETTV91GG&e0*ZP{L=j2{f3#n?2S*8ta847?_4*@Oz^hI%de^XZC8aG zPS|34x%T_y``I@2Th?#rKhIP4s(k-#qg5#jLt`q8ikoM3t~z@AeqnpmTG@}!QrCUf za+EB3lC-zFu<7uMxab^#mE1=+f6mW-U2{E;pV4%>QTcYkOD|J9W<)HEo+@YPmpb9y zlK6O!YK4dXIlK0^#jtv*Y>t!=+Wbv=b;37>;;+wsP5C#yu`Xr$u8xgDmv81jeO_{Y zwe^Y*t~2*uaasB%Qk-p*Vt}N_#cN+SbNT#>^7*}YV*jLtg(dRW^fPob9lUWB!YjWCVBpGS+qj26ISH`_* zrK{^ouW>NUm|$0HGHJ58uTCKdqUleiS8kH zf~Un!slCK&5Ik8$%zwV!&38K%3U7U`(Rsggt#j|`?HNJ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