Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fce2e88

Browse filesBrowse files
fix(Connectivity): androidApp is not defined on SDK <28 (#10324)
fixes #10323 Co-authored-by: Nathan Walker <walkerrunpdx@gmail.com>
1 parent 029ed4f commit fce2e88
Copy full SHA for fce2e88

File tree

2 files changed

+3
-4
lines changed
Filter options

2 files changed

+3
-4
lines changed

‎packages/core/connectivity/index.android.ts

Copy file name to clipboardExpand all lines: packages/core/connectivity/index.android.ts
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,7 @@ function startMonitoringLegacy(connectionTypeChangedCallback) {
109109
connectionTypeChangedCallback(newConnectionType);
110110
};
111111
const zoneCallback = zonedCallback(onReceiveCallback);
112-
// @ts-ignore
113-
androidApp.registerBroadcastReceiver(android.net.ConnectivityManager.CONNECTIVITY_ACTION, zoneCallback);
112+
Application.android.registerBroadcastReceiver(android.net.ConnectivityManager.CONNECTIVITY_ACTION, zoneCallback);
114113
}
115114

116115
let callback;

‎packages/core/global-types.d.ts

Copy file name to clipboardExpand all lines: packages/core/global-types.d.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ declare module globalThis {
103103
function _isModuleLoadedForUI(moduleName: string): boolean;
104104

105105
var onGlobalLayoutListener: any;
106-
function zonedCallback(callback: Function): Function;
106+
function zonedCallback<T = Function>(callback: T): T;
107107
var Reflect: any;
108108
function Deprecated(target: Object, key?: string | symbol, descriptor?: any): any;
109109
function Experimental(target: Object, key?: string | symbol, descriptor?: any): any;
@@ -358,7 +358,7 @@ declare function fail(data: any): void;
358358
*/
359359
// declare function clearInterval(id: number): void;
360360

361-
declare function zonedCallback(callback: Function): Function;
361+
declare function zonedCallback<T = Function>(callback: T): T;
362362

363363
/**
364364
* Create a Java long from a number

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.