Loading services/core/java/com/android/server/BootReceiver.java +10 −0 Original line number Diff line number Diff line Loading @@ -141,6 +141,10 @@ public class BootReceiver extends BroadcastReceiver { private static final int MAX_ERROR_REPORTS = 8; private static int sSentReports = 0; // Max tombstone file size to add to dropbox. private static final long MAX_TOMBSTONE_SIZE_BYTES = DropBoxManagerService.DEFAULT_QUOTA_KB * 1024; @Override public void onReceive(final Context context, Intent intent) { // Log boot events in the background to avoid blocking the main thread with I/O Loading Loading @@ -390,6 +394,12 @@ public class BootReceiver extends BroadcastReceiver { private static void addAugmentedProtoToDropbox( File tombstone, DropBoxManager db, DropboxRateLimiter.RateLimitResult rateLimitResult) throws IOException { // Do not add proto files larger than 20Mb to DropBox as they can cause OOMs when // processing large tombstones. The text tombstone is still added to DropBox. if (tombstone.length() > MAX_TOMBSTONE_SIZE_BYTES) { Slog.w(TAG, "Tombstone too large to add to DropBox: " + tombstone.toPath()); return; } // Read the proto tombstone file as bytes. final byte[] tombstoneBytes = Files.readAllBytes(tombstone.toPath()); Loading services/core/java/com/android/server/DropBoxManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -106,7 +106,7 @@ public final class DropBoxManagerService extends SystemService { private static final int DEFAULT_AGE_SECONDS = 3 * 86400; private static final int DEFAULT_MAX_FILES = 1000; private static final int DEFAULT_MAX_FILES_LOWRAM = 300; private static final int DEFAULT_QUOTA_KB = Build.IS_USERDEBUG ? 20 * 1024 : 10 * 1024; public static final int DEFAULT_QUOTA_KB = Build.IS_USERDEBUG ? 20 * 1024 : 10 * 1024; private static final int DEFAULT_QUOTA_PERCENT = 10; private static final int DEFAULT_RESERVE_PERCENT = 0; private static final int QUOTA_RESCAN_MILLIS = 5000; Loading Loading
services/core/java/com/android/server/BootReceiver.java +10 −0 Original line number Diff line number Diff line Loading @@ -141,6 +141,10 @@ public class BootReceiver extends BroadcastReceiver { private static final int MAX_ERROR_REPORTS = 8; private static int sSentReports = 0; // Max tombstone file size to add to dropbox. private static final long MAX_TOMBSTONE_SIZE_BYTES = DropBoxManagerService.DEFAULT_QUOTA_KB * 1024; @Override public void onReceive(final Context context, Intent intent) { // Log boot events in the background to avoid blocking the main thread with I/O Loading Loading @@ -390,6 +394,12 @@ public class BootReceiver extends BroadcastReceiver { private static void addAugmentedProtoToDropbox( File tombstone, DropBoxManager db, DropboxRateLimiter.RateLimitResult rateLimitResult) throws IOException { // Do not add proto files larger than 20Mb to DropBox as they can cause OOMs when // processing large tombstones. The text tombstone is still added to DropBox. if (tombstone.length() > MAX_TOMBSTONE_SIZE_BYTES) { Slog.w(TAG, "Tombstone too large to add to DropBox: " + tombstone.toPath()); return; } // Read the proto tombstone file as bytes. final byte[] tombstoneBytes = Files.readAllBytes(tombstone.toPath()); Loading
services/core/java/com/android/server/DropBoxManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -106,7 +106,7 @@ public final class DropBoxManagerService extends SystemService { private static final int DEFAULT_AGE_SECONDS = 3 * 86400; private static final int DEFAULT_MAX_FILES = 1000; private static final int DEFAULT_MAX_FILES_LOWRAM = 300; private static final int DEFAULT_QUOTA_KB = Build.IS_USERDEBUG ? 20 * 1024 : 10 * 1024; public static final int DEFAULT_QUOTA_KB = Build.IS_USERDEBUG ? 20 * 1024 : 10 * 1024; private static final int DEFAULT_QUOTA_PERCENT = 10; private static final int DEFAULT_RESERVE_PERCENT = 0; private static final int QUOTA_RESCAN_MILLIS = 5000; Loading