[app] Don't crash when not knowing app name while receiving ACTION_INSTALL_INTERRUPTED

Closes acra-crash-reports#143
This commit is contained in:
Torsten Grote
2022-12-21 11:38:08 -03:00
committed by Hans-Christoph Steiner
parent 0629848c89
commit ac87f48cf1

View File

@@ -585,9 +585,8 @@ public class AppDetailsActivity extends AppCompatActivity
if (!TextUtils.isEmpty(errorMessage) && !isFinishing()) {
Log.e(TAG, "install aborted with errorMessage: " + errorMessage);
String title = String.format(
getString(R.string.install_error_notify_title),
app.name);
String title = getString(R.string.install_error_notify_title,
app == null ? "" : app.name);
AlertDialog.Builder alertBuilder = new AlertDialog.Builder(AppDetailsActivity.this);
alertBuilder.setTitle(title);