From 5e80e699c4369d3f4604728952ac3d4bc0bae23a Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Wed, 4 Dec 2013 12:47:05 +0900 Subject: [RF1] Remove files that don't match the expected format, step 1 This implements the skeleton implementation, and enables a fallback implementation in the case the file is coming from the dictionary provider. - A better scheme should be used for provider-supplied dicts. - This does not implement the solution for device-generated dicts yet. This will come in a future change. - This does not implement the checking process on the native side yet. This will come in a future change. Bug: 11281748 Change-Id: Ifa6e237d19dfbffe503e3674915480ea867b0ddf --- java/src/com/android/inputmethod/latin/AssetFileAddress.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'java/src/com/android/inputmethod/latin/AssetFileAddress.java') diff --git a/java/src/com/android/inputmethod/latin/AssetFileAddress.java b/java/src/com/android/inputmethod/latin/AssetFileAddress.java index 875192554..855a8d8c7 100644 --- a/java/src/com/android/inputmethod/latin/AssetFileAddress.java +++ b/java/src/com/android/inputmethod/latin/AssetFileAddress.java @@ -52,4 +52,12 @@ public final class AssetFileAddress { if (!f.isFile()) return null; return new AssetFileAddress(filename, offset, length); } + + public boolean pointsToPhysicalFile() { + return 0 == mOffset; + } + + public void deleteUnderlyingFile() { + new File(mFilename).delete(); + } } -- cgit v1.2.3-83-g751a