Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 61173490 authored by Jacky Wang's avatar Jacky Wang
Browse files

[Catalyst] Inline SettingsSlicesContract constants in SettingsContract

SettingsSlicesContract is only available on API >= 28.

Bug: 388061003
Flag: EXEMPT refactor
Test: N/A
Change-Id: I40c8a80edf241e76215122b19fed5b81737d2511
parent 04651464
Loading
Loading
Loading
Loading
+30 −12
Original line number Diff line number Diff line
@@ -16,22 +16,40 @@

package com.android.settings.contract

import android.provider.SettingsSlicesContract

/** Contract key for the "Airplane Mode" setting. */
const val KEY_AIRPLANE_MODE = SettingsSlicesContract.KEY_AIRPLANE_MODE
// NOTES:
//   - Once a key is added, never modify the literal string.
//   - Remove a key might cause backward compatibility issues.
//   - Avoid importing other class to reduce dependency whenever possible.

/**
 * Contract key for the "Airplane Mode" setting, identical to
 * [android.provider.SettingsSlicesContract.KEY_AIRPLANE_MODE].
 */
const val KEY_AIRPLANE_MODE = "airplane_mode"

/** Contract key for the "Battery Saver" setting. */
const val KEY_BATTERY_SAVER = SettingsSlicesContract.KEY_BATTERY_SAVER
/**
 * Contract key for the "Battery Saver" setting, identical to
 * [android.provider.SettingsSlicesContract.KEY_BATTERY_SAVER].
 */
const val KEY_BATTERY_SAVER = "battery_saver"

/** Contract key for the "Bluetooth" setting. */
const val KEY_BLUETOOTH = SettingsSlicesContract.KEY_BLUETOOTH
/**
 * Contract key for the "Bluetooth" setting, identical to
 * [android.provider.SettingsSlicesContract.KEY_BLUETOOTH].
 */
const val KEY_BLUETOOTH = "bluetooth"

/** Contract key for the "Location" setting. */
const val KEY_LOCATION = SettingsSlicesContract.KEY_LOCATION
/**
 * Contract key for the "Location" setting, identical to
 * [android.provider.SettingsSlicesContract.KEY_LOCATION].
 */
const val KEY_LOCATION = "location"

/** Contract key for the "Wi-fi" setting. */
const val KEY_WIFI = SettingsSlicesContract.KEY_WIFI
/**
 * Contract key for the "Wi-fi" setting, identical to
 * [android.provider.SettingsSlicesContract.KEY_WIFI].
 */
const val KEY_WIFI = "wifi"

/** Contract key for the "Use Wi-Fi calling" setting. */
const val KEY_WIFI_CALLING = "wifi_calling"