debugging test case breakage

This commit is contained in:
Katharine
2021-11-01 19:46:07 +08:00
parent 3ee533b815
commit 4536453fdf
2 changed files with 22 additions and 5 deletions

View File

@@ -64,11 +64,10 @@ import java.util.Locale;
import java.util.NoSuchElementException;
import java.util.concurrent.Callable;
import androidx.activity.result.ActivityResult;
import androidx.activity.result.ActivityResultCallback;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.Toolbar;
@@ -148,7 +147,7 @@ public class LoyaltyCardEditActivity extends CatimaAppCompatActivity {
ActivityResultLauncher<Intent> mPhotoTakerLauncher;
ActivityResultLauncher<Intent> mPhotoPickerLauncher;
ActivityResultLauncher<Intent> mCardIdAndBardCodeEditorLauncher;
ActivityResultLauncher<Intent> mCardIdAndBarCodeEditorLauncher;
ActivityResultLauncher<Intent> mCropperLauncher;
int mRequestedImage;
@@ -545,7 +544,8 @@ public class LoyaltyCardEditActivity extends CatimaAppCompatActivity {
});
mCardIdAndBardCodeEditorLauncher = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), result -> {
mCardIdAndBarCodeEditorLauncher = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), result -> {
Log.d("requestCode", "result arriving at mCardIdAndBarCodeEditorLauncher");
if (result.getResultCode() == RESULT_OK) {
Intent intent = result.getData();
if (intent == null){
@@ -924,7 +924,7 @@ public class LoyaltyCardEditActivity extends CatimaAppCompatActivity {
final Bundle b = new Bundle();
b.putString(LoyaltyCardEditActivity.BUNDLE_CARDID, cardIdFieldView.getText().toString());
i.putExtras(b);
mCardIdAndBardCodeEditorLauncher.launch(i);
mCardIdAndBarCodeEditorLauncher.launch(i);
}
}
@@ -1271,4 +1271,11 @@ public class LoyaltyCardEditActivity extends CatimaAppCompatActivity {
throw new UnsupportedOperationException();
}
}
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
System.out.println("requestCode: " + requestCode);
Log.d("requestCode", "requestCode: " + requestCode);
}
}