protect first app start
This commit is contained in:
parent
6ae9a0a65f
commit
d347fecdd2
@ -487,12 +487,12 @@ public class BRouterActivity extends AppCompatActivity implements ActivityCompat
|
|||||||
return checked;
|
return checked;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void selectProfile(String[] items) {
|
public void selectProfile(String[] items, boolean showDialog) {
|
||||||
availableProfiles = items;
|
availableProfiles = items;
|
||||||
Arrays.sort(availableProfiles);
|
Arrays.sort(availableProfiles);
|
||||||
|
|
||||||
// show main dialog
|
// show main dialog
|
||||||
showADialog(DIALOG_MAINACTION_ID);
|
if (showDialog) showADialog(DIALOG_MAINACTION_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void startDownloadManager() {
|
public void startDownloadManager() {
|
||||||
|
|||||||
@ -250,11 +250,12 @@ public class BRouterView extends View {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (!RoutingHelper.hasDirectoryAnyDatafiles(segmentDir)) {
|
if (!RoutingHelper.hasDirectoryAnyDatafiles(segmentDir)) {
|
||||||
|
((BRouterActivity) getContext()).selectProfile(profiles.toArray(new String[0]), false);
|
||||||
((BRouterActivity) getContext()).startDownloadManager();
|
((BRouterActivity) getContext()).startDownloadManager();
|
||||||
waitingForSelection = true;
|
waitingForSelection = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
((BRouterActivity) getContext()).selectProfile(profiles.toArray(new String[0]));
|
((BRouterActivity) getContext()).selectProfile(profiles.toArray(new String[0]), true);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
String msg = e instanceof IllegalArgumentException ? e.getMessage()
|
String msg = e instanceof IllegalArgumentException ? e.getMessage()
|
||||||
+ (cor == null ? "" : " (coordinate-source: " + cor.basedir + cor.rootdir + ")") : e.toString();
|
+ (cor == null ? "" : " (coordinate-source: " + cor.basedir + cor.rootdir + ")") : e.toString();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user