Example usage for android.view.accessibility AccessibilityManager isEnabled

List of usage examples for android.view.accessibility AccessibilityManager isEnabled

Introduction

In this page you can find the example usage for android.view.accessibility AccessibilityManager isEnabled.

Prototype

public boolean isEnabled() 

Source Link

Document

Returns if the accessibility in the system is enabled.

Usage

From source file:com.aidy.launcher3.ui.workspace.Workspace.java

public 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);
        }/*from   w ww  .  jav  a  2 s  . com*/
    }
    AccessibilityManager am = (AccessibilityManager) getContext()
            .getSystemService(Context.ACCESSIBILITY_SERVICE);
    sAccessibilityEnabled = am.isEnabled();
}

From source file:com.phonemetra.turbo.launcher.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);
        }//from   w w w  .j a  v  a 2s  .  c  o  m
    }
    AccessibilityManager am = (AccessibilityManager) getContext()
            .getSystemService(Context.ACCESSIBILITY_SERVICE);
    sAccessibilityEnabled = am.isEnabled();

    mScrollWallpaper = SettingsProvider.getBoolean(mLauncher,
            SettingsProvider.SETTINGS_UI_HOMESCREEN_SCROLLING_WALLPAPER_SCROLL,
            R.bool.preferences_interface_homescreen_scrolling_wallpaper_scroll_default);

    if (!mScrollWallpaper) {
        if (mWindowToken != null)
            mWallpaperManager.setWallpaperOffsets(mWindowToken, 0f, 0.5f);
    } else {
        mWallpaperOffset.syncWithScroll();
    }

    // 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;

    moveAwayFromCustomContentIfRequired();
}

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);
        }/*from  w  w  w .j  av  a2  s.c  o m*/
    }
    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;
}