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
5774908b
Commit
5774908b
authored
13 years ago
by
Jean Chalard
Browse files
Options
Downloads
Patches
Plain Diff
Give the orders to delete the source files to the dict pack
Bug: 5095140 Change-Id: I64552861768ca30073ffe0d631b2e0c44dad4aa9
parent
d4c08d9b
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 @
5774908b
...
@@ -168,13 +168,17 @@ public class BinaryDictionaryFileDumper {
...
@@ -168,13 +168,17 @@ public class BinaryDictionaryFileDumper {
final
List
<
String
>
idList
=
getDictIdList
(
locale
,
context
);
final
List
<
String
>
idList
=
getDictIdList
(
locale
,
context
);
final
List
<
AssetFileAddress
>
fileAddressList
=
new
ArrayList
<
AssetFileAddress
>();
final
List
<
AssetFileAddress
>
fileAddressList
=
new
ArrayList
<
AssetFileAddress
>();
for
(
String
id
:
idList
)
{
for
(
String
id
:
idList
)
{
final
Uri
dictionaryPack
Uri
=
getProviderUri
(
id
);
final
Uri
wordList
Uri
=
getProviderUri
(
id
);
final
AssetFileDescriptor
afd
=
final
AssetFileDescriptor
afd
=
resolver
.
openAssetFileDescriptor
(
dictionaryPack
Uri
,
"r"
);
resolver
.
openAssetFileDescriptor
(
wordList
Uri
,
"r"
);
if
(
null
==
afd
)
continue
;
if
(
null
==
afd
)
continue
;
final
String
fileName
=
copyFileTo
(
afd
.
createInputStream
(),
final
String
fileName
=
copyFileTo
(
afd
.
createInputStream
(),
getCacheFileName
(
id
,
locale
,
context
));
getCacheFileName
(
id
,
locale
,
context
));
afd
.
close
();
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
));
fileAddressList
.
add
(
AssetFileAddress
.
makeFromFileName
(
fileName
));
}
}
return
fileAddressList
;
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