super.onCreate();
hasHardwareKeyboard = getResources().getConfiguration().keyboard != Configuration.KEYBOARD_NOKEYS;
- applySoftKeyboardFix = hasHardwareKeyboard && U.isChromeOs(this);
+ applySoftKeyboardFix = hasHardwareKeyboard /* && U.isChromeOs(this) */ ;
SharedPreferences pref = U.getSharedPreferences(this);
if(pref.getBoolean("taskbar_active", false) || LauncherHelper.getInstance().isOnHomeScreen()) {
if(!isAccessibilityServiceEnabled
&& hasWriteSecureSettingsPermission(context)) {
- String notificationServices = Settings.Secure.getString(context.getContentResolver(),
+ String services = Settings.Secure.getString(context.getContentResolver(),
Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES);
+ String finalServices = services == null ? "" : services;
+
String powerMenuService = new ComponentName(context, PowerMenuService.class).flattenToString();
- if(!notificationServices.contains(powerMenuService)) {
+ if(!finalServices.contains(powerMenuService)) {
try {
Settings.Secure.putString(context.getContentResolver(),
Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES,
- notificationServices.isEmpty()
+ finalServices.isEmpty()
? powerMenuService
- : notificationServices + ":" + powerMenuService);
+ : finalServices + ":" + powerMenuService);
} catch (Exception e) { /* Gracefully fail */ }
}
try {
Settings.Secure.putString(context.getContentResolver(),
Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES,
- notificationServices);
+ finalServices);
} catch (Exception e) { /* Gracefully fail */ }
if(onComplete != null) onComplete.run();