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
f102f6a3
Commit
f102f6a3
authored
13 years ago
by
Jean Chalard
Committed by
Android (Google) Code Review
13 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Give the orders to delete the source files to the dict pack"
parents
635f68e8
5774908b
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/latin/BinaryDictionaryFileDumper.java
+6
-2
6 additions, 2 deletions
...android/inputmethod/latin/BinaryDictionaryFileDumper.java
with
6 additions
and
2 deletions
java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java
+
6
−
2
View file @
f102f6a3
...
...
@@ -168,13 +168,17 @@ public class BinaryDictionaryFileDumper {
final
List
<
String
>
idList
=
getDictIdList
(
locale
,
context
);
final
List
<
AssetFileAddress
>
fileAddressList
=
new
ArrayList
<
AssetFileAddress
>();
for
(
String
id
:
idList
)
{
final
Uri
dictionaryPack
Uri
=
getProviderUri
(
id
);
final
Uri
wordList
Uri
=
getProviderUri
(
id
);
final
AssetFileDescriptor
afd
=
resolver
.
openAssetFileDescriptor
(
dictionaryPack
Uri
,
"r"
);
resolver
.
openAssetFileDescriptor
(
wordList
Uri
,
"r"
);
if
(
null
==
afd
)
continue
;
final
String
fileName
=
copyFileTo
(
afd
.
createInputStream
(),
getCacheFileName
(
id
,
locale
,
context
));
afd
.
close
();
if
(
0
>=
resolver
.
delete
(
wordListUri
,
null
,
null
))
{
// I'd rather not print the word list ID to the log here out of security concerns
Log
.
e
(
TAG
,
"Could not have the dictionary pack delete a word list"
);
}
fileAddressList
.
add
(
AssetFileAddress
.
makeFromFileName
(
fileName
));
}
return
fileAddressList
;
...
...
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