Skip to content

Commit

Permalink
Fix pre-launch crash issue
Browse files Browse the repository at this point in the history
  • Loading branch information
amrabed committed Nov 12, 2019
1 parent 1fa6df3 commit 6bc76a5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ android {
applicationId "amrabed.android.release.evaluation"
minSdkVersion 21
targetSdkVersion 29
versionCode 19
versionCode 21
versionName "3.1.2"
multiDexEnabled true
signingConfig signingConfigs.release
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.util.Log;
import android.view.ContextMenu;
import android.view.LayoutInflater;
import android.view.Menu;
Expand Down Expand Up @@ -122,7 +123,11 @@ public boolean onContextItemSelected(MenuItem item)
public void onSaveInstanceState(@NonNull Bundle outState)
{
super.onSaveInstanceState(outState);
outState.putInt(POSITION_KEY, getListView().getScrollY());
try {
outState.putInt(POSITION_KEY, getListView().getScrollY());
} catch (IllegalStateException e) {
Log.e(EditSection.class.getCanonicalName(), e.toString());
}
}

@Override
Expand Down

0 comments on commit 6bc76a5

Please sign in to comment.