Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LatinIME
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
keyboard
LatinIME
Commits
9182daf9
Commit
9182daf9
authored
12 years ago
by
Satoshi Kataoka
Browse files
Options
Downloads
Patches
Plain Diff
Output detailed log in ProximityInfoState
Change-Id: If6a254e2a116d1b6812f448d38139b7656168be6
parent
64c65ce6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
native/jni/src/proximity_info_state.cpp
+21
-0
21 additions, 0 deletions
native/jni/src/proximity_info_state.cpp
with
21 additions
and
0 deletions
native/jni/src/proximity_info_state.cpp
+
21
−
0
View file @
9182daf9
...
...
@@ -98,6 +98,10 @@ void ProximityInfoState::initInputParams(const int pointerId, const float maxPoi
mDistanceCache
.
clear
();
mNearKeysVector
.
clear
();
}
if
(
DEBUG_GEO_FULL
)
{
AKLOGI
(
"Init ProximityInfoState: reused points = %d, last input size = %d"
,
pushTouchPointStartIndex
,
lastSavedInputSize
);
}
mInputSize
=
0
;
if
(
xCoordinates
&&
yCoordinates
)
{
...
...
@@ -109,6 +113,9 @@ void ProximityInfoState::initInputParams(const int pointerId, const float maxPoi
lastInputIndex
=
i
;
}
}
if
(
DEBUG_GEO_FULL
)
{
AKLOGI
(
"Init ProximityInfoState: last input index = %d"
,
lastInputIndex
);
}
// Working space to save near keys distances for current, prev and prevprev input point.
NearKeysDistanceMap
nearKeysDistances
[
3
];
// These pointers are swapped for each inputs points.
...
...
@@ -119,6 +126,9 @@ void ProximityInfoState::initInputParams(const int pointerId, const float maxPoi
for
(
int
i
=
pushTouchPointStartIndex
;
i
<=
lastInputIndex
;
++
i
)
{
// Assuming pointerId == 0 if pointerIds is null.
const
int
pid
=
pointerIds
?
pointerIds
[
i
]
:
0
;
if
(
DEBUG_GEO_FULL
)
{
AKLOGI
(
"Init ProximityInfoState: (%d)PID = %d"
,
i
,
pid
);
}
if
(
pointerId
==
pid
)
{
const
int
c
=
isGeometric
?
NOT_A_COORDINATE
:
getPrimaryCharAt
(
i
);
const
int
x
=
proximityOnly
?
NOT_A_COORDINATE
:
xCoordinates
[
i
];
...
...
@@ -367,6 +377,13 @@ bool ProximityInfoState::pushTouchPoint(const int inputIndex, const int nodeChar
if
(
isLastPoint
)
{
if
(
size
>
0
&&
getDistanceFloat
(
x
,
y
,
mInputXs
.
back
(),
mInputYs
.
back
())
<
mProximityInfo
->
getMostCommonKeyWidth
()
*
LAST_POINT_SKIP_DISTANCE_SCALE
)
{
if
(
DEBUG_GEO_FULL
)
{
AKLOGI
(
"p0: size = %zd, x = %d, y = %d, lx = %d, ly = %d, dist = %f, "
"width = %f"
,
size
,
x
,
y
,
mInputXs
.
back
(),
mInputYs
.
back
(),
getDistanceFloat
(
x
,
y
,
mInputXs
.
back
(),
mInputYs
.
back
()),
mProximityInfo
->
getMostCommonKeyWidth
()
*
LAST_POINT_SKIP_DISTANCE_SCALE
);
}
return
popped
;
}
else
if
(
size
>
1
)
{
int
minChar
=
0
;
...
...
@@ -380,6 +397,10 @@ bool ProximityInfoState::pushTouchPoint(const int inputIndex, const int nodeChar
}
NearKeysDistanceMap
::
const_iterator
itPP
=
prevNearKeysDistances
->
find
(
minChar
);
if
(
DEBUG_GEO_FULL
)
{
AKLOGI
(
"p1: char = %c, minDist = %f, prevNear key minDist = %f"
,
minChar
,
itPP
->
second
,
minDist
);
}
if
(
itPP
!=
prevNearKeysDistances
->
end
()
&&
minDist
>
itPP
->
second
)
{
return
popped
;
}
...
...
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