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 zcmY+EX*d*$8pmhG7z|^Vbue-)Gp2@Y(MX|?b*5yjA^SR(>}1LkjeRFZ#mL$;k~M^g zO6XX!9SJG23?oaq?tSh(=eZx==Y5{v|Np)pe;5*{IS9ytA#t)pIFJd33A->L8<0YR z?tw|r9SjM&i6OE2{$IrE04A~89Am5F!9h6xd&LC>f+!^L0fq$L#VA6c|HH@6#leET zh)uE#j+#uRX_$XL@a-t2CB6i)0J<%}ByhjU`3a{ShJ!$NUlN>dXc?j|RB{R;kHY9? zsqlSVE7W3`GS=*yB7BfUsUwu7E$V%x{Dp`%wG4N*^~@%T%QTAoW#TqOx9z*Vi+#x5 zqw~h^!@{Sf<-_pgrmRG}4)@-hHYTre3Qi0C^-|^j2WiTlWVX0PXDy$d-FtPJ>U>jz zD?6?o*sANw=?!Y5(Ysl5-sfT)>Yt_!aozeB+A*b4b+hc6U6@MHox*!ny;F00s-_`-HQX&hYpC9yRXA160dX34Osgvf`SQZ(U}aBdKiW zn*QUlqoZM@^t`!GOGknotFbJdAi_^)idWxY0)lpy_OpNI#l_srYe}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