Home | History | Annotate | Download | only in api
      1 package androidx.slice {
      2 
      3   public abstract class SliceManager {
      4     method public abstract androidx.slice.Slice bindSlice(android.net.Uri);
      5     method public abstract androidx.slice.Slice bindSlice(android.content.Intent);
      6     method public abstract int checkSlicePermission(android.net.Uri, int, int);
      7     method public static androidx.slice.SliceManager getInstance(android.content.Context);
      8     method public abstract java.util.List<android.net.Uri> getPinnedSlices();
      9     method public abstract java.util.Set<androidx.slice.SliceSpec> getPinnedSpecs(android.net.Uri);
     10     method public abstract java.util.Collection<android.net.Uri> getSliceDescendants(android.net.Uri);
     11     method public abstract void grantSlicePermission(java.lang.String, android.net.Uri);
     12     method public abstract android.net.Uri mapIntentToUri(android.content.Intent);
     13     method public abstract void pinSlice(android.net.Uri);
     14     method public abstract void registerSliceCallback(android.net.Uri, androidx.slice.SliceManager.SliceCallback);
     15     method public abstract void registerSliceCallback(android.net.Uri, java.util.concurrent.Executor, androidx.slice.SliceManager.SliceCallback);
     16     method public abstract void revokeSlicePermission(java.lang.String, android.net.Uri);
     17     method public abstract void unpinSlice(android.net.Uri);
     18     method public abstract void unregisterSliceCallback(android.net.Uri, androidx.slice.SliceManager.SliceCallback);
     19   }
     20 
     21   public static abstract interface SliceManager.SliceCallback {
     22     method public abstract void onSliceUpdated(androidx.slice.Slice);
     23   }
     24 
     25   public class SliceMetadata {
     26     method public static androidx.slice.SliceMetadata from(android.content.Context, androidx.slice.Slice);
     27     method public long getExpiry();
     28     method public int getHeaderType();
     29     method public android.app.PendingIntent getInputRangeAction();
     30     method public long getLastUpdatedTime();
     31     method public int getLoadingState();
     32     method public androidx.slice.core.SliceAction getPrimaryAction();
     33     method public androidx.core.util.Pair<java.lang.Integer, java.lang.Integer> getRange();
     34     method public int getRangeValue();
     35     method public java.util.List<androidx.slice.SliceItem> getSliceActions();
     36     method public java.util.List<java.lang.String> getSliceKeywords();
     37     method public java.util.List<androidx.slice.core.SliceAction> getToggles();
     38     method public boolean hasLargeMode();
     39     method public boolean isPermissionSlice();
     40     field public static final int LOADED_ALL = 2; // 0x2
     41     field public static final int LOADED_NONE = 0; // 0x0
     42     field public static final int LOADED_PARTIAL = 1; // 0x1
     43   }
     44 
     45   public class SliceUtils {
     46     method public static deprecated int getLoadingState(androidx.slice.Slice);
     47     method public static deprecated java.util.List<androidx.slice.SliceItem> getSliceActions(androidx.slice.Slice);
     48     method public static deprecated java.util.List<java.lang.String> getSliceKeywords(androidx.slice.Slice);
     49     method public static androidx.slice.Slice parseSlice(android.content.Context, java.io.InputStream, java.lang.String, androidx.slice.SliceUtils.SliceActionListener) throws java.io.IOException, androidx.slice.SliceUtils.SliceParseException;
     50     method public static void serializeSlice(androidx.slice.Slice, android.content.Context, java.io.OutputStream, java.lang.String, androidx.slice.SliceUtils.SerializeOptions) throws java.io.IOException, java.lang.IllegalArgumentException;
     51     field public static final deprecated int LOADING_ALL = 0; // 0x0
     52     field public static final deprecated int LOADING_COMPLETE = 2; // 0x2
     53     field public static final deprecated int LOADING_PARTIAL = 1; // 0x1
     54   }
     55 
     56   public static class SliceUtils.SerializeOptions {
     57     ctor public SliceUtils.SerializeOptions();
     58     method public androidx.slice.SliceUtils.SerializeOptions setActionMode(int);
     59     method public androidx.slice.SliceUtils.SerializeOptions setImageMode(int);
     60     method public androidx.slice.SliceUtils.SerializeOptions setMaxImageHeight(int);
     61     method public androidx.slice.SliceUtils.SerializeOptions setMaxImageWidth(int);
     62     field public static final int MODE_CONVERT = 2; // 0x2
     63     field public static final int MODE_REMOVE = 1; // 0x1
     64     field public static final int MODE_THROW = 0; // 0x0
     65   }
     66 
     67   public static abstract interface SliceUtils.SliceActionListener {
     68     method public abstract void onSliceAction(android.net.Uri);
     69   }
     70 
     71   public static class SliceUtils.SliceParseException extends java.lang.Exception {
     72   }
     73 
     74 }
     75 
     76 package androidx.slice.widget {
     77 
     78   public class EventInfo {
     79     ctor public EventInfo(int, int, int, int);
     80     method public void setPosition(int, int, int);
     81     field public static final int ACTION_TYPE_BUTTON = 1; // 0x1
     82     field public static final int ACTION_TYPE_CONTENT = 3; // 0x3
     83     field public static final int ACTION_TYPE_SEE_MORE = 4; // 0x4
     84     field public static final int ACTION_TYPE_SLIDER = 2; // 0x2
     85     field public static final int ACTION_TYPE_TOGGLE = 0; // 0x0
     86     field public static final int POSITION_CELL = 2; // 0x2
     87     field public static final int POSITION_END = 1; // 0x1
     88     field public static final int POSITION_START = 0; // 0x0
     89     field public static final int ROW_TYPE_GRID = 1; // 0x1
     90     field public static final int ROW_TYPE_LIST = 0; // 0x0
     91     field public static final int ROW_TYPE_MESSAGING = 2; // 0x2
     92     field public static final int ROW_TYPE_PROGRESS = 5; // 0x5
     93     field public static final int ROW_TYPE_SHORTCUT = -1; // 0xffffffff
     94     field public static final int ROW_TYPE_SLIDER = 4; // 0x4
     95     field public static final int ROW_TYPE_TOGGLE = 3; // 0x3
     96     field public static final int STATE_OFF = 0; // 0x0
     97     field public static final int STATE_ON = 1; // 0x1
     98     field public int actionCount;
     99     field public int actionIndex;
    100     field public int actionPosition;
    101     field public int actionType;
    102     field public int rowIndex;
    103     field public int rowTemplateType;
    104     field public int sliceMode;
    105     field public int state;
    106   }
    107 
    108   public final class SliceLiveData {
    109     method public static androidx.lifecycle.LiveData<androidx.slice.Slice> fromIntent(android.content.Context, android.content.Intent);
    110     method public static androidx.lifecycle.LiveData<androidx.slice.Slice> fromUri(android.content.Context, android.net.Uri);
    111   }
    112 
    113   public class SliceView extends android.view.ViewGroup implements androidx.lifecycle.Observer android.view.View.OnClickListener {
    114     ctor public SliceView(android.content.Context);
    115     ctor public SliceView(android.content.Context, android.util.AttributeSet);
    116     ctor public SliceView(android.content.Context, android.util.AttributeSet, int);
    117     ctor public SliceView(android.content.Context, android.util.AttributeSet, int, int);
    118     method public int getMode();
    119     method public androidx.slice.Slice getSlice();
    120     method public java.util.List<androidx.slice.SliceItem> getSliceActions();
    121     method public void onChanged(androidx.slice.Slice);
    122     method public void onClick(android.view.View);
    123     method public void setAccentColor(int);
    124     method public void setMode(int);
    125     method public void setOnSliceActionListener(androidx.slice.widget.SliceView.OnSliceActionListener);
    126     method public void setScrollable(boolean);
    127     method public void setSlice(androidx.slice.Slice);
    128     method public void setSliceActions(java.util.List<androidx.slice.SliceItem>);
    129     method public deprecated void setTint(int);
    130     field public static final int MODE_LARGE = 2; // 0x2
    131     field public static final int MODE_SHORTCUT = 3; // 0x3
    132     field public static final int MODE_SMALL = 1; // 0x1
    133   }
    134 
    135   public static abstract interface SliceView.OnSliceActionListener {
    136     method public abstract void onSliceAction(androidx.slice.widget.EventInfo, androidx.slice.SliceItem);
    137   }
    138 
    139 }
    140 
    141