Skip to content

Commit

Permalink
Added PAD (#169)
Browse files Browse the repository at this point in the history
refactored to get compile

Signed-off-by: kcw-grunt <[email protected]>
  • Loading branch information
kcw-grunt authored Mar 27, 2024
1 parent b07955b commit 64e45a9
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 9 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ android {
dataBinding true
buildConfig true
}

assetPacks = [":install_time_asset_pack",":fast_follow_asset_pack_01"]
signingConfigs {
release {
storeFile file(RELEASE_STORE_FILE)
Expand Down Expand Up @@ -65,7 +65,7 @@ android {
applicationId = 'com.loafwallet'
minSdkVersion 31
targetSdkVersion 33
versionCode 738
versionCode 20240326
versionName "v2.9.1"
multiDexEnabled true
archivesBaseName = "${versionName}(${versionCode})"
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/java/com/breadwallet/BreadApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@
import java.util.concurrent.atomic.AtomicInteger;
import com.pusher.pushnotifications.PushNotifications;


import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import timber.log.Timber;

public class BreadApp extends Application {
Expand Down
11 changes: 9 additions & 2 deletions app/src/main/java/com/breadwallet/tools/util/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,10 @@ public static String join(String[] array, CharSequence separator) {
return stringBuilder.toString();
}
public static String fetchPartnerKey(Context app, PartnerNames name) {
JSONObject keyObject;

Timber.d("timber: fetch name: %s", name);

JSONObject keyObject;
AssetManager assetManager = app.getAssets();
try (InputStream inputStream = assetManager.open("partner-keys.json")) {
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
Expand All @@ -234,11 +237,15 @@ public static String fetchPartnerKey(Context app, PartnerNames name) {
sb.append(line);
}
keyObject = new JSONObject(sb.toString()).getJSONObject("keys");
Timber.d("timber: fetch obj: %s", keyObject.toString());
return keyObject.get(name.getKey()).toString();
} catch (IOException e) {
e.printStackTrace();
Timber.d("timber: IOEXception");

} catch (JSONException e) {
throw new RuntimeException(e);
e.printStackTrace();
Timber.d("timber: JSONException");
}
} catch (IOException e) {
e.printStackTrace();
Expand Down
8 changes: 8 additions & 0 deletions fast_follow_asset_pack_01/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apply plugin: 'com.android.asset-pack'

assetPack {
packName = "fast_follow_asset_pack_01"
dynamicDelivery {
deliveryType = "fast-follow"
}
}
8 changes: 8 additions & 0 deletions install_time_asset_pack/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apply plugin: 'com.android.asset-pack'

assetPack {
packName = "install_time_asset_pack"
dynamicDelivery {
deliveryType = "install-time"
}
}
3 changes: 2 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include ':app'

include ':install_time_asset_pack'
include ':fast_follow_asset_pack_01'

0 comments on commit 64e45a9

Please sign in to comment.