OSDN Git Service

Merge "Exposing some accessibility methods and state to be used in Launcher" into...
authorTreeHugger Robot <treehugger-gerrit@google.com>
Wed, 24 Apr 2019 23:23:34 +0000 (23:23 +0000)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Wed, 24 Apr 2019 23:23:34 +0000 (23:23 +0000)
1  2 
packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java

@@@ -895,25 -916,14 +916,25 @@@ public class NavigationBarFragment exte
              }
          }
  
-         mNavigationBarView.getRotateSuggestionButton()
-                 .setAccessibilityFeedbackEnabled(feedbackEnabled);
+         if (outFeedbackEnabled != null) {
+             outFeedbackEnabled[0] = feedbackEnabled;
+         }
  
-         final boolean showAccessibilityButton = requestingServices >= 1;
-         final boolean targetSelection = requestingServices >= 2;
-         mNavigationBarView.setAccessibilityButtonState(showAccessibilityButton, targetSelection);
+         return (requestingServices >= 1 ? SYSUI_STATE_A11Y_BUTTON_CLICKABLE : 0)
+                 | (requestingServices >= 2 ? SYSUI_STATE_A11Y_BUTTON_LONG_CLICKABLE : 0);
      }
  
 +    private void sendAssistantAvailability(boolean available) {
 +        if (mOverviewProxyService.getProxy() != null) {
 +            try {
 +                mOverviewProxyService.getProxy().onAssistantAvailable(available
 +                        && QuickStepContract.isGesturalMode(getContext()));
 +            } catch (RemoteException e) {
 +                Log.w(TAG, "Unable to send assistant availability data to launcher");
 +            }
 +        }
 +    }
 +
      // ----- Methods that DisplayNavigationBarController talks to -----
  
      /** Applies auto dimming animation on navigation bar when touched. */