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
ceffa0be
Commit
ceffa0be
authored
12 years ago
by
Kurt Partridge
Committed by
Android (Google) Code Review
12 years ago
Browse files
Options
Downloads
Plain Diff
Merge "[Rlog79a] Disallow empty feedback messages"
parents
0cafd658
d3f718fc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
java/res/values/research_strings.xml
+3
-0
3 additions, 0 deletions
java/res/values/research_strings.xml
java/src/com/android/inputmethod/research/FeedbackFragment.java
+14
-6
14 additions, 6 deletions
...rc/com/android/inputmethod/research/FeedbackFragment.java
with
17 additions
and
6 deletions
java/res/values/research_strings.xml
+
3
−
0
View file @
ceffa0be
...
...
@@ -23,4 +23,7 @@
<string
name=
"research_splash_content"
translatable=
"false"
></string>
<string
name=
"research_account_type"
translatable=
"false"
></string>
<string
name=
"research_allowed_account_domain"
translatable=
"false"
></string>
<!-- Message informing the user that the feedback string must not be empty [CHAR LIMIT=100] -->
<!-- TODO: remove translatable=false attribute once text is stable -->
<string
name=
"research_feedback_empty_feedback_error_message"
translatable=
"false"
>
The feedback field must not be empty.
</string>
</resources>
This diff is collapsed.
Click to expand it.
java/src/com/android/inputmethod/research/FeedbackFragment.java
+
14
−
6
View file @
ceffa0be
...
...
@@ -20,6 +20,7 @@ import android.app.Activity;
import
android.app.Fragment
;
import
android.os.Bundle
;
import
android.text.Editable
;
import
android.text.TextUtils
;
import
android.util.Log
;
import
android.view.LayoutInflater
;
import
android.view.View
;
...
...
@@ -28,6 +29,7 @@ import android.view.ViewGroup;
import
android.widget.Button
;
import
android.widget.CheckBox
;
import
android.widget.EditText
;
import
android.widget.Toast
;
import
com.android.inputmethod.latin.R
;
...
...
@@ -96,12 +98,18 @@ public class FeedbackFragment extends Fragment implements OnClickListener {
}
else
if
(
view
==
mSendButton
)
{
final
Editable
editable
=
mEditText
.
getText
();
final
String
feedbackContents
=
editable
.
toString
();
final
boolean
isIncludingAccountName
=
isIncludingAccountName
();
researchLogger
.
sendFeedback
(
feedbackContents
,
false
/* isIncludingHistory */
,
isIncludingAccountName
,
hasUserRecording
());
getActivity
().
finish
();
researchLogger
.
setFeedbackDialogBundle
(
null
);
researchLogger
.
onLeavingSendFeedbackDialog
();
if
(
TextUtils
.
isEmpty
(
feedbackContents
))
{
Toast
.
makeText
(
getActivity
(),
R
.
string
.
research_feedback_empty_feedback_error_message
,
Toast
.
LENGTH_LONG
).
show
();
}
else
{
final
boolean
isIncludingAccountName
=
isIncludingAccountName
();
researchLogger
.
sendFeedback
(
feedbackContents
,
false
/* isIncludingHistory */
,
isIncludingAccountName
,
hasUserRecording
());
getActivity
().
finish
();
researchLogger
.
setFeedbackDialogBundle
(
null
);
researchLogger
.
onLeavingSendFeedbackDialog
();
}
}
else
if
(
view
==
mCancelButton
)
{
Log
.
d
(
TAG
,
"Finishing"
);
getActivity
().
finish
();
...
...
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