android.view.View.OnSystemUiVisibilityChangeListener#android.provider.Settings源码实例Demo

下面列出了android.view.View.OnSystemUiVisibilityChangeListener#android.provider.Settings 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: FaceSlim   文件: MyApplication.java
/**
 * Get Piwik tracker. No sensitive data is collected. Just app version, predicted location,
 * resolution, device model and system version. Location is based on anonymized IP address.
 * @return tracker instance
 */
public synchronized Tracker getTracker() {
    if (mPiwikTracker != null)
        return mPiwikTracker;

    try {
        mPiwikTracker = Piwik.getInstance(this).newTracker("http://indywidualni.org/analytics/piwik.php", 1);
        mPiwikTracker.setUserId(Settings.Secure.getString(getContentResolver(), Settings.Secure.ANDROID_ID));
        mPiwikTracker.setDispatchTimeout(30000);
        mPiwikTracker.setDispatchInterval(-1);
    } catch (MalformedURLException e) {
        Log.w("Piwik", "url is malformed", e);
        return null;
    }

    return mPiwikTracker;
}
 
源代码2 项目: MNImageBrowser   文件: NavigationBarObserver.java
@Override
public void onChange(boolean selfChange) {
    super.onChange(selfChange);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 && mApplication != null && mApplication.getContentResolver() != null
            && mListeners != null && !mListeners.isEmpty()) {
        int show = 0;
        if (OSUtils.isMIUI()) {
            show = Settings.Global.getInt(mApplication.getContentResolver(), IMMERSION_MIUI_NAVIGATION_BAR_HIDE_SHOW, 0);
        } else if (OSUtils.isEMUI()) {
            if (OSUtils.isEMUI3_x() || Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
                show = Settings.System.getInt(mApplication.getContentResolver(), IMMERSION_EMUI_NAVIGATION_BAR_HIDE_SHOW, 0);
            } else {
                show = Settings.Global.getInt(mApplication.getContentResolver(), IMMERSION_EMUI_NAVIGATION_BAR_HIDE_SHOW, 0);
            }
        }
        for (OnNavigationBarListener onNavigationBarListener : mListeners) {
            onNavigationBarListener.onNavigationBarChange(show != 1);
        }
    }
}
 
源代码3 项目: android_9.0.0_r45   文件: StorageManagerService.java
private void handleSystemReady() {
    initIfReadyAndConnected();
    resetIfReadyAndConnected();

    // Start scheduling nominally-daily fstrim operations
    MountServiceIdler.scheduleIdlePass(mContext);

    // Toggle zram-enable system property in response to settings
    mContext.getContentResolver().registerContentObserver(
        Settings.Global.getUriFor(Settings.Global.ZRAM_ENABLED),
        false /*notifyForDescendants*/,
        new ContentObserver(null /* current thread */) {
            @Override
            public void onChange(boolean selfChange) {
                refreshZramSettings();
            }
        });
    refreshZramSettings();
}
 
源代码4 项目: mollyim-android   文件: NotificationChannels.java
/**
 * Updates the message ringtone for a specific recipient. If that recipient has no channel, this
 * does nothing.
 *
 * This has to update the database, and therefore should be run on a background thread.
 */
@WorkerThread
public static synchronized void updateMessageRingtone(@NonNull Context context, @NonNull Recipient recipient, @Nullable Uri uri) {
  if (!supported() || recipient.getNotificationChannel() == null) {
    return;
  }
  Log.i(TAG, "Updating recipient message ringtone with URI: " + String.valueOf(uri));

  String  newChannelId = generateChannelIdFor(recipient);
  boolean success      = updateExistingChannel(ServiceUtil.getNotificationManager(context),
                                               recipient.getNotificationChannel(),
                                               generateChannelIdFor(recipient),
                                               channel -> channel.setSound(uri == null ? Settings.System.DEFAULT_NOTIFICATION_URI : uri, getRingtoneAudioAttributes()));

  DatabaseFactory.getRecipientDatabase(context).setNotificationChannel(recipient.getId(), success ? newChannelId : null);
  ensureCustomChannelConsistency(context);
}
 
源代码5 项目: android-common   文件: PackageUtil.java
/**
 * 打开已安装应用的详情
 */
public static void goToInstalledAppDetails(Context context, String packageName) {
    Intent intent = new Intent();
    int sdkVersion = Build.VERSION.SDK_INT;
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
        intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
        intent.setData(Uri.fromParts("package", packageName, null));
    } else {
        intent.setAction(Intent.ACTION_VIEW);
        intent.setClassName("com.android.settings", "com.android.settings.InstalledAppDetails");
        intent.putExtra((sdkVersion == Build.VERSION_CODES.FROYO ? "pkg"
                : "com.android.settings.ApplicationPkgName"), packageName);
    }
    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    context.startActivity(intent);
}
 
源代码6 项目: GravityBox   文件: VolumePreference.java
private void initSeekBar(SeekBar seekBar, Uri defaultUri) {
    seekBar.setMax(mAudioManager.getStreamMaxVolume(mStreamType));
    mOriginalStreamVolume = mAudioManager.getStreamVolume(mStreamType);
    seekBar.setProgress(mOriginalStreamVolume);
    seekBar.setOnSeekBarChangeListener(this);
    // TODO: removed in MM, find different approach
    mContext.getContentResolver().registerContentObserver(
            System.getUriFor("volume_ring"),
            false, mVolumeObserver);
    if (defaultUri == null) {
        if (mStreamType == AudioManager.STREAM_RING) {
            defaultUri = Settings.System.DEFAULT_RINGTONE_URI;
        } else if (mStreamType == AudioManager.STREAM_NOTIFICATION) {
            defaultUri = Settings.System.DEFAULT_NOTIFICATION_URI;
        } else {
            defaultUri = Settings.System.DEFAULT_ALARM_ALERT_URI;
        }
    }
    mRingtone = RingtoneManager.getRingtone(mContext, defaultUri);
    if (mRingtone != null) {
        mRingtone.setStreamType(mStreamType);
    }
}
 
源代码7 项目: kcanotify   文件: Rule.java
private static Intent getIntentDatasaver(String packageName, Context context) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
        synchronized (context.getApplicationContext()) {
            if (!cacheIntentDatasaver.containsKey(packageName)) {
                Intent intent = new Intent(
                        Settings.ACTION_IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS,
                        Uri.parse("package:" + packageName));
                if (intent.resolveActivity(context.getPackageManager()) == null)
                    intent = null;
                cacheIntentDatasaver.put(packageName, intent);
            }
            return cacheIntentDatasaver.get(packageName);
        }
    else
        return null;
}
 
源代码8 项目: BS-Weather   文件: MainActivity.java
/**
 * 显示对话框
 */
public void showDialog(String title, String info, final int SIGN){
    final AlertDialog.Builder alertDialog  = new AlertDialog.Builder(MainActivity.this);
    alertDialog.setMessage(info);
    alertDialog.setCancelable(false);
    alertDialog.setPositiveButton("确定", new DialogInterface.OnClickListener() {
        @Override
        public void onClick(DialogInterface dialog, int which) {
            if (SIGN == SIGN_NO_INTERNET){
                Intent intent = new Intent(Settings.ACTION_SETTINGS);
                startActivity(intent);
                TaskKiller.dropAllAcitivty();
            }

            if (SIGN == SIGN_ALARMS){
                alertDialog.setCancelable(true);
            }

        }
    });
    alertDialog.show();
}
 
源代码9 项目: together-go   文件: MainActivity.java
private void initMoveManager() {
    if (Build.VERSION.SDK_INT < 23) {
        if (Settings.Secure.getInt(this.getContentResolver(), Settings.Secure.ALLOW_MOCK_LOCATION, 0) == 0) {
            simulateLocationPermission();
        }
    }
    random = new Random();
    try {
        locationManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
        locationManager.addTestProvider(LocationManager.GPS_PROVIDER, false,
                true, false, false, true,
                true, true, 0, 5);
        locationManager.setTestProviderEnabled(LocationManager.GPS_PROVIDER, true);
    } catch (SecurityException e) {
        simulateLocationPermission();
    }
}
 
源代码10 项目: MyHearts   文件: Device.java
@SuppressLint("NewApi")
public static String getIdentifiers(Context ctx) {
  StringBuilder sb = new StringBuilder();
  if (Build.VERSION.SDK_INT > Build.VERSION_CODES.FROYO)
  	sb.append(getPair("serial", Build.SERIAL));
  else
  	sb.append(getPair("serial", "No Serial"));
  sb.append(getPair("android_id", Settings.Secure.getString(ctx.getContentResolver(), Settings.Secure.ANDROID_ID)));
  TelephonyManager tel = (TelephonyManager) ctx.getSystemService(Context.TELEPHONY_SERVICE);
  sb.append(getPair("sim_country_iso", tel.getSimCountryIso()));
  sb.append(getPair("network_operator_name", tel.getNetworkOperatorName()));
  sb.append(getPair("unique_id", Crypto.md5(sb.toString())));
  ConnectivityManager cm = (ConnectivityManager) ctx.getSystemService(Context.CONNECTIVITY_SERVICE);
  sb.append(getPair("network_type", cm.getActiveNetworkInfo() == null ? "-1" : String.valueOf(cm.getActiveNetworkInfo().getType())));
  return sb.toString();
}
 
源代码11 项目: voip_android   文件: MainActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    myEditText = (EditText)findViewById(R.id.editText);
    peerEditText = (EditText)findViewById(R.id.editText2);


    String androidID = Settings.Secure.getString(this.getContentResolver(),
            Settings.Secure.ANDROID_ID);

    //app可以单独部署服务器,给予第三方应用更多的灵活性
    //在开发阶段也可以配置成测试环境的地址 "sandbox.voipnode.gobelieve.io", "sandbox.imnode.gobelieve.io"
    String sdkHost = "imnode2.gobelieve.io";
    IMService.getInstance().setHost(sdkHost);
    IMService.getInstance().setIsSync(false);
    IMService.getInstance().registerConnectivityChangeReceiver(getApplicationContext());
    IMService.getInstance().setDeviceID(androidID);
}
 
源代码12 项目: PermissMe   文件: PermissMeUtils.java
/**
 * The onClickListener that takes you to the app's system settings screen
 *
 * @param activity
 * 		the caller activity used to start the settings intent
 * @return the {@link View.OnClickListener}
 */
public static View.OnClickListener createSettingsClickListener(final Activity activity) {
	return new View.OnClickListener() {
		@Override
		public void onClick(final View v) {
			final Intent intent = new Intent();
			intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
			intent.addCategory(Intent.CATEGORY_DEFAULT);
			intent.setData(Uri.parse("package:" + activity.getPackageName()));
			intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
			intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
			intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
			activity.startActivity(intent);
		}
	};
}
 
源代码13 项目: music_player   文件: MainActivity.java
private void setAsRingtone(final Activity context, int position) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && !Settings.System.canWrite(context)) {
            Intent intent = new Intent(Settings.ACTION_MANAGE_WRITE_SETTINGS, Uri.parse("package:" + context.getPackageName()));
            context.startActivity(intent);
        } else {
            File music = new File(MyApplication.getMusicListNow().get(position).getMusicData()); // path is a file to /sdcard/media/ringtone
            ContentValues values = new ContentValues();
            values.put(MediaStore.MediaColumns.DATA, music.getAbsolutePath());
            values.put(MediaStore.MediaColumns.TITLE, MyApplication.getMusicListNow().get(position).getMusicTitle());
            values.put(MediaStore.MediaColumns.MIME_TYPE, "audio/mp3");
            values.put(MediaStore.Audio.Media.ARTIST, MyApplication.getMusicListNow().get(position).getMusicArtist());
            values.put(MediaStore.Audio.Media.IS_RINGTONE, true);
            values.put(MediaStore.Audio.Media.IS_NOTIFICATION, false);
            values.put(MediaStore.Audio.Media.IS_ALARM, false);
            values.put(MediaStore.Audio.Media.IS_MUSIC, false);
            //Insert it into the database
            Uri uri = MediaStore.Audio.Media.getContentUriForPath(music.getAbsolutePath());
            context.getContentResolver().delete(uri, MediaStore.MediaColumns.DATA + "=\"" + music.getAbsolutePath() + "\"", null);
            Uri newUri = context.getContentResolver().insert(uri, values);
            RingtoneManager.setActualDefaultRingtoneUri(context, RingtoneManager.TYPE_RINGTONE, newUri);
            Toast.makeText(context, "已成功设置为来电铃声", Toast.LENGTH_SHORT).show();
            //Snackbar
//            Snackbar.make(mLayout, "已成功设置为来电铃声", Snackbar.LENGTH_LONG).show();
        }
    }
 
源代码14 项目: vinci   文件: VinciActivityDelegate.java
protected void onCreate(Bundle savedInstanceState) {
    boolean needsOverlayPermission = false;
    if (getReactNativeHost().getUseDeveloperSupport() && Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
        // Get permission to show redbox in dev builds.
        if (!Settings.canDrawOverlays(getContext())) {
            needsOverlayPermission = true;
            Intent serviceIntent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION, Uri.parse("package:" + getContext().getPackageName()));
            FLog.w(ReactConstants.TAG, REDBOX_PERMISSION_MESSAGE);
            Toast.makeText(getContext(), REDBOX_PERMISSION_MESSAGE, Toast.LENGTH_LONG).show();
            ((Activity) getContext()).startActivityForResult(serviceIntent, REQUEST_OVERLAY_PERMISSION_CODE);
        }
    }

    if (mMainComponentName != null && !needsOverlayPermission) {
        loadApp(mMainComponentName);
    }
    mDoubleTapReloadRecognizer = new DoubleTapReloadRecognizer();
}
 
源代码15 项目: GravityBox   文件: BatteryStyleController.java
private void initPreferences(XSharedPreferences prefs) {
    mPrefs = prefs;
    mBatteryStyle = Integer.valueOf(prefs.getString(
            GravityBoxSettings.PREF_KEY_BATTERY_STYLE, "1"));
    mBatteryPercentTextEnabledSb = prefs.getBoolean(
            GravityBoxSettings.PREF_KEY_BATTERY_PERCENT_TEXT_STATUSBAR, false);
    mBatteryPercentTextHeaderHide = prefs.getBoolean(
            GravityBoxSettings.PREF_KEY_BATTERY_PERCENT_TEXT_HEADER_HIDE, false);
    mBatteryPercentTextKgMode = KeyguardMode.valueOf(prefs.getString(
            GravityBoxSettings.PREF_KEY_BATTERY_PERCENT_TEXT_KEYGUARD, "DEFAULT"));
    mMtkPercentTextEnabled = Utils.isMtkDevice() ?
            Settings.Secure.getInt(mContext.getContentResolver(),
                    SETTING_MTK_BATTERY_PERCENTAGE, 0) == 1 : false;
    mBatterySaverIndicationDisabled = prefs.getBoolean(
            GravityBoxSettings.PREF_KEY_BATTERY_SAVER_INDICATION_DISABLE, false);
}
 
源代码16 项目: oversec   文件: OnboardingActivity.java
@Override
protected void onResume() {
    super.onResume();
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
        Ln.d("yeah, onResume "+ Settings.canDrawOverlays(this));
    }
}
 
源代码17 项目: PermissionX   文件: PermissionBuilder.java
/**
 * Go to your app's Settings page to let user turn on the necessary permissions.
 *
 * @param permissions Permissions which are necessary.
 */
private void forwardToSettings(List<String> permissions) {
    forwardPermissions.clear();
    forwardPermissions.addAll(permissions);
    Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
    Uri uri = Uri.fromParts("package", activity.getPackageName(), null);
    intent.setData(uri);
    getInvisibleFragment().startActivityForResult(intent, InvisibleFragment.FORWARD_TO_SETTINGS);
}
 
源代码18 项目: aptoide-client-v8   文件: MockApplicationModule.java
/**
 * Stops inconsistent failed test from happening in Landscape Wizard
 */
@Override IdsRepository provideIdsRepository(SharedPreferences defaultSharedPreferences,
    ContentResolver contentResolver) {
  return new IdsRepository(
      SecurePreferencesImplementation.getInstance(application.getApplicationContext(),
          defaultSharedPreferences), application,
      Settings.Secure.getString(contentResolver, Settings.Secure.ANDROID_ID)) {
    @Override @WorkerThread public synchronized String getGoogleAdvertisingId() {
      return defaultSharedPreferences.getString("googleAdvertisingId", null);
    }
  };
}
 
源代码19 项目: Noyze   文件: HeadsUpVolumePanel.java
void openMusic() {
    hide();
    if (hasAlbumArt) {
        launchMusicApp();
    } else {
        Intent volumeSettings = new Intent(Settings.ACTION_SOUND_SETTINGS);
        startActivity(volumeSettings);
    }
}
 
源代码20 项目: Fairy   文件: ItemActivity.java
private void requestPermission() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
        if (!Settings.canDrawOverlays(this)) {
            Toast.makeText(this, getResources().getString(R.string.grand_window_permission), Toast.LENGTH_SHORT).show();
            Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION, Uri.parse(String.format("package:%s", getPackageName())));
            startActivityForResult(intent, PERMISSION_RESULT_CODE);
        }
    }
}
 
源代码21 项目: Noyze   文件: VolumePanel.java
/** @return The default {@link android.content.Intent#ACTION_MEDIA_BUTTON} receiver, or null. */
public ComponentName getMediaButtonReceiver() {
    String receiverName = Settings.System.getString(
            getContext().getContentResolver(), Constants.getMediaButtonReceiver());
    if ((null != receiverName) && !receiverName.isEmpty())
        return ComponentName.unflattenFromString(receiverName);
    return null;
}
 
源代码22 项目: android_9.0.0_r45   文件: Sandman.java
private static boolean isScreenSaverActivatedOnDock(Context context) {
    int def = context.getResources().getBoolean(
            com.android.internal.R.bool.config_dreamsActivatedOnDockByDefault) ? 1 : 0;
    return Settings.Secure.getIntForUser(context.getContentResolver(),
            Settings.Secure.SCREENSAVER_ACTIVATE_ON_DOCK, def,
            UserHandle.USER_CURRENT) != 0;
}
 
源代码23 项目: LiveBlurListView   文件: Utilities.java
public static boolean isAutoBrightness(ContentResolver aContentResolver) {
    boolean automicBrightness = false;
    try {
        automicBrightness = Settings.System.getInt(aContentResolver,
                Settings.System.SCREEN_BRIGHTNESS_MODE) == Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC;
    } catch (SettingNotFoundException e) {
        e.printStackTrace();
    }
    return automicBrightness;
}
 
源代码24 项目: together-go   文件: MainActivity.java
private void showFilter() {
    if (Build.VERSION.SDK_INT > 22) {
        if (Settings.canDrawOverlays(this)) {
            windowManager.addView(filterView, filterLayoutParams);
        }
    }
    //showPets();
}
 
源代码25 项目: RelaxFinger   文件: AccessibilityUtil.java
public static boolean checkAccessibility() {
    int accessibilityEnabled = 0;
    final String service = context.getPackageName() + "/" + NavAccessibilityService.class.getCanonicalName();
    boolean accessibilityFound = false;
    try {
        accessibilityEnabled = Settings.Secure.getInt(
                context.getApplicationContext().getContentResolver(),
                android.provider.Settings.Secure.ACCESSIBILITY_ENABLED);
    } catch (Settings.SettingNotFoundException e) {
        Log.e("ACBU","Error finding setting, default accessibility to not found: "
                + e.getMessage());
    }

    TextUtils.SimpleStringSplitter mStringColonSplitter = new TextUtils.SimpleStringSplitter(':');

    if (accessibilityEnabled == 1) {
        String settingValue = Settings.Secure.getString(
                context.getApplicationContext().getContentResolver(),
                Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES);
        if (settingValue != null) {
            TextUtils.SimpleStringSplitter splitter = mStringColonSplitter;
            splitter.setString(settingValue);
            while (splitter.hasNext()) {
                String accessabilityService = splitter.next();

                if (accessabilityService.equalsIgnoreCase(service)) {
                    return true;
                }
            }
        }
    } else {
        Log.i("ACBU","***ACCESSIBILIY IS DISABLED***");
    }

    return accessibilityFound;
}
 
源代码26 项目: journaldev   文件: MainActivity.java
private void askForSystemOverlayPermission() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && !Settings.canDrawOverlays(this)) {

        //If the draw over permission is not available open the settings screen
        //to grant the permission.
        Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
                Uri.parse("package:" + getPackageName()));
        startActivityForResult(intent, DRAW_OVER_OTHER_APP_PERMISSION);
    }
}
 
@RequiresApi(api = Build.VERSION_CODES.M)
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    if (requestCode == 10) {
        if (Settings.canDrawOverlays(this)) {
            startWindowService();
        } else {
            Toast.makeText(WindowManagerActivity.this, "not granted", Toast.LENGTH_SHORT).show();
        }
    }
}
 
源代码28 项目: MifareClassicTool   文件: MainMenu.java
/**
 * Create a dialog that send user to NFC settings if NFC is off.
 * Alternatively the user can chose to use the App in editor only
 * mode or exit the App.
 * @return The created alert dialog.
 * @see #runSartUpNode(StartUpNode)
 */
private AlertDialog createNfcEnableDialog() {
    return new AlertDialog.Builder(this)
            .setTitle(R.string.dialog_nfc_not_enabled_title)
            .setMessage(R.string.dialog_nfc_not_enabled)
            .setIcon(android.R.drawable.ic_dialog_info)
            .setPositiveButton(R.string.action_nfc,
                    (dialog, which) -> {
                        // Goto NFC Settings.
                        if (Build.VERSION.SDK_INT >= 16) {
                            startActivity(new Intent(
                                    Settings.ACTION_NFC_SETTINGS));
                        } else {
                            startActivity(new Intent(
                                    Settings.ACTION_WIRELESS_SETTINGS));
                        }
                    })
            .setNeutralButton(R.string.action_editor_only,
                    (dialog, which) -> {
                        // Only use Editor.
                        useAsEditorOnly(true);
                        runSartUpNode(StartUpNode.DonateDialog);
                    })
            .setNegativeButton(R.string.action_exit_app,
                    (dialog, id) -> {
                        // Exit the App.
                        finish();
                    })
            .setOnCancelListener(
                    dialog -> finish())
            .create();
}
 
源代码29 项目: citra_android   文件: SettingsActivity.java
private boolean areSystemAnimationsEnabled()
{
	float duration = Settings.Global.getFloat(
			getContentResolver(),
			Settings.Global.ANIMATOR_DURATION_SCALE, 1);
	float transition = Settings.Global.getFloat(
			getContentResolver(),
			Settings.Global.TRANSITION_ANIMATION_SCALE, 1);
	return duration != 0 && transition != 0;
}
 
源代码30 项目: MiPushFramework   文件: XmsfApp.java
private HashSet<ComponentName> loadEnabledServices() {
    HashSet<ComponentName> hashSet = new HashSet<>();
    String string = Settings.Secure.getString(getContentResolver()
            , "enabled_notification_listeners");
    if (!(string == null || "".equals(string))) {
        String[] split = string.split(":");
        for (String unflattenFromString : split) {
            ComponentName unflattenFromString2 = ComponentName.unflattenFromString(unflattenFromString);
            if (unflattenFromString2 != null) {
                hashSet.add(unflattenFromString2);
            }
        }
    }
    return hashSet;
}