mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-23 09:12:16 -05:00
Partially revert "switch to native DialogFragment, fix some nullpointers", but keep nullpointer fixes
This reverts commit 403f74f558
.
Conflicts:
OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/ProgressDialogFragment.java
This commit is contained in:
parent
b3ebb64666
commit
bd5a5c0138
@ -18,14 +18,16 @@
|
||||
package org.sufficientlysecure.keychain.service;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.FragmentManager;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.operations.results.CertifyResult;
|
||||
import org.sufficientlysecure.keychain.ui.dialog.ProgressDialogFragment;
|
||||
import org.sufficientlysecure.keychain.ui.util.Notify;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
@ -97,7 +99,7 @@ public class ServiceProgressHandler extends Handler {
|
||||
|
||||
// TODO: This is a hack!, see
|
||||
// http://stackoverflow.com/questions/10114324/show-dialogfragment-from-onactivityresult
|
||||
final FragmentManager manager = activity.getFragmentManager();
|
||||
final FragmentManager manager = activity.getSupportFragmentManager();
|
||||
Handler handler = new Handler();
|
||||
handler.post(new Runnable() {
|
||||
public void run() {
|
||||
|
@ -19,7 +19,6 @@ package org.sufficientlysecure.keychain.ui.dialog;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.app.DialogFragment;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnKeyListener;
|
||||
@ -27,6 +26,7 @@ import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.view.ContextThemeWrapper;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
@ -52,6 +52,7 @@ public class ProgressDialogFragment extends DialogFragment {
|
||||
* @param message the message to be displayed initially above the progress bar
|
||||
* @param style the progress bar style, as defined in ProgressDialog (horizontal or spinner)
|
||||
* @param cancelable should we let the user cancel this operation
|
||||
* @return
|
||||
*/
|
||||
public static ProgressDialogFragment newInstance(String message, int style, boolean cancelable) {
|
||||
ProgressDialogFragment frag = new ProgressDialogFragment();
|
||||
|
Loading…
Reference in New Issue
Block a user