Loading res/values/strings.xml +5 −0 Original line number Diff line number Diff line Loading @@ -13189,6 +13189,11 @@ Data usage charges may apply.</string> <!-- [CHAR LIMIT=200] Manage applications, text for dialog when killing persistent apps--> <string name="stop_app_dlg_text">Application will be stopped to apply page size compat setting.</string> <!-- Error messages for 16 KB Developer option--> <string name="error_pending_updates">Kernel update failed. Check and install any pending updates.</string> <string name="error_ota_failed">Kernel update failed. Error occurred while applying OTA.</string> <!-- DSU Loader. Do not translate. --> <string name="dsu_loader_title" translatable="false">DSU Loader</string> src/com/android/settings/development/Enable16kPagesPreferenceController.java +14 −6 Original line number Diff line number Diff line Loading @@ -186,8 +186,14 @@ public class Enable16kPagesPreferenceController extends DeveloperOptionsPreferen public void onFailure(@NonNull Throwable t) { hideProgressDialog(); Log.e(TAG, "Failed to call applyPayload of UpdateEngineStable!", t); // installUpdate will always throw localized messages. String message = t.getMessage(); if (message != null) { displayToast(message); } else { displayToast(mContext.getString(R.string.toast_16k_update_failed_text)); } } }, ContextCompat.getMainExecutor(mContext)); } Loading @@ -208,10 +214,8 @@ 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! 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!"); Log.e(TAG, "SystemUpdateManager is not available. Status :" + status); throw new RuntimeException(mContext.getString(R.string.error_pending_updates)); } // Publish system update info Loading @@ -223,7 +227,11 @@ public class Enable16kPagesPreferenceController extends DeveloperOptionsPreferen Log.i(TAG, "Update file path is " + updateFile.getAbsolutePath()); applyUpdateFile(updateFile); } catch (IOException e) { throw new RuntimeException(e); Log.e(TAG, "Error occurred while applying OTA ", e); throw new RuntimeException(mContext.getString(R.string.error_ota_failed)); } catch (Exception e) { Log.e(TAG, "Unknown error occurred while applying OTA ", e); throw new RuntimeException(mContext.getString(R.string.toast_16k_update_failed_text)); } } Loading Loading
res/values/strings.xml +5 −0 Original line number Diff line number Diff line Loading @@ -13189,6 +13189,11 @@ Data usage charges may apply.</string> <!-- [CHAR LIMIT=200] Manage applications, text for dialog when killing persistent apps--> <string name="stop_app_dlg_text">Application will be stopped to apply page size compat setting.</string> <!-- Error messages for 16 KB Developer option--> <string name="error_pending_updates">Kernel update failed. Check and install any pending updates.</string> <string name="error_ota_failed">Kernel update failed. Error occurred while applying OTA.</string> <!-- DSU Loader. Do not translate. --> <string name="dsu_loader_title" translatable="false">DSU Loader</string>
src/com/android/settings/development/Enable16kPagesPreferenceController.java +14 −6 Original line number Diff line number Diff line Loading @@ -186,8 +186,14 @@ public class Enable16kPagesPreferenceController extends DeveloperOptionsPreferen public void onFailure(@NonNull Throwable t) { hideProgressDialog(); Log.e(TAG, "Failed to call applyPayload of UpdateEngineStable!", t); // installUpdate will always throw localized messages. String message = t.getMessage(); if (message != null) { displayToast(message); } else { displayToast(mContext.getString(R.string.toast_16k_update_failed_text)); } } }, ContextCompat.getMainExecutor(mContext)); } Loading @@ -208,10 +214,8 @@ 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! 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!"); Log.e(TAG, "SystemUpdateManager is not available. Status :" + status); throw new RuntimeException(mContext.getString(R.string.error_pending_updates)); } // Publish system update info Loading @@ -223,7 +227,11 @@ public class Enable16kPagesPreferenceController extends DeveloperOptionsPreferen Log.i(TAG, "Update file path is " + updateFile.getAbsolutePath()); applyUpdateFile(updateFile); } catch (IOException e) { throw new RuntimeException(e); Log.e(TAG, "Error occurred while applying OTA ", e); throw new RuntimeException(mContext.getString(R.string.error_ota_failed)); } catch (Exception e) { Log.e(TAG, "Unknown error occurred while applying OTA ", e); throw new RuntimeException(mContext.getString(R.string.toast_16k_update_failed_text)); } } Loading