Snap for 10704513 from ef6ac74a15
to udc-qpr1-release
Change-Id: I2c6b85cdd2e08bc0af2b53733c5b8c179ea91011
This commit is contained in:
@@ -12008,12 +12008,14 @@
|
|||||||
|
|
||||||
<!-- The title of the bluetooth audio device type selection [CHAR LIMIT=none] -->
|
<!-- The title of the bluetooth audio device type selection [CHAR LIMIT=none] -->
|
||||||
<string name="bluetooth_details_audio_device_types_title">Audio Device Type</string>
|
<string name="bluetooth_details_audio_device_types_title">Audio Device Type</string>
|
||||||
<!-- The audio device type corresponding to unknown selected [CHAR LIMIT=none] -->
|
<!-- The audio device type corresponding to unknown device type [CHAR LIMIT=none] -->
|
||||||
<string name="bluetooth_details_audio_device_type_unknown">Unknown</string>
|
<string name="bluetooth_details_audio_device_type_unknown">Unknown</string>
|
||||||
<!-- The audio device type corresponding to none selected [CHAR LIMIT=none] -->
|
|
||||||
<string name="bluetooth_details_audio_device_type_speaker">Speaker</string>
|
|
||||||
<!-- The audio device type corresponding to speakers [CHAR LIMIT=none] -->
|
<!-- The audio device type corresponding to speakers [CHAR LIMIT=none] -->
|
||||||
|
<string name="bluetooth_details_audio_device_type_speaker">Speaker</string>
|
||||||
|
<!-- The audio device type corresponding to headphones [CHAR LIMIT=none] -->
|
||||||
<string name="bluetooth_details_audio_device_type_headphones">Headphones</string>
|
<string name="bluetooth_details_audio_device_type_headphones">Headphones</string>
|
||||||
|
<!-- The audio device type corresponding to hearing aid [CHAR LIMIT=none] -->
|
||||||
|
<string name="bluetooth_details_audio_device_type_hearing_aid">Hearing Aid</string>
|
||||||
<!-- The audio device type corresponding to car kit [CHAR LIMIT=none] -->
|
<!-- The audio device type corresponding to car kit [CHAR LIMIT=none] -->
|
||||||
<string name="bluetooth_details_audio_device_type_carkit">Car Kit</string>
|
<string name="bluetooth_details_audio_device_type_carkit">Car Kit</string>
|
||||||
<!-- The audio device type corresponding to other device type [CHAR LIMIT=none] -->
|
<!-- The audio device type corresponding to other device type [CHAR LIMIT=none] -->
|
||||||
|
@@ -66,7 +66,6 @@ import android.os.BatteryManager;
|
|||||||
import android.os.Binder;
|
import android.os.Binder;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Environment;
|
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.os.INetworkManagementService;
|
import android.os.INetworkManagementService;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
@@ -1354,14 +1353,4 @@ public final class Utils extends com.android.settingslib.Utils {
|
|||||||
return dreamsSupported && (!dreamsOnlyEnabledForDockUser || canCurrentUserDream(context));
|
return dreamsSupported && (!dreamsOnlyEnabledForDockUser || canCurrentUserDream(context));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get private total size directly.
|
|
||||||
* Referred from StorageManager
|
|
||||||
*/
|
|
||||||
public static long getPrimaryStorageSize() {
|
|
||||||
// TODO(b/288103116): remove this method once support by StorageManager.
|
|
||||||
return Environment.getDataDirectory().getTotalSpace()
|
|
||||||
+ Environment.getRootDirectory().getTotalSpace();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -19,6 +19,7 @@ package com.android.settings.bluetooth;
|
|||||||
import static android.bluetooth.BluetoothDevice.DEVICE_TYPE_LE;
|
import static android.bluetooth.BluetoothDevice.DEVICE_TYPE_LE;
|
||||||
import static android.media.AudioManager.AUDIO_DEVICE_CATEGORY_CARKIT;
|
import static android.media.AudioManager.AUDIO_DEVICE_CATEGORY_CARKIT;
|
||||||
import static android.media.AudioManager.AUDIO_DEVICE_CATEGORY_HEADPHONES;
|
import static android.media.AudioManager.AUDIO_DEVICE_CATEGORY_HEADPHONES;
|
||||||
|
import static android.media.AudioManager.AUDIO_DEVICE_CATEGORY_HEARING_AID;
|
||||||
import static android.media.AudioManager.AUDIO_DEVICE_CATEGORY_OTHER;
|
import static android.media.AudioManager.AUDIO_DEVICE_CATEGORY_OTHER;
|
||||||
import static android.media.AudioManager.AUDIO_DEVICE_CATEGORY_SPEAKER;
|
import static android.media.AudioManager.AUDIO_DEVICE_CATEGORY_SPEAKER;
|
||||||
import static android.media.AudioManager.AUDIO_DEVICE_CATEGORY_UNKNOWN;
|
import static android.media.AudioManager.AUDIO_DEVICE_CATEGORY_UNKNOWN;
|
||||||
@@ -149,6 +150,7 @@ public class BluetoothDetailsAudioDeviceTypeController extends BluetoothDetailsC
|
|||||||
mContext.getString(R.string.bluetooth_details_audio_device_type_speaker),
|
mContext.getString(R.string.bluetooth_details_audio_device_type_speaker),
|
||||||
mContext.getString(R.string.bluetooth_details_audio_device_type_headphones),
|
mContext.getString(R.string.bluetooth_details_audio_device_type_headphones),
|
||||||
mContext.getString(R.string.bluetooth_details_audio_device_type_carkit),
|
mContext.getString(R.string.bluetooth_details_audio_device_type_carkit),
|
||||||
|
mContext.getString(R.string.bluetooth_details_audio_device_type_hearing_aid),
|
||||||
mContext.getString(R.string.bluetooth_details_audio_device_type_other),
|
mContext.getString(R.string.bluetooth_details_audio_device_type_other),
|
||||||
});
|
});
|
||||||
mAudioDeviceTypePreference.setEntryValues(new CharSequence[]{
|
mAudioDeviceTypePreference.setEntryValues(new CharSequence[]{
|
||||||
@@ -156,6 +158,7 @@ public class BluetoothDetailsAudioDeviceTypeController extends BluetoothDetailsC
|
|||||||
Integer.toString(AUDIO_DEVICE_CATEGORY_SPEAKER),
|
Integer.toString(AUDIO_DEVICE_CATEGORY_SPEAKER),
|
||||||
Integer.toString(AUDIO_DEVICE_CATEGORY_HEADPHONES),
|
Integer.toString(AUDIO_DEVICE_CATEGORY_HEADPHONES),
|
||||||
Integer.toString(AUDIO_DEVICE_CATEGORY_CARKIT),
|
Integer.toString(AUDIO_DEVICE_CATEGORY_CARKIT),
|
||||||
|
Integer.toString(AUDIO_DEVICE_CATEGORY_HEARING_AID),
|
||||||
Integer.toString(AUDIO_DEVICE_CATEGORY_OTHER),
|
Integer.toString(AUDIO_DEVICE_CATEGORY_OTHER),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -30,4 +30,6 @@ public class FeatureFlags {
|
|||||||
public static final String CONTEXTUAL_HOME = "settings_contextual_home";
|
public static final String CONTEXTUAL_HOME = "settings_contextual_home";
|
||||||
public static final String SETTINGS_SEARCH_ALWAYS_EXPAND =
|
public static final String SETTINGS_SEARCH_ALWAYS_EXPAND =
|
||||||
"settings_search_always_expand";
|
"settings_search_always_expand";
|
||||||
|
public static final String PRESS_HOLD_NAV_HANDLE_TO_SEARCH =
|
||||||
|
"settings_press_hold_nav_handle_to_search";
|
||||||
}
|
}
|
||||||
|
@@ -211,9 +211,7 @@ public class StorageCategoryFragment extends DashboardFragment
|
|||||||
|
|
||||||
setLoading(false /* loading */, false /* animate */);
|
setLoading(false /* loading */, false /* animate */);
|
||||||
|
|
||||||
// TODO(b/288103116): replace with new API to get TotalBytes before rounding
|
final long privateUsedBytes = mStorageInfo.totalBytes - mStorageInfo.freeBytes;
|
||||||
// once support by StorageManager.
|
|
||||||
final long privateUsedBytes = Utils.getPrimaryStorageSize() - mStorageInfo.freeBytes;
|
|
||||||
mPreferenceController.setVolume(mSelectedStorageEntry.getVolumeInfo());
|
mPreferenceController.setVolume(mSelectedStorageEntry.getVolumeInfo());
|
||||||
mPreferenceController.setUsedSize(privateUsedBytes);
|
mPreferenceController.setUsedSize(privateUsedBytes);
|
||||||
mPreferenceController.setTotalSize(mStorageInfo.totalBytes);
|
mPreferenceController.setTotalSize(mStorageInfo.totalBytes);
|
||||||
|
@@ -387,9 +387,7 @@ public class StorageDashboardFragment extends DashboardFragment
|
|||||||
|
|
||||||
setLoading(false /* loading */, false /* animate */);
|
setLoading(false /* loading */, false /* animate */);
|
||||||
|
|
||||||
// TODO(b/288103116): replace with new API to get TotalBytes before rounding
|
final long privateUsedBytes = mStorageInfo.totalBytes - mStorageInfo.freeBytes;
|
||||||
// once support by StorageManager.
|
|
||||||
final long privateUsedBytes = Utils.getPrimaryStorageSize() - mStorageInfo.freeBytes;
|
|
||||||
mPreferenceController.setVolume(mSelectedStorageEntry.getVolumeInfo());
|
mPreferenceController.setVolume(mSelectedStorageEntry.getVolumeInfo());
|
||||||
mPreferenceController.setUsedSize(privateUsedBytes);
|
mPreferenceController.setUsedSize(privateUsedBytes);
|
||||||
mPreferenceController.setTotalSize(mStorageInfo.totalBytes);
|
mPreferenceController.setTotalSize(mStorageInfo.totalBytes);
|
||||||
|
@@ -75,9 +75,7 @@ public class TopLevelStoragePreferenceController extends BasePreferenceControlle
|
|||||||
final PrivateStorageInfo info = PrivateStorageInfo.getPrivateStorageInfo(
|
final PrivateStorageInfo info = PrivateStorageInfo.getPrivateStorageInfo(
|
||||||
getStorageManagerVolumeProvider());
|
getStorageManagerVolumeProvider());
|
||||||
|
|
||||||
// TODO(b/288103116): replace with new API to get TotalBytes before rounding
|
long usedBytes = info.totalBytes - info.freeBytes;
|
||||||
// once support by StorageManager.
|
|
||||||
long usedBytes = Utils.getPrimaryStorageSize() - info.freeBytes;
|
|
||||||
storageCacheHelper.cacheUsedSize(usedBytes);
|
storageCacheHelper.cacheUsedSize(usedBytes);
|
||||||
ThreadUtils.postOnMainThread(() -> {
|
ThreadUtils.postOnMainThread(() -> {
|
||||||
preference.setSummary(
|
preference.setSummary(
|
||||||
|
@@ -26,7 +26,6 @@ import androidx.preference.Preference;
|
|||||||
import androidx.preference.PreferenceScreen;
|
import androidx.preference.PreferenceScreen;
|
||||||
|
|
||||||
import com.android.settings.R;
|
import com.android.settings.R;
|
||||||
import com.android.settings.Utils;
|
|
||||||
import com.android.settings.core.BasePreferenceController;
|
import com.android.settings.core.BasePreferenceController;
|
||||||
import com.android.settingslib.utils.ThreadUtils;
|
import com.android.settingslib.utils.ThreadUtils;
|
||||||
import com.android.settingslib.widget.UsageProgressBarPreference;
|
import com.android.settingslib.widget.UsageProgressBarPreference;
|
||||||
@@ -93,9 +92,7 @@ public class StorageUsageProgressBarPreferenceController extends BasePreferenceC
|
|||||||
if (mStorageEntry.isPrivate()) {
|
if (mStorageEntry.isPrivate()) {
|
||||||
// StorageStatsManager can only query private storages.
|
// StorageStatsManager can only query private storages.
|
||||||
mTotalBytes = mStorageStatsManager.getTotalBytes(mStorageEntry.getFsUuid());
|
mTotalBytes = mStorageStatsManager.getTotalBytes(mStorageEntry.getFsUuid());
|
||||||
// TODO(b/288103116): replace with new API to get TotalBytes before rounding
|
mUsedBytes = mTotalBytes
|
||||||
// once support by StorageManager.
|
|
||||||
mUsedBytes = Utils.getPrimaryStorageSize()
|
|
||||||
- mStorageStatsManager.getFreeBytes(mStorageEntry.getFsUuid());
|
- mStorageStatsManager.getFreeBytes(mStorageEntry.getFsUuid());
|
||||||
} else {
|
} else {
|
||||||
final File rootFile = mStorageEntry.getPath();
|
final File rootFile = mStorageEntry.getPath();
|
||||||
|
@@ -52,7 +52,8 @@ public class SystemNavigationPreferenceController extends BasePreferenceControll
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean isGestureAvailable(Context context) {
|
/** Returns {@code true} if gesture is available. */
|
||||||
|
public static boolean isGestureAvailable(Context context) {
|
||||||
// Skip if the swipe up settings are not available
|
// Skip if the swipe up settings are not available
|
||||||
if (!context.getResources().getBoolean(
|
if (!context.getResources().getBoolean(
|
||||||
com.android.internal.R.bool.config_swipe_up_gesture_setting_available)) {
|
com.android.internal.R.bool.config_swipe_up_gesture_setting_available)) {
|
||||||
|
Reference in New Issue
Block a user