android: move calendar permission handling to the SDK

Since this is a feature implemented in the SDK, it makes sense that all the
plumbing required to make it work it's in the SDK itself.
This commit is contained in:
Saúl Ibarra Corretgé 2018-09-04 23:42:04 +02:00 committed by Paweł Domas
parent 388c906312
commit f3d623e0ca
2 changed files with 4 additions and 18 deletions

View File

@ -27,11 +27,9 @@ import org.jitsi.meet.sdk.invite.AddPeopleControllerListener;
import org.jitsi.meet.sdk.invite.InviteController;
import org.jitsi.meet.sdk.invite.InviteControllerListener;
import com.calendarevents.CalendarEventsPackage;
import com.facebook.react.bridge.UiThreadUtil;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -229,20 +227,4 @@ public class MainActivity extends JitsiMeetActivity {
addPeopleController.endAddPeople();
}
}
@Override
public void onRequestPermissionsResult(
int requestCode,
String[] permissions,
int[] grantResults) {
CalendarEventsPackage.onRequestPermissionsResult(
requestCode,
permissions,
grantResults);
super.onRequestPermissionsResult(
requestCode,
permissions,
grantResults);
}
}

View File

@ -148,6 +148,10 @@ public class ReactActivityLifecycleCallbacks {
final int requestCode,
final String[] permissions,
final int[] grantResults) {
CalendarEventsPackage.onRequestPermissionsResult(
requestCode,
permissions,
grantResults);
permissionsCallback = new Callback() {
@Override
public void invoke(Object... args) {