• R/O
  • SSH
  • HTTPS

merlin: コミット


コミットメタ情報

リビジョン3 (tree)
日時2016-09-28 13:39:53
作者hirukawa_ryo

ログメッセージ

(メッセージはありません)

変更サマリ

差分

--- Merlin/library/src/main/java/net/osdn/merlin/core/ApplicationActivity.java (revision 2)
+++ Merlin/library/src/main/java/net/osdn/merlin/core/ApplicationActivity.java (revision 3)
@@ -38,7 +38,6 @@
3838 }
3939 onInitializeStaticFields();
4040 super.onCreate(savedInstanceState);
41-
4241 }
4342
4443 protected void onInitializeStaticFields() {
@@ -154,16 +153,22 @@
154153 super.onConfigurationChanged(newConfig);
155154 }
156155
157- protected void run(Class<? extends State> stateClass) {
156+ protected void transitTo(Class<? extends State> stateClass) {
158157 State state = StateManager.getInstance(stateClass);
159- run(state);
158+ transitTo(state);
160159 }
161160
162- protected void run(State state) {
161+ protected void transitTo(State state) {
163162 if(DEBUG) {
164163 Log.d(TAG, "run: state=" + state);
165164 }
166165
166+ if(state == null) {
167+
168+ }
169+
170+ state.setContext(context);
171+
167172 EventDispatcher dispatcher = new EventDispatcher();
168173 Log.d(TAG, "#1");
169174 dispatcher.start();
@@ -172,8 +177,6 @@
172177 Log.d(TAG, "#3");
173178 }
174179
175-
176-
177180 public static Context getContext() {
178181 return context;
179182 }
--- Merlin/library/src/main/java/net/osdn/merlin/core/State.java (revision 2)
+++ Merlin/library/src/main/java/net/osdn/merlin/core/State.java (revision 3)
@@ -1,4 +1,16 @@
11 package net.osdn.merlin.core;
22
3+import android.content.Context;
4+
35 public class State {
6+
7+ private Context context;
8+
9+ protected void setContext(Context context) {
10+ this.context = context;
11+ }
12+
13+ public Context getContext() {
14+ return this.context;
15+ }
416 }
旧リポジトリブラウザで表示