mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-04-28 12:17:57 +03:00
Merge branch 'tubular' into 'master'
support tubular and probably other NewPipe forks See merge request android_translation_layer/android_translation_layer!153
This commit is contained in:
commit
4ae6b9cc20
3 changed files with 15 additions and 3 deletions
|
@ -78,13 +78,17 @@ public class LayerDrawable extends Drawable implements Drawable.Callback {
|
|||
int length = layers.length;
|
||||
ChildDrawable[] r = new ChildDrawable[length];
|
||||
|
||||
int j = 0;
|
||||
for (int i = 0; i < length; i++) {
|
||||
r[i] = new ChildDrawable();
|
||||
r[i].mDrawable = layers[i];
|
||||
if (layers[i] == null)
|
||||
continue;
|
||||
r[j] = new ChildDrawable();
|
||||
r[j].mDrawable = layers[i];
|
||||
layers[i].setCallback(this);
|
||||
mLayerState.mChildrenChangingConfigurations |= layers[i].getChangingConfigurations();
|
||||
j++;
|
||||
}
|
||||
mLayerState.mNum = length;
|
||||
mLayerState.mNum = j;
|
||||
mLayerState.mChildren = r;
|
||||
|
||||
ensurePadding();
|
||||
|
|
|
@ -2192,4 +2192,8 @@ public class View implements Drawable.Callback {
|
|||
public void restoreHierarchyState(SparseArray<Parcelable> container) {}
|
||||
|
||||
public boolean isHovered() { return false; }
|
||||
|
||||
public void scrollBy(int x, int y) {
|
||||
scrollTo(scrollX + x, scrollY + y);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,10 @@ public class CookieManager {
|
|||
if (Context.this_application.getPackageName().equals("org.schabi.newpipe")) {
|
||||
throw new RuntimeException("CookieManager not yet fully implemented");
|
||||
}
|
||||
try { // also handle NewPipe forks which can have a different packagename
|
||||
Class.forName("org.schabi.newpipe.util.potoken.PoTokenWebView");
|
||||
throw new RuntimeException("CookieManager not yet fully implemented");
|
||||
} catch (ClassNotFoundException e) {}
|
||||
return new CookieManager();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue