Simple Notepad Application for Android OS
Revisión | 3d3b17d5322aa598c1ee68385d1aca9a210bbaa3 (tree) |
---|---|
Tiempo | 2017-08-19 13:29:46 |
Autor | Masahiko, SAWAI <say@user...> |
Commiter | Masahiko, SAWAI |
Changed the frequency of starting the database optimizer.
@@ -69,6 +69,7 @@ public class NotepadActivity extends Activity implements NotepadConstants, | ||
69 | 69 | { |
70 | 70 | |
71 | 71 | public static final String ACTION_QUIT = NotepadActivity.class.getPackage().getName() + ".ACTION_QUIT"; |
72 | + private static final int DB_OPTIMIZER_COUNT = 128; | |
72 | 73 | private static final String FT_NOTE_DETAIL = "FT_NOTE_DETAIL"; |
73 | 74 | private static final String FT_NOTE_TEMPLATE_PICKER = "FT_NOTE_TEMPLATE_PICKER"; |
74 | 75 | private static final String LOG_TAG = "simple-notepad"; |
@@ -194,7 +195,7 @@ public class NotepadActivity extends Activity implements NotepadConstants, | ||
194 | 195 | Log.v(LOG_TAG, "Hello"); |
195 | 196 | |
196 | 197 | int quitCount = NotepadPreferenceUtils.incrementQuitCount(this); |
197 | - if (quitCount % 64 == 0) | |
198 | + if ((quitCount % DB_OPTIMIZER_COUNT) == 0) | |
198 | 199 | { |
199 | 200 | Intent noteDBOptimizerIntent = new Intent(this, NoteDBOptimizer.class); |
200 | 201 | startService(noteDBOptimizerIntent); |
@@ -68,6 +68,7 @@ public class NotepadActivity extends ListActivity | ||
68 | 68 | NotepadConstants |
69 | 69 | { |
70 | 70 | |
71 | + private static final int DB_OPTIMIZER_COUNT = 128; | |
71 | 72 | private static final String LOG_TAG = "simple-notepad"; |
72 | 73 | private static final String ACTION_QUIT = NotepadConstants.class.getPackage().getName() + ".QUIT"; |
73 | 74 | private static final String SAVE_KEY_ACTION_MODE = "ACTION_MODE"; |
@@ -218,7 +219,7 @@ public class NotepadActivity extends ListActivity | ||
218 | 219 | } |
219 | 220 | |
220 | 221 | int quitCount = NotepadPreferenceUtils.incrementQuitCount(this); |
221 | - if (quitCount % 64 == 0) | |
222 | + if ((quitCount % DB_OPTIMIZER_COUNT) == 0) | |
222 | 223 | { |
223 | 224 | Intent noteDBOptimizerIntent = new Intent(this, NoteDBOptimizer.class); |
224 | 225 | startService(noteDBOptimizerIntent); |