Loading services/java/com/android/server/updates/ConfigUpdateInstallReceiver.java +2 −4 Original line number Diff line number Diff line Loading @@ -223,7 +223,7 @@ public class ConfigUpdateInstallReceiver extends BroadcastReceiver { return signer.verify(Base64.decode(signature.getBytes(), Base64.DEFAULT)); } private void writeUpdate(File dir, File file, String content) { private void writeUpdate(File dir, File file, String content) throws IOException { FileOutputStream out = null; File tmp = null; try { Loading @@ -247,8 +247,6 @@ public class ConfigUpdateInstallReceiver extends BroadcastReceiver { if (!tmp.renameTo(file)) { throw new IOException("Failed to atomically rename " + file.getCanonicalPath()); } } catch (IOException e) { Slog.e(TAG, "Failed to write update", e); } finally { if (tmp != null) { tmp.delete(); Loading @@ -257,7 +255,7 @@ public class ConfigUpdateInstallReceiver extends BroadcastReceiver { } } private void install(String content, int version) { private void install(String content, int version) throws IOException { writeUpdate(updateDir, updateContent, content); writeUpdate(updateDir, updateVersion, Long.toString(version)); } Loading Loading
services/java/com/android/server/updates/ConfigUpdateInstallReceiver.java +2 −4 Original line number Diff line number Diff line Loading @@ -223,7 +223,7 @@ public class ConfigUpdateInstallReceiver extends BroadcastReceiver { return signer.verify(Base64.decode(signature.getBytes(), Base64.DEFAULT)); } private void writeUpdate(File dir, File file, String content) { private void writeUpdate(File dir, File file, String content) throws IOException { FileOutputStream out = null; File tmp = null; try { Loading @@ -247,8 +247,6 @@ public class ConfigUpdateInstallReceiver extends BroadcastReceiver { if (!tmp.renameTo(file)) { throw new IOException("Failed to atomically rename " + file.getCanonicalPath()); } } catch (IOException e) { Slog.e(TAG, "Failed to write update", e); } finally { if (tmp != null) { tmp.delete(); Loading @@ -257,7 +255,7 @@ public class ConfigUpdateInstallReceiver extends BroadcastReceiver { } } private void install(String content, int version) { private void install(String content, int version) throws IOException { writeUpdate(updateDir, updateContent, content); writeUpdate(updateDir, updateVersion, Long.toString(version)); } Loading