public interface

CoreComponentFactory.CompatWrapped

 androidx.core.app.CoreComponentFactory.CompatWrapped

Subclasses:

SliceProviderWithCallbacks<T>, SliceProvider

Overview

Implement this interface to allow a different class to be returned when instantiating on certain API levels.

Summary

Methods
public java.lang.ObjectgetWrapper()

Called while this class is being instantiated by the OS.

Methods

public java.lang.Object getWrapper()

Called while this class is being instantiated by the OS. If an object is returned then it will be used in place of the class. Note: this will not be called on API <= 27. Example:

 public AndroidXContentProvider extends ContentProvider implements CompatWrapped {
     ...

     public Object getWrapper() {
         if (SDK_INT >= 29) {
             return new AndroidXContentProviderV29(this);
         }
         return null;
     }
 }