Sergey Vasilinets | b1bf850 | 2018-11-30 18:56:14 +0000 | [diff] [blame] | 1 | /* |
| 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 Woods | 76b254b | 2020-02-28 18:32:23 -0800 | [diff] [blame] | 17 | package androidx.activity |
Sergey Vasilinets | b1bf850 | 2018-11-30 18:56:14 +0000 | [diff] [blame] | 18 | |
Aurimas Liutikas | b276649 | 2024-06-17 12:10:11 -0700 | [diff] [blame^] | 19 | import android.app.Application |
Jeremy Woods | 796762a | 2020-02-28 17:03:48 -0800 | [diff] [blame] | 20 | import leakcanary.LeakCanary |
| 21 | import shark.AndroidReferenceMatchers |
| 22 | import shark.ReferenceMatcher |
Sergey Vasilinets | b1bf850 | 2018-11-30 18:56:14 +0000 | [diff] [blame] | 23 | |
Aurimas Liutikas | b276649 | 2024-06-17 12:10:11 -0700 | [diff] [blame^] | 24 | class LeakCanaryApp : Application() { |
Sergey Vasilinets | b1bf850 | 2018-11-30 18:56:14 +0000 | [diff] [blame] | 25 | override fun onCreate() { |
| 26 | super.onCreate() |
Jeremy Woods | 796762a | 2020-02-28 17:03:48 -0800 | [diff] [blame] | 27 | @Suppress("UNCHECKED_CAST") |
Omar Ismail | 8092c35 | 2024-05-24 09:25:21 +0100 | [diff] [blame] | 28 | LeakCanary.config = |
| 29 | LeakCanary.config.copy( |
| 30 | referenceMatchers = |
| 31 | (AndroidReferenceMatchers.appDefaults - |
| 32 | AndroidReferenceMatchers.INPUT_METHOD_MANAGER_IS_TERRIBLE) |
| 33 | as List<ReferenceMatcher> |
| 34 | ) |
Sergey Vasilinets | b1bf850 | 2018-11-30 18:56:14 +0000 | [diff] [blame] | 35 | } |
| 36 | } |