Skip to content

Commit

Permalink
[docs] Merge pull request #58 from solrudev/develop
Browse files Browse the repository at this point in the history
Fix Java sample
  • Loading branch information
solrudev authored Apr 25, 2024
2 parents dd6ebb1 + c1aa1c5 commit 254c543
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 31 deletions.
1 change: 0 additions & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Version 0.5.3 (2024-04-25)

- Use `FileChannel` to read zipped APKs on Android Oreo+ if possible. This drastically improves performance when direct access through `java.io` APIs is not available and allows to process problematic ZIP files (such as XAPK files).
- Don't crash if exception occurs while iterating APK sequence in sample apps, and display the exception message instead.
- Share one thread pool across ViewModels in Java sample.

Version 0.5.2 (2024-03-30)
--------------------------
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2023-2024 Ilya Fomichev
* Copyright (C) 2023 Ilya Fomichev
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -38,6 +38,7 @@
import java.util.List;
import java.util.UUID;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import kotlin.sequences.Sequence;
import ru.solrudev.ackpine.DisposableSubscriptionContainer;
Expand All @@ -51,7 +52,6 @@
import ru.solrudev.ackpine.installer.PackageInstaller;
import ru.solrudev.ackpine.installer.parameters.InstallParameters;
import ru.solrudev.ackpine.sample.R;
import ru.solrudev.ackpine.sample.ThreadPool;
import ru.solrudev.ackpine.session.Failure;
import ru.solrudev.ackpine.session.ProgressSession;
import ru.solrudev.ackpine.session.Session;
Expand Down Expand Up @@ -225,7 +225,7 @@ public void onFailure(@NonNull UUID sessionId, @NonNull InstallFailure failure)
final var packageInstaller = PackageInstaller.getInstance(application);
final var savedStateHandle = createSavedStateHandle(creationExtras);
final var sessionsRepository = new SessionDataRepositoryImpl(savedStateHandle);
final var executor = ThreadPool.INSTANCE;
final var executor = Executors.newFixedThreadPool(8);
return new InstallViewModel(packageInstaller, sessionsRepository, executor);
}
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2023-2024 Ilya Fomichev
* Copyright (C) 2023 Ilya Fomichev
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -39,9 +39,9 @@
import java.util.Objects;
import java.util.UUID;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import ru.solrudev.ackpine.DisposableSubscriptionContainer;
import ru.solrudev.ackpine.sample.ThreadPool;
import ru.solrudev.ackpine.session.Failure;
import ru.solrudev.ackpine.session.Session;
import ru.solrudev.ackpine.session.parameters.Confirmation;
Expand Down Expand Up @@ -186,7 +186,7 @@ public void onFailure(@NonNull UUID sessionId, @NonNull UninstallFailure failure
assert application != null;
final var packageUninstaller = PackageUninstaller.getInstance(application);
final var savedStateHandle = createSavedStateHandle(creationExtras);
final var executor = ThreadPool.INSTANCE;
final var executor = Executors.newFixedThreadPool(8);
return new UninstallViewModel(packageUninstaller, savedStateHandle, executor);
}
);
Expand Down

0 comments on commit 254c543

Please sign in to comment.