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
5a50d574
Commit
5a50d574
authored
12 years ago
by
Kurt Partridge
Browse files
Options
Downloads
Patches
Plain Diff
[Rlog13] Add flag to inhibit uploading
Change-Id: I9d22dfb3fbc8332000507c8b97d9072bdd8dda91
parent
cff28c5d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
java/src/com/android/inputmethod/research/UploaderService.java
+6
-1
6 additions, 1 deletion
...src/com/android/inputmethod/research/UploaderService.java
with
6 additions
and
1 deletion
java/src/com/android/inputmethod/research/UploaderService.java
+
6
−
1
View file @
5a50d574
...
@@ -30,6 +30,7 @@ import android.os.Bundle;
...
@@ -30,6 +30,7 @@ import android.os.Bundle;
import
android.util.Log
;
import
android.util.Log
;
import
com.android.inputmethod.latin.R
;
import
com.android.inputmethod.latin.R
;
import
com.android.inputmethod.latin.define.ProductionFlag
;
import
java.io.BufferedReader
;
import
java.io.BufferedReader
;
import
java.io.File
;
import
java.io.File
;
...
@@ -45,6 +46,9 @@ import java.net.URL;
...
@@ -45,6 +46,9 @@ import java.net.URL;
public
final
class
UploaderService
extends
IntentService
{
public
final
class
UploaderService
extends
IntentService
{
private
static
final
String
TAG
=
UploaderService
.
class
.
getSimpleName
();
private
static
final
String
TAG
=
UploaderService
.
class
.
getSimpleName
();
// Set IS_INHIBITING_AUTO_UPLOAD to true for local testing
private
static
final
boolean
IS_INHIBITING_AUTO_UPLOAD
=
false
&&
ProductionFlag
.
IS_EXPERIMENTAL_DEBUG
;
// Force false in production
public
static
final
long
RUN_INTERVAL
=
AlarmManager
.
INTERVAL_HOUR
;
public
static
final
long
RUN_INTERVAL
=
AlarmManager
.
INTERVAL_HOUR
;
private
static
final
String
EXTRA_UPLOAD_UNCONDITIONALLY
=
UploaderService
.
class
.
getName
()
private
static
final
String
EXTRA_UPLOAD_UNCONDITIONALLY
=
UploaderService
.
class
.
getName
()
+
".extra.UPLOAD_UNCONDITIONALLY"
;
+
".extra.UPLOAD_UNCONDITIONALLY"
;
...
@@ -116,7 +120,8 @@ public final class UploaderService extends IntentService {
...
@@ -116,7 +120,8 @@ public final class UploaderService extends IntentService {
}
}
private
void
doUpload
(
final
boolean
isUploadingUnconditionally
)
{
private
void
doUpload
(
final
boolean
isUploadingUnconditionally
)
{
if
(!
isUploadingUnconditionally
&&
(!
isExternallyPowered
()
||
!
hasWifiConnection
()))
{
if
(!
isUploadingUnconditionally
&&
(!
isExternallyPowered
()
||
!
hasWifiConnection
()
||
IS_INHIBITING_AUTO_UPLOAD
))
{
return
;
return
;
}
}
if
(
mFilesDir
==
null
)
{
if
(
mFilesDir
==
null
)
{
...
...
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