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

Commit f227a2c9 authored by Nicolo' Mazzucato's avatar Nicolo' Mazzucato
Browse files

Add traces to BackGestureTFClassifier#loadVocab

This seems to take a lot of time, and we think it happens more often than needed. With those traces we will be able to easily spot it in perfetto recordings.

Bug: 197515205
Test: Manual
Change-Id: Iaa3d14ebf789d7d2082de121e58ca443fc4122c1
parent 2fb73232
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import android.os.Looper;
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.Trace;
import android.provider.DeviceConfig;
import android.util.DisplayMetrics;
import android.util.Log;
@@ -576,7 +577,9 @@ public class EdgeBackGestureHandler extends CurrentUserTracker
            mMLModelThreshold = DeviceConfig.getFloat(DeviceConfig.NAMESPACE_SYSTEMUI,
                    SystemUiDeviceConfigFlags.BACK_GESTURE_ML_MODEL_THRESHOLD, 0.9f);
            if (mBackGestureTfClassifierProvider.isActive()) {
                Trace.beginSection("EdgeBackGestureHandler#loadVocab");
                mVocab = mBackGestureTfClassifierProvider.loadVocab(mContext.getAssets());
                Trace.endSection();
                mUseMLModel = true;
                return;
            }