|
@@ -17,10 +17,7 @@
|
17
|
17
|
package org.jitsi.meet.sdk;
|
18
|
18
|
|
19
|
19
|
import android.content.Intent;
|
20
|
|
-import android.net.Uri;
|
21
|
|
-import android.os.Build;
|
22
|
20
|
import android.os.Bundle;
|
23
|
|
-import android.provider.Settings;
|
24
|
21
|
import android.support.annotation.Nullable;
|
25
|
22
|
import android.support.v7.app.AppCompatActivity;
|
26
|
23
|
|
|
@@ -38,13 +35,6 @@ import java.net.URL;
|
38
|
35
|
* <tt>JKConferenceView</tt> static methods.
|
39
|
36
|
*/
|
40
|
37
|
public class JitsiMeetActivity extends AppCompatActivity {
|
41
|
|
- /**
|
42
|
|
- * Code for identifying the permission to draw on top of other apps. The
|
43
|
|
- * number is chosen arbitrarily and used to correlate the intent with its
|
44
|
|
- * result.
|
45
|
|
- */
|
46
|
|
- public static final int OVERLAY_PERMISSION_REQ_CODE = 4242;
|
47
|
|
-
|
48
|
38
|
/**
|
49
|
39
|
* Instance of the {@link JitsiMeetView} which this activity will display.
|
50
|
40
|
*/
|
|
@@ -74,26 +64,6 @@ public class JitsiMeetActivity extends AppCompatActivity {
|
74
|
64
|
view.loadURL(url);
|
75
|
65
|
}
|
76
|
66
|
|
77
|
|
- /**
|
78
|
|
- * {@inheritDoc}
|
79
|
|
- */
|
80
|
|
- @Override
|
81
|
|
- protected void onActivityResult(
|
82
|
|
- int requestCode,
|
83
|
|
- int resultCode,
|
84
|
|
- Intent data) {
|
85
|
|
- if (requestCode == OVERLAY_PERMISSION_REQ_CODE) {
|
86
|
|
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
87
|
|
- if (!Settings.canDrawOverlays(this)) {
|
88
|
|
- // Permission not granted.
|
89
|
|
- return;
|
90
|
|
- }
|
91
|
|
- }
|
92
|
|
-
|
93
|
|
- setContentView(view);
|
94
|
|
- }
|
95
|
|
- }
|
96
|
|
-
|
97
|
67
|
/**
|
98
|
68
|
* {@inheritDoc}
|
99
|
69
|
*/
|
|
@@ -120,20 +90,6 @@ public class JitsiMeetActivity extends AppCompatActivity {
|
120
|
90
|
view.setWelcomePageEnabled(welcomePageEnabled);
|
121
|
91
|
view.loadURL(null);
|
122
|
92
|
|
123
|
|
- // In debug mode React needs permission to write over other apps in
|
124
|
|
- // order to display the warning and error overlays.
|
125
|
|
- if (BuildConfig.DEBUG
|
126
|
|
- && Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
|
127
|
|
- && !Settings.canDrawOverlays(this)) {
|
128
|
|
- Intent intent
|
129
|
|
- = new Intent(
|
130
|
|
- Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
|
131
|
|
- Uri.parse("package:" + getPackageName()));
|
132
|
|
-
|
133
|
|
- startActivityForResult(intent, OVERLAY_PERMISSION_REQ_CODE);
|
134
|
|
- return;
|
135
|
|
- }
|
136
|
|
-
|
137
|
93
|
setContentView(view);
|
138
|
94
|
}
|
139
|
95
|
|