• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Simple Notepad Application for Android OS


Commit MetaInfo

Revisión3d3b17d5322aa598c1ee68385d1aca9a210bbaa3 (tree)
Tiempo2017-08-19 13:29:46
AutorMasahiko, SAWAI <say@user...>
CommiterMasahiko, SAWAI

Log Message

Changed the frequency of starting the database optimizer.

Cambiar Resumen

Diferencia incremental

--- a/notepad-app-level-11/src/main/java/org/routine_work/notepad/NotepadActivity.java
+++ b/notepad-app-level-11/src/main/java/org/routine_work/notepad/NotepadActivity.java
@@ -69,6 +69,7 @@ public class NotepadActivity extends Activity implements NotepadConstants,
6969 {
7070
7171 public static final String ACTION_QUIT = NotepadActivity.class.getPackage().getName() + ".ACTION_QUIT";
72+ private static final int DB_OPTIMIZER_COUNT = 128;
7273 private static final String FT_NOTE_DETAIL = "FT_NOTE_DETAIL";
7374 private static final String FT_NOTE_TEMPLATE_PICKER = "FT_NOTE_TEMPLATE_PICKER";
7475 private static final String LOG_TAG = "simple-notepad";
@@ -194,7 +195,7 @@ public class NotepadActivity extends Activity implements NotepadConstants,
194195 Log.v(LOG_TAG, "Hello");
195196
196197 int quitCount = NotepadPreferenceUtils.incrementQuitCount(this);
197- if (quitCount % 64 == 0)
198+ if ((quitCount % DB_OPTIMIZER_COUNT) == 0)
198199 {
199200 Intent noteDBOptimizerIntent = new Intent(this, NoteDBOptimizer.class);
200201 startService(noteDBOptimizerIntent);
--- a/notepad-app/src/main/java/org/routine_work/notepad/NotepadActivity.java
+++ b/notepad-app/src/main/java/org/routine_work/notepad/NotepadActivity.java
@@ -68,6 +68,7 @@ public class NotepadActivity extends ListActivity
6868 NotepadConstants
6969 {
7070
71+ private static final int DB_OPTIMIZER_COUNT = 128;
7172 private static final String LOG_TAG = "simple-notepad";
7273 private static final String ACTION_QUIT = NotepadConstants.class.getPackage().getName() + ".QUIT";
7374 private static final String SAVE_KEY_ACTION_MODE = "ACTION_MODE";
@@ -218,7 +219,7 @@ public class NotepadActivity extends ListActivity
218219 }
219220
220221 int quitCount = NotepadPreferenceUtils.incrementQuitCount(this);
221- if (quitCount % 64 == 0)
222+ if ((quitCount % DB_OPTIMIZER_COUNT) == 0)
222223 {
223224 Intent noteDBOptimizerIntent = new Intent(this, NoteDBOptimizer.class);
224225 startService(noteDBOptimizerIntent);