title: accessibility service permission lost after killing app in android 8.0
body: <p>Hi i have created accessibility service permission  using below code .</p>
  <pre><code> public static boolean isAccessibilitySettingsOn(Context mContext) {
          int accessibilityEnabled = 0;
          final String service = mContext.getPackageName() + &quot;/&quot; + YouTubeFilterService.class.getCanonicalName();
          try {
              accessibilityEnabled = Settings.Secure.getInt(
                      mContext.getApplicationContext().getContentResolver(),
                      android.provider.Settings.Secure.ACCESSIBILITY_ENABLED);
              Log.v(TAG, &quot;accessibilityEnabled = &quot; + accessibilityEnabled);
          } catch (Settings.SettingNotFoundException e) {
              Log.e(TAG, &quot;Error finding setting, default accessibility to not found: &quot;
                      + e.getMessage());
          }
          TextUtils.SimpleStringSplitter mStringColonSplitter = new TextUtils.SimpleStringSplitter(':');
  
          if (accessibilityEnabled == 1) {
              Log.v(TAG, &quot;***ACCESSIBILITY IS ENABLED*** -----------------&quot;);
              String settingValue = Settings.Secure.getString(
                      mContext.getApplicationContext().getContentResolver(),
                      Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES);
              if (settingValue != null) {
                  mStringColonSplitter.setString(settingValue);
                  while (mStringColonSplitter.hasNext()) {
                      String accessibilityService = mStringColonSplitter.next();
  
                      Log.v(TAG, &quot;-------------- &gt; accessibilityService :: &quot; + accessibilityService + &quot; &quot; + service);
                      if (accessibilityService.equalsIgnoreCase(service)) {
                          Log.v(TAG, &quot;We've found the correct setting - accessibility is switched on!&quot;);
                          return true;
                      }
                  }
              }
          } else {
              Log.v(TAG, &quot;***ACCESSIBILITY IS DISABLED***&quot;);
          }
  
          return false;
      }
  </code></pre>
  <p>This is working properly in android 8 above when i give permission its save permission status but in android 8.0 and android 8.1 when i give permission to ON and again if i kill and launch then its asking again permission while it should be save permission status please help me what i am doing wrong .</p>