Merge "Fix for build breakage"

main
Jae Yong Sung 2010-07-28 12:02:34 -07:00 committed by Android (Google) Code Review
commit d0f4413f95
1 changed files with 3 additions and 2 deletions

View File

@ -36,10 +36,11 @@ public class SuggestHelper {
public SuggestHelper(String tag, Context context, int[] resId) { public SuggestHelper(String tag, Context context, int[] resId) {
TAG = tag; TAG = tag;
InputStream[] res = null;
try { try {
// merging separated dictionary into one if dictionary is separated // merging separated dictionary into one if dictionary is separated
int total = 0; int total = 0;
InputStream[] res = new InputStream[resId.length]; res = new InputStream[resId.length];
for (int i = 0; i < resId.length; i++) { for (int i = 0; i < resId.length; i++) {
res[i] = context.getResources().openRawResource(resId[i]); res[i] = context.getResources().openRawResource(resId[i]);
total += res[i].available(); total += res[i].available();
@ -61,7 +62,7 @@ public class SuggestHelper {
Log.w(TAG, "No available memory for binary dictionary"); Log.w(TAG, "No available memory for binary dictionary");
} finally { } finally {
try { try {
for (int i = 0;i < is.length; i++) { for (int i = 0;i < res.length; i++) {
res[i].close(); res[i].close();
} }
} catch (IOException e) { } catch (IOException e) {