Messaging: Language cleanup

No unnecessary boxing, enhanced for loops, redundant checks and throws,
imports (removal, reordering), possible void returns

Change-Id: I7a8e1b2007e3b0906e01b41785c518d02c2f3fab
This commit is contained in:
Michael W
2024-12-26 15:54:37 +01:00
parent e335f6bec8
commit e128bff457
77 changed files with 202 additions and 334 deletions
@@ -165,16 +165,14 @@ public class BugleApplication extends Application implements UncaughtExceptionHa
// Start method tracing with a big enough buffer and let it run for 30s.
// Note we use a logging tag as we don't want to wait for gservices to start up.
final File file = DebugUtils.getDebugFile("startup.trace", true);
if (file != null) {
android.os.Debug.startMethodTracing(file.getAbsolutePath(), 160 * 1024 * 1024);
new Handler(Looper.getMainLooper()).postDelayed(() -> {
android.os.Debug.stopMethodTracing();
// Allow world to see trace file
DebugUtils.ensureReadable(file);
LogUtil.d(LogUtil.PROFILE_TAG, "Tracing complete - "
+ file.getAbsolutePath());
android.os.Debug.startMethodTracing(file.getAbsolutePath(), 160 * 1024 * 1024);
new Handler(Looper.getMainLooper()).postDelayed(() -> {
android.os.Debug.stopMethodTracing();
// Allow world to see trace file
DebugUtils.ensureReadable(file);
LogUtil.d(LogUtil.PROFILE_TAG, "Tracing complete - "
+ file.getAbsolutePath());
}, 30000);
}
}
}