Loading src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java +7 −0 Original line number Diff line number Diff line Loading @@ -376,6 +376,13 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra || enableAngleController.isDefaultValue())) { disableDeveloperOptions(); } else { // Disabling developer options in page-agnostic mode isn't supported as device // isn't in production state if (Enable16kUtils.isPageAgnosticModeOn(getContext())) { Enable16kUtils.showPageAgnosticWarning(getContext()); onDisableDevelopmentOptionsRejected(); return; } DisableDevSettingsDialogFragment.show(this /* host */); } } Loading src/com/android/settings/development/Enable16kPagesPreferenceController.java +7 −3 Original line number Diff line number Diff line Loading @@ -207,7 +207,10 @@ public class Enable16kPagesPreferenceController extends DeveloperOptionsPreferen int status = data.getInt(SystemUpdateManager.KEY_STATUS); if (status != SystemUpdateManager.STATUS_UNKNOWN && status != SystemUpdateManager.STATUS_IDLE) { throw new RuntimeException("System has pending update!"); throw new RuntimeException( "System has pending update! Please restart the device to complete applying" + " pending update. If you are seeing this after using 16KB developer" + " options, please check configuration and OTA packages!"); } // Publish system update info Loading Loading @@ -313,7 +316,7 @@ public class Enable16kPagesPreferenceController extends DeveloperOptionsPreferen } private void displayToast(String message) { Toast.makeText(mContext, message, Toast.LENGTH_SHORT).show(); Toast.makeText(mContext, message, Toast.LENGTH_LONG).show(); } @Override Loading @@ -330,7 +333,7 @@ public class Enable16kPagesPreferenceController extends DeveloperOptionsPreferen @Override public void onFailure(@NonNull Throwable t) { Log.e(TAG, "Failed to change the /data partition with ext4"); Log.e(TAG, "Failed to change the /data partition to ext4"); displayToast(mContext.getString(R.string.format_ext4_failure_toast)); } }, Loading Loading @@ -405,6 +408,7 @@ public class Enable16kPagesPreferenceController extends DeveloperOptionsPreferen LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT); progressBar.setLayoutParams(params); progressBar.setPadding(0, 24, 0, 24); builder.setView(progressBar); builder.setCancelable(false); return builder.create(); Loading src/com/android/settings/development/EnableExt4WarningDialog.java +2 −1 Original line number Diff line number Diff line Loading @@ -70,8 +70,9 @@ public class EnableExt4WarningDialog extends InstrumentedDialogFragment public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) { return new AlertDialog.Builder(getActivity()) .setTitle(R.string.confirm_format_ext4_title) .setIcon(R.drawable.ic_delete_accent) .setMessage(R.string.confirm_format_ext4_text) .setPositiveButton(android.R.string.ok, this /* onClickListener */) .setPositiveButton(R.string.main_clear_confirm_title, this /* onClickListener */) .setNegativeButton(android.R.string.cancel, this /* onClickListener */) .create(); } Loading Loading
src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java +7 −0 Original line number Diff line number Diff line Loading @@ -376,6 +376,13 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra || enableAngleController.isDefaultValue())) { disableDeveloperOptions(); } else { // Disabling developer options in page-agnostic mode isn't supported as device // isn't in production state if (Enable16kUtils.isPageAgnosticModeOn(getContext())) { Enable16kUtils.showPageAgnosticWarning(getContext()); onDisableDevelopmentOptionsRejected(); return; } DisableDevSettingsDialogFragment.show(this /* host */); } } Loading
src/com/android/settings/development/Enable16kPagesPreferenceController.java +7 −3 Original line number Diff line number Diff line Loading @@ -207,7 +207,10 @@ public class Enable16kPagesPreferenceController extends DeveloperOptionsPreferen int status = data.getInt(SystemUpdateManager.KEY_STATUS); if (status != SystemUpdateManager.STATUS_UNKNOWN && status != SystemUpdateManager.STATUS_IDLE) { throw new RuntimeException("System has pending update!"); throw new RuntimeException( "System has pending update! Please restart the device to complete applying" + " pending update. If you are seeing this after using 16KB developer" + " options, please check configuration and OTA packages!"); } // Publish system update info Loading Loading @@ -313,7 +316,7 @@ public class Enable16kPagesPreferenceController extends DeveloperOptionsPreferen } private void displayToast(String message) { Toast.makeText(mContext, message, Toast.LENGTH_SHORT).show(); Toast.makeText(mContext, message, Toast.LENGTH_LONG).show(); } @Override Loading @@ -330,7 +333,7 @@ public class Enable16kPagesPreferenceController extends DeveloperOptionsPreferen @Override public void onFailure(@NonNull Throwable t) { Log.e(TAG, "Failed to change the /data partition with ext4"); Log.e(TAG, "Failed to change the /data partition to ext4"); displayToast(mContext.getString(R.string.format_ext4_failure_toast)); } }, Loading Loading @@ -405,6 +408,7 @@ public class Enable16kPagesPreferenceController extends DeveloperOptionsPreferen LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT); progressBar.setLayoutParams(params); progressBar.setPadding(0, 24, 0, 24); builder.setView(progressBar); builder.setCancelable(false); return builder.create(); Loading
src/com/android/settings/development/EnableExt4WarningDialog.java +2 −1 Original line number Diff line number Diff line Loading @@ -70,8 +70,9 @@ public class EnableExt4WarningDialog extends InstrumentedDialogFragment public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) { return new AlertDialog.Builder(getActivity()) .setTitle(R.string.confirm_format_ext4_title) .setIcon(R.drawable.ic_delete_accent) .setMessage(R.string.confirm_format_ext4_text) .setPositiveButton(android.R.string.ok, this /* onClickListener */) .setPositiveButton(R.string.main_clear_confirm_title, this /* onClickListener */) .setNegativeButton(android.R.string.cancel, this /* onClickListener */) .create(); } Loading