Android SDK Version
- Mutable
- CollectionMapper
- AppCall
- CustomTab
- CustomTabUtils
- DialogFeature
- DialogPresenter
- FacebookDialogBase
- FacebookDialogFragment
- GamingAction
- FacebookWebFallbackDialog
- FragmentWrapper
- InstagramCustomTab
- PlatformServiceClient
- WebDialog
- AnalyticsEvents
- AttributionIdentifiers
- BoltsMeasurementEventListener
- BundleJSONConverter
- CallbackManagerImpl
- FacebookInitProvider
- FacebookRequestErrorClassification
- FacebookSignatureValidator
- FeatureManager
- FetchedAppGateKeepersManager
- FetchedAppSettings
- FetchedAppSettingsManager
- FileLruCache
- ImageDownloader
- ImageRequest
- ImageResponse
- ImageResponseCache
- InstallReferrerUtil
- InternalSettings
- LockOnGetVariable
- Logger
- NativeAppCallAttachmentStore
- NativeProtocol
- ServerProtocol
- SmartLoginOption
- UrlRedirectCache
- Utility
- Validate
- WorkQueue
- MessageDialog
- SendButton
- ShareButton
- ShareButtonBase
- GameRequestDialog
- ShareDialog
- MessageDialogFeature
- VideoUploader
- GameRequestValidation
- CameraEffectFeature
- CameraEffectJSONUtility
- LegacyNativeDialogParameters
- NativeDialogParameters
- ResultProcessor
- ShareConstants
- ShareContentValidation
- ShareDialogFeature
- ShareFeedContent
- ShareInternalUtility
- ShareStoryFeature
- WebDialogParameters
- ShareApi
- ShareBuilder
- Sharer
- Share
- ShareToMessengerParamsBuilder
- Messenger
- MessengerThreadParams
- MessengerUtils
- ShareToMessengerParams
- FacebookAppLinkResolver
- AppLinkData
- AppLinks
- AggregateException
- AppLink
- AppLinkResolver
- AppLinks
- CancellationToken
- CancellationTokenRegistration
- CancellationTokenSource
- Continuation
- ExecutorException
- Task
- TaskCompletionSource
- UnobservedTaskException
- AccessTokenTracker
- AuthenticationTokenTracker
- CustomTabActivity
- CustomTabMainActivity
- FacebookActivity
- FacebookAuthorizationException
- FacebookButtonBase
- FacebookCallback
- FacebookDialog
- FacebookDialogException
- LoginStatusCallback
- WebDialog
- AccessToken
- AccessTokenManager
- AccessTokenSource
- AuthenticationToken
- AuthenticationTokenCache
- AuthenticationTokenClaims
- AuthenticationTokenHeader
- AuthenticationTokenManager
- CallbackManager
- CurrentAccessTokenExpirationBroadcastReceiver
- FacebookBroadcastReceiver
- FacebookContentProvider
- FacebookException
- FacebookGraphResponseException
- FacebookOperationCanceledException
- FacebookRequestError
- FacebookSdk
- FacebookSdkNotInitializedException
- FacebookServiceException
- GraphRequest
- GraphRequestAsyncTask
- GraphRequestBatch
- GraphResponse
- HttpMethod
- LoggingBehavior
- Profile
- ProfileCache
- ProfileManager
- ProfileTracker
- ProgressNoopOutputStream
- ProgressOutputStream
- RequestProgress
- Common
- DeviceRequestsHelper
- EndToEndDumper
- CodeChallengeMethod
- CustomTabLoginMethodHandler
- CustomTabPrefetchHelper
- DeviceAuthDialog
- DeviceAuthMethodHandler
- GetTokenLoginMethodHandler
- KatanaProxyLoginMethodHandler
- LoginBehavior
- LoginClient
- LoginConfiguration
- LoginFragment
- LoginManager
- LoginMethodHandler
- LoginResult
- NativeAppLoginMethodHandler
- NonceUtil
- WebLoginMethodHandler
- WebViewLoginMethodHandler
- DefaultAudience
- LoginTargetApp
- DeviceLoginManager
- Login
- AppGroupCreationContent
- CameraEffectArguments
- CameraEffectTextures
- GameRequestContent
- ShareCameraEffectContent
- ShareContent
- ShareHashtag
- ShareLinkContent
- ShareMedia
- ShareMediaContent
- ShareMessengerActionButton
- ShareMessengerURLActionButton
- ShareModel
- ShareModelBuilder
- SharePhoto
- SharePhotoContent
- ShareStoryContent
- ShareVideo
- ShareVideoContent
- AccessTokenAppIdPair
- AppEvent
- AppEventsConstants
- AppEventsLogger
- AppEventsManager
- FlushResult
- InternalAppEventsLogger
- UserDataStore
- MetadataIndexer
- MetadataRule
- SettingsAPIFields
- AppEventsCAPIManager
- CustomEventField
- AppEventType
- AppEventUserAndAppDataField
- ConversionsAPISection
- ConversionsAPICustomEventField
- ConversionsAPIUserAndAppDataField
- ConversionsAPIEventName
- OtherEventConstants
- AppEventsConversionsAPITransformer
- AppEventsConversionsAPITransformerWebRequests
- CodelessLoggingEventListener
- CodelessManager
- RCTCodelessLoggingEventListener
- ViewIndexer
- Constants
- EventBinding
- ParameterComponent
- PathComponent
- SensitiveUserDataUtils
- UnityReflection
- ViewHierarchy
- EventDeactivationManager
- InAppPurchaseActivityLifecycleTracker
- InAppPurchaseAutoLogger
- InAppPurchaseBillingClientWrapper
- InAppPurchaseEventManager
- InAppPurchaseLoggerManager
- InAppPurchaseManager
- InAppPurchaseSkuDetailsWrapper
- InAppPurchaseUtils
- IntegrityManager
- ActivityLifecycleTracker
- AppEventUtility
- AppEventsLoggerUtility
- AutomaticAnalyticsLogger
- Constants
- FileDownloadTask
- ViewHierarchyConstants
- MTensor
- Model
- ModelManager
- Utils
- OnDeviceProcessingManager
- RemoteServiceWrapper
- RestrictiveDataManager
- SuggestedEventsManager
- ViewOnClickListener
- Core
- GateKeeper
- GateKeeperRuntimeCache
- ExceptionAnalyzer
- InstrumentData
- InstrumentManager
- InstrumentUtility
- ANRDetector
- ANRHandler
- CrashHandler
- AutoHandleExceptions
- CrashShieldHandler
- NoAutoExceptionHandling
- ErrorReportData
- ErrorReportHandler
- ThreadCheckHandler
- Excuse
- ExcusesForDesignViolations
- CertificateUtil
- OidcSecurityUtil
- DeviceLoginButton
- LoginButton
- ProfilePictureView
- ToolTipPopup
- All
public class InstrumentUtility
Field Summary
Modifier and Type | Field | Description |
---|---|---|
private final String | ANALYSIS_REPORT_PREFIX | |
private final String | ANR_REPORT_PREFIX | |
private final String | CRASH_REPORT_PREFIX | |
private final String | CRASH_SHIELD_PREFIX | |
private final String | THREAD_CHECK_PREFIX | |
private final String | ERROR_REPORT_PREFIX | |
public final static InstrumentUtility | INSTANCE |
Method Summary
Modifier and Type | Method | Description |
---|---|---|
final static String | getCause(Throwable e) | Get the cause of the raised exception. |
final static String | getStackTrace(Throwable e) | Get the iterated call stack traces of the raised exception. |
final static String | getStackTrace(Thread thread) | Get the stack trace of the input Thread. |
final static Boolean | isSDKRelatedException(Throwable e) | Check whether a Throwable is related to Facebook SDK by looking at iterated stack traces and return true if one of the traces has prefix "com.facebook". |
final static Boolean | isSDKRelatedThread(Thread thread) | Check whether an Thread is related to Facebook SDK by looking at iterated stack traces |
final static Array<File> | listAnrReportFiles() | Get the list of anr report files from instrument report directory defined in InstrumentUtility.getInstrumentReportDir method. |
final static Array<File> | listExceptionAnalysisReportFiles() | Get the list of exception analysis report files from instrument report directory defined in InstrumentUtility.getInstrumentReportDir method. |
final static Array<File> | listExceptionReportFiles() | Get the list of exception report files from instrument report directory defined in method. |
final static JSONObject | readFile(String filename, Boolean deleteOnException) | Read the content from the file which is denoted by filename and the directory is the instrument report directory defined in InstrumentUtility.getInstrumentReportDir method. |
final static Unit | writeFile(String filename, String content) | Write the content to the file which is denoted by filename and the file will be put in instrument report directory defined in InstrumentUtility.getInstrumentReportDir method. |
final static Boolean | deleteFile(String filename) | Deletes the cache file under instrument report directory. |
final static Unit | sendReports(String key, JSONArray reports, GraphRequest.Callback callback) | Create Graph Request for Instrument reports and send the reports to Facebook. |
final static File | getInstrumentReportDir() | Get the instrument directory for report if the directory exists. |
final static Boolean | isFromFbOrMeta(StackTraceElement element) | |
final String | getANALYSIS_REPORT_PREFIX() | |
final String | getANR_REPORT_PREFIX() | |
final String | getCRASH_REPORT_PREFIX() | |
final String | getCRASH_SHIELD_PREFIX() | |
final String | getTHREAD_CHECK_PREFIX() | |
final String | getERROR_REPORT_PREFIX() |
Method Detail
getCause
final static StringgetCause(Throwable e)
Get the cause of the raised exception.
Parameters:
e
- The Throwable containing the exception that was raisedgetStackTrace
final static StringgetStackTrace(Throwable e)
Get the iterated call stack traces of the raised exception.
Parameters:
e
- The Throwable containing the exception that was raisedgetStackTrace
final static StringgetStackTrace(Thread thread)
Get the stack trace of the input Thread.
Parameters:
thread
- The Thread to obtain the stack traceisSDKRelatedException
final static BooleanisSDKRelatedException(Throwable e)
Check whether a Throwable is related to Facebook SDK by looking at iterated stack traces and return true if one of the traces has prefix "com.facebook".
Parameters:
e
- The Throwable containing the exception that was raisedisSDKRelatedThread
final static BooleanisSDKRelatedThread(Thread thread)
Check whether an Thread is related to Facebook SDK by looking at iterated stack traces
Parameters:
thread
- The Thread to obtain the stack tracelistAnrReportFiles
final static Array<File> listAnrReportFiles()
Get the list of anr report files from instrument report directory defined in InstrumentUtility.getInstrumentReportDir method.
Note that the function should be called after FacebookSdk is initialized. Otherwise, exception FacebookSdkNotInitializedException will be thrown.
listExceptionAnalysisReportFiles
final static Array<File> listExceptionAnalysisReportFiles()
Get the list of exception analysis report files from instrument report directory defined in InstrumentUtility.getInstrumentReportDir method.
Note that the function should be called after FacebookSdk is initialized. Otherwise, exception FacebookSdkNotInitializedException will be thrown.
listExceptionReportFiles
final static Array<File> listExceptionReportFiles()
readFile
final static JSONObjectreadFile(String filename, Boolean deleteOnException)
Read the content from the file which is denoted by filename and the directory is the instrument report directory defined in InstrumentUtility.getInstrumentReportDir method.
Note that the function should be called after FacebookSdk is initialized. Otherwise, exception FacebookSdkNotInitializedException will be thrown.
writeFile
final static UnitwriteFile(String filename, String content)
Write the content to the file which is denoted by filename and the file will be put in instrument report directory defined in InstrumentUtility.getInstrumentReportDir method.
Note that the function should be called after FacebookSdk is initialized. Otherwise, exception FacebookSdkNotInitializedException will be thrown.
deleteFile
final static BooleandeleteFile(String filename)
Deletes the cache file under instrument report directory. If the instrument report directory exists and the file exists under the directory, the file will be deleted.
Note that the function should be called after FacebookSdk is initialized. Otherwise, exception FacebookSdkNotInitializedException will be thrown.
sendReports
final static UnitsendReports(String key, JSONArray reports, GraphRequest.Callback callback)
Create Graph Request for Instrument reports and send the reports to Facebook.
getInstrumentReportDir
final static FilegetInstrumentReportDir()
Get the instrument directory for report if the directory exists. If the directory doesn't exist, will attempt to create the directory. Note that, the instrument directory is under cache directory of the Application.
Note that the function should be called after FacebookSdk is initialized. Otherwise, exception FacebookSdkNotInitializedException will be thrown.
isFromFbOrMeta
final static BooleanisFromFbOrMeta(StackTraceElement element)
getANALYSIS_REPORT_PREFIX
final StringgetANALYSIS_REPORT_PREFIX()
getANR_REPORT_PREFIX
final StringgetANR_REPORT_PREFIX()
getCRASH_REPORT_PREFIX
final StringgetCRASH_REPORT_PREFIX()
getCRASH_SHIELD_PREFIX
final StringgetCRASH_SHIELD_PREFIX()
getTHREAD_CHECK_PREFIX
final StringgetTHREAD_CHECK_PREFIX()
getERROR_REPORT_PREFIX
final StringgetERROR_REPORT_PREFIX()