Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c3fa0caf authored by Jack He's avatar Jack He
Browse files

Metrics: Remove handler for --proto-java-bin flag in dumpsys

* All usages of --proto-java-bin flags are removed
* The handler for --proto-java-bin should therefore be removed as well

Bug: 33693818
Test: make, metrics app integration test
Change-Id: I944a09c2161f4a810e8c7266d2c81660e32bfd03
(cherry picked from commit 60dd8db2)
parent a270f0b9
Loading
Loading
Loading
Loading
+2 −14
Original line number Diff line number Diff line
@@ -2493,20 +2493,8 @@ public class AdapterService extends Service {
        }

        verboseLog("dumpsys arguments, check for protobuf output: " + TextUtils.join(" ", args));
        if (args[0].startsWith("--proto")) {
        if (args[0].equals("--proto-bin")) {
            dumpMetrics(fd);
            } else if (args[0].equals("--proto-java-bin")) {
                // TODO: Remove once --proto-java-bin is no longer used
                BluetoothProto.BluetoothLog metrics = new BluetoothProto.BluetoothLog();
                byte[] metricsBytes = Base64.encode(metrics.toByteArray(), Base64.DEFAULT);
                Log.w(TAG, "proto-java-bin dump, empty metrics size is " + metricsBytes.length);
                try (FileOutputStream protoOut = new FileOutputStream(fd)) {
                    protoOut.write(metricsBytes);
                } catch (IOException e) {
                    errorLog("Unable to write Java protobuf to file descriptor.");
                }
            }
            return;
        }