what-the-bank/sources/com/huawei/hms/common/sqlite/HMSCursorWrapper.java

62 lines
2.2 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.huawei.hms.common.sqlite;
import android.database.AbstractWindowedCursor;
import android.database.CrossProcessCursor;
import android.database.Cursor;
import android.database.CursorWindow;
import android.database.CursorWrapper;
/* loaded from: classes2.dex */
public class HMSCursorWrapper extends CursorWrapper implements CrossProcessCursor {
private AbstractWindowedCursor a;
public HMSCursorWrapper(Cursor cursor) {
super(cursor);
if (cursor != null) {
if (cursor instanceof CursorWrapper) {
Cursor wrappedCursor = ((CursorWrapper) cursor).getWrappedCursor();
if (wrappedCursor != null) {
if (wrappedCursor instanceof AbstractWindowedCursor) {
this.a = (AbstractWindowedCursor) wrappedCursor;
return;
}
StringBuilder sb = new StringBuilder("getWrappedCursor:");
sb.append(wrappedCursor);
sb.append(" is not a subclass for CursorWrapper");
throw new IllegalArgumentException(sb.toString());
}
throw new IllegalArgumentException("getWrappedCursor cannot be null");
}
StringBuilder sb2 = new StringBuilder("cursor:");
sb2.append(cursor);
sb2.append(" is not a subclass for CursorWrapper");
throw new IllegalArgumentException(sb2.toString());
}
throw new IllegalArgumentException("cursor cannot be null");
}
@Override // android.database.CrossProcessCursor
public void fillWindow(int i, CursorWindow cursorWindow) {
this.a.fillWindow(i, cursorWindow);
}
@Override // android.database.CrossProcessCursor
public CursorWindow getWindow() {
return this.a.getWindow();
}
@Override // android.database.CrossProcessCursor
public boolean onMove(int i, int i2) {
return this.a.onMove(i, i2);
}
public void setWindow(CursorWindow cursorWindow) {
this.a.setWindow(cursorWindow);
}
@Override // android.database.CursorWrapper
public Cursor getWrappedCursor() {
return this.a;
}
}