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

Commit 26378261 authored by Felipe Leme's avatar Felipe Leme
Browse files

Make LocalTransport.DEBUG dynamic.

There's a general recommendation to make such static fields as FALSE
on framework code so they're removed by the compiler and don't take
space in memory, but LocalTransport is a "debug artifact", so that
memory increase is not a problem and the increase in APK size is
negligible, hence it's more flexible for developers to be able to
turned it on dynamically.

Test: adb shell setprop log.tag.LocalTransport VERBOSE && adb logcat LocalTransport:v *:s
Bug: 394173116
Flag: EXEMPT changes on debugging components only

Change-Id: I11d239f9b2a70de8f94ff7f9f6df0be79fc69d42
parent 8f647896
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ import java.util.List;

public class LocalTransport extends BackupTransport {
    static final String TAG = "LocalTransport";
    static final boolean DEBUG = false;
    static final boolean DEBUG = Log.isLoggable(TAG, Log.VERBOSE);

    private static final String TRANSPORT_DIR_NAME
            = "com.android.localtransport.LocalTransport";
@@ -131,7 +131,8 @@ public class LocalTransport extends BackupTransport {
    }

    public LocalTransport(Context context, LocalTransportParameters parameters) {
        Log.i(TAG, "Creating LocalTransport for user " + context.getUserId());
        Log.i(TAG, "Creating LocalTransport for user " + context.getUserId()
                + " (DEBUG=" + DEBUG + ")");
        mContext = context;
        mParameters = parameters;
        makeDataDirs();