use TextUtils, fix typo it is myActivity, not activity

This commit is contained in:
adbenitez
2024-08-13 00:21:59 +02:00
parent 0500dd167c
commit c233c6ce54
@@ -2,6 +2,7 @@ package org.thoughtcrime.securesms.qr;
import android.app.Activity;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
@@ -107,8 +108,8 @@ public class QrScanFragment extends Fragment {
// therefore, we only show a non-disturbing error here.
@Override
protected void displayFrameworkBugMessageAndExit(String message) {
if (message == null || message.isEmpty()) {
message = activity.getString(R.string.zxing_msg_camera_framework_bug);
if (TextUtils.isEmpty(message)) {
message = myActivity.getString(R.string.zxing_msg_camera_framework_bug);
}
Toast.makeText(myActivity, message, Toast.LENGTH_SHORT).show();
}