Skip to content

Commit 3bf7c24

Browse files
committed
Merge branch 'master' of github.com:firebase/firebase-android-sdk
2 parents 686a998 + b58e788 commit 3bf7c24

File tree

25 files changed

+581
-337
lines changed

25 files changed

+581
-337
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright 2020 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# Prevent FirebaseCrashlytics from being obfuscated, because the Crashlytics
16+
# native libraries call FirebaseCrashlytics public methods dynamically via JNI.
17+
-keep public class com.google.firebase.crashlytics.FirebaseCrashlytics { public *; }

firebase-crashlytics-ndk/firebase-crashlytics-ndk.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ android {
3434
targetSdkVersion androidVersion
3535
versionName version
3636

37+
consumerProguardFiles 'firebase-crashlytics-ndk-proguard.txt'
3738
multiDexEnabled true
3839
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
3940
}

firebase-crashlytics-ndk/src/main/jni/libcrashlytics/Android.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
1414
rwildcard=$(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) $(filter $(subst *,%,$2),$d))
1515

1616
SRC_FILE_LIST := $(call rwildcard, $(LOCAL_PATH)/src/, *.cpp)
17-
SRC_FILE_LIST += $(LOCAL_PATH)/src/external/api_c.c
1817

1918
LOCAL_SRC_FILES := $(SRC_FILE_LIST:$(LOCAL_PATH)/%=%)
2019
LOCAL_STATIC_LIBRARIES := breakpad_client

firebase-crashlytics-ndk/src/main/jni/libcrashlytics/include/crashlytics/external/crashlytics.h

Lines changed: 182 additions & 152 deletions
Large diffs are not rendered by default.

firebase-crashlytics-ndk/src/main/jni/libcrashlytics/src/external/api_c.c

Lines changed: 0 additions & 34 deletions
This file was deleted.

firebase-crashlytics/src/androidTest/java/com/google/firebase/crashlytics/internal/common/SessionReportingCoordinatorTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,10 @@ public void onUserId_writesUserToReportMetadata() {
328328
public void onSessionsFinalize_finalizesReports() {
329329
final String sessionId = "testSessionId";
330330
reportManager.onBeginSession(sessionId, System.currentTimeMillis());
331-
reportManager.finalizeSessions();
331+
final long endedAt = System.currentTimeMillis();
332+
reportManager.finalizeSessions(endedAt);
332333

333-
verify(reportPersistence).finalizeReports(sessionId);
334+
verify(reportPersistence).finalizeReports(sessionId, endedAt);
334335
}
335336

336337
@Test

firebase-crashlytics/src/androidTest/java/com/google/firebase/crashlytics/internal/model/serialization/CrashlyticsReportJsonTransformTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,12 @@ private static CrashlyticsReport.Session makeTestSession() {
7373
return Session.builder()
7474
.setGenerator("generator")
7575
.setIdentifier("identifier")
76-
.setStartedAt(0)
76+
.setStartedAt(1L)
77+
.setEndedAt(1L)
78+
.setCrashed(true)
7779
.setApp(makeTestApplication())
7880
.setUser(User.builder().setIdentifier("user").build())
81+
.setGeneratorType(3)
7982
.build();
8083
}
8184

0 commit comments

Comments
 (0)