[go: nahoru, domu]

blob: 69d82b7d255550b6efee4cb1265570668d2bae63 [file] [log] [blame]
Sergey Vasilinetsb1bf8502018-11-30 18:56:14 +00001/*
2 * Copyright 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Jeremy Woods76b254b2020-02-28 18:32:23 -080017package androidx.activity
Sergey Vasilinetsb1bf8502018-11-30 18:56:14 +000018
Aurimas Liutikasb2766492024-06-17 12:10:11 -070019import android.app.Application
Jeremy Woods796762a2020-02-28 17:03:48 -080020import leakcanary.LeakCanary
21import shark.AndroidReferenceMatchers
22import shark.ReferenceMatcher
Sergey Vasilinetsb1bf8502018-11-30 18:56:14 +000023
Aurimas Liutikasb2766492024-06-17 12:10:11 -070024class LeakCanaryApp : Application() {
Sergey Vasilinetsb1bf8502018-11-30 18:56:14 +000025 override fun onCreate() {
26 super.onCreate()
Jeremy Woods796762a2020-02-28 17:03:48 -080027 @Suppress("UNCHECKED_CAST")
Omar Ismail8092c352024-05-24 09:25:21 +010028 LeakCanary.config =
29 LeakCanary.config.copy(
30 referenceMatchers =
31 (AndroidReferenceMatchers.appDefaults -
32 AndroidReferenceMatchers.INPUT_METHOD_MANAGER_IS_TERRIBLE)
33 as List<ReferenceMatcher>
34 )
Sergey Vasilinetsb1bf8502018-11-30 18:56:14 +000035 }
36}