Introduce InteractionJankMonitor into Settings

Detects the jank of page scrolling which is implemented by
InstrumentedPreferenceFragment.

Bug: 187306869
Test: verify with Perfetto

Change-Id: Icaa557d1b47a12374298f044e2f9568281589f64
This commit is contained in:
Yanting Yang
2021-05-03 19:42:57 +08:00
parent 8c1c7b63a7
commit d62082027d
5 changed files with 85 additions and 1 deletions

View File

@@ -0,0 +1,33 @@
/*
* Copyright (C) 2021 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.settings.testutils.shadow;
import static org.mockito.Mockito.mock;
import com.android.internal.jank.InteractionJankMonitor;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
@Implements(InteractionJankMonitor.class)
public class ShadowInteractionJankMonitor {
@Implementation
public static InteractionJankMonitor getInstance() {
return mock(InteractionJankMonitor.class);
}
}