Skip to content

Commit

Permalink
final round of fixes for keyboard not showing on android 9
Browse files Browse the repository at this point in the history
  • Loading branch information
Luca Ventura committed Feb 13, 2019
1 parent ba47347 commit b0505e5
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import android.view.View;

import com.guardanis.applock.AppLock;
import com.guardanis.applock.pin.PINInputView;
import com.guardanis.applock.views.AppLockViewController;

import java.lang.ref.WeakReference;
Expand All @@ -23,6 +24,7 @@ public abstract class AppLockDialogBuilder<ALVC extends AppLockViewController> {

protected WeakReference<AppCompatDialog> dialog = new WeakReference<AppCompatDialog>(null);
protected int layoutResId;
protected PINInputView pinInputView;

public AppLockDialogBuilder(Activity activity, int layoutResId) {
this.activity = new WeakReference<Activity>(activity);
Expand Down Expand Up @@ -61,6 +63,8 @@ public void onDismiss(DialogInterface dialogInterface) {

this.dialog = new WeakReference<AppCompatDialog>(dialog);

this.pinInputView = this.viewController.getPINInputController().inputView.get();

return dialog;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ public class LockCreationDialogBuilder extends AppLockDialogBuilder<LockCreation
protected Runnable lockCreatedCallback;
protected Runnable canceledCallback;

public PINInputView inputView;
public PINInputView getPINInputView() {
return pinInputView;
}

public LockCreationDialogBuilder(Activity activity) {
super(activity, R.layout.applock__lock_creation);
Expand Down Expand Up @@ -41,8 +43,6 @@ protected LockCreationViewController buildViewControllerInstance(View parent) {
LockCreationViewController controller = new LockCreationViewController(activity.get(), parent);
controller.setDelegate(this);

inputView = controller.getPINInputController().inputView.get();

return controller;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@

import com.guardanis.applock.AppLock;
import com.guardanis.applock.R;
import com.guardanis.applock.pin.PINInputView;
import com.guardanis.applock.views.UnlockViewController;

public class UnlockDialogBuilder extends AppLockDialogBuilder<UnlockViewController> implements UnlockViewController.Delegate {

protected Runnable unlockCallback;
protected Runnable canceledCallback;

public PINInputView getPINInputView() {
return pinInputView;
}

public UnlockDialogBuilder(Activity activity) {
super(activity, R.layout.applock__unlock);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.guardanis.applock.AppLock;
import com.guardanis.applock.R;
import com.guardanis.applock.pin.PINInputController;
import com.guardanis.applock.pin.PINInputView;
import com.guardanis.applock.services.FingerprintLockService;
import com.guardanis.applock.services.PINLockService;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.guardanis.applock.AppLock;
import com.guardanis.applock.R;
import com.guardanis.applock.pin.PINInputController;
import com.guardanis.applock.pin.PINInputView;
import com.guardanis.applock.services.FingerprintLockService;

import java.lang.ref.WeakReference;
Expand Down

0 comments on commit b0505e5

Please sign in to comment.