class moved
This commit is contained in:
parent
bfe89e893d
commit
3a55ff6fb7
@ -1,4 +1,4 @@
|
||||
package org.solovyev.android.calculator;
|
||||
package org.solovyev.android;
|
||||
|
||||
import android.app.Application;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@ -18,9 +18,16 @@ public final class App {
|
||||
*
|
||||
**********************************************************************
|
||||
*/
|
||||
|
||||
@NotNull
|
||||
public static final App instance = new App();
|
||||
|
||||
@NotNull
|
||||
public static App getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
**********************************************************************
|
||||
*
|
||||
@ -40,22 +47,8 @@ public final class App {
|
||||
private App() {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static App getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Application getApplication() {
|
||||
return application;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public DelayedExecutor getUiThreadExecutor() {
|
||||
return uiThreadExecutor;
|
||||
}
|
||||
|
||||
void init(@NotNull Application application) {
|
||||
public void init(@NotNull Application application) {
|
||||
if (!initialized) {
|
||||
this.application = application;
|
||||
this.uiThreadExecutor = new UiThreadExecutor();
|
||||
@ -63,4 +56,14 @@ public final class App {
|
||||
this.initialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public <A extends Application> A getApplication() {
|
||||
return (A) application;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public DelayedExecutor getUiThreadExecutor() {
|
||||
return uiThreadExecutor;
|
||||
}
|
||||
}
|
@ -1,8 +1,7 @@
|
||||
package org.solovyev.android.calculator;
|
||||
package org.solovyev.android;
|
||||
|
||||
import android.os.Handler;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.solovyev.android.AndroidUtils;
|
||||
import org.solovyev.common.DelayedExecutor;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
@ -5,6 +5,7 @@ import android.content.Intent;
|
||||
import android.os.Parcelable;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.solovyev.android.App;
|
||||
import org.solovyev.android.calculator.*;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
@ -9,7 +9,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.simpleframework.xml.Serializer;
|
||||
import org.simpleframework.xml.core.Persister;
|
||||
import org.solovyev.android.calculator.App;
|
||||
import org.solovyev.android.App;
|
||||
import org.solovyev.android.calculator.MathEntityDao;
|
||||
import org.solovyev.android.calculator.MathEntityPersistenceContainer;
|
||||
import org.solovyev.android.calculator.MathPersistenceEntity;
|
||||
|
@ -8,7 +8,7 @@ import android.preference.PreferenceManager;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.solovyev.android.AndroidUtils2;
|
||||
import org.solovyev.android.calculator.AbstractFixableError;
|
||||
import org.solovyev.android.calculator.App;
|
||||
import org.solovyev.android.App;
|
||||
import org.solovyev.android.calculator.FixableMessage;
|
||||
import org.solovyev.android.calculator.FixableMessagesDialog;
|
||||
import org.solovyev.android.calculator.CalculatorPreferences;
|
||||
|
@ -15,6 +15,7 @@ import org.achartengine.ChartFactory;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.solovyev.android.AndroidUtils2;
|
||||
import org.solovyev.android.App;
|
||||
import org.solovyev.android.calculator.about.CalculatorAboutActivity;
|
||||
import org.solovyev.android.calculator.function.FunctionEditDialogFragment;
|
||||
import org.solovyev.android.calculator.help.CalculatorHelpActivity;
|
||||
|
@ -14,6 +14,7 @@ import org.acra.ReportingInteractionMode;
|
||||
import org.acra.annotation.ReportsCrashes;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.solovyev.android.AndroidUtils2;
|
||||
import org.solovyev.android.App;
|
||||
import org.solovyev.android.ads.AdsController;
|
||||
import org.solovyev.android.calculator.external.AndroidExternalListenersContainer;
|
||||
import org.solovyev.android.calculator.history.AndroidCalculatorHistory;
|
||||
|
@ -10,7 +10,7 @@ import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
import android.widget.ZoomButtonsController;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.solovyev.android.calculator.App;
|
||||
import org.solovyev.android.App;
|
||||
|
||||
import javax.microedition.khronos.opengles.GL10;
|
||||
import javax.microedition.khronos.opengles.GL11;
|
||||
|
Loading…
Reference in New Issue
Block a user