MM-18465 Add proper flags when opening settings (#3242)
* MM-18465 Add proper flags when opening settings * Fix undefined setPerformingAuthentication Function in emm_provider.
This commit is contained in:
parent
9ccde970fa
commit
4bb94195f1
2 changed files with 6 additions and 2 deletions
|
|
@ -5,6 +5,7 @@ import android.app.Application;
|
|||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.provider.Settings;
|
||||
|
||||
import com.facebook.react.bridge.Arguments;
|
||||
import com.facebook.react.bridge.NativeModule;
|
||||
|
|
@ -69,7 +70,10 @@ public class MattermostManagedModule extends ReactContextBaseJavaModule {
|
|||
@ReactMethod
|
||||
// Close the current activity and open the security settings.
|
||||
public void goToSecuritySettings() {
|
||||
getReactApplicationContext().startActivity(new Intent(android.provider.Settings.ACTION_SECURITY_SETTINGS));
|
||||
Intent intent = new Intent(Settings.ACTION_SECURITY_SETTINGS);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
getReactApplicationContext().startActivity(intent);
|
||||
|
||||
getCurrentActivity().finish();
|
||||
System.exit(0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ class EMMProvider {
|
|||
return false;
|
||||
}
|
||||
|
||||
this.setPerformingAuthentication(false);
|
||||
this.performingAuthentication = false;
|
||||
return true;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue