diff --git a/RELEASING.md b/RELEASING.md index 68fec9c..91c6cca 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -30,7 +30,7 @@ Release 7. Install the release APK. - 8. Launch the app. Long press and release the "Launch" button 5 times. Ensure that the app crashed - and that the exception was reported to Bugsnag. + 8. Run `adb shell am start -n com.jakewharton.telecine/.TelecineActivity -e crash true` and ensure + that the app crashed and that the exception was reported to Bugsnag. 9. :shipit: diff --git a/telecine/src/main/java/com/jakewharton/telecine/TelecineActivity.java b/telecine/src/main/java/com/jakewharton/telecine/TelecineActivity.java index 90e0ba1..f251ac9 100644 --- a/telecine/src/main/java/com/jakewharton/telecine/TelecineActivity.java +++ b/telecine/src/main/java/com/jakewharton/telecine/TelecineActivity.java @@ -19,11 +19,9 @@ import butterknife.OnCheckedChanged; import butterknife.OnClick; import butterknife.OnItemSelected; -import butterknife.OnLongClick; import com.google.android.gms.analytics.HitBuilders; -import timber.log.Timber; - import javax.inject.Inject; +import timber.log.Timber; import static android.graphics.Bitmap.Config.ARGB_8888; @@ -47,11 +45,14 @@ public final class TelecineActivity extends AppCompatActivity { @Inject Analytics analytics; private VideoSizePercentageAdapter videoSizePercentageAdapter; - private int longClickCount; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + if ("true".equals(getIntent().getStringExtra("crash"))) { + throw new RuntimeException("Crash! Bang! Pow! This is only a test..."); + } + ((TelecineApplication) getApplication()).injector().inject(this); setContentView(R.layout.activity_main); @@ -88,23 +89,10 @@ public final class TelecineActivity extends AppCompatActivity { } @OnClick(R.id.launch) void onLaunchClicked() { - if (longClickCount > 0) { - longClickCount = 0; - Timber.d("Long click count reset."); - } - Timber.d("Attempting to acquire permission to screen capture."); CaptureHelper.fireScreenCaptureIntent(this, analytics); } - @OnLongClick(R.id.launch) boolean onLongClick() { - if (++longClickCount == 5) { - throw new RuntimeException("Crash! Bang! Pow! This is only a test..."); - } - Timber.d("Long click count updated to %s", longClickCount); - return true; - } - @OnItemSelected(R.id.spinner_video_size_percentage) void onVideoSizePercentageSelected( int position) { int newValue = videoSizePercentageAdapter.getItem(position);