diff --git a/app/build.gradle b/app/build.gradle index bbcd73a2dbd9bc491415c03228ca914ccfa080ef..1199d2196bd3a135176605aef8e2f8066162a404 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/app/src/main/java/foundation/e/drive/work/AccountUserInfoWorker.java b/app/src/main/java/foundation/e/drive/work/AccountUserInfoWorker.java index d027aaac2c2ee5a116a603890e3bfa13e839fbdb..957d5eebe71c44406ef2e93dac95ff16b2597819 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 = ""; diff --git a/keystore/platform.keystore b/keystore/platform.keystore new file mode 100644 index 0000000000000000000000000000000000000000..574b2203d6dc78b3853cf899c3c7a1f60c773507 Binary files /dev/null and b/keystore/platform.keystore differ