patch
This commit is contained in:
parent
1102b82094
commit
fe26068c0f
2
.gitignore
vendored
2
.gitignore
vendored
@ -52,3 +52,5 @@ local.properties
|
|||||||
**/fastlane/izzyscript/iod-scan-apk.php
|
**/fastlane/izzyscript/iod-scan-apk.php
|
||||||
**/fastlane/izzyscript/current_iod-scan-apk.php
|
**/fastlane/izzyscript/current_iod-scan-apk.php
|
||||||
**/fastlane/izzyscript/current_result_*.json
|
**/fastlane/izzyscript/current_result_*.json
|
||||||
|
|
||||||
|
flake.lock
|
10
buildapk.sh
Normal file
10
buildapk.sh
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
KEY_STORE=$HOME/.config/upload-keystore.jks
|
||||||
|
KEY_ALIAS=upload
|
||||||
|
|
||||||
|
rm -rf presentation/build
|
||||||
|
./gradlew clean assembleApkstoreRelease
|
||||||
|
cd presentation/build/outputs/apk/apkstore/release/
|
||||||
|
zipalign -p -f -v 4 presentation-apkstore-release-unsigned.apk cryptomator.apk
|
||||||
|
apksigner sign --ks $KEY_STORE --ks-key-alias $KEY_ALIAS -v cryptomator.apk
|
||||||
|
cp presentation/build/outputs/apk/apkstore/release/cryptomator.apk ../../../../../../
|
39
flake.nix
Normal file
39
flake.nix
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
description = "Cryptomator";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
android-nixpkgs = {
|
||||||
|
url = "github:tadfisher/android-nixpkgs/stable";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, android-nixpkgs, nixpkgs, flake-utils }:
|
||||||
|
flake-utils.lib.eachDefaultSystem
|
||||||
|
(system:
|
||||||
|
let pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
config = { android_sdk.accept_license = true; allowUnfree = true; };
|
||||||
|
}; in rec {
|
||||||
|
packages.android-sdk = android-nixpkgs.sdk.${system} (sdkPkgs: with sdkPkgs; [
|
||||||
|
cmdline-tools-latest
|
||||||
|
build-tools-30-0-3
|
||||||
|
build-tools-32-0-0
|
||||||
|
platform-tools
|
||||||
|
platforms-android-30
|
||||||
|
platforms-android-31
|
||||||
|
emulator
|
||||||
|
patcher-v4
|
||||||
|
]);
|
||||||
|
devShells.default = pkgs.mkShell {
|
||||||
|
packages = [ packages.android-sdk pkgs.jdk11 pkgs.gradle ];
|
||||||
|
GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${packages.android-sdk}/share/android-sdk/build-tools/32.0.0/aapt2";
|
||||||
|
shellHook = ''
|
||||||
|
export PATH=${packages.android-sdk}/share/android-sdk/build-tools/32.0.0:$PATH
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
@ -133,23 +133,7 @@ class VaultListPresenter @Inject constructor( //
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onError(e: Throwable) {
|
override fun onError(e: Throwable) {}
|
||||||
val license = if (e is LicenseNotValidException) {
|
|
||||||
e.license
|
|
||||||
} else {
|
|
||||||
""
|
|
||||||
}
|
|
||||||
val intent = Intent(context(), LicenseCheckActivity::class.java)
|
|
||||||
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
|
|
||||||
intent.data = Uri.parse(String.format("app://cryptomator/%s", license))
|
|
||||||
|
|
||||||
try {
|
|
||||||
context().startActivity(intent)
|
|
||||||
} catch (e: ActivityNotFoundException) {
|
|
||||||
Toast.makeText(context(), "Please contact the support.", Toast.LENGTH_LONG).show()
|
|
||||||
finish()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user