Add a log buffer for the new pipeline
Test: build Fixes: 274106423 Change-Id: If080237e5d85786d7cb08c7665a44a86a3ddff9e
This commit is contained in:
committed by
Fabián Kozynski
parent
25be63a7bc
commit
0bbf3f5989
@@ -29,6 +29,7 @@ import com.android.systemui.qs.AutoAddTracker;
|
||||
import com.android.systemui.qs.QSHost;
|
||||
import com.android.systemui.qs.ReduceBrightColorsController;
|
||||
import com.android.systemui.qs.external.QSExternalModule;
|
||||
import com.android.systemui.qs.pipeline.dagger.QSPipelineModule;
|
||||
import com.android.systemui.qs.tileimpl.QSTileImpl;
|
||||
import com.android.systemui.statusbar.phone.AutoTileManager;
|
||||
import com.android.systemui.statusbar.phone.ManagedProfileController;
|
||||
@@ -40,14 +41,14 @@ import com.android.systemui.statusbar.policy.SafetyController;
|
||||
import com.android.systemui.statusbar.policy.WalletController;
|
||||
import com.android.systemui.util.settings.SecureSettings;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.inject.Named;
|
||||
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import dagger.multibindings.Multibinds;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.inject.Named;
|
||||
|
||||
/**
|
||||
* Module for QS dependencies
|
||||
*/
|
||||
@@ -56,7 +57,8 @@ import dagger.multibindings.Multibinds;
|
||||
MediaModule.class,
|
||||
QSExternalModule.class,
|
||||
QSFlagsModule.class,
|
||||
QSHostModule.class
|
||||
QSHostModule.class,
|
||||
QSPipelineModule.class,
|
||||
}
|
||||
)
|
||||
public interface QSModule {
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (C) 2023 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.systemui.qs.pipeline.dagger
|
||||
|
||||
import com.android.systemui.dagger.SysUISingleton
|
||||
import com.android.systemui.log.LogBufferFactory
|
||||
import com.android.systemui.plugins.log.LogBuffer
|
||||
import com.android.systemui.qs.pipeline.shared.logging.QSPipelineLogger
|
||||
import dagger.Module
|
||||
import dagger.Provides
|
||||
|
||||
@Module
|
||||
abstract class QSPipelineModule {
|
||||
companion object {
|
||||
/**
|
||||
* Provides a logging buffer for all logs related to the new Quick Settings pipeline to log
|
||||
* the list of current tiles.
|
||||
*/
|
||||
@Provides
|
||||
@SysUISingleton
|
||||
@QSTileListLog
|
||||
fun provideQSTileListLogBuffer(factory: LogBufferFactory): LogBuffer {
|
||||
return factory.create(QSPipelineLogger.TILE_LIST_TAG, maxSize = 700, systrace = false)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (C) 2023 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.android.systemui.qs.pipeline.dagger
|
||||
|
||||
import java.lang.annotation.Retention
|
||||
import java.lang.annotation.RetentionPolicy
|
||||
import javax.inject.Qualifier
|
||||
|
||||
/** A {@link LogBuffer} for the new QS Pipeline for logging changes to the set of current tiles. */
|
||||
@Qualifier @MustBeDocumented @Retention(RetentionPolicy.RUNTIME) annotation class QSTileListLog
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (C) 2023 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.systemui.qs.pipeline.shared.logging
|
||||
|
||||
import com.android.systemui.plugins.log.LogBuffer
|
||||
import com.android.systemui.qs.pipeline.dagger.QSTileListLog
|
||||
import javax.inject.Inject
|
||||
|
||||
class QSPipelineLogger
|
||||
@Inject
|
||||
constructor(
|
||||
@QSTileListLog private val tileListLogBuffer: LogBuffer,
|
||||
) {
|
||||
|
||||
companion object {
|
||||
const val TILE_LIST_TAG = "QSTileListLog"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user