Merge "Add prompt to sign in at captive portal to Wi-Fi Slice" into qt-dev

This commit is contained in:
TreeHugger Robot
2019-04-05 03:19:22 +00:00
committed by Android (Google) Code Review
9 changed files with 277 additions and 24 deletions

View File

@@ -68,16 +68,17 @@ public abstract class SliceBackgroundWorker<E> implements Closeable {
}
/**
* Returns the singleton instance of the {@link SliceBackgroundWorker} for specified {@link Uri}
* if exists
* Returns the singleton instance of {@link SliceBackgroundWorker} for specified {@link Uri} if
* exists
*/
@Nullable
public static SliceBackgroundWorker getInstance(Uri uri) {
return LIVE_WORKERS.get(uri);
@SuppressWarnings("TypeParameterUnusedInFormals")
public static <T extends SliceBackgroundWorker> T getInstance(Uri uri) {
return (T) LIVE_WORKERS.get(uri);
}
/**
* Returns the singleton instance of the {@link SliceBackgroundWorker} for specified {@link
* Returns the singleton instance of {@link SliceBackgroundWorker} for specified {@link
* CustomSliceable}
*/
static SliceBackgroundWorker getInstance(Context context, Sliceable sliceable, Uri uri) {
@@ -165,4 +166,4 @@ public abstract class SliceBackgroundWorker<E> implements Closeable {
protected final void notifySliceChange() {
mContext.getContentResolver().notifyChange(mUri, null);
}
}
}