| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package android.database.sqlite; |
| 18 |
|
| 19 |
import android.compat.annotation.UnsupportedAppUsage; |
| 20 |
import android.os.Build; |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
public final class SQLiteCustomFunction { |
| 28 |
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) |
| 29 |
public final String name; |
| 30 |
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) |
| 31 |
public final int numArgs; |
| 32 |
public final SQLiteDatabase.CustomFunction callback; |
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
public SQLiteCustomFunction(String name, int numArgs, |
| 43 |
SQLiteDatabase.CustomFunction callback) { |
| 44 |
if (name == null) { |
| 45 |
throw new IllegalArgumentException("name must not be null."); |
| 46 |
} |
| 47 |
|
| 48 |
this.name = name; |
| 49 |
this.numArgs = numArgs; |
| 50 |
this.callback = callback; |
| 51 |
} |
| 52 |
|
| 53 |
|
| 54 |
@SuppressWarnings("unused") |
| 55 |
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) |
| 56 |
private void dispatchCallback(String[] args) { |
| 57 |
callback.callback(args); |
| 58 |
} |
| 59 |
} |