mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 18:29:23 +02:00
Config.runOnStart() => Config.runOnConnect()
This commit is contained in:
parent
2d2361d078
commit
2d08f9e149
10 changed files with 14 additions and 14 deletions
|
@ -145,7 +145,7 @@ public final class FBReader extends Activity implements ZLApplicationWindow {
|
|||
myBook = null;
|
||||
}
|
||||
}
|
||||
Config.Instance().runOnStart(new Runnable() {
|
||||
Config.Instance().runOnConnect(new Runnable() {
|
||||
public void run() {
|
||||
myFBReaderApp.openBook(myBook, bookmark, action);
|
||||
AndroidFontUtil.clearFontCache();
|
||||
|
@ -201,7 +201,7 @@ public final class FBReader extends Activity implements ZLApplicationWindow {
|
|||
);
|
||||
|
||||
final Config config = Config.Instance();
|
||||
config.runOnStart(new Runnable() {
|
||||
config.runOnConnect(new Runnable() {
|
||||
public void run() {
|
||||
config.requestAllValuesForGroup("Options");
|
||||
config.requestAllValuesForGroup("Style");
|
||||
|
@ -372,7 +372,7 @@ public final class FBReader extends Activity implements ZLApplicationWindow {
|
|||
|
||||
final ZLAndroidLibrary zlibrary = getZLibrary();
|
||||
|
||||
Config.Instance().runOnStart(new Runnable() {
|
||||
Config.Instance().runOnConnect(new Runnable() {
|
||||
public void run() {
|
||||
final boolean showStatusBar = zlibrary.ShowStatusBarOption.getValue();
|
||||
if (showStatusBar != myShowStatusBarFlag) {
|
||||
|
@ -451,7 +451,7 @@ public final class FBReader extends Activity implements ZLApplicationWindow {
|
|||
super.onResume();
|
||||
|
||||
myStartTimer = true;
|
||||
Config.Instance().runOnStart(new Runnable() {
|
||||
Config.Instance().runOnConnect(new Runnable() {
|
||||
public void run() {
|
||||
final int brightnessLevel =
|
||||
getZLibrary().ScreenBrightnessLevelOption.getValue();
|
||||
|
|
|
@ -61,7 +61,7 @@ public final class ConfigShadow extends Config implements ServiceConnection {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void runOnStart(Runnable runnable) {
|
||||
public void runOnConnect(Runnable runnable) {
|
||||
if (myInterface != null) {
|
||||
runnable.run();
|
||||
} else {
|
||||
|
|
|
@ -61,7 +61,7 @@ public class FixBooksDirectoryActivity extends Activity {
|
|||
|
||||
final View selectButton = findViewById(R.id.books_directory_fix_select_button);
|
||||
|
||||
Config.Instance().runOnStart(new Runnable() {
|
||||
Config.Instance().runOnConnect(new Runnable() {
|
||||
public void run() {
|
||||
final ZLStringOption tempDirectoryOption = Paths.TempDirectoryOption();
|
||||
myDirectoryView.setText(tempDirectoryOption.getValue());
|
||||
|
|
|
@ -64,7 +64,7 @@ public class BookCollectionShadow extends AbstractBookCollection implements Serv
|
|||
public synchronized void bindToService(Context context, Runnable onBindAction) {
|
||||
if (myInterface != null && myContext == context) {
|
||||
if (onBindAction != null) {
|
||||
Config.Instance().runOnStart(onBindAction);
|
||||
Config.Instance().runOnConnect(onBindAction);
|
||||
}
|
||||
} else {
|
||||
if (onBindAction != null) {
|
||||
|
@ -462,7 +462,7 @@ public class BookCollectionShadow extends AbstractBookCollection implements Serv
|
|||
public synchronized void onServiceConnected(ComponentName name, IBinder service) {
|
||||
myInterface = LibraryInterface.Stub.asInterface(service);
|
||||
while (!myOnBindActions.isEmpty()) {
|
||||
Config.Instance().runOnStart(myOnBindActions.remove(0));
|
||||
Config.Instance().runOnConnect(myOnBindActions.remove(0));
|
||||
}
|
||||
if (myContext != null) {
|
||||
myContext.registerReceiver(myReceiver, new IntentFilter(LibraryService.BOOK_EVENT_ACTION));
|
||||
|
|
|
@ -95,7 +95,7 @@ public class LibraryService extends Service {
|
|||
}
|
||||
|
||||
public void reset(final boolean force) {
|
||||
Config.Instance().runOnStart(new Runnable() {
|
||||
Config.Instance().runOnConnect(new Runnable() {
|
||||
public void run() {
|
||||
resetInternal(force);
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ public abstract class Util implements UserRegistrationConstants {
|
|||
return;
|
||||
}
|
||||
|
||||
Config.Instance().runOnStart(new Runnable() {
|
||||
Config.Instance().runOnConnect(new Runnable() {
|
||||
public void run() {
|
||||
UIUtil.wait("loadingNetworkLibrary", new Runnable() {
|
||||
public void run() {
|
||||
|
|
|
@ -129,7 +129,7 @@ abstract class ZLPreferenceActivity extends android.preference.PreferenceActivit
|
|||
myScreen = getPreferenceManager().createPreferenceScreen(this);
|
||||
|
||||
final Intent intent = getIntent();
|
||||
Config.Instance().runOnStart(new Runnable() {
|
||||
Config.Instance().runOnConnect(new Runnable() {
|
||||
public void run() {
|
||||
init(intent);
|
||||
}
|
||||
|
|
|
@ -151,7 +151,7 @@ public class TipsManager {
|
|||
|
||||
myDownloadInProgress = true;
|
||||
|
||||
Config.Instance().runOnStart(new Runnable() {
|
||||
Config.Instance().runOnConnect(new Runnable() {
|
||||
public void run() {
|
||||
final File tipsFile = new File(getLocalFilePath());
|
||||
tipsFile.getParentFile().mkdirs();
|
||||
|
|
|
@ -47,7 +47,7 @@ public final class ZLKeyBindings {
|
|||
|
||||
private ZLKeyBindings(String name) {
|
||||
myName = name;
|
||||
Config.Instance().runOnStart(new Initializer());
|
||||
Config.Instance().runOnConnect(new Initializer());
|
||||
}
|
||||
|
||||
private class Initializer implements Runnable {
|
||||
|
|
|
@ -100,7 +100,7 @@ public abstract class Config {
|
|||
}
|
||||
|
||||
public abstract boolean isInitialized();
|
||||
public abstract void runOnStart(Runnable runnable);
|
||||
public abstract void runOnConnect(Runnable runnable);
|
||||
|
||||
public abstract List<String> listGroups();
|
||||
public abstract List<String> listNames(String group);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue