Guard against NPE in ThreadedRenderer

Bug: b/168319139
Test: compile & verify basic functions working

Change-Id: Iaa2a6b7362d31f3501b3dd67f5af790ba3aebd24
This commit is contained in:
Sanguk Jeon
2021-11-20 09:57:33 +09:00
committed by Vishnu Nair
parent 64528ba853
commit 13c5549834

View File

@@ -613,7 +613,10 @@ public final class ThreadedRenderer extends HardwareRenderer {
// If there's no arguments, eg 'dumpsys gfxinfo', then dump everything.
// If there's a targetted package, eg 'dumpsys gfxinfo com.android.systemui', then only
// dump the summary information
int flags = (args == null || args.length == 0) ? FLAG_DUMP_ALL : 0;
if (args == null || args.length == 0) {
return FLAG_DUMP_ALL;
}
int flags = 0;
for (int i = 0; i < args.length; i++) {
switch (args[i]) {
case "framestats":