Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
App Manager
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
6
Snippets
Groups
Projects
Show more breadcrumbs
Muntashir Al-Islam
App Manager
Commits
adf8ba0e
Commit
adf8ba0e
authored
1 month ago
by
Muntashir Al-Islam
Browse files
Options
Downloads
Patches
Plain Diff
[UITracker] Fix clicking on the icon after it is iconified
Signed-off-by:
Muntashir Al-Islam
<
muntashirakon@riseup.net
>
parent
2bfed265
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/src/main/java/io/github/muntashirakon/AppManager/accessibility/activity/TrackerWindow.java
+5
-7
5 additions, 7 deletions
...akon/AppManager/accessibility/activity/TrackerWindow.java
with
5 additions
and
7 deletions
app/src/main/java/io/github/muntashirakon/AppManager/accessibility/activity/TrackerWindow.java
+
5
−
7
View file @
adf8ba0e
...
...
@@ -62,7 +62,6 @@ public class TrackerWindow implements View.OnTouchListener {
private
boolean
mPaused
=
false
;
private
boolean
mIconified
=
false
;
private
boolean
mViewAttached
=
false
;
private
boolean
mDragging
=
false
;
@Nullable
private
Future
<?>
mClassHierarchyResult
;
...
...
@@ -154,13 +153,11 @@ public class TrackerWindow implements View.OnTouchListener {
Point
point
;
int
action
=
event
.
getAction
();
if
(
action
==
MotionEvent
.
ACTION_DOWN
)
{
mDragging
=
false
;
point
=
new
Point
((
int
)
event
.
getRawX
(),
(
int
)
event
.
getRawY
());
mPressPosition
.
set
(
point
.
x
,
point
.
y
);
mWindowPosition
.
set
(
mWindowLayoutParams
.
x
,
mWindowLayoutParams
.
y
);
return
true
;
}
else
if
(
action
==
MotionEvent
.
ACTION_MOVE
)
{
mDragging
=
true
;
point
=
new
Point
((
int
)
event
.
getRawX
(),
(
int
)
event
.
getRawY
());
int
delX
=
point
.
x
-
mPressPosition
.
x
;
int
delY
=
point
.
y
-
mPressPosition
.
y
;
...
...
@@ -169,10 +166,10 @@ public class TrackerWindow implements View.OnTouchListener {
updateLayout
();
return
true
;
}
if
(
!
mDragging
&&
v
==
mIconView
&&
action
==
MotionEvent
.
ACTION_UP
)
{
if
(
v
==
mIconView
&&
action
==
MotionEvent
.
ACTION_UP
)
{
point
=
new
Point
((
int
)
event
.
getRawX
(),
(
int
)
event
.
getRawY
());
int
delX
=
point
.
x
-
mPressPosition
.
x
;
int
delY
=
point
.
y
-
mPressPosition
.
y
;
int
delX
=
Math
.
abs
(
point
.
x
-
mPressPosition
.
x
)
;
int
delY
=
Math
.
abs
(
point
.
y
-
mPressPosition
.
y
)
;
if
(
delX
<
1
&&
delY
<
1
)
{
v
.
performClick
();
return
true
;
...
...
@@ -191,7 +188,8 @@ public class TrackerWindow implements View.OnTouchListener {
CharSequence
packageName
=
event
.
getPackageName
();
if
(
packageName
!=
null
&&
BuildConfig
.
APPLICATION_ID
.
contentEquals
(
packageName
))
{
// On some devices, this window always gets the focus
if
(
"android.widget.EditText"
.
contentEquals
(
event
.
getClassName
()))
{
CharSequence
className
=
event
.
getClassName
();
if
(
className
!=
null
&&
"android.widget.EditText"
.
contentEquals
(
className
))
{
// For some reason, only this class is focused
if
(
event
.
getSource
()
==
null
)
{
// No class hierarchy. This is the intended event
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment