Skip to content

Commit af26fff

Browse files
committed
feat(ts): add ADB detection callback
1 parent bc90ecb commit af26fff

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

src/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ export const setThreatListeners = async <T extends NativeEventEmitterActions>(
117117
case Threat.Malware.value:
118118
config.malware?.(parseMalwareData(event[malwareKey]));
119119
break;
120+
case Threat.ADBEnabled.value:
121+
config.adbEnabled?.();
122+
break;
120123
default:
121124
onInvalidCallback();
122125
break;

src/threat.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export class Threat {
1717
static ObfuscationIssues = new Threat(0);
1818
static DevMode = new Threat(0);
1919
static Malware = new Threat(0);
20+
static ADBEnabled = new Threat(0);
2021

2122
constructor(value: number) {
2223
this.value = value;
@@ -38,6 +39,7 @@ export class Threat {
3839
this.ObfuscationIssues,
3940
this.DevMode,
4041
this.Malware,
42+
this.ADBEnabled,
4143
]
4244
: [
4345
this.AppIntegrity,

src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,5 @@ export type NativeEventEmitterActions = {
5252
devMode?: () => any;
5353
systemVPN?: () => any;
5454
malware?: (suspiciousApps: SuspiciousAppInfo[]) => any;
55+
adbEnabled?: () => any;
5556
};

0 commit comments

Comments
 (0)