|
@@ -27,46 +27,46 @@ import type { Props as AbstractAppProps } from './AbstractApp';
|
27
|
27
|
declare var __DEV__;
|
28
|
28
|
|
29
|
29
|
/**
|
30
|
|
- * App component's property types.
|
|
30
|
+ * The type of React {@code Component} props of {@link App}.
|
31
|
31
|
*/
|
32
|
32
|
type Props = AbstractAppProps & {
|
33
|
33
|
|
34
|
34
|
/**
|
35
|
|
- * Whether the add people feature is enabled or not.
|
|
35
|
+ * Whether the add people feature is enabled.
|
36
|
36
|
*/
|
37
|
37
|
addPeopleEnabled: boolean,
|
38
|
38
|
|
39
|
39
|
/**
|
40
|
|
- * Whether the dial-out feature is enabled or not.
|
|
40
|
+ * Whether the dial-out feature is enabled.
|
41
|
41
|
*/
|
42
|
42
|
dialOutEnabled: boolean,
|
43
|
43
|
|
44
|
44
|
/**
|
45
|
|
- * Whether Picture-in-Picture is enabled. If {@code true}, a toolbar
|
46
|
|
- * button is rendered in the {@link Conference} view to afford entering
|
|
45
|
+ * Whether Picture-in-Picture is enabled. If {@code true}, a toolbar button
|
|
46
|
+ * is rendered in the {@link Conference} view to afford entering
|
47
|
47
|
* Picture-in-Picture.
|
48
|
48
|
*/
|
49
|
49
|
pictureInPictureEnabled: boolean,
|
50
|
50
|
|
51
|
51
|
/**
|
52
|
|
- * Whether the Welcome page is enabled. If {@code true}, the Welcome
|
53
|
|
- * page is rendered when the {@link App} is not at a location (URL)
|
54
|
|
- * identifying a Jitsi Meet conference/room.
|
|
52
|
+ * Whether the Welcome page is enabled. If {@code true}, the Welcome page is
|
|
53
|
+ * rendered when the {@link App} is not at a location (URL) identifying
|
|
54
|
+ * a Jitsi Meet conference/room.
|
55
|
55
|
*/
|
56
|
56
|
welcomePageEnabled: boolean
|
57
|
57
|
};
|
58
|
58
|
|
59
|
59
|
/**
|
60
|
|
- * Root application component.
|
|
60
|
+ * Root app {@code Component} on mobile/React Native.
|
61
|
61
|
*
|
62
|
62
|
* @extends AbstractApp
|
63
|
63
|
*/
|
64
|
64
|
export class App extends AbstractApp {
|
65
|
65
|
/**
|
66
|
|
- * Initializes a new App instance.
|
|
66
|
+ * Initializes a new {@code App} instance.
|
67
|
67
|
*
|
68
|
|
- * @param {Object} props - The read-only React Component props with which
|
69
|
|
- * the new instance is to be initialized.
|
|
68
|
+ * @param {Props} props - The read-only React {@code Component} props with
|
|
69
|
+ * which the new instance is to be initialized.
|
70
|
70
|
*/
|
71
|
71
|
constructor(props: Props) {
|
72
|
72
|
super(props);
|
|
@@ -76,8 +76,8 @@ export class App extends AbstractApp {
|
76
|
76
|
|
77
|
77
|
// In the Release configuration, React Native will (intentionally) throw
|
78
|
78
|
// an unhandled JavascriptException for an unhandled JavaScript error.
|
79
|
|
- // This will effectively kill the application. In accord with the Web,
|
80
|
|
- // do not kill the application.
|
|
79
|
+ // This will effectively kill the app. In accord with the Web, do not
|
|
80
|
+ // kill the app.
|
81
|
81
|
this._maybeDisableExceptionsManager();
|
82
|
82
|
}
|
83
|
83
|
|
|
@@ -130,10 +130,9 @@ export class App extends AbstractApp {
|
130
|
130
|
* {@link ExceptionsManager#handleException} on platforms and in
|
131
|
131
|
* configurations on/in which the use of the method in questions has been
|
132
|
132
|
* determined to be undesirable. For example, React Native will
|
133
|
|
- * (intentionally) throw an unhandled JavascriptException for an
|
|
133
|
+ * (intentionally) throw an unhandled {@code JavascriptException} for an
|
134
|
134
|
* unhandled JavaScript error in the Release configuration. This will
|
135
|
|
- * effectively kill the application. In accord with the Web, do not kill the
|
136
|
|
- * application.
|
|
135
|
+ * effectively kill the app. In accord with the Web, do not kill the app.
|
137
|
136
|
*
|
138
|
137
|
* @private
|
139
|
138
|
* @returns {void}
|
|
@@ -148,9 +147,9 @@ export class App extends AbstractApp {
|
148
|
147
|
// A solution based on RTCSetFatalHandler was implemented on iOS and
|
149
|
148
|
// it is preferred because it is at a later step of the
|
150
|
149
|
// error/exception handling and it is specific to fatal
|
151
|
|
- // errors/exceptions which were observed to kill the application.
|
152
|
|
- // The solution implemented bellow was tested on Android only so it
|
153
|
|
- // is considered safest to use it there only.
|
|
150
|
+ // errors/exceptions which were observed to kill the app. The
|
|
151
|
+ // solution implemented bellow was tested on Android only so it is
|
|
152
|
+ // considered safest to use it there only.
|
154
|
153
|
return;
|
155
|
154
|
}
|
156
|
155
|
|
|
@@ -167,10 +166,10 @@ export class App extends AbstractApp {
|
167
|
166
|
|
168
|
167
|
/**
|
169
|
168
|
* Notified by React's Linking API that a specific URL registered to be
|
170
|
|
- * handled by this App was activated.
|
|
169
|
+ * handled by this app was activated.
|
171
|
170
|
*
|
172
|
171
|
* @param {Object} event - The details of the notification/event.
|
173
|
|
- * @param {string} event.url - The URL registered to be handled by this App
|
|
172
|
+ * @param {string} event.url - The URL registered to be handled by this app
|
174
|
173
|
* which was activated.
|
175
|
174
|
* @private
|
176
|
175
|
* @returns {void}
|
|
@@ -183,11 +182,11 @@ export class App extends AbstractApp {
|
183
|
182
|
/**
|
184
|
183
|
* Handles a (possibly unhandled) JavaScript error by preventing React Native
|
185
|
184
|
* from converting a fatal error into an unhandled native exception which will
|
186
|
|
- * kill the application.
|
|
185
|
+ * kill the app.
|
187
|
186
|
*
|
188
|
187
|
* @param {Error} error - The (possibly unhandled) JavaScript error to handle.
|
189
|
|
- * @param {boolean} fatal - True if the specified error is fatal; otherwise,
|
190
|
|
- * false.
|
|
188
|
+ * @param {boolean} fatal - If the specified error is fatal, {@code true};
|
|
189
|
+ * otherwise, {@code false}.
|
191
|
190
|
* @private
|
192
|
191
|
* @returns {void}
|
193
|
192
|
*/
|
|
@@ -195,12 +194,12 @@ function _handleException(error, fatal) {
|
195
|
194
|
if (fatal) {
|
196
|
195
|
// In the Release configuration, React Native will (intentionally) throw
|
197
|
196
|
// an unhandled JavascriptException for an unhandled JavaScript error.
|
198
|
|
- // This will effectively kill the application. In accord with the Web,
|
199
|
|
- // do not kill the application.
|
|
197
|
+ // This will effectively kill the app. In accord with the Web, do not
|
|
198
|
+ // kill the app.
|
200
|
199
|
console.error(error);
|
201
|
200
|
} else {
|
202
|
201
|
// Forward to the next globalHandler of ErrorUtils.
|
203
|
|
- const next = _handleException.next;
|
|
202
|
+ const { next } = _handleException;
|
204
|
203
|
|
205
|
204
|
typeof next === 'function' && next(error, fatal);
|
206
|
205
|
}
|