Example usage for android.content Context ACCESSIBILITY_SERVICE

List of usage examples for android.content Context ACCESSIBILITY_SERVICE

Introduction

In this page you can find the example usage for android.content Context ACCESSIBILITY_SERVICE.

Prototype

String ACCESSIBILITY_SERVICE

To view the source code for android.content Context ACCESSIBILITY_SERVICE.

Click Source Link

Document

Use with #getSystemService(String) to retrieve a android.view.accessibility.AccessibilityManager for giving the user feedback for UI events through the registered event listeners.

Usage

From source file:com.android.launcher3.Workspace.java

protected void onResume() {
    if (getPageIndicator() != null) {
        // In case accessibility state has changed, we need to perform this on every
        // attach to window
        OnClickListener listener = getPageIndicatorClickListener();
        if (listener != null) {
            getPageIndicator().setOnClickListener(listener);
        }// www. j a v  a2  s.  c om
    }
    AccessibilityManager am = (AccessibilityManager) getContext()
            .getSystemService(Context.ACCESSIBILITY_SERVICE);
    sAccessibilityEnabled = am.isEnabled();

    // Update wallpaper dimensions if they were changed since last onResume
    // (we also always set the wallpaper dimensions in the constructor)
    if (LauncherAppState.getInstance().hasWallpaperChangedSinceLastCheck()) {
        setWallpaperDimension();
    }
    mWallpaperIsLiveWallpaper = mWallpaperManager.getWallpaperInfo() != null;
    // Force the wallpaper offset steps to be set again, because another app might have changed
    // them
    mLastSetWallpaperOffsetSteps = 0f;
}