类android.view.accessibility.AccessibilityManager源码实例Demo

下面列出了怎么用android.view.accessibility.AccessibilityManager的API类实例代码及写法,或者点击链接到github查看源代码。

static boolean isAccessibilityServiceEnabled(Context context) {
    AccessibilityManager manager = (AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE);
    if (manager != null) {
        List<AccessibilityServiceInfo> runningServices =
                manager.getEnabledAccessibilityServiceList(AccessibilityEvent.TYPES_ALL_MASK);

        for (AccessibilityServiceInfo service : runningServices) {
            if (service != null) {
                //PPApplication.logE("PPPExtenderBroadcastReceiver.isAccessibilityServiceEnabled", "serviceId=" + service.getId());
                if (PPApplication.EXTENDER_ACCESSIBILITY_SERVICE_ID.equals(service.getId())) {
                    //PPApplication.logE("PPPExtenderBroadcastReceiver.isAccessibilityServiceEnabled", "true");
                    return true;
                }
            }
        }
        //PPApplication.logE("PPPExtenderBroadcastReceiver.isAccessibilityServiceEnabled", "false");
        return false;
    }
    //PPApplication.logE("PPPExtenderBroadcastReceiver.isAccessibilityServiceEnabled", "false");
    return false;
}
 
源代码2 项目: holoaccent   文件: SwitchPreference.java
/** As defined in TwoStatePreference source */
void sendAccessibilityEvent(View view) {
    // Since the view is still not attached we create, populate,
    // and send the event directly since we do not know when it
    // will be attached and posting commands is not as clean.
	AccessibilityManager accessibilityManager =
	        (AccessibilityManager)getContext().getSystemService(Context.ACCESSIBILITY_SERVICE);
	if (accessibilityManager == null)
		return;
    if (mSendClickAccessibilityEvent && accessibilityManager.isEnabled()) {
        AccessibilityEvent event = AccessibilityEvent.obtain();
        event.setEventType(AccessibilityEvent.TYPE_VIEW_CLICKED);
        view.onInitializeAccessibilityEvent(event);
        view.dispatchPopulateAccessibilityEvent(event);
        accessibilityManager.sendAccessibilityEvent(event);
    }
    mSendClickAccessibilityEvent = false;
}
 
源代码3 项目: android-lockpattern   文件: LockPatternView.java
@Override
public boolean onHoverEvent(MotionEvent event) {
    if (AccessibilityManager.getInstance(mContext).isTouchExplorationEnabled()) {
        final int action = event.getAction();
        switch (action) {
            case MotionEvent.ACTION_HOVER_ENTER:
                event.setAction(MotionEvent.ACTION_DOWN);
                break;
            case MotionEvent.ACTION_HOVER_MOVE:
                event.setAction(MotionEvent.ACTION_MOVE);
                break;
            case MotionEvent.ACTION_HOVER_EXIT:
                event.setAction(MotionEvent.ACTION_UP);
                break;
        }
        onTouchEvent(event);
        event.setAction(action);
    }
    return super.onHoverEvent(event);
}
 
源代码4 项目: PocketEOS-Android   文件: BaseWebView.java
public static void disableAccessibility(Context context) {
    if (Build.VERSION.SDK_INT == 17/*4.2 (Build.VERSION_CODES.JELLY_BEAN_MR1)*/) {
        if (context != null) {
            try {
                AccessibilityManager am = (AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE);
                if (!am.isEnabled()) {
                    //Not need to disable accessibility
                    return;
                }

                Method setState = am.getClass().getDeclaredMethod("setState", int.class);
                setState.setAccessible(true);
                setState.invoke(am, 0);/**{@link AccessibilityManager#STATE_FLAG_ACCESSIBILITY_ENABLED}*/
            } catch (Exception ignored) {
                ignored.printStackTrace();
            }
        }
    }
}
 
源代码5 项目: android-dialer   文件: DialpadView.java
@Override
protected void onFinishInflate() {
  setupKeypad();
  mDigits = (EditText) findViewById(R.id.digits);
  mDelete = (ImageButton) findViewById(R.id.deleteButton);
  mOverflowMenuButton = findViewById(R.id.dialpad_overflow);
  mRateContainer = (ViewGroup) findViewById(R.id.rate_container);
  mIldCountry = (TextView) mRateContainer.findViewById(R.id.ild_country);
  mIldRate = (TextView) mRateContainer.findViewById(R.id.ild_rate);

  AccessibilityManager accessibilityManager =
      (AccessibilityManager) getContext().getSystemService(Context.ACCESSIBILITY_SERVICE);
  if (accessibilityManager.isEnabled()) {
    // The text view must be selected to send accessibility events.
    mDigits.setSelected(true);
  }
}
 
源代码6 项目: Noyze   文件: Utils.java
/**
 * API 14+, check if the given {@link AccessibilityService} is enabled.
 *
 * @return True if id is an enabled {@link AccessibilityService}.
 */
public static boolean isAccessibilityServiceEnabled14(Context context, String[] ids) {

    AccessibilityManager aManager = (AccessibilityManager)
            context.getSystemService(Context.ACCESSIBILITY_SERVICE);
    if (null == aManager || null == ids) return false;

    List<AccessibilityServiceInfo> services = aManager
            .getEnabledAccessibilityServiceList(AccessibilityEvent.TYPES_ALL_MASK);
    for (AccessibilityServiceInfo service : services) {
        if (contains(ids, service.getId())) {
            return true;
        }
    }

    return false;
}
 
源代码7 项目: LaunchEnr   文件: Workspace.java
public ValueAnimator createHotseatAlphaAnimator(float finalValue) {
    if (Float.compare(finalValue, mHotseatAlpha[HOTSEAT_STATE_ALPHA_INDEX]) == 0) {
        // Return a dummy animator to avoid null checks.
        return ValueAnimator.ofFloat(0, 0);
    } else {
        ValueAnimator animator = ValueAnimator
                .ofFloat(mHotseatAlpha[HOTSEAT_STATE_ALPHA_INDEX], finalValue);
        animator.addUpdateListener(new AnimatorUpdateListener() {
            @Override
            public void onAnimationUpdate(ValueAnimator valueAnimator) {
                float value = (Float) valueAnimator.getAnimatedValue();
                setHotseatAlphaAtIndex(value, HOTSEAT_STATE_ALPHA_INDEX);
            }
        });

        AccessibilityManager am = (AccessibilityManager)
                mLauncher.getSystemService(Context.ACCESSIBILITY_SERVICE);
        final boolean accessibilityEnabled = am.isEnabled();
        animator.addUpdateListener(
                new AlphaUpdateListener(mLauncher.getHotseat(), accessibilityEnabled));
        animator.addUpdateListener(
                new AlphaUpdateListener(mPageIndicator, accessibilityEnabled));
        return animator;
    }
}
 
源代码8 项目: EhViewer   文件: LockPatternView.java
@Override
public boolean onHoverEvent(@NonNull MotionEvent event) {
    AccessibilityManager accessibilityManager =
            (AccessibilityManager) getContext().getSystemService(Context.ACCESSIBILITY_SERVICE);
    if (accessibilityManager.isTouchExplorationEnabled()) {
        final int action = event.getAction();
        switch (action) {
            case MotionEvent.ACTION_HOVER_ENTER:
                event.setAction(MotionEvent.ACTION_DOWN);
                break;
            case MotionEvent.ACTION_HOVER_MOVE:
                event.setAction(MotionEvent.ACTION_MOVE);
                break;
            case MotionEvent.ACTION_HOVER_EXIT:
                event.setAction(MotionEvent.ACTION_UP);
                break;
        }
        onTouchEvent(event);
        event.setAction(action);
    }
    return super.onHoverEvent(event);
}
 
源代码9 项目: WeChatHongBao   文件: WeChatFragment.java
private void updateServiceStatus() {
    boolean serviceEnabled = false;

    AccessibilityManager accessibilityManager =
            (AccessibilityManager) baseContext.getSystemService(Context.ACCESSIBILITY_SERVICE);
    List<AccessibilityServiceInfo> accessibilityServices =
            accessibilityManager.getEnabledAccessibilityServiceList(AccessibilityServiceInfo.FEEDBACK_GENERIC);
    for (AccessibilityServiceInfo info : accessibilityServices) {
        if (info.getId().equals(baseContext.getPackageName() + "/.services.HongbaoService")) {
            serviceEnabled = true;
            break;
        }
    }

    if (!serviceEnabled) {
        btn.setText(R.string.service_open);
    } else {
        btn.setText(R.string.service_off);
    }
}
 
源代码10 项目: android-chromium   文件: ContentViewCore.java
/**
 * Constructs a new ContentViewCore. Embedders must call initialize() after constructing
 * a ContentViewCore and before using it.
 *
 * @param context The context used to create this.
 */
public ContentViewCore(Context context) {
    mContext = context;

    WeakContext.initializeWeakContext(context);
    HeapStatsLogger.init(mContext.getApplicationContext());
    mAdapterInputConnectionFactory = new AdapterInputConnectionFactory();

    mRenderCoordinates = new RenderCoordinates();
    mRenderCoordinates.setDeviceScaleFactor(
            getContext().getResources().getDisplayMetrics().density);
    mStartHandlePoint = mRenderCoordinates.createNormalizedPoint();
    mEndHandlePoint = mRenderCoordinates.createNormalizedPoint();
    mInsertionHandlePoint = mRenderCoordinates.createNormalizedPoint();
    mAccessibilityManager = (AccessibilityManager)
            getContext().getSystemService(Context.ACCESSIBILITY_SERVICE);
}
 
源代码11 项目: HgLauncher   文件: DagashiBar.java
private DagashiBar(
        ViewGroup parent,
        View content,
        com.google.android.material.snackbar.ContentViewCallback contentViewCallback) {
    super(parent, content, contentViewCallback);
    accessibilityManager =
            (AccessibilityManager) parent.getContext()
                                         .getSystemService(Context.ACCESSIBILITY_SERVICE);
}
 
源代码12 项目: LB-Launcher   文件: LauncherClings.java
/** Returns whether the clings are enabled or should be shown */
private boolean areClingsEnabled() {
    if (DISABLE_CLINGS) {
        return false;
    }

    // disable clings when running in a test harness
    if(ActivityManager.isRunningInTestHarness()) return false;

    // Disable clings for accessibility when explore by touch is enabled
    final AccessibilityManager a11yManager = (AccessibilityManager) mLauncher.getSystemService(
            Launcher.ACCESSIBILITY_SERVICE);
    if (a11yManager.isTouchExplorationEnabled()) {
        return false;
    }

    // Restricted secondary users (child mode) will potentially have very few apps
    // seeded when they start up for the first time. Clings won't work well with that
    boolean supportsLimitedUsers =
            android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR2;
    Account[] accounts = AccountManager.get(mLauncher).getAccounts();
    if (supportsLimitedUsers && accounts.length == 0) {
        UserManager um = (UserManager) mLauncher.getSystemService(Context.USER_SERVICE);
        Bundle restrictions = um.getUserRestrictions();
        if (restrictions.getBoolean(UserManager.DISALLOW_MODIFY_ACCOUNTS, false)) {
            return false;
        }
    }
    if (Settings.Secure.getInt(mLauncher.getContentResolver(), SKIP_FIRST_USE_HINTS, 0)
            == 1) {
        return false;
    }
    return true;
}
 
源代码13 项目: Blackbulb   文件: MaskService.java
@Override
public void onCreate() {
    super.onCreate();

    mWindowManager = (WindowManager) getSystemService(Context.WINDOW_SERVICE);
    mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
    mAccessibilityManager = (AccessibilityManager) getSystemService(Context.ACCESSIBILITY_SERVICE);
}
 
源代码14 项目: android_9.0.0_r45   文件: AdapterView.java
void selectionChanged() {
    // We're about to post or run the selection notifier, so we don't need
    // a pending notifier.
    mPendingSelectionNotifier = null;

    if (mOnItemSelectedListener != null
            || AccessibilityManager.getInstance(mContext).isEnabled()) {
        if (mInLayout || mBlockLayoutRequests) {
            // If we are in a layout traversal, defer notification
            // by posting. This ensures that the view tree is
            // in a consistent state and is able to accommodate
            // new layout or invalidate requests.
            if (mSelectionNotifier == null) {
                mSelectionNotifier = new SelectionNotifier();
            } else {
                removeCallbacks(mSelectionNotifier);
            }
            post(mSelectionNotifier);
        } else {
            dispatchOnItemSelected();
        }
    }
    // Always notify AutoFillManager - it will return right away if autofill is disabled.
    final AutofillManager afm = mContext.getSystemService(AutofillManager.class);
    if (afm != null) {
        afm.notifyValueChanged(this);
    }
}
 
源代码15 项目: LB-Launcher   文件: DragLayer.java
@Override
public boolean onInterceptHoverEvent(MotionEvent ev) {
    if (mLauncher == null || mLauncher.getWorkspace() == null) {
        return false;
    }
    Folder currentFolder = mLauncher.getWorkspace().getOpenFolder();
    if (currentFolder == null) {
        return false;
    } else {
            AccessibilityManager accessibilityManager = (AccessibilityManager)
                    getContext().getSystemService(Context.ACCESSIBILITY_SERVICE);
        if (accessibilityManager.isTouchExplorationEnabled()) {
            final int action = ev.getAction();
            boolean isOverFolder;
            switch (action) {
                case MotionEvent.ACTION_HOVER_ENTER:
                    isOverFolder = isEventOverFolder(currentFolder, ev);
                    if (!isOverFolder) {
                        sendTapOutsideFolderAccessibilityEvent(currentFolder.isEditingName());
                        mHoverPointClosesFolder = true;
                        return true;
                    }
                    mHoverPointClosesFolder = false;
                    break;
                case MotionEvent.ACTION_HOVER_MOVE:
                    isOverFolder = isEventOverFolder(currentFolder, ev);
                    if (!isOverFolder && !mHoverPointClosesFolder) {
                        sendTapOutsideFolderAccessibilityEvent(currentFolder.isEditingName());
                        mHoverPointClosesFolder = true;
                        return true;
                    } else if (!isOverFolder) {
                        return true;
                    }
                    mHoverPointClosesFolder = false;
            }
        }
    }
    return false;
}
 
源代码16 项目: Pi-Locker   文件: LockPatternView_v14.java
public LockPatternView_v14(Context context, AttributeSet attrs) {
    super(context, attrs);

    mAccessibilityManager = isInEditMode() ? null
            : (AccessibilityManager) context
            .getSystemService(Context.ACCESSIBILITY_SERVICE);
}
 
源代码17 项目: TurboLauncher   文件: DragLayer.java
private void sendTapOutsideFolderAccessibilityEvent(boolean isEditingName) {
    AccessibilityManager accessibilityManager = (AccessibilityManager)
            getContext().getSystemService(Context.ACCESSIBILITY_SERVICE);
    if (accessibilityManager.isEnabled()) {
        int stringId = isEditingName ? R.string.folder_tap_to_rename : R.string.folder_tap_to_close;
        AccessibilityEvent event = AccessibilityEvent.obtain(
                AccessibilityEvent.TYPE_VIEW_FOCUSED);
        onInitializeAccessibilityEvent(event);
        event.getText().add(getContext().getString(stringId));
        accessibilityManager.sendAccessibilityEvent(event);
    }
}
 
源代码18 项目: brailleback   文件: GestureOverlay.java
private void initAccessibilitySettings(Context context) {
    // Check is touch exploration is on
    accessibilityManager = (AccessibilityManager) context.getSystemService(
            Context.ACCESSIBILITY_SERVICE);

    try {
        if (AccessibilityManager_isTouchExplorationEnabled != null) {
            Object retobj = AccessibilityManager_isTouchExplorationEnabled
                    .invoke(accessibilityManager);
            touchExploring = (Boolean) retobj;
        }
    } catch (Exception e) {
        Log.e("GestureOverlay", "Failed to get Accessibility Manager " + e.toString());
    }
}
 
源代码19 项目: letv   文件: ViewParentCompat.java
public boolean requestSendAccessibilityEvent(ViewParent parent, View child, AccessibilityEvent event) {
    if (child == null) {
        return false;
    }
    ((AccessibilityManager) child.getContext().getSystemService("accessibility")).sendAccessibilityEvent(event);
    return true;
}
 
源代码20 项目: guideshow   文件: ExploreByTouchHelper.java
/**
 * Factory method to create a new {@link ExploreByTouchHelper}.
 *
 * @param forView View whose logical children are exposed by this helper.
 */
public ExploreByTouchHelper(View forView) {
    if (forView == null) {
        throw new IllegalArgumentException("View may not be null");
    }

    mView = forView;
    final Context context = forView.getContext();
    mManager = (AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE);
}
 
源代码21 项目: science-journal   文件: ChartView.java
@Override
public void onWindowFocusChanged(boolean hasWindowFocus) {
  super.onWindowFocusChanged(hasWindowFocus);
  if (hasWindowFocus) {
    // The user could have changed the accessibility mode while we were in the background,
    // so just get it when window focus changes.
    exploreByTouchEnabled =
        ((AccessibilityManager) getContext().getSystemService(Context.ACCESSIBILITY_SERVICE))
            .isTouchExplorationEnabled();
  }
}
 
源代码22 项目: TurboLauncher   文件: DragLayer.java
@Override
public boolean onInterceptHoverEvent(MotionEvent ev) {
    if (mLauncher == null || mLauncher.getWorkspace() == null) {
        return false;
    }
    Folder currentFolder = mLauncher.getWorkspace().getOpenFolder();
    if (currentFolder == null) {
        return false;
    } else {
            AccessibilityManager accessibilityManager = (AccessibilityManager)
                    getContext().getSystemService(Context.ACCESSIBILITY_SERVICE);
        if (accessibilityManager.isTouchExplorationEnabled()) {
            final int action = ev.getAction();
            boolean isOverFolder;
            switch (action) {
                case MotionEvent.ACTION_HOVER_ENTER:
                    isOverFolder = isEventOverFolder(currentFolder, ev);
                    if (!isOverFolder) {
                        sendTapOutsideFolderAccessibilityEvent(currentFolder.isEditingName());
                        mHoverPointClosesFolder = true;
                        return true;
                    }
                    mHoverPointClosesFolder = false;
                    break;
                case MotionEvent.ACTION_HOVER_MOVE:
                    isOverFolder = isEventOverFolder(currentFolder, ev);
                    if (!isOverFolder && !mHoverPointClosesFolder) {
                        sendTapOutsideFolderAccessibilityEvent(currentFolder.isEditingName());
                        mHoverPointClosesFolder = true;
                        return true;
                    } else if (!isOverFolder) {
                        return true;
                    }
                    mHoverPointClosesFolder = false;
            }
        }
    }
    return false;
}
 
源代码23 项目: LaunchEnr   文件: DropTargetBar.java
@Override
public void run() {
    AccessibilityManager am = (AccessibilityManager)
            getContext().getSystemService(Context.ACCESSIBILITY_SERVICE);
    boolean accessibilityEnabled = am.isEnabled();
    AlphaUpdateListener.updateVisibility(DropTargetBar.this, accessibilityEnabled);
}
 
源代码24 项目: zen4android   文件: NumberPicker.java
private void sendAccessibilityEventForVirtualButton(int virtualViewId, int eventType,
        String text) {
    if (((AccessibilityManager) getContext().getSystemService(Context.ACCESSIBILITY_SERVICE)).isEnabled()) {
        AccessibilityEvent event = AccessibilityEvent.obtain(eventType);
        event.setClassName(Button.class.getName());
        event.setPackageName(getContext().getPackageName());
        event.getText().add(text);
        event.setEnabled(NumberPicker.this.isEnabled());
        event.setSource(NumberPicker.this, virtualViewId);
        requestSendAccessibilityEvent(NumberPicker.this, event);
    }
}
 
源代码25 项目: isu   文件: Per_App.java
public static boolean isAccessibilityEnabled(Context context, String id) {
    if (id == null) return false;
    AccessibilityManager am = (AccessibilityManager) context
        .getSystemService(Context.ACCESSIBILITY_SERVICE);

    List < AccessibilityServiceInfo > runningServices = am
        .getEnabledAccessibilityServiceList(AccessibilityEvent.TYPES_ALL_MASK);
    for (AccessibilityServiceInfo service: runningServices) {
        if (id.equals(service.getId()))
            return true;
    }

    return false;
}
 
源代码26 项目: TurboLauncher   文件: Workspace.java
@Override
protected OnClickListener getPageIndicatorClickListener() {
    AccessibilityManager am = (AccessibilityManager)
            getContext().getSystemService(Context.ACCESSIBILITY_SERVICE);
    if (!am.isTouchExplorationEnabled()) {
        return null;
    }
    OnClickListener listener = new OnClickListener() {
        @Override
        public void onClick(View arg0) {
            enterOverviewMode();
        }
    };
    return listener;
}
 
源代码27 项目: Noyze   文件: Utils.java
/**
 * @return True if system-wide Accessibility is enabled.
 */
public static boolean isAccessibilityEnabled(Context context) {
    // Also see Settings.Secure.ACCESSIBILITY_ENABLED, alternative method.
    AccessibilityManager aManager = (AccessibilityManager)
            context.getSystemService(Context.ACCESSIBILITY_SERVICE);
    return (null != aManager && aManager.isEnabled());
}
 
源代码28 项目: android-apps   文件: IcsProgressBar.java
/**
 * @hide
 */
public IcsProgressBar(Context context, AttributeSet attrs, int defStyle, int styleRes) {
    super(context, attrs, defStyle);
    mUiThreadId = Thread.currentThread().getId();
    initProgressBar();

    TypedArray a =
        context.obtainStyledAttributes(attrs, /*R.styleable.*/ProgressBar, defStyle, styleRes);

    mNoInvalidate = true;

    Drawable drawable = a.getDrawable(/*R.styleable.*/ProgressBar_progressDrawable);
    if (drawable != null) {
        drawable = tileify(drawable, false);
        // Calling this method can set mMaxHeight, make sure the corresponding
        // XML attribute for mMaxHeight is read after calling this method
        setProgressDrawable(drawable);
    }


    mDuration = a.getInt(/*R.styleable.*/ProgressBar_indeterminateDuration, mDuration);

    mMinWidth = a.getDimensionPixelSize(/*R.styleable.*/ProgressBar_minWidth, mMinWidth);
    mMaxWidth = a.getDimensionPixelSize(/*R.styleable.*/ProgressBar_maxWidth, mMaxWidth);
    mMinHeight = a.getDimensionPixelSize(/*R.styleable.*/ProgressBar_minHeight, mMinHeight);
    mMaxHeight = a.getDimensionPixelSize(/*R.styleable.*/ProgressBar_maxHeight, mMaxHeight);

    mBehavior = a.getInt(/*R.styleable.*/ProgressBar_indeterminateBehavior, mBehavior);

    final int resID = a.getResourceId(
            /*com.android.internal.R.styleable.*/ProgressBar_interpolator,
            android.R.anim.linear_interpolator); // default to linear interpolator
    if (resID > 0) {
        setInterpolator(context, resID);
    }

    setMax(a.getInt(/*R.styleable.*/ProgressBar_max, mMax));

    setProgress(a.getInt(/*R.styleable.*/ProgressBar_progress, mProgress));

    setSecondaryProgress(
            a.getInt(/*R.styleable.*/ProgressBar_secondaryProgress, mSecondaryProgress));

    drawable = a.getDrawable(/*R.styleable.*/ProgressBar_indeterminateDrawable);
    if (drawable != null) {
        drawable = tileifyIndeterminate(drawable);
        setIndeterminateDrawable(drawable);
    }

    mOnlyIndeterminate = a.getBoolean(
            /*R.styleable.*/ProgressBar_indeterminateOnly, mOnlyIndeterminate);

    mNoInvalidate = false;

    setIndeterminate(mOnlyIndeterminate || a.getBoolean(
            /*R.styleable.*/ProgressBar_indeterminate, mIndeterminate));

    mAnimationResolution = a.getInteger(/*R.styleable.*/ProgressBar_animationResolution,
            ANIMATION_RESOLUTION);

    a.recycle();

    mAccessibilityManager = (AccessibilityManager)context.getSystemService(Context.ACCESSIBILITY_SERVICE);
}
 
源代码29 项目: V.FlyoutTest   文件: AccessibilityManagerCompat.java
@Override
public boolean isTouchExplorationEnabled(AccessibilityManager manager) {
    return AccessibilityManagerCompatIcs.isTouchExplorationEnabled(manager);
}
 
源代码30 项目: AndroidComponentPlugin   文件: ContextImpl.java
public Object getService(ContextImpl ctx) {
    return AccessibilityManager.getInstance(ctx);
}
 
 类所在包
 同包方法