-
Notifications
You must be signed in to change notification settings - Fork 617
Crashlytics ndk datatransport #1356
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
54ab654
Add FilesPayload for NDK reports
mrwillis21 3a1d179
WIP
mrwillis21 9d5bc02
Implement strategy pattern for native sessions
mrwillis21 aae1642
Prep for next iteration
mrwillis21 84c793c
Refactor datatransport abstractions to support polymorphic handling o…
jakeouellette 70be19a
Address feedback
jakeouellette 867e464
style
jakeouellette 89e196e
remove UTF-8
jakeouellette 8371820
Add test classes
jakeouellette 7a76a10
Add tests
jakeouellette 745cd56
Add tests and serialization of ndkpayload
jakeouellette 1d16106
Add settings field for NDK sessions through DataTransport
mrwillis21 d533e8b
Wire up settings to send procedure
jakeouellette a924bb2
Interleave native and non-native high priority sessions
jakeouellette fcc5426
Add session ID abstraction to facilitate deleting NDK reports
jakeouellette 1796c16
Add tests for session coordinator and report persistence
jakeouellette bcacb59
Make Firebase session ID for native sessions
mrwillis21 56a4eeb
Add support for sending/deleting native crashes based on the settings…
mrwillis21 75257bf
Cleanup
mrwillis21 21313d7
Remove undone testS
jakeouellette 9173669
Cleanup
mrwillis21 3d231e2
Base ndk sessions on non-ndk sessions
jakeouellette 365d773
Update paths to allow firelog to go to a different filename.
jakeouellette cba4bff
Make try { } catches less wide
jakeouellette 8d54a9c
Remove old withUserId method
mrwillis21 f2f3db3
Add null check for withSessionEndFields
mrwillis21 5c3f488
Replace builder with simpler create method
mrwillis21 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
...ics/src/main/java/com/google/firebase/crashlytics/internal/common/DataTransportState.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// Copyright 2020 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package com.google.firebase.crashlytics.internal.common; | ||
|
||
import com.google.firebase.crashlytics.internal.settings.model.AppSettingsData; | ||
|
||
public enum DataTransportState { | ||
NONE, | ||
JAVA_ONLY, | ||
ALL; | ||
|
||
// Used to determine whether to upload reports through the legacy reports endpoint | ||
static final int REPORT_UPLOAD_VARIANT_LEGACY = 1; | ||
// Used to determine whether to upload reports through the new DataTransport API. | ||
static final int REPORT_UPLOAD_VARIANT_DATATRANSPORT = 2; | ||
|
||
static DataTransportState getState(boolean dataTransportState, boolean dataTransportNativeState) { | ||
if (!dataTransportState) { | ||
return NONE; | ||
} | ||
if (!dataTransportNativeState) { | ||
return JAVA_ONLY; | ||
} | ||
return ALL; | ||
} | ||
|
||
static DataTransportState getState(AppSettingsData appSettingsData) { | ||
final boolean dataTransportState = | ||
appSettingsData.reportUploadVariant == REPORT_UPLOAD_VARIANT_DATATRANSPORT; | ||
final boolean dataTransportNativeState = | ||
appSettingsData.nativeReportUploadVariant == REPORT_UPLOAD_VARIANT_DATATRANSPORT; | ||
return getState(dataTransportState, dataTransportNativeState); | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a test here?