Search in sources :

Example 96 with SubSettingLauncher

use of com.android.settings.core.SubSettingLauncher in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class StorageItemPreferenceController method getAppsIntent.

private Intent getAppsIntent() {
    if (mVolume == null) {
        return null;
    }
    final Bundle args = getWorkAnnotatedBundle(3);
    args.putString(ManageApplications.EXTRA_CLASSNAME, Settings.StorageUseActivity.class.getName());
    args.putString(ManageApplications.EXTRA_VOLUME_UUID, mVolume.getFsUuid());
    args.putString(ManageApplications.EXTRA_VOLUME_NAME, mVolume.getDescription());
    return new SubSettingLauncher(mContext).setDestination(ManageApplications.class.getName()).setTitleRes(R.string.apps_storage).setArguments(args).setSourceMetricsCategory(mMetricsFeatureProvider.getMetricsCategory(mFragment)).toIntent();
}
Also used : SubSettingLauncher(com.android.settings.core.SubSettingLauncher) Bundle(android.os.Bundle) ManageApplications(com.android.settings.applications.manageapplications.ManageApplications)

Example 97 with SubSettingLauncher

use of com.android.settings.core.SubSettingLauncher in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class UserProfileController method handlePreferenceTreeClick.

@Override
public boolean handlePreferenceTreeClick(Preference preference) {
    if (preference != null && mStoragePreference == preference) {
        final Bundle args = new Bundle();
        args.putInt(StorageProfileFragment.USER_ID_EXTRA, mUser.id);
        args.putString(VolumeInfo.EXTRA_VOLUME_ID, VolumeInfo.ID_PRIVATE_INTERNAL);
        new SubSettingLauncher(mContext).setDestination(StorageProfileFragment.class.getName()).setArguments(args).setTitleText(mUser.name).setSourceMetricsCategory(SettingsEnums.DEVICEINFO_STORAGE).launch();
        return true;
    }
    return false;
}
Also used : SubSettingLauncher(com.android.settings.core.SubSettingLauncher) Bundle(android.os.Bundle) StorageProfileFragment(com.android.settings.deviceinfo.StorageProfileFragment)

Example 98 with SubSettingLauncher

use of com.android.settings.core.SubSettingLauncher in project android_packages_apps_Settings by omnirom.

the class ResetNetwork method showFinalConfirmation.

@VisibleForTesting
void showFinalConfirmation() {
    Bundle args = new Bundle();
    if (mSubscriptions != null && mSubscriptions.size() > 0) {
        int selectedIndex = mSubscriptionSpinner.getSelectedItemPosition();
        SubscriptionInfo subscription = mSubscriptions.get(selectedIndex);
        args.putInt(SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX, subscription.getSubscriptionId());
    }
    args.putBoolean(MainClear.ERASE_ESIMS_EXTRA, mEsimContainer.getVisibility() == View.VISIBLE && mEsimCheckbox.isChecked());
    new SubSettingLauncher(getContext()).setDestination(ResetNetworkConfirm.class.getName()).setArguments(args).setTitleRes(R.string.reset_network_confirm_title).setSourceMetricsCategory(getMetricsCategory()).launch();
}
Also used : SubSettingLauncher(com.android.settings.core.SubSettingLauncher) Bundle(android.os.Bundle) SubscriptionInfo(android.telephony.SubscriptionInfo) VisibleForTesting(androidx.annotation.VisibleForTesting)

Example 99 with SubSettingLauncher

use of com.android.settings.core.SubSettingLauncher in project android_packages_apps_Settings by omnirom.

the class AccessibilityHearingAidPreferenceController method launchBluetoothDeviceDetailSetting.

@VisibleForTesting
void launchBluetoothDeviceDetailSetting(final CachedBluetoothDevice device) {
    if (device == null) {
        return;
    }
    final Bundle args = new Bundle();
    args.putString(BluetoothDeviceDetailsFragment.KEY_DEVICE_ADDRESS, device.getDevice().getAddress());
    new SubSettingLauncher(mContext).setDestination(BluetoothDeviceDetailsFragment.class.getName()).setArguments(args).setTitleRes(R.string.device_details_title).setSourceMetricsCategory(SettingsEnums.ACCESSIBILITY).launch();
}
Also used : SubSettingLauncher(com.android.settings.core.SubSettingLauncher) Bundle(android.os.Bundle) BluetoothDeviceDetailsFragment(com.android.settings.bluetooth.BluetoothDeviceDetailsFragment) VisibleForTesting(androidx.annotation.VisibleForTesting)

Example 100 with SubSettingLauncher

use of com.android.settings.core.SubSettingLauncher in project android_packages_apps_Settings by omnirom.

the class BluetoothDeviceUpdater method launchDeviceDetails.

/**
 * Get {@link CachedBluetoothDevice} from {@link Preference} and it is used to init
 * {@link SubSettingLauncher} to launch {@link BluetoothDeviceDetailsFragment}
 */
protected void launchDeviceDetails(Preference preference) {
    mMetricsFeatureProvider.logClickedPreference(preference, mFragment.getMetricsCategory());
    final CachedBluetoothDevice device = ((BluetoothDevicePreference) preference).getBluetoothDevice();
    if (device == null) {
        return;
    }
    final Bundle args = new Bundle();
    args.putString(BluetoothDeviceDetailsFragment.KEY_DEVICE_ADDRESS, device.getDevice().getAddress());
    new SubSettingLauncher(mFragment.getContext()).setDestination(BluetoothDeviceDetailsFragment.class.getName()).setArguments(args).setTitleRes(R.string.device_details_title).setSourceMetricsCategory(mFragment.getMetricsCategory()).launch();
}
Also used : CachedBluetoothDevice(com.android.settingslib.bluetooth.CachedBluetoothDevice) SubSettingLauncher(com.android.settings.core.SubSettingLauncher) Bundle(android.os.Bundle)

Aggregations

SubSettingLauncher (com.android.settings.core.SubSettingLauncher)135 Bundle (android.os.Bundle)116 Intent (android.content.Intent)24 VisibleForTesting (androidx.annotation.VisibleForTesting)16 Preference (androidx.preference.Preference)14 UserHandle (android.os.UserHandle)10 ManageApplications (com.android.settings.applications.manageapplications.ManageApplications)10 Context (android.content.Context)9 PendingIntent (android.app.PendingIntent)6 PackageManager (android.content.pm.PackageManager)5 ComponentName (android.content.ComponentName)4 PersistableBundle (android.os.PersistableBundle)4 ApplicationsState (com.android.settingslib.applications.ApplicationsState)4 UserManager (android.os.UserManager)3 View (android.view.View)3 NetworkSelectSettings (com.android.settings.network.telephony.NetworkSelectSettings)3 Activity (android.app.Activity)2 NotificationChannel (android.app.NotificationChannel)2 Drawable (android.graphics.drawable.Drawable)2 Uri (android.net.Uri)2