forked from Ivasoft/mattermost-mobile
MM-15643 Better close app when checking for pin code (#2846)
This commit is contained in:
committed by
Miguel Alatzar
parent
cdfec92669
commit
163f0b7fdf
@@ -68,7 +68,14 @@ public class MattermostManagedModule extends ReactContextBaseJavaModule {
|
||||
@ReactMethod
|
||||
// Close the current activity and open the security settings.
|
||||
public void goToSecuritySettings() {
|
||||
getCurrentActivity().finish();
|
||||
getReactApplicationContext().startActivity(new Intent(android.provider.Settings.ACTION_SECURITY_SETTINGS));
|
||||
getCurrentActivity().finish();
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void quitApp() {
|
||||
getCurrentActivity().finish();
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {BackHandler, NativeModules, DeviceEventEmitter} from 'react-native';
|
||||
import {NativeModules, DeviceEventEmitter} from 'react-native';
|
||||
import LocalAuth from 'react-native-local-auth';
|
||||
import JailMonkey from 'jail-monkey';
|
||||
|
||||
@@ -63,5 +63,5 @@ export default {
|
||||
|
||||
return JailMonkey.trustFall();
|
||||
},
|
||||
quitApp: BackHandler.exitApp,
|
||||
quitApp: MattermostManaged.quitApp,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user