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

Commit 8f8f279a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Reverting some debug logs" into ub-launcher3-master

parents 6c3f6d46 b959cfb4
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -357,11 +357,6 @@ public class Launcher extends BaseDraggingActivity
        if ((diff & (CONFIG_ORIENTATION | CONFIG_SCREEN_SIZE)) != 0) {
            mUserEventDispatcher = null;
            initDeviceProfile(mDeviceProfile.inv);
            FileLog.d(TAG, "Config changed, my orientation=" +
                    getResources().getConfiguration().orientation +
                    ", new orientation=" + newConfig.orientation +
                    ", old orientation=" + mOldConfig.orientation +
                    ", isTransposed=" + mDeviceProfile.isVerticalBarLayout());
            dispatchDeviceProfileChanged();

            getRootView().dispatchInsets();
+0 −7
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@ import android.content.res.Resources;
import android.database.Cursor;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.database.sqlite.SQLiteQueryBuilder;
import android.database.sqlite.SQLiteStatement;
import android.net.Uri;
@@ -56,7 +55,6 @@ import com.android.launcher3.compat.UserManagerCompat;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.logging.FileLog;
import com.android.launcher3.model.DbDowngradeHelper;
import com.android.launcher3.model.ModelWriter;
import com.android.launcher3.provider.LauncherDbUtils;
import com.android.launcher3.provider.LauncherDbUtils.SQLiteTransaction;
import com.android.launcher3.provider.RestoreDbTask;
@@ -320,11 +318,6 @@ public class LauncherProvider extends ContentProvider {

    @Override
    public int delete(Uri uri, String selection, String[] selectionArgs) {
        if (ModelWriter.DEBUG_DELETE) {
            String args = selectionArgs == null ? null : TextUtils.join(",", selectionArgs);
            FileLog.d(TAG, "Delete uri=" + uri + ", selection=" + selection
                    + ", selectionArgs=" + args, new Exception());
        }
        createDbIfNotExists();
        SqlArguments args = new SqlArguments(uri, selection, selectionArgs);

+0 −14
Original line number Diff line number Diff line
@@ -50,7 +50,6 @@ import java.util.concurrent.Executor;
public class ModelWriter {

    private static final String TAG = "ModelWriter";
    public static final boolean DEBUG_DELETE = true;

    private final Context mContext;
    private final LauncherModel mModel;
@@ -257,14 +256,6 @@ public class ModelWriter {
     * Removes the specified items from the database
     */
    public void deleteItemsFromDatabase(final Iterable<? extends ItemInfo> items) {
        if (DEBUG_DELETE) {
            // Log it on the colling thread to get the proper stack trace
            FileLog.d(TAG, "Starting item deletion", new Exception());
            for (ItemInfo item : items) {
                FileLog.d(TAG, "deleting item " + item);
            }
            FileLog.d(TAG, "Finished deleting items");
        }
        ModelVerifier verifier = new ModelVerifier();

        mWorkerExecutor.execute(() -> {
@@ -282,11 +273,6 @@ public class ModelWriter {
     * Remove the specified folder and all its contents from the database.
     */
    public void deleteFolderAndContentsFromDatabase(final FolderInfo info) {
        if (DEBUG_DELETE) {
            // Log it on the colling thread to get the proper stack trace
            FileLog.d(TAG, "Deleting folder " + info, new Exception());
        }

        ModelVerifier verifier = new ModelVerifier();

        mWorkerExecutor.execute(() -> {
+2 −4
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ import android.util.ArrayMap;
import android.util.Log;
import android.util.MutableLong;

import com.android.launcher3.Utilities;
import com.android.launcher3.config.FeatureFlags;

/**
@@ -35,8 +34,7 @@ import com.android.launcher3.config.FeatureFlags;
 */
public class TraceHelper {

    private static final boolean FORCE_LOG = Utilities.IS_DEBUG_DEVICE;
    private static final boolean ENABLED = FORCE_LOG || FeatureFlags.IS_DOGFOOD_BUILD;
    private static final boolean ENABLED = FeatureFlags.IS_DOGFOOD_BUILD;

    private static final boolean SYSTEM_TRACE = false;
    private static final ArrayMap<String, MutableLong> sUpTimes = ENABLED ? new ArrayMap<>() : null;
@@ -45,7 +43,7 @@ public class TraceHelper {
        if (ENABLED) {
            MutableLong time = sUpTimes.get(sectionName);
            if (time == null) {
                time = new MutableLong((FORCE_LOG || isLoggable(sectionName, VERBOSE)) ? 0 : -1);
                time = new MutableLong(isLoggable(sectionName, VERBOSE) ? 0 : -1);
                sUpTimes.put(sectionName, time);
            }
            if (time.value >= 0) {