Loading res/values/strings.xml +0 −2 Original line number Diff line number Diff line Loading @@ -10666,13 +10666,11 @@ <string-array name="game_driver_all_apps_preference_values"> <item>@string/game_driver_app_preference_default</item> <item>@string/game_driver_app_preference_game_driver</item> <item>@string/game_driver_app_preference_prerelease_driver</item> </string-array> <!-- All the values for Game Driver app preference [CHAR LIMIT=50] --> <string-array name="game_driver_app_preference_values"> <item>@string/game_driver_app_preference_default</item> <item>@string/game_driver_app_preference_game_driver</item> <item>@string/game_driver_app_preference_prerelease_driver</item> <item>@string/game_driver_app_preference_system</item> </string-array> src/com/android/settings/MasterClear.java +1 −2 Original line number Diff line number Diff line Loading @@ -182,8 +182,7 @@ public class MasterClear extends InstrumentedFragment implements OnGlobalLayoutL void showFinalConfirmation() { final Bundle args = new Bundle(); args.putBoolean(ERASE_EXTERNAL_EXTRA, mExternalStorage.isChecked()); args.putBoolean(ERASE_ESIMS_EXTRA, mEsimStorageContainer.getVisibility() == View.VISIBLE && mEsimStorage.isChecked()); args.putBoolean(ERASE_ESIMS_EXTRA, mEsimStorage.isChecked()); new SubSettingLauncher(getContext()) .setDestination(MasterClearConfirm.class.getName()) .setArguments(args) Loading src/com/android/settings/RegulatoryInfoDisplayActivity.java +20 −5 Original line number Diff line number Diff line Loading @@ -119,7 +119,8 @@ public class RegulatoryInfoDisplayActivity extends Activity implements } } private int getResourceId() { @VisibleForTesting int getResourceId() { // Use regulatory_info by default. int resId = getResources().getIdentifier( REGULATORY_INFO_RESOURCE, "drawable", getPackageName()); Loading @@ -134,6 +135,18 @@ public class RegulatoryInfoDisplayActivity extends Activity implements resId = id; } } // When hardware coo property exists, use regulatory_info_<sku>_<coo> resource if valid. final String coo = getCoo(); if (!TextUtils.isEmpty(coo) && !TextUtils.isEmpty(sku)) { final String regulatory_info_coo_res = REGULATORY_INFO_RESOURCE + "_" + sku.toLowerCase() + "_" + coo.toLowerCase(); final int id = getResources().getIdentifier( regulatory_info_coo_res, "drawable", getPackageName()); if (id != 0) { resId = id; } } return resId; } Loading @@ -142,13 +155,15 @@ public class RegulatoryInfoDisplayActivity extends Activity implements finish(); // close the activity } @VisibleForTesting public static String getSku() { private String getCoo() { return SystemProperties.get("ro.boot.hardware.coo", ""); } private String getSku() { return SystemProperties.get("ro.boot.hardware.sku", ""); } @VisibleForTesting public static String getRegulatoryInfoImageFileName() { private String getRegulatoryInfoImageFileName() { final String sku = getSku(); if (TextUtils.isEmpty(sku)) { return DEFAULT_REGULATORY_INFO_FILEPATH; Loading src/com/android/settings/deviceinfo/TopLevelStoragePreferenceController.java +20 −9 Original line number Diff line number Diff line Loading @@ -20,10 +20,13 @@ import android.content.Context; import android.os.storage.StorageManager; import android.text.format.Formatter; import androidx.preference.Preference; import com.android.settings.R; import com.android.settings.core.BasePreferenceController; import com.android.settingslib.deviceinfo.PrivateStorageInfo; import com.android.settingslib.deviceinfo.StorageManagerVolumeProvider; import com.android.settingslib.utils.ThreadUtils; import java.text.NumberFormat; Loading @@ -44,14 +47,22 @@ public class TopLevelStoragePreferenceController extends BasePreferenceControlle } @Override public CharSequence getSummary() { // TODO: Register listener. protected void refreshSummary(Preference preference) { if (preference == null) { return; } ThreadUtils.postOnBackgroundThread(() -> { final NumberFormat percentageFormat = NumberFormat.getPercentInstance(); final PrivateStorageInfo info = PrivateStorageInfo.getPrivateStorageInfo( mStorageManagerVolumeProvider); double privateUsedBytes = info.totalBytes - info.freeBytes; return mContext.getString(R.string.storage_summary, final double privateUsedBytes = info.totalBytes - info.freeBytes; ThreadUtils.postOnMainThread(() -> { preference.setSummary(mContext.getString(R.string.storage_summary, percentageFormat.format(privateUsedBytes / info.totalBytes), Formatter.formatFileSize(mContext, info.freeBytes)); Formatter.formatFileSize(mContext, info.freeBytes))); }); }); } } src/com/android/settings/password/BiometricFragment.java +8 −0 Original line number Diff line number Diff line Loading @@ -58,11 +58,13 @@ public class BiometricFragment extends InstrumentedFragment { private Bundle mBundle; private BiometricPrompt mBiometricPrompt; private CancellationSignal mCancellationSignal; private boolean mAuthenticating; private AuthenticationCallback mAuthenticationCallback = new AuthenticationCallback() { @Override public void onAuthenticationError(int error, @NonNull CharSequence message) { mAuthenticating = false; mClientExecutor.execute(() -> { mClientCallback.onAuthenticationError(error, message); }); Loading @@ -71,6 +73,7 @@ public class BiometricFragment extends InstrumentedFragment { @Override public void onAuthenticationSucceeded(AuthenticationResult result) { mAuthenticating = false; mClientExecutor.execute(() -> { mClientCallback.onAuthenticationSucceeded(result); }); Loading Loading @@ -134,6 +137,10 @@ public class BiometricFragment extends InstrumentedFragment { } } boolean isAuthenticating() { return mAuthenticating; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Loading Loading @@ -180,6 +187,7 @@ public class BiometricFragment extends InstrumentedFragment { mCancellationSignal = new CancellationSignal(); // TODO: CC doesn't use crypto for now mAuthenticating = true; mBiometricPrompt.authenticateUser(mCancellationSignal, mClientExecutor, mAuthenticationCallback, mUserId, mCancelCallback); } Loading Loading
res/values/strings.xml +0 −2 Original line number Diff line number Diff line Loading @@ -10666,13 +10666,11 @@ <string-array name="game_driver_all_apps_preference_values"> <item>@string/game_driver_app_preference_default</item> <item>@string/game_driver_app_preference_game_driver</item> <item>@string/game_driver_app_preference_prerelease_driver</item> </string-array> <!-- All the values for Game Driver app preference [CHAR LIMIT=50] --> <string-array name="game_driver_app_preference_values"> <item>@string/game_driver_app_preference_default</item> <item>@string/game_driver_app_preference_game_driver</item> <item>@string/game_driver_app_preference_prerelease_driver</item> <item>@string/game_driver_app_preference_system</item> </string-array>
src/com/android/settings/MasterClear.java +1 −2 Original line number Diff line number Diff line Loading @@ -182,8 +182,7 @@ public class MasterClear extends InstrumentedFragment implements OnGlobalLayoutL void showFinalConfirmation() { final Bundle args = new Bundle(); args.putBoolean(ERASE_EXTERNAL_EXTRA, mExternalStorage.isChecked()); args.putBoolean(ERASE_ESIMS_EXTRA, mEsimStorageContainer.getVisibility() == View.VISIBLE && mEsimStorage.isChecked()); args.putBoolean(ERASE_ESIMS_EXTRA, mEsimStorage.isChecked()); new SubSettingLauncher(getContext()) .setDestination(MasterClearConfirm.class.getName()) .setArguments(args) Loading
src/com/android/settings/RegulatoryInfoDisplayActivity.java +20 −5 Original line number Diff line number Diff line Loading @@ -119,7 +119,8 @@ public class RegulatoryInfoDisplayActivity extends Activity implements } } private int getResourceId() { @VisibleForTesting int getResourceId() { // Use regulatory_info by default. int resId = getResources().getIdentifier( REGULATORY_INFO_RESOURCE, "drawable", getPackageName()); Loading @@ -134,6 +135,18 @@ public class RegulatoryInfoDisplayActivity extends Activity implements resId = id; } } // When hardware coo property exists, use regulatory_info_<sku>_<coo> resource if valid. final String coo = getCoo(); if (!TextUtils.isEmpty(coo) && !TextUtils.isEmpty(sku)) { final String regulatory_info_coo_res = REGULATORY_INFO_RESOURCE + "_" + sku.toLowerCase() + "_" + coo.toLowerCase(); final int id = getResources().getIdentifier( regulatory_info_coo_res, "drawable", getPackageName()); if (id != 0) { resId = id; } } return resId; } Loading @@ -142,13 +155,15 @@ public class RegulatoryInfoDisplayActivity extends Activity implements finish(); // close the activity } @VisibleForTesting public static String getSku() { private String getCoo() { return SystemProperties.get("ro.boot.hardware.coo", ""); } private String getSku() { return SystemProperties.get("ro.boot.hardware.sku", ""); } @VisibleForTesting public static String getRegulatoryInfoImageFileName() { private String getRegulatoryInfoImageFileName() { final String sku = getSku(); if (TextUtils.isEmpty(sku)) { return DEFAULT_REGULATORY_INFO_FILEPATH; Loading
src/com/android/settings/deviceinfo/TopLevelStoragePreferenceController.java +20 −9 Original line number Diff line number Diff line Loading @@ -20,10 +20,13 @@ import android.content.Context; import android.os.storage.StorageManager; import android.text.format.Formatter; import androidx.preference.Preference; import com.android.settings.R; import com.android.settings.core.BasePreferenceController; import com.android.settingslib.deviceinfo.PrivateStorageInfo; import com.android.settingslib.deviceinfo.StorageManagerVolumeProvider; import com.android.settingslib.utils.ThreadUtils; import java.text.NumberFormat; Loading @@ -44,14 +47,22 @@ public class TopLevelStoragePreferenceController extends BasePreferenceControlle } @Override public CharSequence getSummary() { // TODO: Register listener. protected void refreshSummary(Preference preference) { if (preference == null) { return; } ThreadUtils.postOnBackgroundThread(() -> { final NumberFormat percentageFormat = NumberFormat.getPercentInstance(); final PrivateStorageInfo info = PrivateStorageInfo.getPrivateStorageInfo( mStorageManagerVolumeProvider); double privateUsedBytes = info.totalBytes - info.freeBytes; return mContext.getString(R.string.storage_summary, final double privateUsedBytes = info.totalBytes - info.freeBytes; ThreadUtils.postOnMainThread(() -> { preference.setSummary(mContext.getString(R.string.storage_summary, percentageFormat.format(privateUsedBytes / info.totalBytes), Formatter.formatFileSize(mContext, info.freeBytes)); Formatter.formatFileSize(mContext, info.freeBytes))); }); }); } }
src/com/android/settings/password/BiometricFragment.java +8 −0 Original line number Diff line number Diff line Loading @@ -58,11 +58,13 @@ public class BiometricFragment extends InstrumentedFragment { private Bundle mBundle; private BiometricPrompt mBiometricPrompt; private CancellationSignal mCancellationSignal; private boolean mAuthenticating; private AuthenticationCallback mAuthenticationCallback = new AuthenticationCallback() { @Override public void onAuthenticationError(int error, @NonNull CharSequence message) { mAuthenticating = false; mClientExecutor.execute(() -> { mClientCallback.onAuthenticationError(error, message); }); Loading @@ -71,6 +73,7 @@ public class BiometricFragment extends InstrumentedFragment { @Override public void onAuthenticationSucceeded(AuthenticationResult result) { mAuthenticating = false; mClientExecutor.execute(() -> { mClientCallback.onAuthenticationSucceeded(result); }); Loading Loading @@ -134,6 +137,10 @@ public class BiometricFragment extends InstrumentedFragment { } } boolean isAuthenticating() { return mAuthenticating; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Loading Loading @@ -180,6 +187,7 @@ public class BiometricFragment extends InstrumentedFragment { mCancellationSignal = new CancellationSignal(); // TODO: CC doesn't use crypto for now mAuthenticating = true; mBiometricPrompt.authenticateUser(mCancellationSignal, mClientExecutor, mAuthenticationCallback, mUserId, mCancelCallback); } Loading