Skip to content

Commit

Permalink
Merge pull request #1308 from microsoft/develop
Browse files Browse the repository at this point in the history
Version 2.5.0
  • Loading branch information
zhangcc01 authored Nov 5, 2019
2 parents cbbd568 + e7babe1 commit 1e2fc83
Show file tree
Hide file tree
Showing 33 changed files with 1,451 additions and 930 deletions.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for the Android SDK for App Center
title: ''
labels: feature request
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
18 changes: 11 additions & 7 deletions ISSUE_TEMPLATE.md → .github/ISSUE_TEMPLATE/problem_report.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
---
name: Problem report
about: Report a problem using the SDK
title: ''
labels: support
assignees: ''

---

<!--
Thanks for your interest in using the App Center SDK for Android.
If your issue is not related to using our Android SDK but rather about the product experience like the portal or CI,
please create a ticket using the blue chat button on any page of the https://appcenter.ms portal instead.
If you are using Xamarin, please report the issue on https://github.com/microsoft/appcenter-sdk-dotnet instead.
If your issue is not related to using our Android SDK but rather about the product experience like the portal or CI, please create an issue on https://github.com/Microsoft/appcenter instead.
-->

### **Description**

Please describe the issue you are facing or a feature you would like to be added to the SDK.

<!-- If making a feature request, remove the below information -->
Please describe the issue you are facing using the SDK.

### **Repro Steps**

Expand All @@ -29,4 +34,3 @@ Please list the steps used to reproduce your issue.
4. What third party libraries are you using?
- example
5. Please enable verbose logging for your app using `AppCenter.setLogLevel(Log.VERBOSE)` before your call to `AppCenter.start(...)` and include the logs here:

File renamed without changes.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# App Center SDK for Android Change Log

## Version 2.4.2
## Version 2.5.0

### App Center Crashes

* **[Feature]** Add the `Crash.trackError` method to send handled errors (with optional properties and attachments).

### App Center Distribute

* **[Fix]** Fix an in-app update caching issue, where the same version was installed constantly after the 1st successful update.
* **[Fix]** Fix an in-app update caching issue, where the same version was installed constantly after the 1st successful update (or also if the download was canceled).

___

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,11 @@

package com.microsoft.appcenter.crashes;

import java.util.Map;

public final class CrashesPrivateHelper {

private CrashesPrivateHelper() {
}

public static void trackException(Throwable throwable, Map<String, String> properties) {
Crashes.trackException(throwable, properties);
}

public static void saveUncaughtException(Thread thread, Throwable exception) {
Crashes.getInstance().saveUncaughtException(thread, exception);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

package com.microsoft.appcenter.sasquatch;

import android.app.Activity;

import com.microsoft.appcenter.crashes.Crashes;
import com.microsoft.appcenter.crashes.model.TestCrashException;

import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.Random;

public class CrashTestHelper {

private final List<Crash> mCrashes = Arrays.asList(
new Crash(R.string.title_test_crash, R.string.description_test_crash, new Runnable() {

@Override
public void run() {
Crashes.generateTestCrash();
throw new TestCrashException();
}
}),
new Crash(R.string.title_crash_divide_by_0, R.string.description_crash_divide_by_0, new Runnable() {

@Override
@SuppressWarnings("ResultOfMethodCallIgnored")
public void run() {
("" + (42 / Integer.valueOf("0"))).toCharArray();
}
}),
new Crash(R.string.title_stack_overflow_crash, R.string.description_stack_overflow_crash, new Runnable() {

@Override
@SuppressWarnings("InfiniteRecursion")
public void run() {
run();
}
}),
new Crash(R.string.title_nested_exception_crash, R.string.description_nested_exception_crash, new Runnable() {

@Override
public void run() {
throw new RuntimeException("HTTP call failed", new IOException("Broken pipe"));
}
}),
new Crash(R.string.title_deeply_nested_exception_crash, R.string.description_deeply_nested_exception_crash, new Runnable() {

@Override
public void run() {
Exception e = new Exception();
for (int i = 0; i < 1000; i++) {
e = new Exception(String.valueOf(i), e);
}
throw new RuntimeException(e);
}
}),
new Crash(R.string.title_memory_crash, R.string.description_memory_crash, new Runnable() {

@Override
public void run() {
new int[Integer.MAX_VALUE].clone();
}
}),
new Crash(R.string.title_variable_message, R.string.description_variable_message, new Runnable() {

@Override
public void run() {
mActivity.getResources().openRawResource(~new Random().nextInt(10));
}
})
);

private Activity mActivity;

public CrashTestHelper(Activity activity) {
mActivity = activity;
}

public List<Crash> getCrashes() {
return mCrashes;
}

public static class Crash {

public final int title;

public final int description;

public final Runnable crashTask;

public Crash(int title, int description, Runnable crashTask) {
this.title = title;
this.description = description;
this.crashTask = crashTask;
}
}
}
Loading

0 comments on commit 1e2fc83

Please sign in to comment.