mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
fix so process restarts after archive loaded
This commit is contained in:
parent
08a8bc4189
commit
e516dbcf66
1 changed files with 5 additions and 4 deletions
|
@ -116,18 +116,19 @@ public class ZipUtils {
|
||||||
Log.d( TAG, "getHasWhats() => %s", result );
|
Log.d( TAG, "getHasWhats() => %s", result );
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Return true if anything is loaded/changed, as caller will use result to
|
||||||
|
// decide whether to restart process.
|
||||||
public static boolean load( Context context, Uri uri,
|
public static boolean load( Context context, Uri uri,
|
||||||
final List<SaveWhat> whats )
|
final List<SaveWhat> whats )
|
||||||
{
|
{
|
||||||
Log.d( TAG, "load(%s)", whats );
|
|
||||||
boolean result = false;
|
boolean result = false;
|
||||||
try {
|
try {
|
||||||
result = iterate( context, uri, new EntryIter() {
|
result = iterate( context, uri, new EntryIter() {
|
||||||
@Override
|
@Override
|
||||||
public boolean withEntry( ZipInputStream zis, SaveWhat what )
|
public boolean withEntry( ZipInputStream zis, SaveWhat what )
|
||||||
throws FileNotFoundException, IOException {
|
throws FileNotFoundException, IOException {
|
||||||
boolean success = false;
|
boolean success = true;
|
||||||
if ( whats.contains( what ) ) {
|
if ( whats.contains( what ) ) {
|
||||||
switch ( what ) {
|
switch ( what ) {
|
||||||
case COLORS:
|
case COLORS:
|
||||||
|
@ -151,7 +152,7 @@ public class ZipUtils {
|
||||||
Log.ex( TAG, ex );
|
Log.ex( TAG, ex );
|
||||||
result = false;
|
result = false;
|
||||||
}
|
}
|
||||||
|
Log.d( TAG, "load(%s) => %b", whats, result );
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue