mirror of
https://github.com/bitwarden/mobile.git
synced 2024-11-05 09:01:11 +01:00
formatting touchups
This commit is contained in:
parent
9a66b9003f
commit
c3649a9c80
@ -370,7 +370,7 @@ namespace Bit.Droid.Accessibility
|
||||
var anchorViewRectTop = anchorViewRect.Top;
|
||||
anchorViewRect.Dispose();
|
||||
|
||||
int calculatedTop = rootRectHeight - anchorViewRectTop;
|
||||
var calculatedTop = rootRectHeight - anchorViewRectTop;
|
||||
if((int)Build.VERSION.SdkInt >= 24)
|
||||
{
|
||||
calculatedTop -= GetNavigationBarHeight();
|
||||
@ -385,7 +385,8 @@ namespace Bit.Droid.Accessibility
|
||||
Point point = null;
|
||||
if(anchorNode != null)
|
||||
{
|
||||
anchorNode.Refresh(); // update node's info since this is still a reference from an older event
|
||||
// Update node's info since this is still a reference from an older event
|
||||
anchorNode.Refresh();
|
||||
if(!anchorNode.VisibleToUser)
|
||||
{
|
||||
return new Point(-1, -1);
|
||||
@ -406,7 +407,7 @@ namespace Bit.Droid.Accessibility
|
||||
{
|
||||
return new Point(-1, -1);
|
||||
}
|
||||
Rect inputWindowRect = GetInputMethodWindowRect(windows);
|
||||
var inputWindowRect = GetInputMethodWindowRect(windows);
|
||||
if(inputWindowRect != null)
|
||||
{
|
||||
limitLowY += inputWindowRect.Height();
|
||||
@ -419,7 +420,6 @@ namespace Bit.Droid.Accessibility
|
||||
}
|
||||
|
||||
point = GetOverlayAnchorPosition(root, anchorNode, rootNodeHeight);
|
||||
|
||||
if(point.Y < limitLowY || point.Y > limitHighY)
|
||||
{
|
||||
point.X = -1;
|
||||
|
@ -29,7 +29,8 @@ namespace Bit.Droid.Accessibility
|
||||
private const string BitwardenWebsite = "vault.bitwarden.com";
|
||||
|
||||
private AccessibilityNodeInfo _anchorNode = null;
|
||||
private int _lastAnchorX, _lastAnchorY = 0;
|
||||
private int _lastAnchorX = 0;
|
||||
private int _lastAnchorY = 0;
|
||||
private static bool _overlayAnchorObserverRunning = false;
|
||||
private IWindowManager _windowManager = null;
|
||||
private LinearLayout _overlayView = null;
|
||||
@ -64,7 +65,7 @@ namespace Bit.Droid.Accessibility
|
||||
return;
|
||||
}
|
||||
|
||||
// AccessibilityHelpers.PrintTestData(root, e);
|
||||
// AccessibilityHelpers.PrintTestData(RootInActiveWindow, e);
|
||||
|
||||
AccessibilityNodeInfo root = null;
|
||||
|
||||
@ -83,6 +84,7 @@ namespace Bit.Droid.Accessibility
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
var isKnownBroswer = AccessibilityHelpers.SupportedBrowsers.ContainsKey(root.PackageName);
|
||||
if(e.EventType == EventTypes.ViewClicked && isKnownBroswer)
|
||||
{
|
||||
@ -255,8 +257,8 @@ namespace Bit.Droid.Accessibility
|
||||
{
|
||||
return;
|
||||
}
|
||||
_overlayAnchorObserverRunning = true;
|
||||
|
||||
_overlayAnchorObserverRunning = true;
|
||||
_overlayAnchorObserverRunnable = new Java.Lang.Runnable(() =>
|
||||
{
|
||||
if(_overlayAnchorObserverRunning)
|
||||
@ -283,8 +285,8 @@ namespace Bit.Droid.Accessibility
|
||||
{
|
||||
windows = Windows;
|
||||
}
|
||||
var anchorPosition = AccessibilityHelpers.GetOverlayAnchorPosition(_anchorNode, root, windows);
|
||||
|
||||
var anchorPosition = AccessibilityHelpers.GetOverlayAnchorPosition(_anchorNode, root, windows);
|
||||
if(anchorPosition == null)
|
||||
{
|
||||
CancelOverlayPrompt();
|
||||
|
Loading…
Reference in New Issue
Block a user