Commit 546f8509 by Kazuyuki Hida

コメントを追加

parent 039e677f
...@@ -205,6 +205,11 @@ public class AgreementToTermsActivity extends ABVUIActivity { ...@@ -205,6 +205,11 @@ public class AgreementToTermsActivity extends ABVUIActivity {
PreferenceUtil.putUserPref(context, ABookKeys.AGREEMENT_TO_TERMS_VERSION, version); PreferenceUtil.putUserPref(context, ABookKeys.AGREEMENT_TO_TERMS_VERSION, version);
} }
/**
* 規約同意バージョンをクリア(動作確認時に使用するために残しておく)
*
* @param context
*/
public static void clearVersion(Context context) { public static void clearVersion(Context context) {
PreferenceUtil.removeUserPref(context, ABookKeys.AGREEMENT_TO_TERMS_VERSION); PreferenceUtil.removeUserPref(context, ABookKeys.AGREEMENT_TO_TERMS_VERSION);
} }
......
...@@ -101,7 +101,11 @@ public class LoginActivity extends ABVLoginActivity { ...@@ -101,7 +101,11 @@ public class LoginActivity extends ABVLoginActivity {
private InputMethodManager imm; private InputMethodManager imm;
private static List<LoginActivity> pendingActivityList = new ArrayList<>(); /**
* 規約同意画面をActivityで実装したため、LoginActivityをfinish()するタイミングが変わったので、
* それを調整するため、その管理をするために内部にスタックを持たせた。
*/
private static final List<LoginActivity> pendingActivityList = new ArrayList<>();
@Override @Override
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
...@@ -290,9 +294,13 @@ public class LoginActivity extends ABVLoginActivity { ...@@ -290,9 +294,13 @@ public class LoginActivity extends ABVLoginActivity {
@Override @Override
public void onPause() { public void onPause() {
super.onPause(); super.onPause();
// 後でfinishする
pendingActivityList.add(this); pendingActivityList.add(this);
} }
/**
* スタックに含まれたLoginActivityをfinish()
*/
public static void finishPendingActivity() { public static void finishPendingActivity() {
while (pendingActivityList.size() > 0) { while (pendingActivityList.size() > 0) {
LoginActivity activity = pendingActivityList.remove(pendingActivityList.size() - 1); LoginActivity activity = pendingActivityList.remove(pendingActivityList.size() - 1);
...@@ -300,10 +308,6 @@ public class LoginActivity extends ABVLoginActivity { ...@@ -300,10 +308,6 @@ public class LoginActivity extends ABVLoginActivity {
} }
} }
public static void clearPendingActivity() {
pendingActivityList.clear();
}
@Override @Override
public boolean onKeyUp(int keyCode, KeyEvent event) { public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) { if (keyCode == KeyEvent.KEYCODE_BACK) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment