Exemple #1
0
        bool RegisterGestures()
        {
            IGestureService gestureService;

            try
            {
                if (Preferences.Instance.UseRootForGestures)
                {
                    gestureService = new RootGestures(GetSuperUser());
                }
                else
                {
                    gestureService = new AccessibilityGestureService(this);
                }
            }
            catch (Exception e)
            {
                Toast.MakeText(this, e.Message, ToastLength.Short).Show();
                return false;
            }

            _gestureService = gestureService;
            AutomataApi.RegisterGestures(_gestureService);
            return true;
        }