diff options
| author | Jules Aguillon | 2023-08-15 20:23:33 +0200 |
|---|---|---|
| committer | Jules Aguillon | 2023-08-16 12:21:40 +0200 |
| commit | 5822f98bbbc3b96a90ff09551de8252ca18bca22 (patch) | |
| tree | b9463b52a746149a889a7f83c0fea694bbbf6888 /srcs/juloo.keyboard2/Logs.java | |
| parent | 613aa283bdcab3d8d6e26fbe08aedcc49a8fe571 (diff) | |
| download | unexpected-keyboard-5822f98bbbc3b96a90ff09551de8252ca18bca22.tar.gz unexpected-keyboard-5822f98bbbc3b96a90ff09551de8252ca18bca22.zip | |
Migrate layouts preferences
The new `layouts` preference replaces three previous preferences:
layout
second_layout
custom_layout
Add a preference migration function, which first migration is to
migrate layouts into the new preference.
The migration must also be called from the SettingsActivity as it might
use a different preference store due to the boot-aware preference copy.
Diffstat (limited to 'srcs/juloo.keyboard2/Logs.java')
| -rw-r--r-- | srcs/juloo.keyboard2/Logs.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/srcs/juloo.keyboard2/Logs.java b/srcs/juloo.keyboard2/Logs.java index a09c83f..8843052 100644 --- a/srcs/juloo.keyboard2/Logs.java +++ b/srcs/juloo.keyboard2/Logs.java @@ -27,9 +27,25 @@ public final class Logs _debug_logs.println("actionLabel: "+conf.actionLabel); } + public static void debug_config_migration(int from_version, int to_version) + { + debug("Migrating config version from " + from_version + " to " + to_version); + } + public static void debug(String s) { if (_debug_logs != null) _debug_logs.println(s); } + + public static void exn(String msg, Exception e) + { + Log.e(TAG, msg, e); + } + + public static void trace() + { + if (_debug_logs != null) + _debug_logs.println(Log.getStackTraceString(new Exception())); + } } |
