move migration away from ui thread
This commit is contained in:
parent
9a029af8dd
commit
62595b2553
1 changed files with 12 additions and 2 deletions
|
@ -174,8 +174,18 @@ public class BRouterView extends View {
|
||||||
// new init is done move old files
|
// new init is done move old files
|
||||||
if (waitingForMigration) {
|
if (waitingForMigration) {
|
||||||
Log.d("BR", "path " + oldMigrationPath + " " + basedir);
|
Log.d("BR", "path " + oldMigrationPath + " " + basedir);
|
||||||
|
Thread t = new Thread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
if (!oldMigrationPath.equals(basedir + "/brouter"))
|
if (!oldMigrationPath.equals(basedir + "/brouter"))
|
||||||
moveFolders(oldMigrationPath, basedir + "/brouter");
|
moveFolders(oldMigrationPath, basedir + "/brouter");
|
||||||
|
}});
|
||||||
|
t.start();
|
||||||
|
try {
|
||||||
|
t.join(500);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
waitingForMigration = false;
|
waitingForMigration = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue