Workaround bug in fragment activity

pull/146/head
M66B 6 years ago
parent d3966263c1
commit 95d101c9f2

@ -27,6 +27,7 @@ import android.view.MenuItem;
import java.util.ArrayList;
import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import androidx.lifecycle.Lifecycle;
@ -139,4 +140,14 @@ public class ActivityCompose extends ActivityBilling implements FragmentManager.
return false;
}
}
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
if (resultCode == RESULT_CANCELED) {
int request = requestCode & 0xffff;
if (request == REQUEST_IMAGE || request == REQUEST_ATTACHMENT)
return;
}
super.onActivityResult(requestCode, resultCode, data);
}
}

@ -28,6 +28,7 @@ import android.view.MenuItem;
import java.util.List;
import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import androidx.lifecycle.Lifecycle;
@ -106,6 +107,16 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
}
}
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
if (resultCode == RESULT_CANCELED) {
int request = requestCode & 0xffff;
if (request == REQUEST_EXPORT || request == REQUEST_IMPORT)
return;
}
super.onActivityResult(requestCode, resultCode, data);
}
BroadcastReceiver receiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {

Loading…
Cancel
Save