Loading services/core/java/com/android/server/notification/NotificationManagerService.java +12 −17 Original line number Original line Diff line number Diff line Loading @@ -583,7 +583,6 @@ public class NotificationManagerService extends SystemService { private void loadPolicyFile() { private void loadPolicyFile() { if (DBG) Slog.d(TAG, "loadPolicyFile"); if (DBG) Slog.d(TAG, "loadPolicyFile"); synchronized (mPolicyFile) { synchronized (mPolicyFile) { InputStream infile = null; InputStream infile = null; try { try { infile = mPolicyFile.openRead(); infile = mPolicyFile.openRead(); Loading Loading @@ -3357,7 +3356,6 @@ public class NotificationManagerService extends SystemService { Slog.w(TAG, "getBackupPayload: cannot backup policy for user " + user); Slog.w(TAG, "getBackupPayload: cannot backup policy for user " + user); return null; return null; } } synchronized(mPolicyFile) { final ByteArrayOutputStream baos = new ByteArrayOutputStream(); final ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { try { writePolicyXml(baos, true /*forBackup*/); writePolicyXml(baos, true /*forBackup*/); Loading @@ -3365,7 +3363,6 @@ public class NotificationManagerService extends SystemService { } catch (IOException e) { } catch (IOException e) { Slog.w(TAG, "getBackupPayload: error writing payload for user " + user, e); Slog.w(TAG, "getBackupPayload: error writing payload for user " + user, e); } } } return null; return null; } } Loading @@ -3383,7 +3380,6 @@ public class NotificationManagerService extends SystemService { Slog.w(TAG, "applyRestore: cannot restore policy for user " + user); Slog.w(TAG, "applyRestore: cannot restore policy for user " + user); return; return; } } synchronized(mPolicyFile) { final ByteArrayInputStream bais = new ByteArrayInputStream(payload); final ByteArrayInputStream bais = new ByteArrayInputStream(payload); try { try { readPolicyXml(bais, true /*forRestore*/); readPolicyXml(bais, true /*forRestore*/); Loading @@ -3392,7 +3388,6 @@ public class NotificationManagerService extends SystemService { Slog.w(TAG, "applyRestore: error reading payload", e); Slog.w(TAG, "applyRestore: error reading payload", e); } } } } } @Override @Override public boolean isNotificationPolicyAccessGranted(String pkg) { public boolean isNotificationPolicyAccessGranted(String pkg) { Loading Loading
services/core/java/com/android/server/notification/NotificationManagerService.java +12 −17 Original line number Original line Diff line number Diff line Loading @@ -583,7 +583,6 @@ public class NotificationManagerService extends SystemService { private void loadPolicyFile() { private void loadPolicyFile() { if (DBG) Slog.d(TAG, "loadPolicyFile"); if (DBG) Slog.d(TAG, "loadPolicyFile"); synchronized (mPolicyFile) { synchronized (mPolicyFile) { InputStream infile = null; InputStream infile = null; try { try { infile = mPolicyFile.openRead(); infile = mPolicyFile.openRead(); Loading Loading @@ -3357,7 +3356,6 @@ public class NotificationManagerService extends SystemService { Slog.w(TAG, "getBackupPayload: cannot backup policy for user " + user); Slog.w(TAG, "getBackupPayload: cannot backup policy for user " + user); return null; return null; } } synchronized(mPolicyFile) { final ByteArrayOutputStream baos = new ByteArrayOutputStream(); final ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { try { writePolicyXml(baos, true /*forBackup*/); writePolicyXml(baos, true /*forBackup*/); Loading @@ -3365,7 +3363,6 @@ public class NotificationManagerService extends SystemService { } catch (IOException e) { } catch (IOException e) { Slog.w(TAG, "getBackupPayload: error writing payload for user " + user, e); Slog.w(TAG, "getBackupPayload: error writing payload for user " + user, e); } } } return null; return null; } } Loading @@ -3383,7 +3380,6 @@ public class NotificationManagerService extends SystemService { Slog.w(TAG, "applyRestore: cannot restore policy for user " + user); Slog.w(TAG, "applyRestore: cannot restore policy for user " + user); return; return; } } synchronized(mPolicyFile) { final ByteArrayInputStream bais = new ByteArrayInputStream(payload); final ByteArrayInputStream bais = new ByteArrayInputStream(payload); try { try { readPolicyXml(bais, true /*forRestore*/); readPolicyXml(bais, true /*forRestore*/); Loading @@ -3392,7 +3388,6 @@ public class NotificationManagerService extends SystemService { Slog.w(TAG, "applyRestore: error reading payload", e); Slog.w(TAG, "applyRestore: error reading payload", e); } } } } } @Override @Override public boolean isNotificationPolicyAccessGranted(String pkg) { public boolean isNotificationPolicyAccessGranted(String pkg) { Loading