abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/Keyboard2View.java
diff options
context:
space:
mode:
authorJules Aguillon2021-12-28 16:47:19 +0100
committerJules Aguillon2021-12-28 16:47:19 +0100
commit0190cfc29a07a5a281f0fd1bdac4999ba65c19ba (patch)
tree160ffb4e68af482093240f28b7022f38e0cee52b /srcs/juloo.keyboard2/Keyboard2View.java
parentdd24ad323bf4a5c13295214e7b492398e98b8d04 (diff)
downloadunexpected-keyboard-0190cfc29a07a5a281f0fd1bdac4999ba65c19ba.tar.gz
unexpected-keyboard-0190cfc29a07a5a281f0fd1bdac4999ba65c19ba.zip
Turn Config into a singleton object
The goal is to remove a cast of the 'context' into 'Keyboard2'.
Diffstat (limited to 'srcs/juloo.keyboard2/Keyboard2View.java')
-rw-r--r--srcs/juloo.keyboard2/Keyboard2View.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/srcs/juloo.keyboard2/Keyboard2View.java b/srcs/juloo.keyboard2/Keyboard2View.java
index c85af4d..4430df4 100644
--- a/srcs/juloo.keyboard2/Keyboard2View.java
+++ b/srcs/juloo.keyboard2/Keyboard2View.java
@@ -45,14 +45,14 @@ public class Keyboard2View extends View
_vibratorService = (Vibrator)context.getSystemService(Context.VIBRATOR_SERVICE);
_handler = new Handler(this);
_theme = new Theme(getContext(), attrs);
- refreshConfig(((Keyboard2)context).getConfig(), null);
+ _config = Config.globalConfig();
+ refreshConfig(null);
setOnTouchListener(this);
}
/* Internally calls [reset()]. */
- public void refreshConfig(Config config, KeyboardData kw)
+ public void refreshConfig(KeyboardData kw)
{
- _config = config;
if (kw != null)
setKeyboard(kw); // handle layout options then calls reset().
}