Created
May 7, 2015 13:37
-
-
Save ok3141/b8566a0002fb76d07093 to your computer and use it in GitHub Desktop.
Prevent FC when starting 3rd-party Activity
This file contains 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
public void startActivity(Intent intent) { | |
try { | |
super.startActivity(intent); | |
} catch (Throwable ex) { | |
if (SNAPSHOT) { | |
Log.wtf(LOG_TAG, ex); | |
} | |
} | |
} | |
@Override | |
@TargetApi(Build.VERSION_CODES.JELLY_BEAN) | |
public void startActivityForResult(Intent intent, int requestCode, Bundle options) { | |
try { | |
super.startActivityForResult(intent, requestCode, options); | |
} catch (Throwable ex) { | |
if (SNAPSHOT) { | |
Log.wtf(LOG_TAG, ex); | |
} | |
} | |
} | |
@Override | |
public void startActivityForResult(Intent intent, int requestCode) { | |
try { | |
super.startActivityForResult(intent, requestCode); | |
} catch (Throwable ex) { | |
if (SNAPSHOT) { | |
Log.wtf(LOG_TAG, ex); | |
} | |
} | |
} | |
@TargetApi(Build.VERSION_CODES.JELLY_BEAN) | |
@Override | |
public void startActivity(Intent intent, Bundle options) { | |
try { | |
super.startActivity(intent, options); | |
} catch (Throwable ex) { | |
if (SNAPSHOT) { | |
Log.wtf(LOG_TAG, ex); | |
} | |
} | |
} | |
@Override | |
public boolean startActivityIfNeeded(Intent intent, int requestCode) { | |
try { | |
return super.startActivityIfNeeded(intent, requestCode); | |
} catch (Throwable ex) { | |
if (SNAPSHOT) { | |
Log.wtf(LOG_TAG, ex); | |
} | |
return false; | |
} | |
} | |
@TargetApi(Build.VERSION_CODES.JELLY_BEAN) | |
@Override | |
public boolean startActivityIfNeeded(Intent intent, int requestCode, Bundle options) { | |
try { | |
return super.startActivityIfNeeded(intent, requestCode, options); | |
} catch (Throwable ex) { | |
if (SNAPSHOT) { | |
Log.wtf(LOG_TAG, ex); | |
} | |
return false; | |
} | |
} | |
@Override | |
public boolean startNextMatchingActivity(Intent intent) { | |
try { | |
return super.startNextMatchingActivity(intent); | |
} catch (Throwable ex) { | |
if (SNAPSHOT) { | |
Log.wtf(LOG_TAG, ex); | |
} | |
return false; | |
} | |
} | |
@TargetApi(Build.VERSION_CODES.JELLY_BEAN) | |
@Override | |
public boolean startNextMatchingActivity(Intent intent, Bundle options) { | |
try { | |
return super.startNextMatchingActivity(intent, options); | |
} catch (Throwable ex) { | |
if (SNAPSHOT) { | |
Log.wtf(LOG_TAG, ex); | |
} | |
return false; | |
} | |
} | |
@Override | |
public void startActivityFromChild(Activity child, Intent intent, int requestCode) { | |
try { | |
super.startActivityFromChild(child, intent, requestCode); | |
} catch (Throwable ex) { | |
if (SNAPSHOT) { | |
Log.wtf(LOG_TAG, ex); | |
} | |
} | |
} | |
@TargetApi(Build.VERSION_CODES.JELLY_BEAN) | |
@Override | |
public void startActivityFromChild(Activity child, Intent intent, int requestCode, Bundle options) { | |
try { | |
super.startActivityFromChild(child, intent, requestCode, options); | |
} catch (Throwable ex) { | |
if (SNAPSHOT) { | |
Log.wtf(LOG_TAG, ex); | |
} | |
} | |
} | |
@TargetApi(Build.VERSION_CODES.HONEYCOMB) | |
@Override | |
public void startActivityFromFragment(android.app.Fragment fragment, Intent intent, int requestCode) { | |
try { | |
super.startActivityFromFragment(fragment, intent, requestCode); | |
} catch (Throwable ex) { | |
if (SNAPSHOT) { | |
Log.wtf(LOG_TAG, ex); | |
} | |
} | |
} | |
@TargetApi(Build.VERSION_CODES.JELLY_BEAN) | |
@Override | |
public void startActivityFromFragment(android.app.Fragment fragment, Intent intent, int requestCode, Bundle options) { | |
try { | |
super.startActivityFromFragment(fragment, intent, requestCode, options); | |
} catch (Throwable ex) { | |
if (SNAPSHOT) { | |
Log.wtf(LOG_TAG, ex); | |
} | |
} | |
} | |
@Override | |
public void startIntentSenderFromChild(Activity child, IntentSender intent, int requestCode, Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags) throws IntentSender.SendIntentException { | |
try { | |
super.startIntentSenderFromChild(child, intent, requestCode, fillInIntent, flagsMask, flagsValues, extraFlags); | |
} catch (Throwable ex) { | |
if (SNAPSHOT) { | |
Log.wtf(LOG_TAG, ex); | |
} | |
} | |
} | |
@TargetApi(Build.VERSION_CODES.JELLY_BEAN) | |
@Override | |
public void startIntentSenderFromChild(Activity child, IntentSender intent, int requestCode, Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags, Bundle options) throws IntentSender.SendIntentException { | |
try { | |
super.startIntentSenderFromChild(child, intent, requestCode, fillInIntent, flagsMask, flagsValues, extraFlags, options); | |
} catch (Throwable ex) { | |
if (SNAPSHOT) { | |
Log.wtf(LOG_TAG, ex); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment