All Downloads are FREE. Search and download functionalities are using the official Maven repository.

main.app.cash.paparazzi.internal.interceptors.ServiceManagerInterceptor.kt Maven / Gradle / Ivy

Go to download

An Android library to render your application screens without a physical device or emulator

The newest version!
package app.cash.paparazzi.internal.interceptors

import android.os.IBinder

/**
 * The ImeTracing class attempts to initialize its [mService field in its constructor](https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/java/android/util/imetracing/ImeTracing.java;l=60).
 *
 * Unfortunately, [layoutlib's version of ServiceManager](https://cs.android.com/android/platform/superproject/+/master:frameworks/layoutlib/bridge/src/android/os/ServiceManager.java;l=37)
 * throws an exception immediately.
 *
 * This interceptor overrides ServiceManager.getServiceOrThrow to simply return null instead.
 */
internal object ServiceManagerInterceptor {
  @Suppress("unused")
  @JvmStatic
  fun interceptGetServiceOrThrow(@Suppress("UNUSED_PARAMETER") name: String): IBinder? = null
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy