added bridges
This commit is contained in:
@@ -101,6 +101,18 @@ public class DeviceUtilsModule extends ReactContextBaseJavaModule implements Act
|
||||
AlfredManager.INSTANCE.handleSWWEvent("Cosmos", h);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void handleCrash() {
|
||||
int[] list = {1,2};
|
||||
int a = list[3];
|
||||
}
|
||||
@ReactMethod
|
||||
public void handleANR() {
|
||||
while (true){
|
||||
Log.d("Alfred", "handleANR");
|
||||
}
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void setCodePushVersion(String codePushVersion) {
|
||||
AlfredManager.config.setCodePushVersion(codePushVersion);
|
||||
|
||||
@@ -13,7 +13,9 @@ export const alfredHandleSWWEvent = (error: Error) => {
|
||||
|
||||
DeviceUtilsModule.handleSWWEvent(message, stack, name);
|
||||
};
|
||||
export const alfredSetUserId = (userId: string) => DeviceUtilsModule.setUserId(userId);
|
||||
export const handleCrash = () => DeviceUtilsModule.handleCrash();
|
||||
|
||||
export const handleANR = () => DeviceUtilsModule.handleCrash();
|
||||
|
||||
export const alfredSetPhoneNumber = (phoneNumber: string) =>
|
||||
DeviceUtilsModule.setPhoneNumber(phoneNumber);
|
||||
|
||||
@@ -26,6 +26,7 @@ import Button from '../../../RN-UI-LIB/src/components/Button';
|
||||
import EmptyList from './EmptyList';
|
||||
import { data } from '../../../RN-UI-LIB/src/data';
|
||||
import ErrorBoundary from '../../common/ErrorBoundary';
|
||||
import { handleANR, handleCrash, alfredHandleSWWEvent } from '../../components/utlis/DeviceUtils';
|
||||
|
||||
const AllCasesMain = () => {
|
||||
const { pendingList, pinnedList, completedList, loading } = useAppSelector(
|
||||
@@ -101,9 +102,10 @@ const AllCasesMain = () => {
|
||||
{/* /> */}
|
||||
<CasesActionButtons />
|
||||
|
||||
<Button title="crash" onPress={triggerWhileLoop} />
|
||||
<Button title="Trigger Native Crash" onPress={() => handleCrash()} />
|
||||
<Button title="Trigger Native ANR" onPress={() => handleANR()} />
|
||||
<Button title="whileLoop" onPress={() => triggerWhileLoop()} />
|
||||
<Button title="SWW" onPress={() => handleSwwEvent()} />
|
||||
<Button title="SWW" onPress={() => xyz()} />
|
||||
</ErrorBoundary>
|
||||
</Layout>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user