Skip to content

Commit

Permalink
MM-15643 Better close app when checking for pin code (mattermost#2846)
Browse files Browse the repository at this point in the history
  • Loading branch information
hmhealey authored and migbot committed May 30, 2019
1 parent daa8152 commit 3503025
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,14 @@ public void getConfig(final Promise promise) {
@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);
}
}
4 changes: 2 additions & 2 deletions app/mattermost_managed/mattermost-managed.android.js
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -63,5 +63,5 @@ export default {

return JailMonkey.trustFall();
},
quitApp: BackHandler.exitApp,
quitApp: MattermostManaged.quitApp,
};

0 comments on commit 3503025

Please sign in to comment.