Skip to content

Commit

Permalink
Check for active translation
Browse files Browse the repository at this point in the history
  • Loading branch information
uholeschak committed Jan 15, 2025
1 parent 2c2aa14 commit f5b5b98
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
11 changes: 11 additions & 0 deletions BmwDeepObd/EdiabasToolActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -966,10 +966,21 @@ public override bool OnOptionsItemSelected(IMenuItem item)

public override bool IsFinishAllowed()
{
if (_activityCommon == null)
{
return true;
}

if (IsJobRunning())
{
return false;
}

if (_activityCommon.TranslateActive)
{
return false;
}

return true;
}

Expand Down
15 changes: 15 additions & 0 deletions BmwDeepObd/TranslateKeyActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,21 @@ public override bool OnOptionsItemSelected(IMenuItem item)
return base.OnOptionsItemSelected(item);
}

public override bool IsFinishAllowed()
{
if (_activityCommon == null)
{
return true;
}

if (_activityCommon.TranslateActive)
{
return false;
}

return true;
}

public bool OnTouch(View v, MotionEvent e)
{
switch (e.Action)
Expand Down

0 comments on commit f5b5b98

Please sign in to comment.