Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 4.4.4 #1635

Merged
merged 85 commits into from
Jun 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
ecd5ef9
Start version 4.4.4
AnatolyPristensky Mar 21, 2022
2788553
Merge pull request #1611 from microsoft/start/4.4.4
AnatolyPristensky Mar 21, 2022
1086031
Update dependencies
MatkovIvan Apr 18, 2022
7b56dd9
Update gradle
MatkovIvan Apr 18, 2022
b4f65cb
Fix core tests
MatkovIvan Apr 18, 2022
93f36f1
Fix analytics tests
MatkovIvan Apr 20, 2022
28ee319
Fix crashes tests
MatkovIvan Apr 21, 2022
aaf652d
Fix distribute tests
MatkovIvan Apr 21, 2022
44a692b
Run tests in parallel
MatkovIvan Apr 27, 2022
0bb619d
Fix warnings in distribute-play module
MatkovIvan Apr 27, 2022
1718102
Ignore IllegalAccess warnings in tests
MatkovIvan Apr 27, 2022
4c2a953
Fix warnings in tests
MatkovIvan Apr 28, 2022
76ee83e
Fix more warnings in tests
MatkovIvan Apr 28, 2022
c8f820b
Increase timeout for distribute tests
MatkovIvan Apr 28, 2022
ab6de9b
Fix coverage collection
MatkovIvan May 5, 2022
16482a1
Revert to Gradle 6.x
MatkovIvan May 5, 2022
634ea0c
Fix javadoc task
MatkovIvan May 5, 2022
48fb309
Force update jacoco
MatkovIvan May 5, 2022
f741ef3
Fix getCursor argument matcher
MatkovIvan May 5, 2022
2d8d510
Use Java 11 in CodeQL
MatkovIvan May 5, 2022
70d28ab
Merge pull request #1618 from microsoft/fix/compatibility-with-new-tools
MatkovIvan May 6, 2022
e0bd996
Resume app on notification click
MatkovIvan Apr 11, 2022
2dea537
Move posting notification to utils
MatkovIvan Apr 12, 2022
334753c
Move resume intent creation to utils
MatkovIvan Apr 13, 2022
60779ba
Fix tests
MatkovIvan Apr 18, 2022
bec80d1
Fix NPE on register receiver if service is not started
MatkovIvan May 9, 2022
9685d82
Wrap checking service state to getter
MatkovIvan May 9, 2022
6d212d3
Remove extra flags
MatkovIvan May 9, 2022
0c03db7
Simplify receiver registering
MatkovIvan May 9, 2022
c483c0c
Update tests
MatkovIvan May 9, 2022
a98ecb9
Fix coverage
MatkovIvan May 9, 2022
ff44f5d
Update changelog
MatkovIvan May 10, 2022
16333a0
Update changelog
MatkovIvan May 10, 2022
170e1a7
Merge pull request #1621 from microsoft/fix/notification-click
MatkovIvan May 10, 2022
7dce43f
Merge branch 'develop' into fix/npe-on-resume
MatkovIvan May 12, 2022
11fae5e
Merge pull request #1622 from microsoft/fix/npe-on-resume
MatkovIvan May 12, 2022
9625b14
Cleanup package installing code
MatkovIvan Apr 1, 2022
a9b058a
Call installer from background thread
MatkovIvan Apr 1, 2022
81d91b7
Add FIXME comments and some logs
MatkovIvan Apr 11, 2022
2b98697
Restore abstraction from DownloadManager
MatkovIvan Apr 12, 2022
b3e2612
Resolve TODOs
MatkovIvan Apr 13, 2022
ccd81e8
Fix tests (part 1, build errors only)
MatkovIvan May 12, 2022
4a0bba3
Fix tests (part 2, all tests passed)
MatkovIvan May 12, 2022
88483fa
Fix tests (part 3, coverage)
MatkovIvan May 12, 2022
09463de
Update changelog
MatkovIvan May 16, 2022
a6a9faf
Fix threading issue in onActiveChanged
MatkovIvan May 17, 2022
bba6382
Merge pull request #1625 from microsoft/fix/install-anr
MatkovIvan May 17, 2022
eded9ff
Microsoft mandatory file
microsoft-github-policy-service[bot] May 17, 2022
ff6e9b2
Merge pull request #1626 from microsoft/users/GitHubPolicyService/069…
MatkovIvan May 17, 2022
9079ff9
Fix resource leak and strict mode violation
MatkovIvan Apr 13, 2022
0361e09
Add tests for DownloadManagerCancelPendingTask
May 18, 2022
264dd52
Update changelog
MatkovIvan May 20, 2022
590486f
Merge pull request #1628 from microsoft/fix/download-timeout-impl
MatkovIvan May 23, 2022
9e6c054
Refactor AppCenterPackageInstallerReceiver
MatkovIvan May 12, 2022
9d09bdd
Remove alert window permission
MatkovIvan May 17, 2022
b741d3f
Post notification instead try to restart
MatkovIvan May 17, 2022
7e9819c
Update tests
MatkovIvan May 17, 2022
126fa2f
Fix coverage
MatkovIvan May 24, 2022
b49547c
Update changelog
MatkovIvan May 24, 2022
28466d3
Merge pull request #1629 from microsoft/fix/extra-permission
MatkovIvan May 25, 2022
7e86ced
Update SECURITY.md
wiryallcserviceseducative Jun 1, 2022
7b724aa
Merge pull request #1630 from wiryallcserviceseducative/patch-1
AnatolyPristensky Jun 1, 2022
b08ac0c
Create installer abstraction
MatkovIvan May 18, 2022
daf8c31
Fix threading
MatkovIvan May 19, 2022
ba5e15a
Fix tracking cancel installing
MatkovIvan May 20, 2022
614edcc
Fix tests (part 1, build errors only)
MatkovIvan May 25, 2022
a35f770
Fix tests (part 2, all tests passed)
MatkovIvan May 25, 2022
f56a2cd
Add missing javadocs
MatkovIvan Jun 5, 2022
9d7898f
Adding tests for new classes
MatkovIvan Jun 5, 2022
a180afa
Fix test coverage
MatkovIvan Jun 6, 2022
b0d7bc8
Update changelog and some javadocs
MatkovIvan Jun 6, 2022
6a07c65
Restore install error toast
MatkovIvan Jun 7, 2022
17507e4
Merge pull request #1631 from microsoft/fix/cancel-mandatory-install
MatkovIvan Jun 8, 2022
ecfaf01
Use protected storage context if needed
MatkovIvan Jun 8, 2022
2223df5
Add unit tests
Jun 10, 2022
ee5d817
Update Changelog
Jun 10, 2022
8339057
Add comments and asserts for tests
Jun 10, 2022
4c74308
Change some tests
Jun 14, 2022
844c415
Add more detailed comments and log warning
MatkovIvan Jun 15, 2022
417840d
Update CHANGELOG.md
MatkovIvan Jun 15, 2022
108ee7f
Add new tests for boolean flag
Jun 15, 2022
72d8cdb
Improve tests
MatkovIvan Jun 20, 2022
cc384bf
Merge pull request #1632 from microsoft/fix/protected-context
DmitriyKirakosyan Jun 21, 2022
7d05fc4
Update Changelog
DmitriyKirakosyan Jun 21, 2022
6860074
Merge pull request #1634 from microsoft/release/4.4.4
DmitriyKirakosyan Jun 21, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Use Java 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# App Center SDK for Android Change Log

## Version 4.4.4

### App Center

* **[Fix]** Fix crash when storage is encrypted during direct boot. Please note that settings and pending logs database are not shared between regular and device-protected storage.

### App Center Distribute

* **[Improvement]** Remove optional `SYSTEM_ALERT_WINDOW` permission that was required to automatically restart the app after installing the update.
* **[Improvement]** Add fallback to the old [ACTION_INSTALL_PACKAGE](https://developer.android.com/reference/android/content/Intent#ACTION_INSTALL_PACKAGE) installation method if the update cannot be installed by `PackageInstaller` API (e.g. when MIUI optimizations block installation).
* **[Fix]** Fix possible crash on resume event before initialization.
* **[Fix]** Fix clicks on the download completion notification.
* **[Fix]** Fix ANR on installing large packages.
* **[Fix]** Fix cancellation handling of confirmation dialog for mandatory updates.
* **[Fix]** Fix strict mode issues.

___

## Version 4.4.3

### App Center Crashes
Expand Down
42 changes: 42 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.6 BLOCK -->

## Security

Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/)(
(microsoft edge:https:// fadliwiryawirawan@microsoft.com/en-us/en-ID

If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below.

## Reporting Security Issues

**Please do not report security vulnerabilities through public GitHub issues.**

Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report).

If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/msrc/pgp-key-msrc).

You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).

Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:

* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue

This information will help us triage your report more quickly.

If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs.

## Preferred Languages

We prefer all communications to be in English.

## Policy

Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/msrc/cvd).

<!-- END MICROSOFT SECURITY.MD BLOCK -->
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
import static androidx.test.espresso.matcher.ViewMatchers.isRoot;
import static androidx.test.espresso.matcher.ViewMatchers.withChild;
import static androidx.test.espresso.matcher.ViewMatchers.withText;
import static android.util.Log.getStackTraceString;
import static com.microsoft.appcenter.sasquatch.activities.utils.EspressoUtils.CHECK_DELAY;
import static com.microsoft.appcenter.sasquatch.activities.utils.EspressoUtils.TOAST_DELAY;
import static com.microsoft.appcenter.sasquatch.activities.utils.EspressoUtils.onToast;
Expand Down
30 changes: 20 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,21 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.2'
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'gradle.plugin.org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.12.0'

/* Resolves issue of incorrect version use in one of jacoco/android plugin inner tasks (can be removed on AGP 7.2+). */
classpath 'org.jacoco:org.jacoco.core:0.8.3'
classpath 'org.jacoco:org.jacoco.report:0.8.3'
classpath 'org.jacoco:org.jacoco.agent:0.8.3'
}
}

allprojects {
repositories {
google()
mavenCentral()
jcenter {
content {

// https://youtrack.jetbrains.com/issue/IDEA-261387
includeModule("org.jetbrains.trove4j", "trove4j")
}
}
}

tasks.withType(JavaCompile) {
Expand All @@ -43,6 +41,18 @@ allprojects {
}

subprojects {

/* Force Jacoco Agent version upgrade (can be removed on AGP 7.2+). */
configurations.all {
resolutionStrategy {
eachDependency { details ->
if ('org.jacoco' == details.requested.group) {
details.useVersion '0.8.3'
}
}
}
}

afterEvaluate { project ->
if (project.hasProperty('android')) {
def config = android.defaultConfig
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#

distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.2-bin.zip
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
zipStoreBase=GRADLE_USER_HOME
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ private void queuePage(String name, Map<String, String> properties) {
* Implements {@link #enableManualSessionTracker()}.
*/
private synchronized void enableManualSessionTrackerAsync() {
if (mChannel != null) {
if (isStarted()) {
AppCenterLog.debug(AppCenterLog.LOG_TAG, "The manual session tracker state should be set before the App Center start.");
return;
}
Expand Down Expand Up @@ -967,7 +967,7 @@ private void setDefaultTransmissionTarget(String transmissionTargetToken) {
* @return <code>true</code> if the interval is set, <code>false</code> otherwise.
*/
private boolean setInstanceTransmissionInterval(int seconds) {
if (mChannel != null) {
if (isStarted()) {
AppCenterLog.error(LOG_TAG, "Transmission interval should be set before the service is started.");
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
import org.powermock.modules.junit4.PowerMockRunner;

import static org.junit.Assert.assertFalse;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyBoolean;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.eq;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.when;
import static org.powermock.api.mockito.PowerMockito.doAnswer;
import static org.powermock.api.mockito.PowerMockito.mockStatic;
Expand Down Expand Up @@ -65,7 +65,7 @@ public Void answer(InvocationOnMock invocation) {
return null;
}
};
doAnswer(runNow).when(mAppCenterHandler).post(any(Runnable.class), any(Runnable.class));
doAnswer(runNow).when(mAppCenterHandler).post(any(Runnable.class), any());
mockStatic(HandlerUtils.class);
doAnswer(runNow).when(HandlerUtils.class);
HandlerUtils.runOnUiThread(any(Runnable.class));
Expand Down
Loading