diff --git a/java/ql/lib/semmle/code/java/security/AndroidWebViewCertificateValidationQuery.qll b/java/ql/lib/semmle/code/java/security/AndroidWebViewCertificateValidationQuery.qll new file mode 100644 index 000000000000..3d47f77a2bbb --- /dev/null +++ b/java/ql/lib/semmle/code/java/security/AndroidWebViewCertificateValidationQuery.qll @@ -0,0 +1,29 @@ +/** Definitions for the web view certificate validation query */ + +import java + +/** A method that overrides `WebViewClient.onReceivedSslError` */ +class OnReceivedSslErrorMethod extends Method { + OnReceivedSslErrorMethod() { + this.overrides*(any(Method m | + m.hasQualifiedName("android.webkit", "WebViewClient", "onReceivedSslError") + )) + } + + /** Gets the `SslErrorHandler` argument to this method. */ + Parameter handlerArg() { result = this.getParameter(1) } +} + +/** A call to `SslErrorHandler.proceed` */ +private class SslProceedCall extends MethodAccess { + SslProceedCall() { + this.getMethod().hasQualifiedName("android.webkit", "SslErrorHandler", "proceed") + } +} + +/** Holds if `m` trusts all certificates by calling `SslErrorHandler.proceed` unconditionally. */ +predicate trustsAllCerts(OnReceivedSslErrorMethod m) { + exists(SslProceedCall pr | pr.getQualifier().(VarAccess).getVariable() = m.handlerArg() | + pr.getBasicBlock().bbPostDominates(m.getBody().getBasicBlock()) + ) +} diff --git a/java/ql/src/Security/CWE/CWE-295/ImproperWebViewCertificateValidation.java b/java/ql/src/Security/CWE/CWE-295/ImproperWebViewCertificateValidation.java new file mode 100644 index 000000000000..358800c57463 --- /dev/null +++ b/java/ql/src/Security/CWE/CWE-295/ImproperWebViewCertificateValidation.java @@ -0,0 +1,22 @@ +class Bad extends WebViewClient { + // BAD: All certificates are trusted. + public void onReceivedSslError (WebView view, SslErrorHandler handler, SslError error) { // $hasResult + handler.proceed(); + } +} + +class Good extends WebViewClient { + PublicKey myPubKey = ...; + + // GOOD: Only certificates signed by a certain public key are trusted. + public void onReceivedSslError (WebView view, SslErrorHandler handler, SslError error) { // $hasResult + try { + X509Certificate cert = error.getCertificate().getX509Certificate(); + cert.verify(this.myPubKey); + handler.proceed(); + } + catch (CertificateException|NoSuchAlgorithmException|InvalidKeyException|NoSuchProviderException|SignatureException e) { + handler.cancel(); + } + } +} \ No newline at end of file diff --git a/java/ql/src/Security/CWE/CWE-295/ImproperWebViewCertificateValidation.qhelp b/java/ql/src/Security/CWE/CWE-295/ImproperWebViewCertificateValidation.qhelp new file mode 100644 index 000000000000..2a8d3b58a4cf --- /dev/null +++ b/java/ql/src/Security/CWE/CWE-295/ImproperWebViewCertificateValidation.qhelp @@ -0,0 +1,46 @@ + + + +

+If the onReceivedSslError method of an Android WebViewClient always calls proceed on the given SslErrorHandler, it trusts any certificate. +This allows an attacker to perform a machine-in-the-middle attack against the application, therefore breaking any security Transport Layer Security (TLS) gives. +

+ +

+An attack might look like this: +

+ +
    +
  1. The vulnerable application connects to https://example.com.
  2. +
  3. The attacker intercepts this connection and presents a valid, self-signed certificate for https://example.com.
  4. +
  5. The vulnerable application calls the onReceivedSslError method to check whether it should trust the certificate.
  6. +
  7. The onReceivedSslError method of your WebViewClient calls SslErrorHandler.proceed.
  8. +
  9. The vulnerable application accepts the certificate and proceeds with the connection since your WevViewClient trusted it by proceeding.
  10. +
  11. The attacker can now read the data your application sends to https://example.com and/or alter its replies while the application thinks the connection is secure.
  12. +
+
+ + +

+Do not use a call SslerrorHandler.proceed unconditionally. +If you have to use a self-signed certificate, only accept that certificate, not all certificates. +

+ +
+ + +

+In the first (bad) example, the WebViewClient trusts all certificates by always calling SslErrorHandler.proceed. +In the second (good) example, only certificates signed by a certain public key are accepted. +

+ +
+ + +
  • +WebViewClient.onReceivedSslError documentation. +
  • +
    +
    diff --git a/java/ql/src/Security/CWE/CWE-295/ImproperWebViewCertificateValidation.ql b/java/ql/src/Security/CWE/CWE-295/ImproperWebViewCertificateValidation.ql new file mode 100644 index 000000000000..aac3a99be4c2 --- /dev/null +++ b/java/ql/src/Security/CWE/CWE-295/ImproperWebViewCertificateValidation.ql @@ -0,0 +1,18 @@ +/** + * @name Android `WebView` that accepts all certificates + * @description Trusting all certificates allows an attacker to perform a machine-in-the-middle attack. + * @kind problem + * @problem.severity error + * @security-severity 7.5 + * @precision high + * @id java/improper-webview-certificate-validation + * @tags security + * external/cwe/cwe-295 + */ + +import java +import semmle.code.java.security.AndroidWebViewCertificateValidationQuery + +from OnReceivedSslErrorMethod m +where trustsAllCerts(m) +select m, "This handler accepts all SSL certificates." diff --git a/java/ql/src/change-notes/2022-06-22-improper-webview-certificate-validation.md b/java/ql/src/change-notes/2022-06-22-improper-webview-certificate-validation.md new file mode 100644 index 000000000000..3e80487d7723 --- /dev/null +++ b/java/ql/src/change-notes/2022-06-22-improper-webview-certificate-validation.md @@ -0,0 +1,4 @@ +--- +category: newQuery +--- +* A new query "Android `WebView` that accepts all certificates" (`java/improper-webview-certificate-validation`) has been added. This query finds implementations of `WebViewClient`s that accept all certificates in the case of an SSL error. \ No newline at end of file diff --git a/java/ql/test/query-tests/security/CWE-295/ImproperWebVeiwCertificateValidation/Test.java b/java/ql/test/query-tests/security/CWE-295/ImproperWebVeiwCertificateValidation/Test.java new file mode 100644 index 000000000000..180989590f0f --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-295/ImproperWebVeiwCertificateValidation/Test.java @@ -0,0 +1,54 @@ +import android.webkit.WebViewClient; +import android.webkit.WebView; +import android.webkit.SslErrorHandler; +import android.net.http.SslError; +import android.net.http.SslCertificate; +import android.app.AlertDialog; +import android.content.DialogInterface; +import android.app.Activity; + +class Test { + class A extends WebViewClient { + public void onReceivedSslError (WebView view, SslErrorHandler handler, SslError error) { // $hasResult + handler.proceed(); + } + } + + interface Validator { + boolean isValid(SslCertificate cert); + } + + class B extends WebViewClient { + Validator v; + + public void onReceivedSslError (WebView view, SslErrorHandler handler, SslError error) { + if (this.v.isValid(error.getCertificate())) { + handler.proceed(); + } + else { + handler.cancel(); + } + } + } + + class C extends WebViewClient { + Activity activity; + + public void onReceivedSslError (WebView view, SslErrorHandler handler, SslError error) { + new AlertDialog.Builder(activity). + setTitle("SSL error"). + setMessage("SSL error. Connect anyway?"). + setPositiveButton("Yes", new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + handler.proceed(); + } + }).setNegativeButton("No", new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + handler.cancel(); + } + }).show(); + } + } +} \ No newline at end of file diff --git a/java/ql/test/query-tests/security/CWE-295/ImproperWebVeiwCertificateValidation/options b/java/ql/test/query-tests/security/CWE-295/ImproperWebVeiwCertificateValidation/options new file mode 100644 index 000000000000..a36a7e0c5ee5 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-295/ImproperWebVeiwCertificateValidation/options @@ -0,0 +1 @@ +// semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/google-android-9.0.0 \ No newline at end of file diff --git a/java/ql/test/query-tests/security/CWE-295/ImproperWebVeiwCertificateValidation/test.expected b/java/ql/test/query-tests/security/CWE-295/ImproperWebVeiwCertificateValidation/test.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/java/ql/test/query-tests/security/CWE-295/ImproperWebVeiwCertificateValidation/test.ql b/java/ql/test/query-tests/security/CWE-295/ImproperWebVeiwCertificateValidation/test.ql new file mode 100644 index 000000000000..6166e0fe2398 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-295/ImproperWebVeiwCertificateValidation/test.ql @@ -0,0 +1,19 @@ +import java +import semmle.code.java.security.AndroidWebViewCertificateValidationQuery +import TestUtilities.InlineExpectationsTest + +class WebViewTest extends InlineExpectationsTest { + WebViewTest() { this = "WebViewTest" } + + override string getARelevantTag() { result = "hasResult" } + + override predicate hasActualResult(Location location, string element, string tag, string value) { + exists(OnReceivedSslErrorMethod m | + trustsAllCerts(m) and + location = m.getLocation() and + element = m.toString() and + tag = "hasResult" and + value = "" + ) + } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/app/ActionBar.java b/java/ql/test/stubs/google-android-9.0.0/android/app/ActionBar.java new file mode 100644 index 000000000000..ae42ac532dcc --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/app/ActionBar.java @@ -0,0 +1,132 @@ +// Generated automatically from android.app.ActionBar for testing purposes + +package android.app; + +import android.app.FragmentTransaction; +import android.content.Context; +import android.graphics.drawable.Drawable; +import android.util.AttributeSet; +import android.view.View; +import android.view.ViewGroup; +import android.widget.SpinnerAdapter; + +abstract public class ActionBar +{ + abstract static public class Tab + { + public Tab(){} + public abstract ActionBar.Tab setContentDescription(CharSequence p0); + public abstract ActionBar.Tab setContentDescription(int p0); + public abstract ActionBar.Tab setCustomView(View p0); + public abstract ActionBar.Tab setCustomView(int p0); + public abstract ActionBar.Tab setIcon(Drawable p0); + public abstract ActionBar.Tab setIcon(int p0); + public abstract ActionBar.Tab setTabListener(ActionBar.TabListener p0); + public abstract ActionBar.Tab setTag(Object p0); + public abstract ActionBar.Tab setText(CharSequence p0); + public abstract ActionBar.Tab setText(int p0); + public abstract CharSequence getContentDescription(); + public abstract CharSequence getText(); + public abstract Drawable getIcon(); + public abstract Object getTag(); + public abstract View getCustomView(); + public abstract int getPosition(); + public abstract void select(); + public static int INVALID_POSITION = 0; + } + public ActionBar(){} + public Context getThemedContext(){ return null; } + public abstract ActionBar.Tab getSelectedTab(); + public abstract ActionBar.Tab getTabAt(int p0); + public abstract ActionBar.Tab newTab(); + public abstract CharSequence getSubtitle(); + public abstract CharSequence getTitle(); + public abstract View getCustomView(); + public abstract boolean isShowing(); + public abstract int getDisplayOptions(); + public abstract int getHeight(); + public abstract int getNavigationItemCount(); + public abstract int getNavigationMode(); + public abstract int getSelectedNavigationIndex(); + public abstract int getTabCount(); + public abstract void addOnMenuVisibilityListener(ActionBar.OnMenuVisibilityListener p0); + public abstract void addTab(ActionBar.Tab p0); + public abstract void addTab(ActionBar.Tab p0, boolean p1); + public abstract void addTab(ActionBar.Tab p0, int p1); + public abstract void addTab(ActionBar.Tab p0, int p1, boolean p2); + public abstract void hide(); + public abstract void removeAllTabs(); + public abstract void removeOnMenuVisibilityListener(ActionBar.OnMenuVisibilityListener p0); + public abstract void removeTab(ActionBar.Tab p0); + public abstract void removeTabAt(int p0); + public abstract void selectTab(ActionBar.Tab p0); + public abstract void setBackgroundDrawable(Drawable p0); + public abstract void setCustomView(View p0); + public abstract void setCustomView(View p0, ActionBar.LayoutParams p1); + public abstract void setCustomView(int p0); + public abstract void setDisplayHomeAsUpEnabled(boolean p0); + public abstract void setDisplayOptions(int p0); + public abstract void setDisplayOptions(int p0, int p1); + public abstract void setDisplayShowCustomEnabled(boolean p0); + public abstract void setDisplayShowHomeEnabled(boolean p0); + public abstract void setDisplayShowTitleEnabled(boolean p0); + public abstract void setDisplayUseLogoEnabled(boolean p0); + public abstract void setIcon(Drawable p0); + public abstract void setIcon(int p0); + public abstract void setListNavigationCallbacks(SpinnerAdapter p0, ActionBar.OnNavigationListener p1); + public abstract void setLogo(Drawable p0); + public abstract void setLogo(int p0); + public abstract void setNavigationMode(int p0); + public abstract void setSelectedNavigationItem(int p0); + public abstract void setSubtitle(CharSequence p0); + public abstract void setSubtitle(int p0); + public abstract void setTitle(CharSequence p0); + public abstract void setTitle(int p0); + public abstract void show(); + public boolean isHideOnContentScrollEnabled(){ return false; } + public float getElevation(){ return 0; } + public int getHideOffset(){ return 0; } + public static int DISPLAY_HOME_AS_UP = 0; + public static int DISPLAY_SHOW_CUSTOM = 0; + public static int DISPLAY_SHOW_HOME = 0; + public static int DISPLAY_SHOW_TITLE = 0; + public static int DISPLAY_USE_LOGO = 0; + public static int NAVIGATION_MODE_LIST = 0; + public static int NAVIGATION_MODE_STANDARD = 0; + public static int NAVIGATION_MODE_TABS = 0; + public void setElevation(float p0){} + public void setHideOffset(int p0){} + public void setHideOnContentScrollEnabled(boolean p0){} + public void setHomeActionContentDescription(CharSequence p0){} + public void setHomeActionContentDescription(int p0){} + public void setHomeAsUpIndicator(Drawable p0){} + public void setHomeAsUpIndicator(int p0){} + public void setHomeButtonEnabled(boolean p0){} + public void setSplitBackgroundDrawable(Drawable p0){} + public void setStackedBackgroundDrawable(Drawable p0){} + static public class LayoutParams extends ViewGroup.MarginLayoutParams + { + protected LayoutParams() {} + public LayoutParams(ActionBar.LayoutParams p0){} + public LayoutParams(Context p0, AttributeSet p1){} + public LayoutParams(ViewGroup.LayoutParams p0){} + public LayoutParams(int p0){} + public LayoutParams(int p0, int p1){} + public LayoutParams(int p0, int p1, int p2){} + public int gravity = 0; + } + static public interface OnMenuVisibilityListener + { + void onMenuVisibilityChanged(boolean p0); + } + static public interface OnNavigationListener + { + boolean onNavigationItemSelected(int p0, long p1); + } + static public interface TabListener + { + void onTabReselected(ActionBar.Tab p0, FragmentTransaction p1); + void onTabSelected(ActionBar.Tab p0, FragmentTransaction p1); + void onTabUnselected(ActionBar.Tab p0, FragmentTransaction p1); + } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/app/ActivityManager.java b/java/ql/test/stubs/google-android-9.0.0/android/app/ActivityManager.java new file mode 100644 index 000000000000..2d9bc359cf7e --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/app/ActivityManager.java @@ -0,0 +1,215 @@ +// Generated automatically from android.app.ActivityManager for testing purposes + +package android.app; + +import android.app.Activity; +import android.app.ApplicationExitInfo; +import android.app.PendingIntent; +import android.app.TaskInfo; +import android.content.ComponentName; +import android.content.Context; +import android.content.Intent; +import android.content.pm.ConfigurationInfo; +import android.graphics.Bitmap; +import android.os.Bundle; +import android.os.Debug; +import android.os.Parcel; +import android.os.Parcelable; +import android.util.Size; +import java.io.FileDescriptor; +import java.util.List; + +public class ActivityManager +{ + public ConfigurationInfo getDeviceConfigurationInfo(){ return null; } + public Debug.MemoryInfo[] getProcessMemoryInfo(int[] p0){ return null; } + public List getAppTasks(){ return null; } + public List getProcessesInErrorState(){ return null; } + public List getRecentTasks(int p0, int p1){ return null; } + public List getRunningAppProcesses(){ return null; } + public List getRunningServices(int p0){ return null; } + public List getRunningTasks(int p0){ return null; } + public List getHistoricalProcessExitReasons(String p0, int p1, int p2){ return null; } + public PendingIntent getRunningServiceControlPanel(ComponentName p0){ return null; } + public Size getAppTaskThumbnailSize(){ return null; } + public boolean clearApplicationUserData(){ return false; } + public boolean isActivityStartAllowedOnDisplay(Context p0, int p1, Intent p2){ return false; } + public boolean isBackgroundRestricted(){ return false; } + public boolean isInLockTaskMode(){ return false; } + public boolean isLowRamDevice(){ return false; } + public int addAppTask(Activity p0, Intent p1, ActivityManager.TaskDescription p2, Bitmap p3){ return 0; } + public int getLargeMemoryClass(){ return 0; } + public int getLauncherLargeIconDensity(){ return 0; } + public int getLauncherLargeIconSize(){ return 0; } + public int getLockTaskModeState(){ return 0; } + public int getMemoryClass(){ return 0; } + public static String ACTION_REPORT_HEAP_LIMIT = null; + public static String META_HOME_ALTERNATE = null; + public static boolean isLowMemoryKillReportSupported(){ return false; } + public static boolean isRunningInTestHarness(){ return false; } + public static boolean isRunningInUserTestHarness(){ return false; } + public static boolean isUserAMonkey(){ return false; } + public static int LOCK_TASK_MODE_LOCKED = 0; + public static int LOCK_TASK_MODE_NONE = 0; + public static int LOCK_TASK_MODE_PINNED = 0; + public static int MOVE_TASK_NO_USER_ACTION = 0; + public static int MOVE_TASK_WITH_HOME = 0; + public static int RECENT_IGNORE_UNAVAILABLE = 0; + public static int RECENT_WITH_EXCLUDED = 0; + public static void getMyMemoryState(ActivityManager.RunningAppProcessInfo p0){} + public static void setVrThread(int p0){} + public void appNotResponding(String p0){} + public void clearWatchHeapLimit(){} + public void dumpPackageState(FileDescriptor p0, String p1){} + public void getMemoryInfo(ActivityManager.MemoryInfo p0){} + public void killBackgroundProcesses(String p0){} + public void moveTaskToFront(int p0, int p1){} + public void moveTaskToFront(int p0, int p1, Bundle p2){} + public void restartPackage(String p0){} + public void setProcessStateSummary(byte[] p0){} + public void setWatchHeapLimit(long p0){} + static public class AppTask + { + public ActivityManager.RecentTaskInfo getTaskInfo(){ return null; } + public void finishAndRemoveTask(){} + public void moveToFront(){} + public void setExcludeFromRecents(boolean p0){} + public void startActivity(Context p0, Intent p1, Bundle p2){} + } + static public class MemoryInfo implements Parcelable + { + public MemoryInfo(){} + public boolean lowMemory = false; + public int describeContents(){ return 0; } + public long availMem = 0; + public long threshold = 0; + public long totalMem = 0; + public static Parcelable.Creator CREATOR = null; + public void readFromParcel(Parcel p0){} + public void writeToParcel(Parcel p0, int p1){} + } + static public class ProcessErrorStateInfo implements Parcelable + { + public ProcessErrorStateInfo(){} + public String longMsg = null; + public String processName = null; + public String shortMsg = null; + public String stackTrace = null; + public String tag = null; + public byte[] crashData = null; + public int condition = 0; + public int describeContents(){ return 0; } + public int pid = 0; + public int uid = 0; + public static Parcelable.Creator CREATOR = null; + public static int CRASHED = 0; + public static int NOT_RESPONDING = 0; + public static int NO_ERROR = 0; + public void readFromParcel(Parcel p0){} + public void writeToParcel(Parcel p0, int p1){} + } + static public class RecentTaskInfo extends TaskInfo implements Parcelable + { + public CharSequence description = null; + public RecentTaskInfo(){} + public int affiliatedTaskId = 0; + public int describeContents(){ return 0; } + public int id = 0; + public int persistentId = 0; + public static Parcelable.Creator CREATOR = null; + public void readFromParcel(Parcel p0){} + public void writeToParcel(Parcel p0, int p1){} + } + static public class RunningAppProcessInfo implements Parcelable + { + public ComponentName importanceReasonComponent = null; + public RunningAppProcessInfo(){} + public RunningAppProcessInfo(String p0, int p1, String[] p2){} + public String processName = null; + public String[] pkgList = null; + public int describeContents(){ return 0; } + public int importance = 0; + public int importanceReasonCode = 0; + public int importanceReasonPid = 0; + public int lastTrimLevel = 0; + public int lru = 0; + public int pid = 0; + public int uid = 0; + public static Parcelable.Creator CREATOR = null; + public static int IMPORTANCE_BACKGROUND = 0; + public static int IMPORTANCE_CACHED = 0; + public static int IMPORTANCE_CANT_SAVE_STATE = 0; + public static int IMPORTANCE_EMPTY = 0; + public static int IMPORTANCE_FOREGROUND = 0; + public static int IMPORTANCE_FOREGROUND_SERVICE = 0; + public static int IMPORTANCE_GONE = 0; + public static int IMPORTANCE_PERCEPTIBLE = 0; + public static int IMPORTANCE_PERCEPTIBLE_PRE_26 = 0; + public static int IMPORTANCE_SERVICE = 0; + public static int IMPORTANCE_TOP_SLEEPING = 0; + public static int IMPORTANCE_TOP_SLEEPING_PRE_28 = 0; + public static int IMPORTANCE_VISIBLE = 0; + public static int REASON_PROVIDER_IN_USE = 0; + public static int REASON_SERVICE_IN_USE = 0; + public static int REASON_UNKNOWN = 0; + public void readFromParcel(Parcel p0){} + public void writeToParcel(Parcel p0, int p1){} + } + static public class RunningServiceInfo implements Parcelable + { + public ComponentName service = null; + public RunningServiceInfo(){} + public String clientPackage = null; + public String process = null; + public boolean foreground = false; + public boolean started = false; + public int clientCount = 0; + public int clientLabel = 0; + public int crashCount = 0; + public int describeContents(){ return 0; } + public int flags = 0; + public int pid = 0; + public int uid = 0; + public long activeSince = 0; + public long lastActivityTime = 0; + public long restarting = 0; + public static Parcelable.Creator CREATOR = null; + public static int FLAG_FOREGROUND = 0; + public static int FLAG_PERSISTENT_PROCESS = 0; + public static int FLAG_STARTED = 0; + public static int FLAG_SYSTEM_PROCESS = 0; + public void readFromParcel(Parcel p0){} + public void writeToParcel(Parcel p0, int p1){} + } + static public class RunningTaskInfo extends TaskInfo implements Parcelable + { + public Bitmap thumbnail = null; + public CharSequence description = null; + public RunningTaskInfo(){} + public int describeContents(){ return 0; } + public int id = 0; + public int numRunning = 0; + public static Parcelable.Creator CREATOR = null; + public void readFromParcel(Parcel p0){} + public void writeToParcel(Parcel p0, int p1){} + } + static public class TaskDescription implements Parcelable + { + public Bitmap getIcon(){ return null; } + public String getLabel(){ return null; } + public String toString(){ return null; } + public TaskDescription(){} + public TaskDescription(ActivityManager.TaskDescription p0){} + public TaskDescription(String p0){} + public TaskDescription(String p0, Bitmap p1){} + public TaskDescription(String p0, Bitmap p1, int p2){} + public TaskDescription(String p0, int p1){} + public TaskDescription(String p0, int p1, int p2){} + public boolean equals(Object p0){ return false; } + public int describeContents(){ return 0; } + public int getPrimaryColor(){ return 0; } + public static Parcelable.Creator CREATOR = null; + public void readFromParcel(Parcel p0){} + public void writeToParcel(Parcel p0, int p1){} + } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/app/AlertDialog.java b/java/ql/test/stubs/google-android-9.0.0/android/app/AlertDialog.java new file mode 100644 index 000000000000..530cccf7bc19 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/app/AlertDialog.java @@ -0,0 +1,95 @@ +// Generated automatically from android.app.AlertDialog for testing purposes + +package android.app; + +import android.app.Dialog; +import android.content.Context; +import android.content.DialogInterface; +import android.database.Cursor; +import android.graphics.drawable.Drawable; +import android.os.Bundle; +import android.os.Message; +import android.view.KeyEvent; +import android.view.View; +import android.widget.Adapter; +import android.widget.AdapterView; +import android.widget.Button; +import android.widget.ListAdapter; +import android.widget.ListView; + +public class AlertDialog extends Dialog implements DialogInterface +{ + protected AlertDialog() {} + protected AlertDialog(Context p0){} + protected AlertDialog(Context p0, boolean p1, DialogInterface.OnCancelListener p2){} + protected AlertDialog(Context p0, int p1){} + protected void onCreate(Bundle p0){} + public Button getButton(int p0){ return null; } + public ListView getListView(){ return null; } + public boolean onKeyDown(int p0, KeyEvent p1){ return false; } + public boolean onKeyUp(int p0, KeyEvent p1){ return false; } + public static int THEME_DEVICE_DEFAULT_DARK = 0; + public static int THEME_DEVICE_DEFAULT_LIGHT = 0; + public static int THEME_HOLO_DARK = 0; + public static int THEME_HOLO_LIGHT = 0; + public static int THEME_TRADITIONAL = 0; + public void setButton(CharSequence p0, DialogInterface.OnClickListener p1){} + public void setButton(CharSequence p0, Message p1){} + public void setButton(int p0, CharSequence p1, DialogInterface.OnClickListener p2){} + public void setButton(int p0, CharSequence p1, Message p2){} + public void setButton2(CharSequence p0, DialogInterface.OnClickListener p1){} + public void setButton2(CharSequence p0, Message p1){} + public void setButton3(CharSequence p0, DialogInterface.OnClickListener p1){} + public void setButton3(CharSequence p0, Message p1){} + public void setCustomTitle(View p0){} + public void setIcon(Drawable p0){} + public void setIcon(int p0){} + public void setIconAttribute(int p0){} + public void setInverseBackgroundForced(boolean p0){} + public void setMessage(CharSequence p0){} + public void setTitle(CharSequence p0){} + public void setView(View p0){} + public void setView(View p0, int p1, int p2, int p3, int p4){} + static public class Builder + { + protected Builder() {} + public AlertDialog create(){ return null; } + public AlertDialog show(){ return null; } + public AlertDialog.Builder setAdapter(ListAdapter p0, DialogInterface.OnClickListener p1){ return null; } + public AlertDialog.Builder setCancelable(boolean p0){ return null; } + public AlertDialog.Builder setCursor(Cursor p0, DialogInterface.OnClickListener p1, String p2){ return null; } + public AlertDialog.Builder setCustomTitle(View p0){ return null; } + public AlertDialog.Builder setIcon(Drawable p0){ return null; } + public AlertDialog.Builder setIcon(int p0){ return null; } + public AlertDialog.Builder setIconAttribute(int p0){ return null; } + public AlertDialog.Builder setInverseBackgroundForced(boolean p0){ return null; } + public AlertDialog.Builder setItems(CharSequence[] p0, DialogInterface.OnClickListener p1){ return null; } + public AlertDialog.Builder setItems(int p0, DialogInterface.OnClickListener p1){ return null; } + public AlertDialog.Builder setMessage(CharSequence p0){ return null; } + public AlertDialog.Builder setMessage(int p0){ return null; } + public AlertDialog.Builder setMultiChoiceItems(CharSequence[] p0, boolean[] p1, DialogInterface.OnMultiChoiceClickListener p2){ return null; } + public AlertDialog.Builder setMultiChoiceItems(Cursor p0, String p1, String p2, DialogInterface.OnMultiChoiceClickListener p3){ return null; } + public AlertDialog.Builder setMultiChoiceItems(int p0, boolean[] p1, DialogInterface.OnMultiChoiceClickListener p2){ return null; } + public AlertDialog.Builder setNegativeButton(CharSequence p0, DialogInterface.OnClickListener p1){ return null; } + public AlertDialog.Builder setNegativeButton(int p0, DialogInterface.OnClickListener p1){ return null; } + public AlertDialog.Builder setNeutralButton(CharSequence p0, DialogInterface.OnClickListener p1){ return null; } + public AlertDialog.Builder setNeutralButton(int p0, DialogInterface.OnClickListener p1){ return null; } + public AlertDialog.Builder setOnCancelListener(DialogInterface.OnCancelListener p0){ return null; } + public AlertDialog.Builder setOnDismissListener(DialogInterface.OnDismissListener p0){ return null; } + public AlertDialog.Builder setOnItemSelectedListener(AdapterView.OnItemSelectedListener p0){ return null; } + public AlertDialog.Builder setOnKeyListener(DialogInterface.OnKeyListener p0){ return null; } + public AlertDialog.Builder setPositiveButton(CharSequence p0, DialogInterface.OnClickListener p1){ return null; } + public AlertDialog.Builder setPositiveButton(int p0, DialogInterface.OnClickListener p1){ return null; } + public AlertDialog.Builder setSingleChoiceItems(CharSequence[] p0, int p1, DialogInterface.OnClickListener p2){ return null; } + public AlertDialog.Builder setSingleChoiceItems(Cursor p0, int p1, String p2, DialogInterface.OnClickListener p3){ return null; } + public AlertDialog.Builder setSingleChoiceItems(ListAdapter p0, int p1, DialogInterface.OnClickListener p2){ return null; } + public AlertDialog.Builder setSingleChoiceItems(int p0, int p1, DialogInterface.OnClickListener p2){ return null; } + public AlertDialog.Builder setTitle(CharSequence p0){ return null; } + public AlertDialog.Builder setTitle(int p0){ return null; } + public AlertDialog.Builder setView(View p0){ return null; } + public AlertDialog.Builder setView(int p0){ return null; } + public Builder(Context p0){} + public Builder(Context p0, int p1){} + public Context getContext(){ return null; } + } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/app/Application.java b/java/ql/test/stubs/google-android-9.0.0/android/app/Application.java new file mode 100644 index 000000000000..e9199a2da83c --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/app/Application.java @@ -0,0 +1,55 @@ +// Generated automatically from android.app.Application for testing purposes + +package android.app; + +import android.app.Activity; +import android.content.ComponentCallbacks2; +import android.content.ComponentCallbacks; +import android.content.ContextWrapper; +import android.content.res.Configuration; +import android.os.Bundle; + +public class Application extends ContextWrapper implements ComponentCallbacks2 +{ + public Application(){} + public static String getProcessName(){ return null; } + public void onConfigurationChanged(Configuration p0){} + public void onCreate(){} + public void onLowMemory(){} + public void onTerminate(){} + public void onTrimMemory(int p0){} + public void registerActivityLifecycleCallbacks(Application.ActivityLifecycleCallbacks p0){} + public void registerComponentCallbacks(ComponentCallbacks p0){} + public void registerOnProvideAssistDataListener(Application.OnProvideAssistDataListener p0){} + public void unregisterActivityLifecycleCallbacks(Application.ActivityLifecycleCallbacks p0){} + public void unregisterComponentCallbacks(ComponentCallbacks p0){} + public void unregisterOnProvideAssistDataListener(Application.OnProvideAssistDataListener p0){} + static public interface ActivityLifecycleCallbacks + { + default void onActivityPostCreated(Activity p0, Bundle p1){} + default void onActivityPostDestroyed(Activity p0){} + default void onActivityPostPaused(Activity p0){} + default void onActivityPostResumed(Activity p0){} + default void onActivityPostSaveInstanceState(Activity p0, Bundle p1){} + default void onActivityPostStarted(Activity p0){} + default void onActivityPostStopped(Activity p0){} + default void onActivityPreCreated(Activity p0, Bundle p1){} + default void onActivityPreDestroyed(Activity p0){} + default void onActivityPrePaused(Activity p0){} + default void onActivityPreResumed(Activity p0){} + default void onActivityPreSaveInstanceState(Activity p0, Bundle p1){} + default void onActivityPreStarted(Activity p0){} + default void onActivityPreStopped(Activity p0){} + void onActivityCreated(Activity p0, Bundle p1); + void onActivityDestroyed(Activity p0); + void onActivityPaused(Activity p0); + void onActivityResumed(Activity p0); + void onActivitySaveInstanceState(Activity p0, Bundle p1); + void onActivityStarted(Activity p0); + void onActivityStopped(Activity p0); + } + static public interface OnProvideAssistDataListener + { + void onProvideAssistData(Activity p0, Bundle p1); + } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/app/ApplicationExitInfo.java b/java/ql/test/stubs/google-android-9.0.0/android/app/ApplicationExitInfo.java new file mode 100644 index 000000000000..6f412aa122ab --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/app/ApplicationExitInfo.java @@ -0,0 +1,47 @@ +// Generated automatically from android.app.ApplicationExitInfo for testing purposes + +package android.app; + +import android.os.Parcel; +import android.os.Parcelable; +import android.os.UserHandle; +import java.io.InputStream; + +public class ApplicationExitInfo implements Parcelable +{ + public InputStream getTraceInputStream(){ return null; } + public String getDescription(){ return null; } + public String getProcessName(){ return null; } + public String toString(){ return null; } + public UserHandle getUserHandle(){ return null; } + public boolean equals(Object p0){ return false; } + public byte[] getProcessStateSummary(){ return null; } + public int describeContents(){ return 0; } + public int getDefiningUid(){ return 0; } + public int getImportance(){ return 0; } + public int getPackageUid(){ return 0; } + public int getPid(){ return 0; } + public int getRealUid(){ return 0; } + public int getReason(){ return 0; } + public int getStatus(){ return 0; } + public int hashCode(){ return 0; } + public long getPss(){ return 0; } + public long getRss(){ return 0; } + public long getTimestamp(){ return 0; } + public static Parcelable.Creator CREATOR = null; + public static int REASON_ANR = 0; + public static int REASON_CRASH = 0; + public static int REASON_CRASH_NATIVE = 0; + public static int REASON_DEPENDENCY_DIED = 0; + public static int REASON_EXCESSIVE_RESOURCE_USAGE = 0; + public static int REASON_EXIT_SELF = 0; + public static int REASON_INITIALIZATION_FAILURE = 0; + public static int REASON_LOW_MEMORY = 0; + public static int REASON_OTHER = 0; + public static int REASON_PERMISSION_CHANGE = 0; + public static int REASON_SIGNALED = 0; + public static int REASON_UNKNOWN = 0; + public static int REASON_USER_REQUESTED = 0; + public static int REASON_USER_STOPPED = 0; + public void writeToParcel(Parcel p0, int p1){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/app/Dialog.java b/java/ql/test/stubs/google-android-9.0.0/android/app/Dialog.java new file mode 100644 index 000000000000..35c4b8bb3939 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/app/Dialog.java @@ -0,0 +1,121 @@ +// Generated automatically from android.app.Dialog for testing purposes + +package android.app; + +import android.app.ActionBar; +import android.app.Activity; +import android.content.Context; +import android.content.DialogInterface; +import android.graphics.drawable.Drawable; +import android.net.Uri; +import android.os.Bundle; +import android.os.Message; +import android.view.ActionMode; +import android.view.ContextMenu; +import android.view.KeyEvent; +import android.view.LayoutInflater; +import android.view.Menu; +import android.view.MenuItem; +import android.view.MotionEvent; +import android.view.SearchEvent; +import android.view.View; +import android.view.ViewGroup; +import android.view.Window; +import android.view.WindowManager; +import android.view.accessibility.AccessibilityEvent; + +public class Dialog implements DialogInterface, KeyEvent.Callback, View.OnCreateContextMenuListener, Window.Callback +{ + protected Dialog() {} + protected Dialog(Context p0, boolean p1, DialogInterface.OnCancelListener p2){} + protected void onCreate(Bundle p0){} + protected void onStart(){} + protected void onStop(){} + public T findViewById(int p0){ return null; } + public ActionBar getActionBar(){ return null; } + public ActionMode onWindowStartingActionMode(ActionMode.Callback p0){ return null; } + public ActionMode onWindowStartingActionMode(ActionMode.Callback p0, int p1){ return null; } + public Bundle onSaveInstanceState(){ return null; } + public Dialog(Context p0){} + public Dialog(Context p0, int p1){} + public LayoutInflater getLayoutInflater(){ return null; } + public View getCurrentFocus(){ return null; } + public View onCreatePanelView(int p0){ return null; } + public Window getWindow(){ return null; } + public boolean dispatchGenericMotionEvent(MotionEvent p0){ return false; } + public boolean dispatchKeyEvent(KeyEvent p0){ return false; } + public boolean dispatchKeyShortcutEvent(KeyEvent p0){ return false; } + public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent p0){ return false; } + public boolean dispatchTouchEvent(MotionEvent p0){ return false; } + public boolean dispatchTrackballEvent(MotionEvent p0){ return false; } + public boolean isShowing(){ return false; } + public boolean onContextItemSelected(MenuItem p0){ return false; } + public boolean onCreateOptionsMenu(Menu p0){ return false; } + public boolean onCreatePanelMenu(int p0, Menu p1){ return false; } + public boolean onGenericMotionEvent(MotionEvent p0){ return false; } + public boolean onKeyDown(int p0, KeyEvent p1){ return false; } + public boolean onKeyLongPress(int p0, KeyEvent p1){ return false; } + public boolean onKeyMultiple(int p0, int p1, KeyEvent p2){ return false; } + public boolean onKeyShortcut(int p0, KeyEvent p1){ return false; } + public boolean onKeyUp(int p0, KeyEvent p1){ return false; } + public boolean onMenuItemSelected(int p0, MenuItem p1){ return false; } + public boolean onMenuOpened(int p0, Menu p1){ return false; } + public boolean onOptionsItemSelected(MenuItem p0){ return false; } + public boolean onPrepareOptionsMenu(Menu p0){ return false; } + public boolean onPreparePanel(int p0, View p1, Menu p2){ return false; } + public boolean onSearchRequested(){ return false; } + public boolean onSearchRequested(SearchEvent p0){ return false; } + public boolean onTouchEvent(MotionEvent p0){ return false; } + public boolean onTrackballEvent(MotionEvent p0){ return false; } + public final T requireViewById(int p0){ return null; } + public final Activity getOwnerActivity(){ return null; } + public final Context getContext(){ return null; } + public final SearchEvent getSearchEvent(){ return null; } + public final boolean requestWindowFeature(int p0){ return false; } + public final int getVolumeControlStream(){ return 0; } + public final void setFeatureDrawable(int p0, Drawable p1){} + public final void setFeatureDrawableAlpha(int p0, int p1){} + public final void setFeatureDrawableResource(int p0, int p1){} + public final void setFeatureDrawableUri(int p0, Uri p1){} + public final void setOwnerActivity(Activity p0){} + public final void setVolumeControlStream(int p0){} + public void addContentView(View p0, ViewGroup.LayoutParams p1){} + public void cancel(){} + public void closeOptionsMenu(){} + public void create(){} + public void dismiss(){} + public void hide(){} + public void invalidateOptionsMenu(){} + public void onActionModeFinished(ActionMode p0){} + public void onActionModeStarted(ActionMode p0){} + public void onAttachedToWindow(){} + public void onBackPressed(){} + public void onContentChanged(){} + public void onContextMenuClosed(Menu p0){} + public void onCreateContextMenu(ContextMenu p0, View p1, ContextMenu.ContextMenuInfo p2){} + public void onDetachedFromWindow(){} + public void onOptionsMenuClosed(Menu p0){} + public void onPanelClosed(int p0, Menu p1){} + public void onRestoreInstanceState(Bundle p0){} + public void onWindowAttributesChanged(WindowManager.LayoutParams p0){} + public void onWindowFocusChanged(boolean p0){} + public void openContextMenu(View p0){} + public void openOptionsMenu(){} + public void registerForContextMenu(View p0){} + public void setCancelMessage(Message p0){} + public void setCancelable(boolean p0){} + public void setCanceledOnTouchOutside(boolean p0){} + public void setContentView(View p0){} + public void setContentView(View p0, ViewGroup.LayoutParams p1){} + public void setContentView(int p0){} + public void setDismissMessage(Message p0){} + public void setOnCancelListener(DialogInterface.OnCancelListener p0){} + public void setOnDismissListener(DialogInterface.OnDismissListener p0){} + public void setOnKeyListener(DialogInterface.OnKeyListener p0){} + public void setOnShowListener(DialogInterface.OnShowListener p0){} + public void setTitle(CharSequence p0){} + public void setTitle(int p0){} + public void show(){} + public void takeKeyEvents(boolean p0){} + public void unregisterForContextMenu(View p0){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/app/DirectAction.java b/java/ql/test/stubs/google-android-9.0.0/android/app/DirectAction.java new file mode 100644 index 000000000000..7eeaa9eac66e --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/app/DirectAction.java @@ -0,0 +1,20 @@ +// Generated automatically from android.app.DirectAction for testing purposes + +package android.app; + +import android.content.LocusId; +import android.os.Bundle; +import android.os.Parcel; +import android.os.Parcelable; + +public class DirectAction implements Parcelable +{ + public Bundle getExtras(){ return null; } + public LocusId getLocusId(){ return null; } + public String getId(){ return null; } + public boolean equals(Object p0){ return false; } + public int describeContents(){ return 0; } + public int hashCode(){ return 0; } + public static Parcelable.Creator CREATOR = null; + public void writeToParcel(Parcel p0, int p1){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/app/Fragment.java b/java/ql/test/stubs/google-android-9.0.0/android/app/Fragment.java index 5e5f71dcd255..41969f5d8776 100644 --- a/java/ql/test/stubs/google-android-9.0.0/android/app/Fragment.java +++ b/java/ql/test/stubs/google-android-9.0.0/android/app/Fragment.java @@ -1,82 +1,148 @@ -/* - * Copyright (C) 2010 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ +// Generated automatically from android.app.Fragment for testing purposes package android.app; -import android.annotation.Nullable; +import android.animation.Animator; +import android.app.Activity; +import android.app.FragmentManager; +import android.app.LoaderManager; +import android.app.SharedElementCallback; import android.content.ComponentCallbacks2; import android.content.Context; import android.content.Intent; +import android.content.IntentSender; import android.content.res.Configuration; +import android.content.res.Resources; import android.os.Bundle; import android.os.Parcel; import android.os.Parcelable; - -public class Fragment implements ComponentCallbacks2 { - public static class SavedState implements Parcelable { - @Override - public int describeContents() { - return 0; +import android.transition.Transition; +import android.util.AttributeSet; +import android.view.ContextMenu; +import android.view.LayoutInflater; +import android.view.Menu; +import android.view.MenuInflater; +import android.view.MenuItem; +import android.view.View; +import android.view.ViewGroup; +import java.io.FileDescriptor; +import java.io.PrintWriter; + +public class Fragment implements ComponentCallbacks2, View.OnCreateContextMenuListener +{ + public Animator onCreateAnimator(int p0, boolean p1, int p2){ return null; } + public Context getContext(){ return null; } + public Fragment(){} + public LayoutInflater onGetLayoutInflater(Bundle p0){ return null; } + public LoaderManager getLoaderManager(){ return null; } + public String toString(){ return null; } + public Transition getEnterTransition(){ return null; } + public Transition getExitTransition(){ return null; } + public Transition getReenterTransition(){ return null; } + public Transition getReturnTransition(){ return null; } + public Transition getSharedElementEnterTransition(){ return null; } + public Transition getSharedElementReturnTransition(){ return null; } + public View getView(){ return null; } + public View onCreateView(LayoutInflater p0, ViewGroup p1, Bundle p2){ return null; } + public boolean getAllowEnterTransitionOverlap(){ return false; } + public boolean getAllowReturnTransitionOverlap(){ return false; } + public boolean getUserVisibleHint(){ return false; } + public boolean onContextItemSelected(MenuItem p0){ return false; } + public boolean onOptionsItemSelected(MenuItem p0){ return false; } + public boolean shouldShowRequestPermissionRationale(String p0){ return false; } + public final Activity getActivity(){ return null; } + public final Bundle getArguments(){ return null; } + public final CharSequence getText(int p0){ return null; } + public final Fragment getParentFragment(){ return null; } + public final Fragment getTargetFragment(){ return null; } + public final FragmentManager getChildFragmentManager(){ return null; } + public final FragmentManager getFragmentManager(){ return null; } + public final LayoutInflater getLayoutInflater(){ return null; } + public final Object getHost(){ return null; } + public final Resources getResources(){ return null; } + public final String getString(int p0){ return null; } + public final String getString(int p0, Object... p1){ return null; } + public final String getTag(){ return null; } + public final boolean equals(Object p0){ return false; } + public final boolean getRetainInstance(){ return false; } + public final boolean isAdded(){ return false; } + public final boolean isDetached(){ return false; } + public final boolean isHidden(){ return false; } + public final boolean isInLayout(){ return false; } + public final boolean isRemoving(){ return false; } + public final boolean isResumed(){ return false; } + public final boolean isStateSaved(){ return false; } + public final boolean isVisible(){ return false; } + public final int getId(){ return 0; } + public final int getTargetRequestCode(){ return 0; } + public final int hashCode(){ return 0; } + public final void requestPermissions(String[] p0, int p1){} + public static Fragment instantiate(Context p0, String p1){ return null; } + public static Fragment instantiate(Context p0, String p1, Bundle p2){ return null; } + public void dump(String p0, FileDescriptor p1, PrintWriter p2, String[] p3){} + public void onActivityCreated(Bundle p0){} + public void onActivityResult(int p0, int p1, Intent p2){} + public void onAttach(Activity p0){} + public void onAttach(Context p0){} + public void onAttachFragment(Fragment p0){} + public void onConfigurationChanged(Configuration p0){} + public void onCreate(Bundle p0){} + public void onCreateContextMenu(ContextMenu p0, View p1, ContextMenu.ContextMenuInfo p2){} + public void onCreateOptionsMenu(Menu p0, MenuInflater p1){} + public void onDestroy(){} + public void onDestroyOptionsMenu(){} + public void onDestroyView(){} + public void onDetach(){} + public void onHiddenChanged(boolean p0){} + public void onInflate(Activity p0, AttributeSet p1, Bundle p2){} + public void onInflate(AttributeSet p0, Bundle p1){} + public void onInflate(Context p0, AttributeSet p1, Bundle p2){} + public void onLowMemory(){} + public void onMultiWindowModeChanged(boolean p0){} + public void onMultiWindowModeChanged(boolean p0, Configuration p1){} + public void onOptionsMenuClosed(Menu p0){} + public void onPause(){} + public void onPictureInPictureModeChanged(boolean p0){} + public void onPictureInPictureModeChanged(boolean p0, Configuration p1){} + public void onPrepareOptionsMenu(Menu p0){} + public void onRequestPermissionsResult(int p0, String[] p1, int[] p2){} + public void onResume(){} + public void onSaveInstanceState(Bundle p0){} + public void onStart(){} + public void onStop(){} + public void onTrimMemory(int p0){} + public void onViewCreated(View p0, Bundle p1){} + public void onViewStateRestored(Bundle p0){} + public void postponeEnterTransition(){} + public void registerForContextMenu(View p0){} + public void setAllowEnterTransitionOverlap(boolean p0){} + public void setAllowReturnTransitionOverlap(boolean p0){} + public void setArguments(Bundle p0){} + public void setEnterSharedElementCallback(SharedElementCallback p0){} + public void setEnterTransition(Transition p0){} + public void setExitSharedElementCallback(SharedElementCallback p0){} + public void setExitTransition(Transition p0){} + public void setHasOptionsMenu(boolean p0){} + public void setInitialSavedState(Fragment.SavedState p0){} + public void setMenuVisibility(boolean p0){} + public void setReenterTransition(Transition p0){} + public void setRetainInstance(boolean p0){} + public void setReturnTransition(Transition p0){} + public void setSharedElementEnterTransition(Transition p0){} + public void setSharedElementReturnTransition(Transition p0){} + public void setTargetFragment(Fragment p0, int p1){} + public void setUserVisibleHint(boolean p0){} + public void startActivity(Intent p0){} + public void startActivity(Intent p0, Bundle p1){} + public void startActivityForResult(Intent p0, int p1){} + public void startActivityForResult(Intent p0, int p1, Bundle p2){} + public void startIntentSenderForResult(IntentSender p0, int p1, Intent p2, int p3, int p4, int p5, Bundle p6){} + public void startPostponedEnterTransition(){} + public void unregisterForContextMenu(View p0){} + static public class SavedState implements Parcelable + { + public int describeContents(){ return 0; } + public static Parcelable.ClassLoaderCreator CREATOR = null; + public void writeToParcel(Parcel p0, int p1){} } - - @Override - public void writeToParcel(Parcel dest, int flags) {} - - } - - static public class InstantiationException { - public InstantiationException(String msg, Exception cause) {} - } - - - public Fragment() {} - - public static Fragment instantiate(Context context, String fname) { - return null; - } - - public static Fragment instantiate(Context context, String fname, @Nullable Bundle args) { - return null; - } - - @Override - final public boolean equals(Object o) { - return false; - } - - @Override - final public int hashCode() { - return 0; - } - - @Override - public String toString() { - return null; - } - - @Override - public void onConfigurationChanged(Configuration p0) {} - - @Override - public void onLowMemory() {} - - @Override - public void onTrimMemory(int p0) {} - - public void startActivityForResult(Intent intent, int requestCode) {} - - public void startActivityForResult(Intent intent, int requestCode, Bundle options) {} - - public void onActivityResult(int requestCode, int resultCode, Intent data) {} } diff --git a/java/ql/test/stubs/google-android-9.0.0/android/app/FragmentManager.java b/java/ql/test/stubs/google-android-9.0.0/android/app/FragmentManager.java new file mode 100644 index 000000000000..0d62560b6851 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/app/FragmentManager.java @@ -0,0 +1,75 @@ +// Generated automatically from android.app.FragmentManager for testing purposes + +package android.app; + +import android.app.Fragment; +import android.app.FragmentTransaction; +import android.content.Context; +import android.os.Bundle; +import android.view.View; +import java.io.FileDescriptor; +import java.io.PrintWriter; +import java.util.List; + +abstract public class FragmentManager +{ + abstract static public class FragmentLifecycleCallbacks + { + public FragmentLifecycleCallbacks(){} + public void onFragmentActivityCreated(FragmentManager p0, Fragment p1, Bundle p2){} + public void onFragmentAttached(FragmentManager p0, Fragment p1, Context p2){} + public void onFragmentCreated(FragmentManager p0, Fragment p1, Bundle p2){} + public void onFragmentDestroyed(FragmentManager p0, Fragment p1){} + public void onFragmentDetached(FragmentManager p0, Fragment p1){} + public void onFragmentPaused(FragmentManager p0, Fragment p1){} + public void onFragmentPreAttached(FragmentManager p0, Fragment p1, Context p2){} + public void onFragmentPreCreated(FragmentManager p0, Fragment p1, Bundle p2){} + public void onFragmentResumed(FragmentManager p0, Fragment p1){} + public void onFragmentSaveInstanceState(FragmentManager p0, Fragment p1, Bundle p2){} + public void onFragmentStarted(FragmentManager p0, Fragment p1){} + public void onFragmentStopped(FragmentManager p0, Fragment p1){} + public void onFragmentViewCreated(FragmentManager p0, Fragment p1, View p2, Bundle p3){} + public void onFragmentViewDestroyed(FragmentManager p0, Fragment p1){} + } + public FragmentManager(){} + public abstract Fragment findFragmentById(int p0); + public abstract Fragment findFragmentByTag(String p0); + public abstract Fragment getFragment(Bundle p0, String p1); + public abstract Fragment getPrimaryNavigationFragment(); + public abstract Fragment.SavedState saveFragmentInstanceState(Fragment p0); + public abstract FragmentManager.BackStackEntry getBackStackEntryAt(int p0); + public abstract FragmentTransaction beginTransaction(); + public abstract List getFragments(); + public abstract boolean executePendingTransactions(); + public abstract boolean isDestroyed(); + public abstract boolean isStateSaved(); + public abstract boolean popBackStackImmediate(); + public abstract boolean popBackStackImmediate(String p0, int p1); + public abstract boolean popBackStackImmediate(int p0, int p1); + public abstract int getBackStackEntryCount(); + public abstract void addOnBackStackChangedListener(FragmentManager.OnBackStackChangedListener p0); + public abstract void dump(String p0, FileDescriptor p1, PrintWriter p2, String[] p3); + public abstract void popBackStack(); + public abstract void popBackStack(String p0, int p1); + public abstract void popBackStack(int p0, int p1); + public abstract void putFragment(Bundle p0, String p1, Fragment p2); + public abstract void registerFragmentLifecycleCallbacks(FragmentManager.FragmentLifecycleCallbacks p0, boolean p1); + public abstract void removeOnBackStackChangedListener(FragmentManager.OnBackStackChangedListener p0); + public abstract void unregisterFragmentLifecycleCallbacks(FragmentManager.FragmentLifecycleCallbacks p0); + public static int POP_BACK_STACK_INCLUSIVE = 0; + public static void enableDebugLogging(boolean p0){} + public void invalidateOptionsMenu(){} + static public interface BackStackEntry + { + CharSequence getBreadCrumbShortTitle(); + CharSequence getBreadCrumbTitle(); + String getName(); + int getBreadCrumbShortTitleRes(); + int getBreadCrumbTitleRes(); + int getId(); + } + static public interface OnBackStackChangedListener + { + void onBackStackChanged(); + } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/app/FragmentTransaction.java b/java/ql/test/stubs/google-android-9.0.0/android/app/FragmentTransaction.java new file mode 100644 index 000000000000..762dc14091c8 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/app/FragmentTransaction.java @@ -0,0 +1,48 @@ +// Generated automatically from android.app.FragmentTransaction for testing purposes + +package android.app; + +import android.app.Fragment; +import android.view.View; + +abstract public class FragmentTransaction +{ + public FragmentTransaction(){} + public abstract FragmentTransaction add(Fragment p0, String p1); + public abstract FragmentTransaction add(int p0, Fragment p1); + public abstract FragmentTransaction add(int p0, Fragment p1, String p2); + public abstract FragmentTransaction addSharedElement(View p0, String p1); + public abstract FragmentTransaction addToBackStack(String p0); + public abstract FragmentTransaction attach(Fragment p0); + public abstract FragmentTransaction detach(Fragment p0); + public abstract FragmentTransaction disallowAddToBackStack(); + public abstract FragmentTransaction hide(Fragment p0); + public abstract FragmentTransaction remove(Fragment p0); + public abstract FragmentTransaction replace(int p0, Fragment p1); + public abstract FragmentTransaction replace(int p0, Fragment p1, String p2); + public abstract FragmentTransaction runOnCommit(Runnable p0); + public abstract FragmentTransaction setBreadCrumbShortTitle(CharSequence p0); + public abstract FragmentTransaction setBreadCrumbShortTitle(int p0); + public abstract FragmentTransaction setBreadCrumbTitle(CharSequence p0); + public abstract FragmentTransaction setBreadCrumbTitle(int p0); + public abstract FragmentTransaction setCustomAnimations(int p0, int p1); + public abstract FragmentTransaction setCustomAnimations(int p0, int p1, int p2, int p3); + public abstract FragmentTransaction setPrimaryNavigationFragment(Fragment p0); + public abstract FragmentTransaction setReorderingAllowed(boolean p0); + public abstract FragmentTransaction setTransition(int p0); + public abstract FragmentTransaction setTransitionStyle(int p0); + public abstract FragmentTransaction show(Fragment p0); + public abstract boolean isAddToBackStackAllowed(); + public abstract boolean isEmpty(); + public abstract int commit(); + public abstract int commitAllowingStateLoss(); + public abstract void commitNow(); + public abstract void commitNowAllowingStateLoss(); + public static int TRANSIT_ENTER_MASK = 0; + public static int TRANSIT_EXIT_MASK = 0; + public static int TRANSIT_FRAGMENT_CLOSE = 0; + public static int TRANSIT_FRAGMENT_FADE = 0; + public static int TRANSIT_FRAGMENT_OPEN = 0; + public static int TRANSIT_NONE = 0; + public static int TRANSIT_UNSET = 0; +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/app/LoaderManager.java b/java/ql/test/stubs/google-android-9.0.0/android/app/LoaderManager.java new file mode 100644 index 000000000000..1c94d938590a --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/app/LoaderManager.java @@ -0,0 +1,25 @@ +// Generated automatically from android.app.LoaderManager for testing purposes + +package android.app; + +import android.content.Loader; +import android.os.Bundle; +import java.io.FileDescriptor; +import java.io.PrintWriter; + +abstract public class LoaderManager +{ + public LoaderManager(){} + public abstract Loader getLoader(int p0); + public abstract Loader initLoader(int p0, Bundle p1, LoaderManager.LoaderCallbacks p2); + public abstract Loader restartLoader(int p0, Bundle p1, LoaderManager.LoaderCallbacks p2); + public abstract void destroyLoader(int p0); + public abstract void dump(String p0, FileDescriptor p1, PrintWriter p2, String[] p3); + public static void enableDebugLogging(boolean p0){} + static public interface LoaderCallbacks + { + Loader onCreateLoader(int p0, Bundle p1); + void onLoadFinished(Loader p0, D p1); + void onLoaderReset(Loader p0); + } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/app/PictureInPictureParams.java b/java/ql/test/stubs/google-android-9.0.0/android/app/PictureInPictureParams.java new file mode 100644 index 000000000000..4186fa98993f --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/app/PictureInPictureParams.java @@ -0,0 +1,16 @@ +// Generated automatically from android.app.PictureInPictureParams for testing purposes + +package android.app; + +import android.os.Parcel; +import android.os.Parcelable; + +public class PictureInPictureParams implements Parcelable +{ + public String toString(){ return null; } + public boolean equals(Object p0){ return false; } + public int describeContents(){ return 0; } + public int hashCode(){ return 0; } + public static Parcelable.Creator CREATOR = null; + public void writeToParcel(Parcel p0, int p1){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/app/PictureInPictureUiState.java b/java/ql/test/stubs/google-android-9.0.0/android/app/PictureInPictureUiState.java new file mode 100644 index 000000000000..9e2485a6f3a1 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/app/PictureInPictureUiState.java @@ -0,0 +1,16 @@ +// Generated automatically from android.app.PictureInPictureUiState for testing purposes + +package android.app; + +import android.os.Parcel; +import android.os.Parcelable; + +public class PictureInPictureUiState implements Parcelable +{ + public boolean equals(Object p0){ return false; } + public boolean isStashed(){ return false; } + public int describeContents(){ return 0; } + public int hashCode(){ return 0; } + public static Parcelable.Creator CREATOR = null; + public void writeToParcel(Parcel p0, int p1){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/app/RemoteAction.java b/java/ql/test/stubs/google-android-9.0.0/android/app/RemoteAction.java new file mode 100644 index 000000000000..58dec2cc81a6 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/app/RemoteAction.java @@ -0,0 +1,30 @@ +// Generated automatically from android.app.RemoteAction for testing purposes + +package android.app; + +import android.app.PendingIntent; +import android.graphics.drawable.Icon; +import android.os.Parcel; +import android.os.Parcelable; +import java.io.PrintWriter; + +public class RemoteAction implements Parcelable +{ + protected RemoteAction() {} + public CharSequence getContentDescription(){ return null; } + public CharSequence getTitle(){ return null; } + public Icon getIcon(){ return null; } + public PendingIntent getActionIntent(){ return null; } + public RemoteAction clone(){ return null; } + public RemoteAction(Icon p0, CharSequence p1, CharSequence p2, PendingIntent p3){} + public boolean equals(Object p0){ return false; } + public boolean isEnabled(){ return false; } + public boolean shouldShowIcon(){ return false; } + public int describeContents(){ return 0; } + public int hashCode(){ return 0; } + public static Parcelable.Creator CREATOR = null; + public void dump(String p0, PrintWriter p1){} + public void setEnabled(boolean p0){} + public void setShouldShowIcon(boolean p0){} + public void writeToParcel(Parcel p0, int p1){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/app/SharedElementCallback.java b/java/ql/test/stubs/google-android-9.0.0/android/app/SharedElementCallback.java new file mode 100644 index 000000000000..1f4cd82b40e3 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/app/SharedElementCallback.java @@ -0,0 +1,27 @@ +// Generated automatically from android.app.SharedElementCallback for testing purposes + +package android.app; + +import android.content.Context; +import android.graphics.Matrix; +import android.graphics.RectF; +import android.os.Parcelable; +import android.view.View; +import java.util.List; +import java.util.Map; + +abstract public class SharedElementCallback +{ + public Parcelable onCaptureSharedElementSnapshot(View p0, Matrix p1, RectF p2){ return null; } + public SharedElementCallback(){} + public View onCreateSnapshotView(Context p0, Parcelable p1){ return null; } + public void onMapSharedElements(List p0, Map p1){} + public void onRejectSharedElements(List p0){} + public void onSharedElementEnd(List p0, List p1, List p2){} + public void onSharedElementStart(List p0, List p1, List p2){} + public void onSharedElementsArrived(List p0, List p1, SharedElementCallback.OnSharedElementsReadyListener p2){} + static public interface OnSharedElementsReadyListener + { + void onSharedElementsReady(); + } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/app/TaskInfo.java b/java/ql/test/stubs/google-android-9.0.0/android/app/TaskInfo.java new file mode 100644 index 000000000000..a5a38ed25bf0 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/app/TaskInfo.java @@ -0,0 +1,21 @@ +// Generated automatically from android.app.TaskInfo for testing purposes + +package android.app; + +import android.app.ActivityManager; +import android.content.ComponentName; +import android.content.Intent; + +public class TaskInfo +{ + public ActivityManager.TaskDescription taskDescription = null; + public ComponentName baseActivity = null; + public ComponentName origActivity = null; + public ComponentName topActivity = null; + public Intent baseIntent = null; + public String toString(){ return null; } + public boolean isRunning = false; + public boolean isVisible(){ return false; } + public int numActivities = 0; + public int taskId = 0; +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/app/TaskStackBuilder.java b/java/ql/test/stubs/google-android-9.0.0/android/app/TaskStackBuilder.java new file mode 100644 index 000000000000..395449304818 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/app/TaskStackBuilder.java @@ -0,0 +1,28 @@ +// Generated automatically from android.app.TaskStackBuilder for testing purposes + +package android.app; + +import android.app.Activity; +import android.app.PendingIntent; +import android.content.ComponentName; +import android.content.Context; +import android.content.Intent; +import android.os.Bundle; + +public class TaskStackBuilder +{ + protected TaskStackBuilder() {} + public Intent editIntentAt(int p0){ return null; } + public Intent[] getIntents(){ return null; } + public PendingIntent getPendingIntent(int p0, int p1){ return null; } + public PendingIntent getPendingIntent(int p0, int p1, Bundle p2){ return null; } + public TaskStackBuilder addNextIntent(Intent p0){ return null; } + public TaskStackBuilder addNextIntentWithParentStack(Intent p0){ return null; } + public TaskStackBuilder addParentStack(Activity p0){ return null; } + public TaskStackBuilder addParentStack(Class p0){ return null; } + public TaskStackBuilder addParentStack(ComponentName p0){ return null; } + public int getIntentCount(){ return 0; } + public static TaskStackBuilder create(Context p0){ return null; } + public void startActivities(){} + public void startActivities(Bundle p0){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/app/VoiceInteractor.java b/java/ql/test/stubs/google-android-9.0.0/android/app/VoiceInteractor.java new file mode 100644 index 000000000000..5d3f6f654cd8 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/app/VoiceInteractor.java @@ -0,0 +1,31 @@ +// Generated automatically from android.app.VoiceInteractor for testing purposes + +package android.app; + +import android.app.Activity; +import android.content.Context; +import java.util.concurrent.Executor; + +public class VoiceInteractor +{ + abstract static public class Request + { + public Activity getActivity(){ return null; } + public Context getContext(){ return null; } + public String getName(){ return null; } + public String toString(){ return null; } + public void cancel(){} + public void onAttached(Activity p0){} + public void onCancel(){} + public void onDetached(){} + } + public VoiceInteractor.Request getActiveRequest(String p0){ return null; } + public VoiceInteractor.Request[] getActiveRequests(){ return null; } + public boolean isDestroyed(){ return false; } + public boolean registerOnDestroyedCallback(Executor p0, Runnable p1){ return false; } + public boolean submitRequest(VoiceInteractor.Request p0){ return false; } + public boolean submitRequest(VoiceInteractor.Request p0, String p1){ return false; } + public boolean unregisterOnDestroyedCallback(Runnable p0){ return false; } + public boolean[] supportsCommands(String[] p0){ return null; } + public void notifyDirectActionsChanged(){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/app/assist/AssistContent.java b/java/ql/test/stubs/google-android-9.0.0/android/app/assist/AssistContent.java new file mode 100644 index 000000000000..49f515177eae --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/app/assist/AssistContent.java @@ -0,0 +1,29 @@ +// Generated automatically from android.app.assist.AssistContent for testing purposes + +package android.app.assist; + +import android.content.ClipData; +import android.content.Intent; +import android.net.Uri; +import android.os.Bundle; +import android.os.Parcel; +import android.os.Parcelable; + +public class AssistContent implements Parcelable +{ + public AssistContent(){} + public Bundle getExtras(){ return null; } + public ClipData getClipData(){ return null; } + public Intent getIntent(){ return null; } + public String getStructuredData(){ return null; } + public Uri getWebUri(){ return null; } + public boolean isAppProvidedIntent(){ return false; } + public boolean isAppProvidedWebUri(){ return false; } + public int describeContents(){ return 0; } + public static Parcelable.Creator CREATOR = null; + public void setClipData(ClipData p0){} + public void setIntent(Intent p0){} + public void setStructuredData(String p0){} + public void setWebUri(Uri p0){} + public void writeToParcel(Parcel p0, int p1){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/content/ComponentCallbacks2.java b/java/ql/test/stubs/google-android-9.0.0/android/content/ComponentCallbacks2.java index d70ac92ec206..f8c83ab104d7 100644 --- a/java/ql/test/stubs/google-android-9.0.0/android/content/ComponentCallbacks2.java +++ b/java/ql/test/stubs/google-android-9.0.0/android/content/ComponentCallbacks2.java @@ -2,7 +2,10 @@ package android.content; -public interface ComponentCallbacks2 extends ComponentCallbacks { +import android.content.ComponentCallbacks; + +public interface ComponentCallbacks2 extends ComponentCallbacks +{ static int TRIM_MEMORY_BACKGROUND = 0; static int TRIM_MEMORY_COMPLETE = 0; static int TRIM_MEMORY_MODERATE = 0; @@ -10,6 +13,5 @@ public interface ComponentCallbacks2 extends ComponentCallbacks { static int TRIM_MEMORY_RUNNING_LOW = 0; static int TRIM_MEMORY_RUNNING_MODERATE = 0; static int TRIM_MEMORY_UI_HIDDEN = 0; - void onTrimMemory(int p0); } diff --git a/java/ql/test/stubs/google-android-9.0.0/android/content/DialogInterface.java b/java/ql/test/stubs/google-android-9.0.0/android/content/DialogInterface.java new file mode 100644 index 000000000000..d47429790f35 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/content/DialogInterface.java @@ -0,0 +1,41 @@ +// Generated automatically from android.content.DialogInterface for testing purposes + +package android.content; + +import android.view.KeyEvent; + +public interface DialogInterface +{ + static int BUTTON1 = 0; + static int BUTTON2 = 0; + static int BUTTON3 = 0; + static int BUTTON_NEGATIVE = 0; + static int BUTTON_NEUTRAL = 0; + static int BUTTON_POSITIVE = 0; + static public interface OnCancelListener + { + void onCancel(DialogInterface p0); + } + static public interface OnClickListener + { + void onClick(DialogInterface p0, int p1); + } + static public interface OnDismissListener + { + void onDismiss(DialogInterface p0); + } + static public interface OnKeyListener + { + boolean onKey(DialogInterface p0, int p1, KeyEvent p2); + } + static public interface OnMultiChoiceClickListener + { + void onClick(DialogInterface p0, int p1, boolean p2); + } + static public interface OnShowListener + { + void onShow(DialogInterface p0); + } + void cancel(); + void dismiss(); +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/content/Loader.java b/java/ql/test/stubs/google-android-9.0.0/android/content/Loader.java new file mode 100644 index 000000000000..2b327100cef1 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/content/Loader.java @@ -0,0 +1,51 @@ +// Generated automatically from android.content.Loader for testing purposes + +package android.content; + +import android.content.Context; +import java.io.FileDescriptor; +import java.io.PrintWriter; + +public class Loader +{ + protected Loader() {} + protected boolean onCancelLoad(){ return false; } + protected void onAbandon(){} + protected void onForceLoad(){} + protected void onReset(){} + protected void onStartLoading(){} + protected void onStopLoading(){} + public Context getContext(){ return null; } + public Loader(Context p0){} + public String dataToString(D p0){ return null; } + public String toString(){ return null; } + public boolean cancelLoad(){ return false; } + public boolean isAbandoned(){ return false; } + public boolean isReset(){ return false; } + public boolean isStarted(){ return false; } + public boolean takeContentChanged(){ return false; } + public final void startLoading(){} + public int getId(){ return 0; } + public void abandon(){} + public void commitContentChanged(){} + public void deliverCancellation(){} + public void deliverResult(D p0){} + public void dump(String p0, FileDescriptor p1, PrintWriter p2, String[] p3){} + public void forceLoad(){} + public void onContentChanged(){} + public void registerListener(int p0, Loader.OnLoadCompleteListener p1){} + public void registerOnLoadCanceledListener(Loader.OnLoadCanceledListener p0){} + public void reset(){} + public void rollbackContentChanged(){} + public void stopLoading(){} + public void unregisterListener(Loader.OnLoadCompleteListener p0){} + public void unregisterOnLoadCanceledListener(Loader.OnLoadCanceledListener p0){} + static public interface OnLoadCanceledListener + { + void onLoadCanceled(Loader p0); + } + static public interface OnLoadCompleteListener + { + void onLoadComplete(Loader p0, D p1); + } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/media/AudioAttributes.java b/java/ql/test/stubs/google-android-9.0.0/android/media/AudioAttributes.java index 20dff0cc7609..042da801af25 100644 --- a/java/ql/test/stubs/google-android-9.0.0/android/media/AudioAttributes.java +++ b/java/ql/test/stubs/google-android-9.0.0/android/media/AudioAttributes.java @@ -11,10 +11,12 @@ protected AudioAttributes() {} public String toString(){ return null; } public boolean areHapticChannelsMuted(){ return false; } public boolean equals(Object p0){ return false; } + public boolean isContentSpatialized(){ return false; } public int describeContents(){ return 0; } public int getAllowedCapturePolicy(){ return 0; } public int getContentType(){ return 0; } public int getFlags(){ return 0; } + public int getSpatializationBehavior(){ return 0; } public int getUsage(){ return 0; } public int getVolumeControlStream(){ return 0; } public int hashCode(){ return 0; } @@ -30,6 +32,8 @@ protected AudioAttributes() {} public static int FLAG_AUDIBILITY_ENFORCED = 0; public static int FLAG_HW_AV_SYNC = 0; public static int FLAG_LOW_LATENCY = 0; + public static int SPATIALIZATION_BEHAVIOR_AUTO = 0; + public static int SPATIALIZATION_BEHAVIOR_NEVER = 0; public static int USAGE_ALARM = 0; public static int USAGE_ASSISTANCE_ACCESSIBILITY = 0; public static int USAGE_ASSISTANCE_NAVIGATION_GUIDANCE = 0; diff --git a/java/ql/test/stubs/google-android-9.0.0/android/net/http/SslCertificate.java b/java/ql/test/stubs/google-android-9.0.0/android/net/http/SslCertificate.java new file mode 100644 index 000000000000..8c22fcb0a493 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/net/http/SslCertificate.java @@ -0,0 +1,34 @@ +// Generated automatically from android.net.http.SslCertificate for testing purposes + +package android.net.http; + +import android.os.Bundle; +import java.security.cert.X509Certificate; +import java.util.Date; + +public class SslCertificate +{ + protected SslCertificate() {} + public Date getValidNotAfterDate(){ return null; } + public Date getValidNotBeforeDate(){ return null; } + public SslCertificate(String p0, String p1, Date p2, Date p3){} + public SslCertificate(String p0, String p1, String p2, String p3){} + public SslCertificate(X509Certificate p0){} + public SslCertificate.DName getIssuedBy(){ return null; } + public SslCertificate.DName getIssuedTo(){ return null; } + public String getValidNotAfter(){ return null; } + public String getValidNotBefore(){ return null; } + public String toString(){ return null; } + public X509Certificate getX509Certificate(){ return null; } + public class DName + { + protected DName() {} + public DName(String p0){} + public String getCName(){ return null; } + public String getDName(){ return null; } + public String getOName(){ return null; } + public String getUName(){ return null; } + } + public static Bundle saveState(SslCertificate p0){ return null; } + public static SslCertificate restoreState(Bundle p0){ return null; } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/net/http/SslError.java b/java/ql/test/stubs/google-android-9.0.0/android/net/http/SslError.java new file mode 100644 index 000000000000..62feb4a498d8 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/net/http/SslError.java @@ -0,0 +1,28 @@ +// Generated automatically from android.net.http.SslError for testing purposes + +package android.net.http; + +import android.net.http.SslCertificate; +import java.security.cert.X509Certificate; + +public class SslError +{ + protected SslError() {} + public SslCertificate getCertificate(){ return null; } + public SslError(int p0, SslCertificate p1){} + public SslError(int p0, SslCertificate p1, String p2){} + public SslError(int p0, X509Certificate p1){} + public SslError(int p0, X509Certificate p1, String p2){} + public String getUrl(){ return null; } + public String toString(){ return null; } + public boolean addError(int p0){ return false; } + public boolean hasError(int p0){ return false; } + public int getPrimaryError(){ return 0; } + public static int SSL_DATE_INVALID = 0; + public static int SSL_EXPIRED = 0; + public static int SSL_IDMISMATCH = 0; + public static int SSL_INVALID = 0; + public static int SSL_MAX_ERROR = 0; + public static int SSL_NOTYETVALID = 0; + public static int SSL_UNTRUSTED = 0; +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/os/Debug.java b/java/ql/test/stubs/google-android-9.0.0/android/os/Debug.java new file mode 100644 index 000000000000..2ce002f144c6 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/os/Debug.java @@ -0,0 +1,110 @@ +// Generated automatically from android.os.Debug for testing purposes + +package android.os; + +import android.os.Parcel; +import android.os.Parcelable; +import java.io.FileDescriptor; +import java.util.Map; + +public class Debug +{ + protected Debug() {} + public static Map getRuntimeStats(){ return null; } + public static String getRuntimeStat(String p0){ return null; } + public static boolean dumpService(String p0, FileDescriptor p1, String[] p2){ return false; } + public static boolean isDebuggerConnected(){ return false; } + public static boolean waitingForDebugger(){ return false; } + public static int SHOW_CLASSLOADER = 0; + public static int SHOW_FULL_DETAIL = 0; + public static int SHOW_INITIALIZED = 0; + public static int TRACE_COUNT_ALLOCS = 0; + public static int getBinderDeathObjectCount(){ return 0; } + public static int getBinderLocalObjectCount(){ return 0; } + public static int getBinderProxyObjectCount(){ return 0; } + public static int getBinderReceivedTransactions(){ return 0; } + public static int getBinderSentTransactions(){ return 0; } + public static int getGlobalAllocCount(){ return 0; } + public static int getGlobalAllocSize(){ return 0; } + public static int getGlobalClassInitCount(){ return 0; } + public static int getGlobalClassInitTime(){ return 0; } + public static int getGlobalExternalAllocCount(){ return 0; } + public static int getGlobalExternalAllocSize(){ return 0; } + public static int getGlobalExternalFreedCount(){ return 0; } + public static int getGlobalExternalFreedSize(){ return 0; } + public static int getGlobalFreedCount(){ return 0; } + public static int getGlobalFreedSize(){ return 0; } + public static int getGlobalGcInvocationCount(){ return 0; } + public static int getLoadedClassCount(){ return 0; } + public static int getThreadAllocCount(){ return 0; } + public static int getThreadAllocSize(){ return 0; } + public static int getThreadExternalAllocCount(){ return 0; } + public static int getThreadExternalAllocSize(){ return 0; } + public static int getThreadGcInvocationCount(){ return 0; } + public static int setAllocationLimit(int p0){ return 0; } + public static int setGlobalAllocationLimit(int p0){ return 0; } + public static long getNativeHeapAllocatedSize(){ return 0; } + public static long getNativeHeapFreeSize(){ return 0; } + public static long getNativeHeapSize(){ return 0; } + public static long getPss(){ return 0; } + public static long threadCpuTimeNanos(){ return 0; } + public static void attachJvmtiAgent(String p0, String p1, ClassLoader p2){} + public static void changeDebugPort(int p0){} + public static void dumpHprofData(String p0){} + public static void enableEmulatorTraceOutput(){} + public static void getMemoryInfo(Debug.MemoryInfo p0){} + public static void printLoadedClasses(int p0){} + public static void resetAllCounts(){} + public static void resetGlobalAllocCount(){} + public static void resetGlobalAllocSize(){} + public static void resetGlobalClassInitCount(){} + public static void resetGlobalClassInitTime(){} + public static void resetGlobalExternalAllocCount(){} + public static void resetGlobalExternalAllocSize(){} + public static void resetGlobalExternalFreedCount(){} + public static void resetGlobalExternalFreedSize(){} + public static void resetGlobalFreedCount(){} + public static void resetGlobalFreedSize(){} + public static void resetGlobalGcInvocationCount(){} + public static void resetThreadAllocCount(){} + public static void resetThreadAllocSize(){} + public static void resetThreadExternalAllocCount(){} + public static void resetThreadExternalAllocSize(){} + public static void resetThreadGcInvocationCount(){} + public static void startAllocCounting(){} + public static void startMethodTracing(){} + public static void startMethodTracing(String p0){} + public static void startMethodTracing(String p0, int p1){} + public static void startMethodTracing(String p0, int p1, int p2){} + public static void startMethodTracingSampling(String p0, int p1, int p2){} + public static void startNativeTracing(){} + public static void stopAllocCounting(){} + public static void stopMethodTracing(){} + public static void stopNativeTracing(){} + public static void waitForDebugger(){} + static public class MemoryInfo implements Parcelable + { + public Map getMemoryStats(){ return null; } + public MemoryInfo(){} + public String getMemoryStat(String p0){ return null; } + public int dalvikPrivateDirty = 0; + public int dalvikPss = 0; + public int dalvikSharedDirty = 0; + public int describeContents(){ return 0; } + public int getTotalPrivateClean(){ return 0; } + public int getTotalPrivateDirty(){ return 0; } + public int getTotalPss(){ return 0; } + public int getTotalSharedClean(){ return 0; } + public int getTotalSharedDirty(){ return 0; } + public int getTotalSwappablePss(){ return 0; } + public int nativePrivateDirty = 0; + public int nativePss = 0; + public int nativeSharedDirty = 0; + public int otherPrivateDirty = 0; + public int otherPss = 0; + public int otherSharedDirty = 0; + public static Parcelable.Creator CREATOR = null; + public void readFromParcel(Parcel p0){} + public void writeToParcel(Parcel p0, int p1){} + } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/os/Parcelable.java b/java/ql/test/stubs/google-android-9.0.0/android/os/Parcelable.java index 626061a67993..3aceab4de0a5 100644 --- a/java/ql/test/stubs/google-android-9.0.0/android/os/Parcelable.java +++ b/java/ql/test/stubs/google-android-9.0.0/android/os/Parcelable.java @@ -2,6 +2,7 @@ package android.os; +import android.app.Fragment; import android.os.Parcel; public interface Parcelable @@ -9,6 +10,10 @@ public interface Parcelable int describeContents(); static int CONTENTS_FILE_DESCRIPTOR = 0; static int PARCELABLE_WRITE_RETURN_VALUE = 0; + static public interface ClassLoaderCreator extends Parcelable.Creator + { + T createFromParcel(Parcel p0, ClassLoader p1); + } static public interface Creator { T createFromParcel(Parcel p0); diff --git a/java/ql/test/stubs/google-android-9.0.0/android/print/PageRange.java b/java/ql/test/stubs/google-android-9.0.0/android/print/PageRange.java new file mode 100644 index 000000000000..7e8a182c81da --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/print/PageRange.java @@ -0,0 +1,21 @@ +// Generated automatically from android.print.PageRange for testing purposes + +package android.print; + +import android.os.Parcel; +import android.os.Parcelable; + +public class PageRange implements Parcelable +{ + protected PageRange() {} + public PageRange(int p0, int p1){} + public String toString(){ return null; } + public boolean equals(Object p0){ return false; } + public int describeContents(){ return 0; } + public int getEnd(){ return 0; } + public int getStart(){ return 0; } + public int hashCode(){ return 0; } + public static PageRange ALL_PAGES = null; + public static Parcelable.Creator CREATOR = null; + public void writeToParcel(Parcel p0, int p1){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/print/PrintAttributes.java b/java/ql/test/stubs/google-android-9.0.0/android/print/PrintAttributes.java new file mode 100644 index 000000000000..82578cf9f767 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/print/PrintAttributes.java @@ -0,0 +1,162 @@ +// Generated automatically from android.print.PrintAttributes for testing purposes + +package android.print; + +import android.content.pm.PackageManager; +import android.os.Parcel; +import android.os.Parcelable; + +public class PrintAttributes implements Parcelable +{ + public PrintAttributes.Margins getMinMargins(){ return null; } + public PrintAttributes.MediaSize getMediaSize(){ return null; } + public PrintAttributes.Resolution getResolution(){ return null; } + public String toString(){ return null; } + public boolean equals(Object p0){ return false; } + public int describeContents(){ return 0; } + public int getColorMode(){ return 0; } + public int getDuplexMode(){ return 0; } + public int hashCode(){ return 0; } + public static Parcelable.Creator CREATOR = null; + public static int COLOR_MODE_COLOR = 0; + public static int COLOR_MODE_MONOCHROME = 0; + public static int DUPLEX_MODE_LONG_EDGE = 0; + public static int DUPLEX_MODE_NONE = 0; + public static int DUPLEX_MODE_SHORT_EDGE = 0; + public void writeToParcel(Parcel p0, int p1){} + static public class Margins + { + protected Margins() {} + public Margins(int p0, int p1, int p2, int p3){} + public String toString(){ return null; } + public boolean equals(Object p0){ return false; } + public int getBottomMils(){ return 0; } + public int getLeftMils(){ return 0; } + public int getRightMils(){ return 0; } + public int getTopMils(){ return 0; } + public int hashCode(){ return 0; } + public static PrintAttributes.Margins NO_MARGINS = null; + } + static public class MediaSize + { + protected MediaSize() {} + public MediaSize(String p0, String p1, int p2, int p3){} + public PrintAttributes.MediaSize asLandscape(){ return null; } + public PrintAttributes.MediaSize asPortrait(){ return null; } + public String getId(){ return null; } + public String getLabel(PackageManager p0){ return null; } + public String toString(){ return null; } + public boolean equals(Object p0){ return false; } + public boolean isPortrait(){ return false; } + public int getHeightMils(){ return 0; } + public int getWidthMils(){ return 0; } + public int hashCode(){ return 0; } + public static PrintAttributes.MediaSize ANSI_C = null; + public static PrintAttributes.MediaSize ANSI_D = null; + public static PrintAttributes.MediaSize ANSI_E = null; + public static PrintAttributes.MediaSize ANSI_F = null; + public static PrintAttributes.MediaSize ISO_A0 = null; + public static PrintAttributes.MediaSize ISO_A1 = null; + public static PrintAttributes.MediaSize ISO_A10 = null; + public static PrintAttributes.MediaSize ISO_A2 = null; + public static PrintAttributes.MediaSize ISO_A3 = null; + public static PrintAttributes.MediaSize ISO_A4 = null; + public static PrintAttributes.MediaSize ISO_A5 = null; + public static PrintAttributes.MediaSize ISO_A6 = null; + public static PrintAttributes.MediaSize ISO_A7 = null; + public static PrintAttributes.MediaSize ISO_A8 = null; + public static PrintAttributes.MediaSize ISO_A9 = null; + public static PrintAttributes.MediaSize ISO_B0 = null; + public static PrintAttributes.MediaSize ISO_B1 = null; + public static PrintAttributes.MediaSize ISO_B10 = null; + public static PrintAttributes.MediaSize ISO_B2 = null; + public static PrintAttributes.MediaSize ISO_B3 = null; + public static PrintAttributes.MediaSize ISO_B4 = null; + public static PrintAttributes.MediaSize ISO_B5 = null; + public static PrintAttributes.MediaSize ISO_B6 = null; + public static PrintAttributes.MediaSize ISO_B7 = null; + public static PrintAttributes.MediaSize ISO_B8 = null; + public static PrintAttributes.MediaSize ISO_B9 = null; + public static PrintAttributes.MediaSize ISO_C0 = null; + public static PrintAttributes.MediaSize ISO_C1 = null; + public static PrintAttributes.MediaSize ISO_C10 = null; + public static PrintAttributes.MediaSize ISO_C2 = null; + public static PrintAttributes.MediaSize ISO_C3 = null; + public static PrintAttributes.MediaSize ISO_C4 = null; + public static PrintAttributes.MediaSize ISO_C5 = null; + public static PrintAttributes.MediaSize ISO_C6 = null; + public static PrintAttributes.MediaSize ISO_C7 = null; + public static PrintAttributes.MediaSize ISO_C8 = null; + public static PrintAttributes.MediaSize ISO_C9 = null; + public static PrintAttributes.MediaSize JIS_B0 = null; + public static PrintAttributes.MediaSize JIS_B1 = null; + public static PrintAttributes.MediaSize JIS_B10 = null; + public static PrintAttributes.MediaSize JIS_B2 = null; + public static PrintAttributes.MediaSize JIS_B3 = null; + public static PrintAttributes.MediaSize JIS_B4 = null; + public static PrintAttributes.MediaSize JIS_B5 = null; + public static PrintAttributes.MediaSize JIS_B6 = null; + public static PrintAttributes.MediaSize JIS_B7 = null; + public static PrintAttributes.MediaSize JIS_B8 = null; + public static PrintAttributes.MediaSize JIS_B9 = null; + public static PrintAttributes.MediaSize JIS_EXEC = null; + public static PrintAttributes.MediaSize JPN_CHOU2 = null; + public static PrintAttributes.MediaSize JPN_CHOU3 = null; + public static PrintAttributes.MediaSize JPN_CHOU4 = null; + public static PrintAttributes.MediaSize JPN_HAGAKI = null; + public static PrintAttributes.MediaSize JPN_KAHU = null; + public static PrintAttributes.MediaSize JPN_KAKU2 = null; + public static PrintAttributes.MediaSize JPN_OE_PHOTO_L = null; + public static PrintAttributes.MediaSize JPN_OUFUKU = null; + public static PrintAttributes.MediaSize JPN_YOU4 = null; + public static PrintAttributes.MediaSize NA_ARCH_A = null; + public static PrintAttributes.MediaSize NA_ARCH_B = null; + public static PrintAttributes.MediaSize NA_ARCH_C = null; + public static PrintAttributes.MediaSize NA_ARCH_D = null; + public static PrintAttributes.MediaSize NA_ARCH_E = null; + public static PrintAttributes.MediaSize NA_ARCH_E1 = null; + public static PrintAttributes.MediaSize NA_FOOLSCAP = null; + public static PrintAttributes.MediaSize NA_GOVT_LETTER = null; + public static PrintAttributes.MediaSize NA_INDEX_3X5 = null; + public static PrintAttributes.MediaSize NA_INDEX_4X6 = null; + public static PrintAttributes.MediaSize NA_INDEX_5X8 = null; + public static PrintAttributes.MediaSize NA_JUNIOR_LEGAL = null; + public static PrintAttributes.MediaSize NA_LEDGER = null; + public static PrintAttributes.MediaSize NA_LEGAL = null; + public static PrintAttributes.MediaSize NA_LETTER = null; + public static PrintAttributes.MediaSize NA_MONARCH = null; + public static PrintAttributes.MediaSize NA_QUARTO = null; + public static PrintAttributes.MediaSize NA_SUPER_B = null; + public static PrintAttributes.MediaSize NA_TABLOID = null; + public static PrintAttributes.MediaSize OM_DAI_PA_KAI = null; + public static PrintAttributes.MediaSize OM_JUURO_KU_KAI = null; + public static PrintAttributes.MediaSize OM_PA_KAI = null; + public static PrintAttributes.MediaSize PRC_1 = null; + public static PrintAttributes.MediaSize PRC_10 = null; + public static PrintAttributes.MediaSize PRC_16K = null; + public static PrintAttributes.MediaSize PRC_2 = null; + public static PrintAttributes.MediaSize PRC_3 = null; + public static PrintAttributes.MediaSize PRC_4 = null; + public static PrintAttributes.MediaSize PRC_5 = null; + public static PrintAttributes.MediaSize PRC_6 = null; + public static PrintAttributes.MediaSize PRC_7 = null; + public static PrintAttributes.MediaSize PRC_8 = null; + public static PrintAttributes.MediaSize PRC_9 = null; + public static PrintAttributes.MediaSize ROC_16K = null; + public static PrintAttributes.MediaSize ROC_8K = null; + public static PrintAttributes.MediaSize UNKNOWN_LANDSCAPE = null; + public static PrintAttributes.MediaSize UNKNOWN_PORTRAIT = null; + } + static public class Resolution + { + protected Resolution() {} + public Resolution(String p0, String p1, int p2, int p3){} + public String getId(){ return null; } + public String getLabel(){ return null; } + public String toString(){ return null; } + public boolean equals(Object p0){ return false; } + public int getHorizontalDpi(){ return 0; } + public int getVerticalDpi(){ return 0; } + public int hashCode(){ return 0; } + } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/print/PrintDocumentAdapter.java b/java/ql/test/stubs/google-android-9.0.0/android/print/PrintDocumentAdapter.java new file mode 100644 index 000000000000..bee84a4361fe --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/print/PrintDocumentAdapter.java @@ -0,0 +1,32 @@ +// Generated automatically from android.print.PrintDocumentAdapter for testing purposes + +package android.print; + +import android.os.Bundle; +import android.os.CancellationSignal; +import android.os.ParcelFileDescriptor; +import android.print.PageRange; +import android.print.PrintAttributes; +import android.print.PrintDocumentInfo; + +abstract public class PrintDocumentAdapter +{ + abstract static public class LayoutResultCallback + { + public void onLayoutCancelled(){} + public void onLayoutFailed(CharSequence p0){} + public void onLayoutFinished(PrintDocumentInfo p0, boolean p1){} + } + abstract static public class WriteResultCallback + { + public void onWriteCancelled(){} + public void onWriteFailed(CharSequence p0){} + public void onWriteFinished(PageRange[] p0){} + } + public PrintDocumentAdapter(){} + public abstract void onLayout(PrintAttributes p0, PrintAttributes p1, CancellationSignal p2, PrintDocumentAdapter.LayoutResultCallback p3, Bundle p4); + public abstract void onWrite(PageRange[] p0, ParcelFileDescriptor p1, CancellationSignal p2, PrintDocumentAdapter.WriteResultCallback p3); + public static String EXTRA_PRINT_PREVIEW = null; + public void onFinish(){} + public void onStart(){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/print/PrintDocumentInfo.java b/java/ql/test/stubs/google-android-9.0.0/android/print/PrintDocumentInfo.java new file mode 100644 index 000000000000..bc42c86d4f2e --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/print/PrintDocumentInfo.java @@ -0,0 +1,25 @@ +// Generated automatically from android.print.PrintDocumentInfo for testing purposes + +package android.print; + +import android.os.Parcel; +import android.os.Parcelable; + +public class PrintDocumentInfo implements Parcelable +{ + protected PrintDocumentInfo() {} + public String getName(){ return null; } + public String toString(){ return null; } + public boolean equals(Object p0){ return false; } + public int describeContents(){ return 0; } + public int getContentType(){ return 0; } + public int getPageCount(){ return 0; } + public int hashCode(){ return 0; } + public long getDataSize(){ return 0; } + public static Parcelable.Creator CREATOR = null; + public static int CONTENT_TYPE_DOCUMENT = 0; + public static int CONTENT_TYPE_PHOTO = 0; + public static int CONTENT_TYPE_UNKNOWN = 0; + public static int PAGE_COUNT_UNKNOWN = 0; + public void writeToParcel(Parcel p0, int p1){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/text/Spannable.java b/java/ql/test/stubs/google-android-9.0.0/android/text/Spannable.java index eb55f4778ef4..f615e7328a5c 100644 --- a/java/ql/test/stubs/google-android-9.0.0/android/text/Spannable.java +++ b/java/ql/test/stubs/google-android-9.0.0/android/text/Spannable.java @@ -6,6 +6,12 @@ public interface Spannable extends Spanned { + static public class Factory + { + public Factory(){} + public Spannable newSpannable(CharSequence p0){ return null; } + public static Spannable.Factory getInstance(){ return null; } + } void removeSpan(Object p0); void setSpan(Object p0, int p1, int p2, int p3); } diff --git a/java/ql/test/stubs/google-android-9.0.0/android/transition/PathMotion.java b/java/ql/test/stubs/google-android-9.0.0/android/transition/PathMotion.java new file mode 100644 index 000000000000..91b7a1cf016f --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/transition/PathMotion.java @@ -0,0 +1,14 @@ +// Generated automatically from android.transition.PathMotion for testing purposes + +package android.transition; + +import android.content.Context; +import android.graphics.Path; +import android.util.AttributeSet; + +abstract public class PathMotion +{ + public PathMotion(){} + public PathMotion(Context p0, AttributeSet p1){} + public abstract Path getPath(float p0, float p1, float p2, float p3); +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/transition/Scene.java b/java/ql/test/stubs/google-android-9.0.0/android/transition/Scene.java new file mode 100644 index 000000000000..57fe7cc104e8 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/transition/Scene.java @@ -0,0 +1,22 @@ +// Generated automatically from android.transition.Scene for testing purposes + +package android.transition; + +import android.content.Context; +import android.view.View; +import android.view.ViewGroup; + +public class Scene +{ + protected Scene() {} + public Scene(ViewGroup p0){} + public Scene(ViewGroup p0, View p1){} + public Scene(ViewGroup p0, ViewGroup p1){} + public ViewGroup getSceneRoot(){ return null; } + public static Scene getCurrentScene(ViewGroup p0){ return null; } + public static Scene getSceneForLayout(ViewGroup p0, int p1, Context p2){ return null; } + public void enter(){} + public void exit(){} + public void setEnterAction(Runnable p0){} + public void setExitAction(Runnable p0){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/transition/Transition.java b/java/ql/test/stubs/google-android-9.0.0/android/transition/Transition.java new file mode 100644 index 000000000000..8adeae42c36e --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/transition/Transition.java @@ -0,0 +1,83 @@ +// Generated automatically from android.transition.Transition for testing purposes + +package android.transition; + +import android.animation.Animator; +import android.animation.TimeInterpolator; +import android.content.Context; +import android.graphics.Rect; +import android.transition.PathMotion; +import android.transition.TransitionPropagation; +import android.transition.TransitionValues; +import android.util.AttributeSet; +import android.view.View; +import android.view.ViewGroup; +import java.util.List; + +abstract public class Transition implements Cloneable +{ + abstract static public class EpicenterCallback + { + public EpicenterCallback(){} + public abstract Rect onGetEpicenter(Transition p0); + } + public Animator createAnimator(ViewGroup p0, TransitionValues p1, TransitionValues p2){ return null; } + public List getTargetTypes(){ return null; } + public List getTargetIds(){ return null; } + public List getTargetNames(){ return null; } + public List getTargets(){ return null; } + public PathMotion getPathMotion(){ return null; } + public Rect getEpicenter(){ return null; } + public String getName(){ return null; } + public String toString(){ return null; } + public String[] getTransitionProperties(){ return null; } + public TimeInterpolator getInterpolator(){ return null; } + public Transition addListener(Transition.TransitionListener p0){ return null; } + public Transition addTarget(Class p0){ return null; } + public Transition addTarget(String p0){ return null; } + public Transition addTarget(View p0){ return null; } + public Transition addTarget(int p0){ return null; } + public Transition clone(){ return null; } + public Transition excludeChildren(Class p0, boolean p1){ return null; } + public Transition excludeChildren(View p0, boolean p1){ return null; } + public Transition excludeChildren(int p0, boolean p1){ return null; } + public Transition excludeTarget(Class p0, boolean p1){ return null; } + public Transition excludeTarget(String p0, boolean p1){ return null; } + public Transition excludeTarget(View p0, boolean p1){ return null; } + public Transition excludeTarget(int p0, boolean p1){ return null; } + public Transition removeListener(Transition.TransitionListener p0){ return null; } + public Transition removeTarget(Class p0){ return null; } + public Transition removeTarget(String p0){ return null; } + public Transition removeTarget(View p0){ return null; } + public Transition removeTarget(int p0){ return null; } + public Transition setDuration(long p0){ return null; } + public Transition setInterpolator(TimeInterpolator p0){ return null; } + public Transition setStartDelay(long p0){ return null; } + public Transition(){} + public Transition(Context p0, AttributeSet p1){} + public Transition.EpicenterCallback getEpicenterCallback(){ return null; } + public TransitionPropagation getPropagation(){ return null; } + public TransitionValues getTransitionValues(View p0, boolean p1){ return null; } + public abstract void captureEndValues(TransitionValues p0); + public abstract void captureStartValues(TransitionValues p0); + public boolean canRemoveViews(){ return false; } + public boolean isTransitionRequired(TransitionValues p0, TransitionValues p1){ return false; } + public long getDuration(){ return 0; } + public long getStartDelay(){ return 0; } + public static int MATCH_ID = 0; + public static int MATCH_INSTANCE = 0; + public static int MATCH_ITEM_ID = 0; + public static int MATCH_NAME = 0; + public void setEpicenterCallback(Transition.EpicenterCallback p0){} + public void setMatchOrder(int... p0){} + public void setPathMotion(PathMotion p0){} + public void setPropagation(TransitionPropagation p0){} + static public interface TransitionListener + { + void onTransitionCancel(Transition p0); + void onTransitionEnd(Transition p0); + void onTransitionPause(Transition p0); + void onTransitionResume(Transition p0); + void onTransitionStart(Transition p0); + } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/transition/TransitionManager.java b/java/ql/test/stubs/google-android-9.0.0/android/transition/TransitionManager.java new file mode 100644 index 000000000000..79a91ccabba0 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/transition/TransitionManager.java @@ -0,0 +1,20 @@ +// Generated automatically from android.transition.TransitionManager for testing purposes + +package android.transition; + +import android.transition.Scene; +import android.transition.Transition; +import android.view.ViewGroup; + +public class TransitionManager +{ + public TransitionManager(){} + public static void beginDelayedTransition(ViewGroup p0){} + public static void beginDelayedTransition(ViewGroup p0, Transition p1){} + public static void endTransitions(ViewGroup p0){} + public static void go(Scene p0){} + public static void go(Scene p0, Transition p1){} + public void setTransition(Scene p0, Scene p1, Transition p2){} + public void setTransition(Scene p0, Transition p1){} + public void transitionTo(Scene p0){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/transition/TransitionPropagation.java b/java/ql/test/stubs/google-android-9.0.0/android/transition/TransitionPropagation.java new file mode 100644 index 000000000000..0101e4f5cd26 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/transition/TransitionPropagation.java @@ -0,0 +1,15 @@ +// Generated automatically from android.transition.TransitionPropagation for testing purposes + +package android.transition; + +import android.transition.Transition; +import android.transition.TransitionValues; +import android.view.ViewGroup; + +abstract public class TransitionPropagation +{ + public TransitionPropagation(){} + public abstract String[] getPropagationProperties(); + public abstract long getStartDelay(ViewGroup p0, Transition p1, TransitionValues p2, TransitionValues p3); + public abstract void captureValues(TransitionValues p0); +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/transition/TransitionValues.java b/java/ql/test/stubs/google-android-9.0.0/android/transition/TransitionValues.java new file mode 100644 index 000000000000..27cbfe690f5b --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/transition/TransitionValues.java @@ -0,0 +1,17 @@ +// Generated automatically from android.transition.TransitionValues for testing purposes + +package android.transition; + +import android.view.View; +import java.util.Map; + +public class TransitionValues +{ + public String toString(){ return null; } + public TransitionValues(){} + public TransitionValues(View p0){} + public View view = null; + public boolean equals(Object p0){ return false; } + public final Map values = null; + public int hashCode(){ return 0; } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/view/AttachedSurfaceControl.java b/java/ql/test/stubs/google-android-9.0.0/android/view/AttachedSurfaceControl.java index 7ac18735ee30..e4140572b6a1 100644 --- a/java/ql/test/stubs/google-android-9.0.0/android/view/AttachedSurfaceControl.java +++ b/java/ql/test/stubs/google-android-9.0.0/android/view/AttachedSurfaceControl.java @@ -8,4 +8,11 @@ public interface AttachedSurfaceControl { SurfaceControl.Transaction buildReparentTransaction(SurfaceControl p0); boolean applyTransactionOnDraw(SurfaceControl.Transaction p0); + default int getBufferTransformHint(){ return 0; } + default void addOnBufferTransformHintChangedListener(AttachedSurfaceControl.OnBufferTransformHintChangedListener p0){} + default void removeOnBufferTransformHintChangedListener(AttachedSurfaceControl.OnBufferTransformHintChangedListener p0){} + static public interface OnBufferTransformHintChangedListener + { + void onBufferTransformHintChanged(int p0); + } } diff --git a/java/ql/test/stubs/google-android-9.0.0/android/view/DragAndDropPermissions.java b/java/ql/test/stubs/google-android-9.0.0/android/view/DragAndDropPermissions.java new file mode 100644 index 000000000000..c0b47133d072 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/view/DragAndDropPermissions.java @@ -0,0 +1,15 @@ +// Generated automatically from android.view.DragAndDropPermissions for testing purposes + +package android.view; + +import android.os.Parcel; +import android.os.Parcelable; + +public class DragAndDropPermissions implements Parcelable +{ + protected DragAndDropPermissions() {} + public int describeContents(){ return 0; } + public static Parcelable.Creator CREATOR = null; + public void release(){} + public void writeToParcel(Parcel p0, int p1){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/view/FrameMetrics.java b/java/ql/test/stubs/google-android-9.0.0/android/view/FrameMetrics.java new file mode 100644 index 000000000000..98c91865a80d --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/view/FrameMetrics.java @@ -0,0 +1,25 @@ +// Generated automatically from android.view.FrameMetrics for testing purposes + +package android.view; + + +public class FrameMetrics +{ + protected FrameMetrics() {} + public FrameMetrics(FrameMetrics p0){} + public long getMetric(int p0){ return 0; } + public static int ANIMATION_DURATION = 0; + public static int COMMAND_ISSUE_DURATION = 0; + public static int DEADLINE = 0; + public static int DRAW_DURATION = 0; + public static int FIRST_DRAW_FRAME = 0; + public static int GPU_DURATION = 0; + public static int INPUT_HANDLING_DURATION = 0; + public static int INTENDED_VSYNC_TIMESTAMP = 0; + public static int LAYOUT_MEASURE_DURATION = 0; + public static int SWAP_BUFFERS_DURATION = 0; + public static int SYNC_DURATION = 0; + public static int TOTAL_DURATION = 0; + public static int UNKNOWN_DELAY_DURATION = 0; + public static int VSYNC_TIMESTAMP = 0; +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/view/InputQueue.java b/java/ql/test/stubs/google-android-9.0.0/android/view/InputQueue.java new file mode 100644 index 000000000000..083a7bdb4b13 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/view/InputQueue.java @@ -0,0 +1,14 @@ +// Generated automatically from android.view.InputQueue for testing purposes + +package android.view; + + +public class InputQueue +{ + protected void finalize(){} + static public interface Callback + { + void onInputQueueCreated(InputQueue p0); + void onInputQueueDestroyed(InputQueue p0); + } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/view/KeyboardShortcutGroup.java b/java/ql/test/stubs/google-android-9.0.0/android/view/KeyboardShortcutGroup.java new file mode 100644 index 000000000000..13f1cdaddc25 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/view/KeyboardShortcutGroup.java @@ -0,0 +1,21 @@ +// Generated automatically from android.view.KeyboardShortcutGroup for testing purposes + +package android.view; + +import android.os.Parcel; +import android.os.Parcelable; +import android.view.KeyboardShortcutInfo; +import java.util.List; + +public class KeyboardShortcutGroup implements Parcelable +{ + protected KeyboardShortcutGroup() {} + public CharSequence getLabel(){ return null; } + public KeyboardShortcutGroup(CharSequence p0){} + public KeyboardShortcutGroup(CharSequence p0, List p1){} + public List getItems(){ return null; } + public int describeContents(){ return 0; } + public static Parcelable.Creator CREATOR = null; + public void addItem(KeyboardShortcutInfo p0){} + public void writeToParcel(Parcel p0, int p1){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/view/KeyboardShortcutInfo.java b/java/ql/test/stubs/google-android-9.0.0/android/view/KeyboardShortcutInfo.java new file mode 100644 index 000000000000..a6d682ce01fc --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/view/KeyboardShortcutInfo.java @@ -0,0 +1,20 @@ +// Generated automatically from android.view.KeyboardShortcutInfo for testing purposes + +package android.view; + +import android.os.Parcel; +import android.os.Parcelable; + +public class KeyboardShortcutInfo implements Parcelable +{ + protected KeyboardShortcutInfo() {} + public CharSequence getLabel(){ return null; } + public KeyboardShortcutInfo(CharSequence p0, char p1, int p2){} + public KeyboardShortcutInfo(CharSequence p0, int p1, int p2){} + public char getBaseCharacter(){ return '0'; } + public int describeContents(){ return 0; } + public int getKeycode(){ return 0; } + public int getModifiers(){ return 0; } + public static Parcelable.Creator CREATOR = null; + public void writeToParcel(Parcel p0, int p1){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/view/SearchEvent.java b/java/ql/test/stubs/google-android-9.0.0/android/view/SearchEvent.java new file mode 100644 index 000000000000..064261513cf9 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/view/SearchEvent.java @@ -0,0 +1,12 @@ +// Generated automatically from android.view.SearchEvent for testing purposes + +package android.view; + +import android.view.InputDevice; + +public class SearchEvent +{ + protected SearchEvent() {} + public InputDevice getInputDevice(){ return null; } + public SearchEvent(InputDevice p0){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/view/SurfaceControl.java b/java/ql/test/stubs/google-android-9.0.0/android/view/SurfaceControl.java index 6feff4a32c21..8ea03128948e 100644 --- a/java/ql/test/stubs/google-android-9.0.0/android/view/SurfaceControl.java +++ b/java/ql/test/stubs/google-android-9.0.0/android/view/SurfaceControl.java @@ -14,6 +14,12 @@ protected void finalize(){} public boolean isValid(){ return false; } public int describeContents(){ return 0; } public static Parcelable.Creator CREATOR = null; + public static int BUFFER_TRANSFORM_IDENTITY = 0; + public static int BUFFER_TRANSFORM_MIRROR_HORIZONTAL = 0; + public static int BUFFER_TRANSFORM_MIRROR_VERTICAL = 0; + public static int BUFFER_TRANSFORM_ROTATE_180 = 0; + public static int BUFFER_TRANSFORM_ROTATE_270 = 0; + public static int BUFFER_TRANSFORM_ROTATE_90 = 0; public void readFromParcel(Parcel p0){} public void release(){} public void writeToParcel(Parcel p0, int p1){} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/view/SurfaceHolder.java b/java/ql/test/stubs/google-android-9.0.0/android/view/SurfaceHolder.java new file mode 100644 index 000000000000..561f640b7064 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/view/SurfaceHolder.java @@ -0,0 +1,40 @@ +// Generated automatically from android.view.SurfaceHolder for testing purposes + +package android.view; + +import android.graphics.Canvas; +import android.graphics.Rect; +import android.view.Surface; + +public interface SurfaceHolder +{ + Canvas lockCanvas(); + Canvas lockCanvas(Rect p0); + Rect getSurfaceFrame(); + Surface getSurface(); + boolean isCreating(); + default Canvas lockHardwareCanvas(){ return null; } + static int SURFACE_TYPE_GPU = 0; + static int SURFACE_TYPE_HARDWARE = 0; + static int SURFACE_TYPE_NORMAL = 0; + static int SURFACE_TYPE_PUSH_BUFFERS = 0; + static public interface Callback + { + void surfaceChanged(SurfaceHolder p0, int p1, int p2, int p3); + void surfaceCreated(SurfaceHolder p0); + void surfaceDestroyed(SurfaceHolder p0); + } + static public interface Callback2 extends SurfaceHolder.Callback + { + default void surfaceRedrawNeededAsync(SurfaceHolder p0, Runnable p1){} + void surfaceRedrawNeeded(SurfaceHolder p0); + } + void addCallback(SurfaceHolder.Callback p0); + void removeCallback(SurfaceHolder.Callback p0); + void setFixedSize(int p0, int p1); + void setFormat(int p0); + void setKeepScreenOn(boolean p0); + void setSizeFromLayout(); + void setType(int p0); + void unlockCanvasAndPost(Canvas p0); +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/view/View.java b/java/ql/test/stubs/google-android-9.0.0/android/view/View.java index 2004c624c6e6..e91fa287eb23 100644 --- a/java/ql/test/stubs/google-android-9.0.0/android/view/View.java +++ b/java/ql/test/stubs/google-android-9.0.0/android/view/View.java @@ -525,6 +525,7 @@ public final void updateDragShadow(View.DragShadowBuilder p0){} public static int AUTOFILL_TYPE_NONE = 0; public static int AUTOFILL_TYPE_TEXT = 0; public static int AUTOFILL_TYPE_TOGGLE = 0; + public static int DRAG_FLAG_ACCESSIBILITY_ACTION = 0; public static int DRAG_FLAG_GLOBAL = 0; public static int DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION = 0; public static int DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION = 0; diff --git a/java/ql/test/stubs/google-android-9.0.0/android/view/ViewGroup.java b/java/ql/test/stubs/google-android-9.0.0/android/view/ViewGroup.java index 7e05f4b37810..a90504337ff4 100644 --- a/java/ql/test/stubs/google-android-9.0.0/android/view/ViewGroup.java +++ b/java/ql/test/stubs/google-android-9.0.0/android/view/ViewGroup.java @@ -258,6 +258,27 @@ public LayoutParams(int p0, int p1){} public static int WRAP_CONTENT = 0; public void resolveLayoutDirection(int p0){} } + static public class MarginLayoutParams extends ViewGroup.LayoutParams + { + protected MarginLayoutParams() {} + public MarginLayoutParams(Context p0, AttributeSet p1){} + public MarginLayoutParams(ViewGroup.LayoutParams p0){} + public MarginLayoutParams(ViewGroup.MarginLayoutParams p0){} + public MarginLayoutParams(int p0, int p1){} + public boolean isMarginRelative(){ return false; } + public int bottomMargin = 0; + public int getLayoutDirection(){ return 0; } + public int getMarginEnd(){ return 0; } + public int getMarginStart(){ return 0; } + public int leftMargin = 0; + public int rightMargin = 0; + public int topMargin = 0; + public void resolveLayoutDirection(int p0){} + public void setLayoutDirection(int p0){} + public void setMarginEnd(int p0){} + public void setMarginStart(int p0){} + public void setMargins(int p0, int p1, int p2, int p3){} + } static public interface OnHierarchyChangeListener { void onChildViewAdded(View p0, View p1); diff --git a/java/ql/test/stubs/google-android-9.0.0/android/view/Window.java b/java/ql/test/stubs/google-android-9.0.0/android/view/Window.java new file mode 100644 index 000000000000..13f5e79ca4a4 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/view/Window.java @@ -0,0 +1,251 @@ +// Generated automatically from android.view.Window for testing purposes + +package android.view; + +import android.content.Context; +import android.content.res.Configuration; +import android.content.res.TypedArray; +import android.graphics.Rect; +import android.graphics.drawable.Drawable; +import android.media.session.MediaController; +import android.net.Uri; +import android.os.Bundle; +import android.os.Handler; +import android.os.IBinder; +import android.transition.Scene; +import android.transition.Transition; +import android.transition.TransitionManager; +import android.view.ActionMode; +import android.view.AttachedSurfaceControl; +import android.view.FrameMetrics; +import android.view.InputEvent; +import android.view.InputQueue; +import android.view.KeyEvent; +import android.view.KeyboardShortcutGroup; +import android.view.LayoutInflater; +import android.view.Menu; +import android.view.MenuItem; +import android.view.MotionEvent; +import android.view.ScrollCaptureCallback; +import android.view.SearchEvent; +import android.view.SurfaceHolder; +import android.view.View; +import android.view.ViewGroup; +import android.view.WindowInsetsController; +import android.view.WindowManager; +import android.view.accessibility.AccessibilityEvent; +import java.util.List; + +abstract public class Window +{ + protected Window() {} + protected abstract void onActive(); + protected final boolean hasSoftInputMode(){ return false; } + protected final int getFeatures(){ return 0; } + protected final int getForcedWindowFlags(){ return 0; } + protected final int getLocalFeatures(){ return 0; } + protected static int DEFAULT_FEATURES = 0; + protected void setDefaultWindowFormat(int p0){} + public T findViewById(int p0){ return null; } + public AttachedSurfaceControl getRootSurfaceControl(){ return null; } + public List getSystemGestureExclusionRects(){ return null; } + public MediaController getMediaController(){ return null; } + public Scene getContentScene(){ return null; } + public Transition getEnterTransition(){ return null; } + public Transition getExitTransition(){ return null; } + public Transition getReenterTransition(){ return null; } + public Transition getReturnTransition(){ return null; } + public Transition getSharedElementEnterTransition(){ return null; } + public Transition getSharedElementExitTransition(){ return null; } + public Transition getSharedElementReenterTransition(){ return null; } + public Transition getSharedElementReturnTransition(){ return null; } + public TransitionManager getTransitionManager(){ return null; } + public Window(Context p0){} + public WindowInsetsController getInsetsController(){ return null; } + public WindowManager getWindowManager(){ return null; } + public abstract Bundle saveHierarchyState(); + public abstract LayoutInflater getLayoutInflater(); + public abstract View getCurrentFocus(); + public abstract View getDecorView(); + public abstract View peekDecorView(); + public abstract boolean isFloating(); + public abstract boolean isShortcutKey(int p0, KeyEvent p1); + public abstract boolean performContextMenuIdentifierAction(int p0, int p1); + public abstract boolean performPanelIdentifierAction(int p0, int p1, int p2); + public abstract boolean performPanelShortcut(int p0, int p1, KeyEvent p2, int p3); + public abstract boolean superDispatchGenericMotionEvent(MotionEvent p0); + public abstract boolean superDispatchKeyEvent(KeyEvent p0); + public abstract boolean superDispatchKeyShortcutEvent(KeyEvent p0); + public abstract boolean superDispatchTouchEvent(MotionEvent p0); + public abstract boolean superDispatchTrackballEvent(MotionEvent p0); + public abstract int getNavigationBarColor(); + public abstract int getStatusBarColor(); + public abstract int getVolumeControlStream(); + public abstract void addContentView(View p0, ViewGroup.LayoutParams p1); + public abstract void closeAllPanels(); + public abstract void closePanel(int p0); + public abstract void invalidatePanelMenu(int p0); + public abstract void onConfigurationChanged(Configuration p0); + public abstract void openPanel(int p0, KeyEvent p1); + public abstract void restoreHierarchyState(Bundle p0); + public abstract void setBackgroundDrawable(Drawable p0); + public abstract void setChildDrawable(int p0, Drawable p1); + public abstract void setChildInt(int p0, int p1); + public abstract void setContentView(View p0); + public abstract void setContentView(View p0, ViewGroup.LayoutParams p1); + public abstract void setContentView(int p0); + public abstract void setDecorCaptionShade(int p0); + public abstract void setFeatureDrawable(int p0, Drawable p1); + public abstract void setFeatureDrawableAlpha(int p0, int p1); + public abstract void setFeatureDrawableResource(int p0, int p1); + public abstract void setFeatureDrawableUri(int p0, Uri p1); + public abstract void setFeatureInt(int p0, int p1); + public abstract void setNavigationBarColor(int p0); + public abstract void setResizingCaptionDrawable(Drawable p0); + public abstract void setStatusBarColor(int p0); + public abstract void setTitle(CharSequence p0); + public abstract void setTitleColor(int p0); + public abstract void setVolumeControlStream(int p0); + public abstract void takeInputQueue(InputQueue.Callback p0); + public abstract void takeKeyEvents(boolean p0); + public abstract void takeSurface(SurfaceHolder.Callback2 p0); + public abstract void togglePanel(int p0, KeyEvent p1); + public boolean getAllowEnterTransitionOverlap(){ return false; } + public boolean getAllowReturnTransitionOverlap(){ return false; } + public boolean getSharedElementsUseOverlay(){ return false; } + public boolean hasFeature(int p0){ return false; } + public boolean isNavigationBarContrastEnforced(){ return false; } + public boolean isStatusBarContrastEnforced(){ return false; } + public boolean isWideColorGamut(){ return false; } + public boolean requestFeature(int p0){ return false; } + public final T requireViewById(int p0){ return null; } + public final Context getContext(){ return null; } + public final TypedArray getWindowStyle(){ return null; } + public final Window getContainer(){ return null; } + public final Window.Callback getCallback(){ return null; } + public final WindowManager.LayoutParams getAttributes(){ return null; } + public final boolean hasChildren(){ return false; } + public final boolean isActive(){ return false; } + public final void addOnFrameMetricsAvailableListener(Window.OnFrameMetricsAvailableListener p0, Handler p1){} + public final void makeActive(){} + public final void removeOnFrameMetricsAvailableListener(Window.OnFrameMetricsAvailableListener p0){} + public final void setHideOverlayWindows(boolean p0){} + public final void setRestrictedCaptionAreaListener(Window.OnRestrictedCaptionAreaChangedListener p0){} + public int getColorMode(){ return 0; } + public int getNavigationBarDividerColor(){ return 0; } + public long getTransitionBackgroundFadeDuration(){ return 0; } + public static String NAVIGATION_BAR_BACKGROUND_TRANSITION_NAME = null; + public static String STATUS_BAR_BACKGROUND_TRANSITION_NAME = null; + public static int DECOR_CAPTION_SHADE_AUTO = 0; + public static int DECOR_CAPTION_SHADE_DARK = 0; + public static int DECOR_CAPTION_SHADE_LIGHT = 0; + public static int FEATURE_ACTION_BAR = 0; + public static int FEATURE_ACTION_BAR_OVERLAY = 0; + public static int FEATURE_ACTION_MODE_OVERLAY = 0; + public static int FEATURE_ACTIVITY_TRANSITIONS = 0; + public static int FEATURE_CONTENT_TRANSITIONS = 0; + public static int FEATURE_CONTEXT_MENU = 0; + public static int FEATURE_CUSTOM_TITLE = 0; + public static int FEATURE_INDETERMINATE_PROGRESS = 0; + public static int FEATURE_LEFT_ICON = 0; + public static int FEATURE_NO_TITLE = 0; + public static int FEATURE_OPTIONS_PANEL = 0; + public static int FEATURE_PROGRESS = 0; + public static int FEATURE_RIGHT_ICON = 0; + public static int FEATURE_SWIPE_TO_DISMISS = 0; + public static int ID_ANDROID_CONTENT = 0; + public static int PROGRESS_END = 0; + public static int PROGRESS_INDETERMINATE_OFF = 0; + public static int PROGRESS_INDETERMINATE_ON = 0; + public static int PROGRESS_SECONDARY_END = 0; + public static int PROGRESS_SECONDARY_START = 0; + public static int PROGRESS_START = 0; + public static int PROGRESS_VISIBILITY_OFF = 0; + public static int PROGRESS_VISIBILITY_ON = 0; + public static int getDefaultFeatures(Context p0){ return 0; } + public void addFlags(int p0){} + public void clearFlags(int p0){} + public void injectInputEvent(InputEvent p0){} + public void registerScrollCaptureCallback(ScrollCaptureCallback p0){} + public void setAllowEnterTransitionOverlap(boolean p0){} + public void setAllowReturnTransitionOverlap(boolean p0){} + public void setAttributes(WindowManager.LayoutParams p0){} + public void setBackgroundBlurRadius(int p0){} + public void setBackgroundDrawableResource(int p0){} + public void setCallback(Window.Callback p0){} + public void setClipToOutline(boolean p0){} + public void setColorMode(int p0){} + public void setContainer(Window p0){} + public void setDecorFitsSystemWindows(boolean p0){} + public void setDimAmount(float p0){} + public void setElevation(float p0){} + public void setEnterTransition(Transition p0){} + public void setExitTransition(Transition p0){} + public void setFlags(int p0, int p1){} + public void setFormat(int p0){} + public void setGravity(int p0){} + public void setIcon(int p0){} + public void setLayout(int p0, int p1){} + public void setLocalFocus(boolean p0, boolean p1){} + public void setLogo(int p0){} + public void setMediaController(MediaController p0){} + public void setNavigationBarContrastEnforced(boolean p0){} + public void setNavigationBarDividerColor(int p0){} + public void setPreferMinimalPostProcessing(boolean p0){} + public void setReenterTransition(Transition p0){} + public void setReturnTransition(Transition p0){} + public void setSharedElementEnterTransition(Transition p0){} + public void setSharedElementExitTransition(Transition p0){} + public void setSharedElementReenterTransition(Transition p0){} + public void setSharedElementReturnTransition(Transition p0){} + public void setSharedElementsUseOverlay(boolean p0){} + public void setSoftInputMode(int p0){} + public void setStatusBarContrastEnforced(boolean p0){} + public void setSustainedPerformanceMode(boolean p0){} + public void setSystemGestureExclusionRects(List p0){} + public void setTransitionBackgroundFadeDuration(long p0){} + public void setTransitionManager(TransitionManager p0){} + public void setType(int p0){} + public void setUiOptions(int p0){} + public void setUiOptions(int p0, int p1){} + public void setWindowAnimations(int p0){} + public void setWindowManager(WindowManager p0, IBinder p1, String p2){} + public void setWindowManager(WindowManager p0, IBinder p1, String p2, boolean p3){} + public void unregisterScrollCaptureCallback(ScrollCaptureCallback p0){} + static public interface Callback + { + ActionMode onWindowStartingActionMode(ActionMode.Callback p0); + ActionMode onWindowStartingActionMode(ActionMode.Callback p0, int p1); + View onCreatePanelView(int p0); + boolean dispatchGenericMotionEvent(MotionEvent p0); + boolean dispatchKeyEvent(KeyEvent p0); + boolean dispatchKeyShortcutEvent(KeyEvent p0); + boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent p0); + boolean dispatchTouchEvent(MotionEvent p0); + boolean dispatchTrackballEvent(MotionEvent p0); + boolean onCreatePanelMenu(int p0, Menu p1); + boolean onMenuItemSelected(int p0, MenuItem p1); + boolean onMenuOpened(int p0, Menu p1); + boolean onPreparePanel(int p0, View p1, Menu p2); + boolean onSearchRequested(); + boolean onSearchRequested(SearchEvent p0); + default void onPointerCaptureChanged(boolean p0){} + default void onProvideKeyboardShortcuts(List p0, Menu p1, int p2){} + void onActionModeFinished(ActionMode p0); + void onActionModeStarted(ActionMode p0); + void onAttachedToWindow(); + void onContentChanged(); + void onDetachedFromWindow(); + void onPanelClosed(int p0, Menu p1); + void onWindowAttributesChanged(WindowManager.LayoutParams p0); + void onWindowFocusChanged(boolean p0); + } + static public interface OnFrameMetricsAvailableListener + { + void onFrameMetricsAvailable(Window p0, FrameMetrics p1, int p2); + } + static public interface OnRestrictedCaptionAreaChangedListener + { + void onRestrictedCaptionAreaChanged(Rect p0); + } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/view/WindowManager.java b/java/ql/test/stubs/google-android-9.0.0/android/view/WindowManager.java new file mode 100644 index 000000000000..ea0c98476ab8 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/view/WindowManager.java @@ -0,0 +1,183 @@ +// Generated automatically from android.view.WindowManager for testing purposes + +package android.view; + +import android.os.IBinder; +import android.os.Parcel; +import android.os.Parcelable; +import android.view.Display; +import android.view.View; +import android.view.ViewGroup; +import android.view.ViewManager; +import android.view.WindowMetrics; +import java.util.concurrent.Executor; +import java.util.function.Consumer; + +public interface WindowManager extends ViewManager +{ + Display getDefaultDisplay(); + default WindowMetrics getCurrentWindowMetrics(){ return null; } + default WindowMetrics getMaximumWindowMetrics(){ return null; } + default boolean isCrossWindowBlurEnabled(){ return false; } + default void addCrossWindowBlurEnabledListener(Consumer p0){} + default void addCrossWindowBlurEnabledListener(Executor p0, Consumer p1){} + default void removeCrossWindowBlurEnabledListener(Consumer p0){} + static public class LayoutParams extends ViewGroup.LayoutParams implements Parcelable + { + public IBinder token = null; + public LayoutParams(){} + public LayoutParams(Parcel p0){} + public LayoutParams(int p0){} + public LayoutParams(int p0, int p1){} + public LayoutParams(int p0, int p1, int p2){} + public LayoutParams(int p0, int p1, int p2, int p3, int p4){} + public LayoutParams(int p0, int p1, int p2, int p3, int p4, int p5, int p6){} + public String debug(String p0){ return null; } + public String packageName = null; + public String toString(){ return null; } + public boolean isFitInsetsIgnoringVisibility(){ return false; } + public boolean preferMinimalPostProcessing = false; + public final CharSequence getTitle(){ return null; } + public final int copyFrom(WindowManager.LayoutParams p0){ return 0; } + public final void setTitle(CharSequence p0){} + public float alpha = 0; + public float buttonBrightness = 0; + public float dimAmount = 0; + public float horizontalMargin = 0; + public float horizontalWeight = 0; + public float preferredRefreshRate = 0; + public float screenBrightness = 0; + public float verticalMargin = 0; + public float verticalWeight = 0; + public int describeContents(){ return 0; } + public int flags = 0; + public int format = 0; + public int getBlurBehindRadius(){ return 0; } + public int getColorMode(){ return 0; } + public int getFitInsetsSides(){ return 0; } + public int getFitInsetsTypes(){ return 0; } + public int gravity = 0; + public int layoutInDisplayCutoutMode = 0; + public int memoryType = 0; + public int preferredDisplayModeId = 0; + public int rotationAnimation = 0; + public int screenOrientation = 0; + public int softInputMode = 0; + public int systemUiVisibility = 0; + public int type = 0; + public int windowAnimations = 0; + public int x = 0; + public int y = 0; + public static Parcelable.Creator CREATOR = null; + public static boolean mayUseInputMethod(int p0){ return false; } + public static float BRIGHTNESS_OVERRIDE_FULL = 0; + public static float BRIGHTNESS_OVERRIDE_NONE = 0; + public static float BRIGHTNESS_OVERRIDE_OFF = 0; + public static int ALPHA_CHANGED = 0; + public static int ANIMATION_CHANGED = 0; + public static int DIM_AMOUNT_CHANGED = 0; + public static int FIRST_APPLICATION_WINDOW = 0; + public static int FIRST_SUB_WINDOW = 0; + public static int FIRST_SYSTEM_WINDOW = 0; + public static int FLAGS_CHANGED = 0; + public static int FLAG_ALLOW_LOCK_WHILE_SCREEN_ON = 0; + public static int FLAG_ALT_FOCUSABLE_IM = 0; + public static int FLAG_BLUR_BEHIND = 0; + public static int FLAG_DIM_BEHIND = 0; + public static int FLAG_DISMISS_KEYGUARD = 0; + public static int FLAG_DITHER = 0; + public static int FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS = 0; + public static int FLAG_FORCE_NOT_FULLSCREEN = 0; + public static int FLAG_FULLSCREEN = 0; + public static int FLAG_HARDWARE_ACCELERATED = 0; + public static int FLAG_IGNORE_CHEEK_PRESSES = 0; + public static int FLAG_KEEP_SCREEN_ON = 0; + public static int FLAG_LAYOUT_ATTACHED_IN_DECOR = 0; + public static int FLAG_LAYOUT_INSET_DECOR = 0; + public static int FLAG_LAYOUT_IN_OVERSCAN = 0; + public static int FLAG_LAYOUT_IN_SCREEN = 0; + public static int FLAG_LAYOUT_NO_LIMITS = 0; + public static int FLAG_LOCAL_FOCUS_MODE = 0; + public static int FLAG_NOT_FOCUSABLE = 0; + public static int FLAG_NOT_TOUCHABLE = 0; + public static int FLAG_NOT_TOUCH_MODAL = 0; + public static int FLAG_SCALED = 0; + public static int FLAG_SECURE = 0; + public static int FLAG_SHOW_WALLPAPER = 0; + public static int FLAG_SHOW_WHEN_LOCKED = 0; + public static int FLAG_SPLIT_TOUCH = 0; + public static int FLAG_TOUCHABLE_WHEN_WAKING = 0; + public static int FLAG_TRANSLUCENT_NAVIGATION = 0; + public static int FLAG_TRANSLUCENT_STATUS = 0; + public static int FLAG_TURN_SCREEN_ON = 0; + public static int FLAG_WATCH_OUTSIDE_TOUCH = 0; + public static int FORMAT_CHANGED = 0; + public static int LAST_APPLICATION_WINDOW = 0; + public static int LAST_SUB_WINDOW = 0; + public static int LAST_SYSTEM_WINDOW = 0; + public static int LAYOUT_CHANGED = 0; + public static int LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS = 0; + public static int LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT = 0; + public static int LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER = 0; + public static int LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES = 0; + public static int MEMORY_TYPE_CHANGED = 0; + public static int MEMORY_TYPE_GPU = 0; + public static int MEMORY_TYPE_HARDWARE = 0; + public static int MEMORY_TYPE_NORMAL = 0; + public static int MEMORY_TYPE_PUSH_BUFFERS = 0; + public static int ROTATION_ANIMATION_CHANGED = 0; + public static int ROTATION_ANIMATION_CROSSFADE = 0; + public static int ROTATION_ANIMATION_JUMPCUT = 0; + public static int ROTATION_ANIMATION_ROTATE = 0; + public static int ROTATION_ANIMATION_SEAMLESS = 0; + public static int SCREEN_BRIGHTNESS_CHANGED = 0; + public static int SCREEN_ORIENTATION_CHANGED = 0; + public static int SOFT_INPUT_ADJUST_NOTHING = 0; + public static int SOFT_INPUT_ADJUST_PAN = 0; + public static int SOFT_INPUT_ADJUST_RESIZE = 0; + public static int SOFT_INPUT_ADJUST_UNSPECIFIED = 0; + public static int SOFT_INPUT_IS_FORWARD_NAVIGATION = 0; + public static int SOFT_INPUT_MASK_ADJUST = 0; + public static int SOFT_INPUT_MASK_STATE = 0; + public static int SOFT_INPUT_MODE_CHANGED = 0; + public static int SOFT_INPUT_STATE_ALWAYS_HIDDEN = 0; + public static int SOFT_INPUT_STATE_ALWAYS_VISIBLE = 0; + public static int SOFT_INPUT_STATE_HIDDEN = 0; + public static int SOFT_INPUT_STATE_UNCHANGED = 0; + public static int SOFT_INPUT_STATE_UNSPECIFIED = 0; + public static int SOFT_INPUT_STATE_VISIBLE = 0; + public static int TITLE_CHANGED = 0; + public static int TYPE_ACCESSIBILITY_OVERLAY = 0; + public static int TYPE_APPLICATION = 0; + public static int TYPE_APPLICATION_ATTACHED_DIALOG = 0; + public static int TYPE_APPLICATION_MEDIA = 0; + public static int TYPE_APPLICATION_OVERLAY = 0; + public static int TYPE_APPLICATION_PANEL = 0; + public static int TYPE_APPLICATION_STARTING = 0; + public static int TYPE_APPLICATION_SUB_PANEL = 0; + public static int TYPE_BASE_APPLICATION = 0; + public static int TYPE_CHANGED = 0; + public static int TYPE_DRAWN_APPLICATION = 0; + public static int TYPE_INPUT_METHOD = 0; + public static int TYPE_INPUT_METHOD_DIALOG = 0; + public static int TYPE_KEYGUARD_DIALOG = 0; + public static int TYPE_PHONE = 0; + public static int TYPE_PRIORITY_PHONE = 0; + public static int TYPE_PRIVATE_PRESENTATION = 0; + public static int TYPE_SEARCH_BAR = 0; + public static int TYPE_STATUS_BAR = 0; + public static int TYPE_SYSTEM_ALERT = 0; + public static int TYPE_SYSTEM_DIALOG = 0; + public static int TYPE_SYSTEM_ERROR = 0; + public static int TYPE_SYSTEM_OVERLAY = 0; + public static int TYPE_TOAST = 0; + public static int TYPE_WALLPAPER = 0; + public void setBlurBehindRadius(int p0){} + public void setColorMode(int p0){} + public void setFitInsetsIgnoringVisibility(boolean p0){} + public void setFitInsetsSides(int p0){} + public void setFitInsetsTypes(int p0){} + public void writeToParcel(Parcel p0, int p1){} + } + void removeViewImmediate(View p0); +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/view/WindowMetrics.java b/java/ql/test/stubs/google-android-9.0.0/android/view/WindowMetrics.java new file mode 100644 index 000000000000..9c9bc92058c3 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/view/WindowMetrics.java @@ -0,0 +1,14 @@ +// Generated automatically from android.view.WindowMetrics for testing purposes + +package android.view; + +import android.graphics.Rect; +import android.view.WindowInsets; + +public class WindowMetrics +{ + protected WindowMetrics() {} + public Rect getBounds(){ return null; } + public WindowInsets getWindowInsets(){ return null; } + public WindowMetrics(Rect p0, WindowInsets p1){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/view/accessibility/AccessibilityEvent.java b/java/ql/test/stubs/google-android-9.0.0/android/view/accessibility/AccessibilityEvent.java index 1db7545960f9..5e702246cb90 100644 --- a/java/ql/test/stubs/google-android-9.0.0/android/view/accessibility/AccessibilityEvent.java +++ b/java/ql/test/stubs/google-android-9.0.0/android/view/accessibility/AccessibilityEvent.java @@ -28,6 +28,9 @@ public AccessibilityEvent(int p0){} public static Parcelable.Creator CREATOR = null; public static String eventTypeToString(int p0){ return null; } public static int CONTENT_CHANGE_TYPE_CONTENT_DESCRIPTION = 0; + public static int CONTENT_CHANGE_TYPE_DRAG_CANCELLED = 0; + public static int CONTENT_CHANGE_TYPE_DRAG_DROPPED = 0; + public static int CONTENT_CHANGE_TYPE_DRAG_STARTED = 0; public static int CONTENT_CHANGE_TYPE_PANE_APPEARED = 0; public static int CONTENT_CHANGE_TYPE_PANE_DISAPPEARED = 0; public static int CONTENT_CHANGE_TYPE_PANE_TITLE = 0; diff --git a/java/ql/test/stubs/google-android-9.0.0/android/view/accessibility/AccessibilityNodeInfo.java b/java/ql/test/stubs/google-android-9.0.0/android/view/accessibility/AccessibilityNodeInfo.java index 9724111622d9..f781f0a60927 100644 --- a/java/ql/test/stubs/google-android-9.0.0/android/view/accessibility/AccessibilityNodeInfo.java +++ b/java/ql/test/stubs/google-android-9.0.0/android/view/accessibility/AccessibilityNodeInfo.java @@ -230,6 +230,9 @@ public AccessibilityAction(int p0, CharSequence p1){} public static AccessibilityNodeInfo.AccessibilityAction ACTION_COPY = null; public static AccessibilityNodeInfo.AccessibilityAction ACTION_CUT = null; public static AccessibilityNodeInfo.AccessibilityAction ACTION_DISMISS = null; + public static AccessibilityNodeInfo.AccessibilityAction ACTION_DRAG_CANCEL = null; + public static AccessibilityNodeInfo.AccessibilityAction ACTION_DRAG_DROP = null; + public static AccessibilityNodeInfo.AccessibilityAction ACTION_DRAG_START = null; public static AccessibilityNodeInfo.AccessibilityAction ACTION_EXPAND = null; public static AccessibilityNodeInfo.AccessibilityAction ACTION_FOCUS = null; public static AccessibilityNodeInfo.AccessibilityAction ACTION_HIDE_TOOLTIP = null; diff --git a/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/ConversationAction.java b/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/ConversationAction.java new file mode 100644 index 000000000000..fc35651b52d5 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/ConversationAction.java @@ -0,0 +1,31 @@ +// Generated automatically from android.view.textclassifier.ConversationAction for testing purposes + +package android.view.textclassifier; + +import android.app.RemoteAction; +import android.os.Bundle; +import android.os.Parcel; +import android.os.Parcelable; + +public class ConversationAction implements Parcelable +{ + protected ConversationAction() {} + public Bundle getExtras(){ return null; } + public CharSequence getTextReply(){ return null; } + public RemoteAction getAction(){ return null; } + public String getType(){ return null; } + public float getConfidenceScore(){ return 0; } + public int describeContents(){ return 0; } + public static Parcelable.Creator CREATOR = null; + public static String TYPE_CALL_PHONE = null; + public static String TYPE_CREATE_REMINDER = null; + public static String TYPE_OPEN_URL = null; + public static String TYPE_SEND_EMAIL = null; + public static String TYPE_SEND_SMS = null; + public static String TYPE_SHARE_LOCATION = null; + public static String TYPE_TEXT_REPLY = null; + public static String TYPE_TRACK_FLIGHT = null; + public static String TYPE_VIEW_CALENDAR = null; + public static String TYPE_VIEW_MAP = null; + public void writeToParcel(Parcel p0, int p1){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/ConversationActions.java b/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/ConversationActions.java new file mode 100644 index 000000000000..ebe2eac2fd2f --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/ConversationActions.java @@ -0,0 +1,51 @@ +// Generated automatically from android.view.textclassifier.ConversationActions for testing purposes + +package android.view.textclassifier; + +import android.app.Person; +import android.os.Bundle; +import android.os.Parcel; +import android.os.Parcelable; +import android.view.textclassifier.ConversationAction; +import android.view.textclassifier.TextClassifier; +import java.time.ZonedDateTime; +import java.util.List; + +public class ConversationActions implements Parcelable +{ + protected ConversationActions() {} + public ConversationActions(List p0, String p1){} + public List getConversationActions(){ return null; } + public String getId(){ return null; } + public int describeContents(){ return 0; } + public static Parcelable.Creator CREATOR = null; + public void writeToParcel(Parcel p0, int p1){} + static public class Message implements Parcelable + { + protected Message() {} + public Bundle getExtras(){ return null; } + public CharSequence getText(){ return null; } + public Person getAuthor(){ return null; } + public ZonedDateTime getReferenceTime(){ return null; } + public int describeContents(){ return 0; } + public static Parcelable.Creator CREATOR = null; + public static Person PERSON_USER_OTHERS = null; + public static Person PERSON_USER_SELF = null; + public void writeToParcel(Parcel p0, int p1){} + } + static public class Request implements Parcelable + { + protected Request() {} + public Bundle getExtras(){ return null; } + public List getConversation(){ return null; } + public List getHints(){ return null; } + public String getCallingPackageName(){ return null; } + public TextClassifier.EntityConfig getTypeConfig(){ return null; } + public int describeContents(){ return 0; } + public int getMaxSuggestions(){ return 0; } + public static Parcelable.Creator CREATOR = null; + public static String HINT_FOR_IN_APP = null; + public static String HINT_FOR_NOTIFICATION = null; + public void writeToParcel(Parcel p0, int p1){} + } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/SelectionEvent.java b/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/SelectionEvent.java new file mode 100644 index 000000000000..70d75c390b83 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/SelectionEvent.java @@ -0,0 +1,61 @@ +// Generated automatically from android.view.textclassifier.SelectionEvent for testing purposes + +package android.view.textclassifier; + +import android.os.Parcel; +import android.os.Parcelable; +import android.view.textclassifier.TextClassification; +import android.view.textclassifier.TextClassificationSessionId; +import android.view.textclassifier.TextSelection; + +public class SelectionEvent implements Parcelable +{ + public String getEntityType(){ return null; } + public String getPackageName(){ return null; } + public String getResultId(){ return null; } + public String getWidgetType(){ return null; } + public String getWidgetVersion(){ return null; } + public String toString(){ return null; } + public TextClassificationSessionId getSessionId(){ return null; } + public boolean equals(Object p0){ return false; } + public int describeContents(){ return 0; } + public int getEnd(){ return 0; } + public int getEventIndex(){ return 0; } + public int getEventType(){ return 0; } + public int getInvocationMethod(){ return 0; } + public int getSmartEnd(){ return 0; } + public int getSmartStart(){ return 0; } + public int getStart(){ return 0; } + public int hashCode(){ return 0; } + public long getDurationSincePreviousEvent(){ return 0; } + public long getDurationSinceSessionStart(){ return 0; } + public long getEventTime(){ return 0; } + public static Parcelable.Creator CREATOR = null; + public static SelectionEvent createSelectionActionEvent(int p0, int p1, int p2){ return null; } + public static SelectionEvent createSelectionActionEvent(int p0, int p1, int p2, TextClassification p3){ return null; } + public static SelectionEvent createSelectionModifiedEvent(int p0, int p1){ return null; } + public static SelectionEvent createSelectionModifiedEvent(int p0, int p1, TextClassification p2){ return null; } + public static SelectionEvent createSelectionModifiedEvent(int p0, int p1, TextSelection p2){ return null; } + public static SelectionEvent createSelectionStartedEvent(int p0, int p1){ return null; } + public static boolean isTerminal(int p0){ return false; } + public static int ACTION_ABANDON = 0; + public static int ACTION_COPY = 0; + public static int ACTION_CUT = 0; + public static int ACTION_DRAG = 0; + public static int ACTION_OTHER = 0; + public static int ACTION_OVERTYPE = 0; + public static int ACTION_PASTE = 0; + public static int ACTION_RESET = 0; + public static int ACTION_SELECT_ALL = 0; + public static int ACTION_SHARE = 0; + public static int ACTION_SMART_SHARE = 0; + public static int EVENT_AUTO_SELECTION = 0; + public static int EVENT_SELECTION_MODIFIED = 0; + public static int EVENT_SELECTION_STARTED = 0; + public static int EVENT_SMART_SELECTION_MULTI = 0; + public static int EVENT_SMART_SELECTION_SINGLE = 0; + public static int INVOCATION_LINK = 0; + public static int INVOCATION_MANUAL = 0; + public static int INVOCATION_UNKNOWN = 0; + public void writeToParcel(Parcel p0, int p1){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/TextClassification.java b/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/TextClassification.java new file mode 100644 index 000000000000..bd89b26c5232 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/TextClassification.java @@ -0,0 +1,48 @@ +// Generated automatically from android.view.textclassifier.TextClassification for testing purposes + +package android.view.textclassifier; + +import android.app.RemoteAction; +import android.content.Intent; +import android.graphics.drawable.Drawable; +import android.os.Bundle; +import android.os.LocaleList; +import android.os.Parcel; +import android.os.Parcelable; +import android.view.View; +import java.time.ZonedDateTime; +import java.util.List; + +public class TextClassification implements Parcelable +{ + protected TextClassification() {} + public Bundle getExtras(){ return null; } + public CharSequence getLabel(){ return null; } + public Drawable getIcon(){ return null; } + public Intent getIntent(){ return null; } + public List getActions(){ return null; } + public String getEntity(int p0){ return null; } + public String getId(){ return null; } + public String getText(){ return null; } + public String toString(){ return null; } + public View.OnClickListener getOnClickListener(){ return null; } + public float getConfidenceScore(String p0){ return 0; } + public int describeContents(){ return 0; } + public int getEntityCount(){ return 0; } + public static Parcelable.Creator CREATOR = null; + public void writeToParcel(Parcel p0, int p1){} + static public class Request implements Parcelable + { + protected Request() {} + public Bundle getExtras(){ return null; } + public CharSequence getText(){ return null; } + public LocaleList getDefaultLocales(){ return null; } + public String getCallingPackageName(){ return null; } + public ZonedDateTime getReferenceTime(){ return null; } + public int describeContents(){ return 0; } + public int getEndIndex(){ return 0; } + public int getStartIndex(){ return 0; } + public static Parcelable.Creator CREATOR = null; + public void writeToParcel(Parcel p0, int p1){} + } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/TextClassificationContext.java b/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/TextClassificationContext.java new file mode 100644 index 000000000000..a7ab6240ede4 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/TextClassificationContext.java @@ -0,0 +1,18 @@ +// Generated automatically from android.view.textclassifier.TextClassificationContext for testing purposes + +package android.view.textclassifier; + +import android.os.Parcel; +import android.os.Parcelable; + +public class TextClassificationContext implements Parcelable +{ + protected TextClassificationContext() {} + public String getPackageName(){ return null; } + public String getWidgetType(){ return null; } + public String getWidgetVersion(){ return null; } + public String toString(){ return null; } + public int describeContents(){ return 0; } + public static Parcelable.Creator CREATOR = null; + public void writeToParcel(Parcel p0, int p1){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/TextClassificationSessionId.java b/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/TextClassificationSessionId.java new file mode 100644 index 000000000000..fda8b2a04495 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/TextClassificationSessionId.java @@ -0,0 +1,17 @@ +// Generated automatically from android.view.textclassifier.TextClassificationSessionId for testing purposes + +package android.view.textclassifier; + +import android.os.Parcel; +import android.os.Parcelable; + +public class TextClassificationSessionId implements Parcelable +{ + public String getValue(){ return null; } + public String toString(){ return null; } + public boolean equals(Object p0){ return false; } + public int describeContents(){ return 0; } + public int hashCode(){ return 0; } + public static Parcelable.Creator CREATOR = null; + public void writeToParcel(Parcel p0, int p1){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/TextClassifier.java b/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/TextClassifier.java new file mode 100644 index 000000000000..9f3daa67ea1c --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/TextClassifier.java @@ -0,0 +1,68 @@ +// Generated automatically from android.view.textclassifier.TextClassifier for testing purposes + +package android.view.textclassifier; + +import android.os.LocaleList; +import android.os.Parcel; +import android.os.Parcelable; +import android.view.textclassifier.ConversationActions; +import android.view.textclassifier.SelectionEvent; +import android.view.textclassifier.TextClassification; +import android.view.textclassifier.TextClassifierEvent; +import android.view.textclassifier.TextLanguage; +import android.view.textclassifier.TextLinks; +import android.view.textclassifier.TextSelection; +import java.util.Collection; + +public interface TextClassifier +{ + default ConversationActions suggestConversationActions(ConversationActions.Request p0){ return null; } + default TextClassification classifyText(CharSequence p0, int p1, int p2, LocaleList p3){ return null; } + default TextClassification classifyText(TextClassification.Request p0){ return null; } + default TextLanguage detectLanguage(TextLanguage.Request p0){ return null; } + default TextLinks generateLinks(TextLinks.Request p0){ return null; } + default TextSelection suggestSelection(CharSequence p0, int p1, int p2, LocaleList p3){ return null; } + default TextSelection suggestSelection(TextSelection.Request p0){ return null; } + default boolean isDestroyed(){ return false; } + default int getMaxGenerateLinksTextLength(){ return 0; } + default void destroy(){} + default void onSelectionEvent(SelectionEvent p0){} + default void onTextClassifierEvent(TextClassifierEvent p0){} + static String EXTRA_FROM_TEXT_CLASSIFIER = null; + static String HINT_TEXT_IS_EDITABLE = null; + static String HINT_TEXT_IS_NOT_EDITABLE = null; + static String TYPE_ADDRESS = null; + static String TYPE_DATE = null; + static String TYPE_DATE_TIME = null; + static String TYPE_EMAIL = null; + static String TYPE_FLIGHT_NUMBER = null; + static String TYPE_OTHER = null; + static String TYPE_PHONE = null; + static String TYPE_UNKNOWN = null; + static String TYPE_URL = null; + static String WIDGET_TYPE_CLIPBOARD = null; + static String WIDGET_TYPE_CUSTOM_EDITTEXT = null; + static String WIDGET_TYPE_CUSTOM_TEXTVIEW = null; + static String WIDGET_TYPE_CUSTOM_UNSELECTABLE_TEXTVIEW = null; + static String WIDGET_TYPE_EDITTEXT = null; + static String WIDGET_TYPE_EDIT_WEBVIEW = null; + static String WIDGET_TYPE_NOTIFICATION = null; + static String WIDGET_TYPE_TEXTVIEW = null; + static String WIDGET_TYPE_UNKNOWN = null; + static String WIDGET_TYPE_UNSELECTABLE_TEXTVIEW = null; + static String WIDGET_TYPE_WEBVIEW = null; + static TextClassifier NO_OP = null; + static public class EntityConfig implements Parcelable + { + protected EntityConfig() {} + public Collection getHints(){ return null; } + public Collection resolveEntityListModifications(Collection p0){ return null; } + public boolean shouldIncludeTypesFromTextClassifier(){ return false; } + public int describeContents(){ return 0; } + public static Parcelable.Creator CREATOR = null; + public static TextClassifier.EntityConfig create(Collection p0, Collection p1, Collection p2){ return null; } + public static TextClassifier.EntityConfig createWithExplicitEntityList(Collection p0){ return null; } + public static TextClassifier.EntityConfig createWithHints(Collection p0){ return null; } + public void writeToParcel(Parcel p0, int p1){} + } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/TextClassifierEvent.java b/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/TextClassifierEvent.java new file mode 100644 index 000000000000..ad18e8b78f5d --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/TextClassifierEvent.java @@ -0,0 +1,54 @@ +// Generated automatically from android.view.textclassifier.TextClassifierEvent for testing purposes + +package android.view.textclassifier; + +import android.icu.util.ULocale; +import android.os.Bundle; +import android.os.Parcel; +import android.os.Parcelable; +import android.view.textclassifier.TextClassificationContext; + +abstract public class TextClassifierEvent implements Parcelable +{ + protected TextClassifierEvent() {} + public Bundle getExtras(){ return null; } + public String getModelName(){ return null; } + public String getResultId(){ return null; } + public String toString(){ return null; } + public String[] getEntityTypes(){ return null; } + public TextClassificationContext getEventContext(){ return null; } + public ULocale getLocale(){ return null; } + public float[] getScores(){ return null; } + public int describeContents(){ return 0; } + public int getEventCategory(){ return 0; } + public int getEventIndex(){ return 0; } + public int getEventType(){ return 0; } + public int[] getActionIndices(){ return null; } + public static Parcelable.Creator CREATOR = null; + public static int CATEGORY_CONVERSATION_ACTIONS = 0; + public static int CATEGORY_LANGUAGE_DETECTION = 0; + public static int CATEGORY_LINKIFY = 0; + public static int CATEGORY_SELECTION = 0; + public static int TYPE_ACTIONS_GENERATED = 0; + public static int TYPE_ACTIONS_SHOWN = 0; + public static int TYPE_AUTO_SELECTION = 0; + public static int TYPE_COPY_ACTION = 0; + public static int TYPE_CUT_ACTION = 0; + public static int TYPE_LINKS_GENERATED = 0; + public static int TYPE_LINK_CLICKED = 0; + public static int TYPE_MANUAL_REPLY = 0; + public static int TYPE_OTHER_ACTION = 0; + public static int TYPE_OVERTYPE = 0; + public static int TYPE_PASTE_ACTION = 0; + public static int TYPE_SELECTION_DESTROYED = 0; + public static int TYPE_SELECTION_DRAG = 0; + public static int TYPE_SELECTION_MODIFIED = 0; + public static int TYPE_SELECTION_RESET = 0; + public static int TYPE_SELECTION_STARTED = 0; + public static int TYPE_SELECT_ALL = 0; + public static int TYPE_SHARE_ACTION = 0; + public static int TYPE_SMART_ACTION = 0; + public static int TYPE_SMART_SELECTION_MULTI = 0; + public static int TYPE_SMART_SELECTION_SINGLE = 0; + public void writeToParcel(Parcel p0, int p1){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/TextLanguage.java b/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/TextLanguage.java new file mode 100644 index 000000000000..8c04c6b43dfe --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/TextLanguage.java @@ -0,0 +1,32 @@ +// Generated automatically from android.view.textclassifier.TextLanguage for testing purposes + +package android.view.textclassifier; + +import android.icu.util.ULocale; +import android.os.Bundle; +import android.os.Parcel; +import android.os.Parcelable; + +public class TextLanguage implements Parcelable +{ + protected TextLanguage() {} + public Bundle getExtras(){ return null; } + public String getId(){ return null; } + public String toString(){ return null; } + public ULocale getLocale(int p0){ return null; } + public float getConfidenceScore(ULocale p0){ return 0; } + public int describeContents(){ return 0; } + public int getLocaleHypothesisCount(){ return 0; } + public static Parcelable.Creator CREATOR = null; + public void writeToParcel(Parcel p0, int p1){} + static public class Request implements Parcelable + { + protected Request() {} + public Bundle getExtras(){ return null; } + public CharSequence getText(){ return null; } + public String getCallingPackageName(){ return null; } + public int describeContents(){ return 0; } + public static Parcelable.Creator CREATOR = null; + public void writeToParcel(Parcel p0, int p1){} + } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/TextLinks.java b/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/TextLinks.java index 597d751996e1..1e36d6727171 100644 --- a/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/TextLinks.java +++ b/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/TextLinks.java @@ -3,11 +3,14 @@ package android.view.textclassifier; import android.os.Bundle; +import android.os.LocaleList; import android.os.Parcel; import android.os.Parcelable; import android.text.Spannable; import android.text.style.ClickableSpan; import android.view.View; +import android.view.textclassifier.TextClassifier; +import java.time.ZonedDateTime; import java.util.Collection; import java.util.function.Function; @@ -29,6 +32,19 @@ protected TextLinks() {} public static int STATUS_NO_LINKS_FOUND = 0; public static int STATUS_UNSUPPORTED_CHARACTER = 0; public void writeToParcel(Parcel p0, int p1){} + static public class Request implements Parcelable + { + protected Request() {} + public Bundle getExtras(){ return null; } + public CharSequence getText(){ return null; } + public LocaleList getDefaultLocales(){ return null; } + public String getCallingPackageName(){ return null; } + public TextClassifier.EntityConfig getEntityConfig(){ return null; } + public ZonedDateTime getReferenceTime(){ return null; } + public int describeContents(){ return 0; } + public static Parcelable.Creator CREATOR = null; + public void writeToParcel(Parcel p0, int p1){} + } static public class TextLink implements Parcelable { protected TextLink() {} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/TextSelection.java b/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/TextSelection.java new file mode 100644 index 000000000000..015715305c45 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/view/textclassifier/TextSelection.java @@ -0,0 +1,40 @@ +// Generated automatically from android.view.textclassifier.TextSelection for testing purposes + +package android.view.textclassifier; + +import android.os.Bundle; +import android.os.LocaleList; +import android.os.Parcel; +import android.os.Parcelable; +import android.view.textclassifier.TextClassification; + +public class TextSelection implements Parcelable +{ + protected TextSelection() {} + public Bundle getExtras(){ return null; } + public String getEntity(int p0){ return null; } + public String getId(){ return null; } + public String toString(){ return null; } + public TextClassification getTextClassification(){ return null; } + public float getConfidenceScore(String p0){ return 0; } + public int describeContents(){ return 0; } + public int getEntityCount(){ return 0; } + public int getSelectionEndIndex(){ return 0; } + public int getSelectionStartIndex(){ return 0; } + public static Parcelable.Creator CREATOR = null; + public void writeToParcel(Parcel p0, int p1){} + static public class Request implements Parcelable + { + protected Request() {} + public Bundle getExtras(){ return null; } + public CharSequence getText(){ return null; } + public LocaleList getDefaultLocales(){ return null; } + public String getCallingPackageName(){ return null; } + public boolean shouldIncludeTextClassification(){ return false; } + public int describeContents(){ return 0; } + public int getEndIndex(){ return 0; } + public int getStartIndex(){ return 0; } + public static Parcelable.Creator CREATOR = null; + public void writeToParcel(Parcel p0, int p1){} + } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/webkit/ClientCertRequest.java b/java/ql/test/stubs/google-android-9.0.0/android/webkit/ClientCertRequest.java new file mode 100644 index 000000000000..0af0587e29d5 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/webkit/ClientCertRequest.java @@ -0,0 +1,19 @@ +// Generated automatically from android.webkit.ClientCertRequest for testing purposes + +package android.webkit; + +import java.security.Principal; +import java.security.PrivateKey; +import java.security.cert.X509Certificate; + +abstract public class ClientCertRequest +{ + public ClientCertRequest(){} + public abstract Principal[] getPrincipals(); + public abstract String getHost(); + public abstract String[] getKeyTypes(); + public abstract int getPort(); + public abstract void cancel(); + public abstract void ignore(); + public abstract void proceed(PrivateKey p0, X509Certificate[] p1); +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/webkit/ConsoleMessage.java b/java/ql/test/stubs/google-android-9.0.0/android/webkit/ConsoleMessage.java new file mode 100644 index 000000000000..9b50c6f7e6ee --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/webkit/ConsoleMessage.java @@ -0,0 +1,19 @@ +// Generated automatically from android.webkit.ConsoleMessage for testing purposes + +package android.webkit; + + +public class ConsoleMessage +{ + protected ConsoleMessage() {} + public ConsoleMessage(String p0, String p1, int p2, ConsoleMessage.MessageLevel p3){} + public ConsoleMessage.MessageLevel messageLevel(){ return null; } + public String message(){ return null; } + public String sourceId(){ return null; } + public int lineNumber(){ return 0; } + static public enum MessageLevel + { + DEBUG, ERROR, LOG, TIP, WARNING; + private MessageLevel() {} + } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/webkit/DownloadListener.java b/java/ql/test/stubs/google-android-9.0.0/android/webkit/DownloadListener.java new file mode 100644 index 000000000000..2620faf369c9 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/webkit/DownloadListener.java @@ -0,0 +1,9 @@ +// Generated automatically from android.webkit.DownloadListener for testing purposes + +package android.webkit; + + +public interface DownloadListener +{ + void onDownloadStart(String p0, String p1, String p2, String p3, long p4); +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/webkit/GeolocationPermissions.java b/java/ql/test/stubs/google-android-9.0.0/android/webkit/GeolocationPermissions.java new file mode 100644 index 000000000000..8edb6b2f3dd8 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/webkit/GeolocationPermissions.java @@ -0,0 +1,20 @@ +// Generated automatically from android.webkit.GeolocationPermissions for testing purposes + +package android.webkit; + +import android.webkit.ValueCallback; +import java.util.Set; + +public class GeolocationPermissions +{ + public static GeolocationPermissions getInstance(){ return null; } + public void allow(String p0){} + public void clear(String p0){} + public void clearAll(){} + public void getAllowed(String p0, ValueCallback p1){} + public void getOrigins(ValueCallback> p0){} + static public interface Callback + { + void invoke(String p0, boolean p1, boolean p2); + } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/webkit/HttpAuthHandler.java b/java/ql/test/stubs/google-android-9.0.0/android/webkit/HttpAuthHandler.java new file mode 100644 index 000000000000..c2bde7e3ffcd --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/webkit/HttpAuthHandler.java @@ -0,0 +1,12 @@ +// Generated automatically from android.webkit.HttpAuthHandler for testing purposes + +package android.webkit; + +import android.os.Handler; + +public class HttpAuthHandler extends Handler +{ + public boolean useHttpAuthUsernamePassword(){ return false; } + public void cancel(){} + public void proceed(String p0, String p1){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/webkit/JsPromptResult.java b/java/ql/test/stubs/google-android-9.0.0/android/webkit/JsPromptResult.java new file mode 100644 index 000000000000..835d76105a01 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/webkit/JsPromptResult.java @@ -0,0 +1,10 @@ +// Generated automatically from android.webkit.JsPromptResult for testing purposes + +package android.webkit; + +import android.webkit.JsResult; + +public class JsPromptResult extends JsResult +{ + public void confirm(String p0){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/webkit/JsResult.java b/java/ql/test/stubs/google-android-9.0.0/android/webkit/JsResult.java new file mode 100644 index 000000000000..c81684381306 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/webkit/JsResult.java @@ -0,0 +1,10 @@ +// Generated automatically from android.webkit.JsResult for testing purposes + +package android.webkit; + + +public class JsResult +{ + public final void cancel(){} + public final void confirm(){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/webkit/PermissionRequest.java b/java/ql/test/stubs/google-android-9.0.0/android/webkit/PermissionRequest.java new file mode 100644 index 000000000000..da64b4420841 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/webkit/PermissionRequest.java @@ -0,0 +1,18 @@ +// Generated automatically from android.webkit.PermissionRequest for testing purposes + +package android.webkit; + +import android.net.Uri; + +abstract public class PermissionRequest +{ + public PermissionRequest(){} + public abstract String[] getResources(); + public abstract Uri getOrigin(); + public abstract void deny(); + public abstract void grant(String[] p0); + public static String RESOURCE_AUDIO_CAPTURE = null; + public static String RESOURCE_MIDI_SYSEX = null; + public static String RESOURCE_PROTECTED_MEDIA_ID = null; + public static String RESOURCE_VIDEO_CAPTURE = null; +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/webkit/RenderProcessGoneDetail.java b/java/ql/test/stubs/google-android-9.0.0/android/webkit/RenderProcessGoneDetail.java new file mode 100644 index 000000000000..1e2086fdf3b9 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/webkit/RenderProcessGoneDetail.java @@ -0,0 +1,11 @@ +// Generated automatically from android.webkit.RenderProcessGoneDetail for testing purposes + +package android.webkit; + + +abstract public class RenderProcessGoneDetail +{ + public RenderProcessGoneDetail(){} + public abstract boolean didCrash(); + public abstract int rendererPriorityAtExit(); +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/webkit/SafeBrowsingResponse.java b/java/ql/test/stubs/google-android-9.0.0/android/webkit/SafeBrowsingResponse.java new file mode 100644 index 000000000000..751d7e76530c --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/webkit/SafeBrowsingResponse.java @@ -0,0 +1,12 @@ +// Generated automatically from android.webkit.SafeBrowsingResponse for testing purposes + +package android.webkit; + + +abstract public class SafeBrowsingResponse +{ + public SafeBrowsingResponse(){} + public abstract void backToSafety(boolean p0); + public abstract void proceed(boolean p0); + public abstract void showInterstitial(boolean p0); +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/webkit/SslErrorHandler.java b/java/ql/test/stubs/google-android-9.0.0/android/webkit/SslErrorHandler.java new file mode 100644 index 000000000000..ab56fed23fae --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/webkit/SslErrorHandler.java @@ -0,0 +1,11 @@ +// Generated automatically from android.webkit.SslErrorHandler for testing purposes + +package android.webkit; + +import android.os.Handler; + +public class SslErrorHandler extends Handler +{ + public void cancel(){} + public void proceed(){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/webkit/ValueCallback.java b/java/ql/test/stubs/google-android-9.0.0/android/webkit/ValueCallback.java new file mode 100644 index 000000000000..0cdf8831825a --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/webkit/ValueCallback.java @@ -0,0 +1,9 @@ +// Generated automatically from android.webkit.ValueCallback for testing purposes + +package android.webkit; + + +public interface ValueCallback +{ + void onReceiveValue(T p0); +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebBackForwardList.java b/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebBackForwardList.java new file mode 100644 index 000000000000..4fe7956b5626 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebBackForwardList.java @@ -0,0 +1,16 @@ +// Generated automatically from android.webkit.WebBackForwardList for testing purposes + +package android.webkit; + +import android.webkit.WebHistoryItem; +import java.io.Serializable; + +abstract public class WebBackForwardList implements Cloneable, Serializable +{ + protected abstract WebBackForwardList clone(); + public WebBackForwardList(){} + public abstract WebHistoryItem getCurrentItem(); + public abstract WebHistoryItem getItemAtIndex(int p0); + public abstract int getCurrentIndex(); + public abstract int getSize(); +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebChromeClient.java b/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebChromeClient.java new file mode 100644 index 000000000000..75b1f938d2d2 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebChromeClient.java @@ -0,0 +1,67 @@ +// Generated automatically from android.webkit.WebChromeClient for testing purposes + +package android.webkit; + +import android.content.Intent; +import android.graphics.Bitmap; +import android.net.Uri; +import android.os.Message; +import android.view.View; +import android.webkit.ConsoleMessage; +import android.webkit.GeolocationPermissions; +import android.webkit.JsPromptResult; +import android.webkit.JsResult; +import android.webkit.PermissionRequest; +import android.webkit.ValueCallback; +import android.webkit.WebStorage; +import android.webkit.WebView; + +public class WebChromeClient +{ + abstract static public class FileChooserParams + { + public FileChooserParams(){} + public abstract CharSequence getTitle(); + public abstract Intent createIntent(); + public abstract String getFilenameHint(); + public abstract String[] getAcceptTypes(); + public abstract boolean isCaptureEnabled(); + public abstract int getMode(); + public static Uri[] parseResult(int p0, Intent p1){ return null; } + public static int MODE_OPEN = 0; + public static int MODE_OPEN_MULTIPLE = 0; + public static int MODE_SAVE = 0; + } + public Bitmap getDefaultVideoPoster(){ return null; } + public View getVideoLoadingProgressView(){ return null; } + public WebChromeClient(){} + public boolean onConsoleMessage(ConsoleMessage p0){ return false; } + public boolean onCreateWindow(WebView p0, boolean p1, boolean p2, Message p3){ return false; } + public boolean onJsAlert(WebView p0, String p1, String p2, JsResult p3){ return false; } + public boolean onJsBeforeUnload(WebView p0, String p1, String p2, JsResult p3){ return false; } + public boolean onJsConfirm(WebView p0, String p1, String p2, JsResult p3){ return false; } + public boolean onJsPrompt(WebView p0, String p1, String p2, String p3, JsPromptResult p4){ return false; } + public boolean onJsTimeout(){ return false; } + public boolean onShowFileChooser(WebView p0, ValueCallback p1, WebChromeClient.FileChooserParams p2){ return false; } + public void getVisitedHistory(ValueCallback p0){} + public void onCloseWindow(WebView p0){} + public void onConsoleMessage(String p0, int p1, String p2){} + public void onExceededDatabaseQuota(String p0, String p1, long p2, long p3, long p4, WebStorage.QuotaUpdater p5){} + public void onGeolocationPermissionsHidePrompt(){} + public void onGeolocationPermissionsShowPrompt(String p0, GeolocationPermissions.Callback p1){} + public void onHideCustomView(){} + public void onPermissionRequest(PermissionRequest p0){} + public void onPermissionRequestCanceled(PermissionRequest p0){} + public void onProgressChanged(WebView p0, int p1){} + public void onReachedMaxAppCacheSize(long p0, long p1, WebStorage.QuotaUpdater p2){} + public void onReceivedIcon(WebView p0, Bitmap p1){} + public void onReceivedTitle(WebView p0, String p1){} + public void onReceivedTouchIconUrl(WebView p0, String p1, boolean p2){} + public void onRequestFocus(WebView p0){} + public void onShowCustomView(View p0, WebChromeClient.CustomViewCallback p1){} + public void onShowCustomView(View p0, int p1, WebChromeClient.CustomViewCallback p2){} + static public interface CustomViewCallback + { + void onCustomViewHidden(); + } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebHistoryItem.java b/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebHistoryItem.java new file mode 100644 index 000000000000..637467d888f8 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebHistoryItem.java @@ -0,0 +1,15 @@ +// Generated automatically from android.webkit.WebHistoryItem for testing purposes + +package android.webkit; + +import android.graphics.Bitmap; + +abstract public class WebHistoryItem implements Cloneable +{ + protected abstract WebHistoryItem clone(); + public WebHistoryItem(){} + public abstract Bitmap getFavicon(); + public abstract String getOriginalUrl(); + public abstract String getTitle(); + public abstract String getUrl(); +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebMessage.java b/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebMessage.java new file mode 100644 index 000000000000..6e02214c1dfc --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebMessage.java @@ -0,0 +1,14 @@ +// Generated automatically from android.webkit.WebMessage for testing purposes + +package android.webkit; + +import android.webkit.WebMessagePort; + +public class WebMessage +{ + protected WebMessage() {} + public String getData(){ return null; } + public WebMessage(String p0){} + public WebMessage(String p0, WebMessagePort[] p1){} + public WebMessagePort[] getPorts(){ return null; } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebMessagePort.java b/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebMessagePort.java new file mode 100644 index 000000000000..05ece05e0a39 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebMessagePort.java @@ -0,0 +1,19 @@ +// Generated automatically from android.webkit.WebMessagePort for testing purposes + +package android.webkit; + +import android.os.Handler; +import android.webkit.WebMessage; + +abstract public class WebMessagePort +{ + abstract static public class WebMessageCallback + { + public WebMessageCallback(){} + public void onMessage(WebMessagePort p0, WebMessage p1){} + } + public abstract void close(); + public abstract void postMessage(WebMessage p0); + public abstract void setWebMessageCallback(WebMessagePort.WebMessageCallback p0); + public abstract void setWebMessageCallback(WebMessagePort.WebMessageCallback p0, Handler p1); +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebResourceError.java b/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebResourceError.java new file mode 100644 index 000000000000..115aaff3dec7 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebResourceError.java @@ -0,0 +1,10 @@ +// Generated automatically from android.webkit.WebResourceError for testing purposes + +package android.webkit; + + +abstract public class WebResourceError +{ + public abstract CharSequence getDescription(); + public abstract int getErrorCode(); +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebResourceRequest.java b/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebResourceRequest.java index 9732ca67ae0f..7a195a1518af 100644 --- a/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebResourceRequest.java +++ b/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebResourceRequest.java @@ -1,72 +1,16 @@ -/* - * Copyright (C) 2014 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Generated automatically from android.webkit.WebResourceRequest for testing purposes + package android.webkit; import android.net.Uri; import java.util.Map; -/** - * Encompasses parameters to the {@link WebViewClient#shouldInterceptRequest} - * method. - */ -public interface WebResourceRequest { - /** - * Gets the URL for which the resource request was made. - * - * @return the URL for which the resource request was made. - */ +public interface WebResourceRequest +{ + Map getRequestHeaders(); + String getMethod(); Uri getUrl(); - - /** - * Gets whether the request was made for the main frame. - * - * @return whether the request was made for the main frame. Will be - * {@code false} for iframes, for example. - */ + boolean hasGesture(); boolean isForMainFrame(); - - /** - * Gets whether the request was a result of a server-side redirect. - * - * @return whether the request was a result of a server-side redirect. - */ boolean isRedirect(); - - /** - * Gets whether a gesture (such as a click) was associated with the request. For - * security reasons in certain situations this method may return {@code false} - * even though the sequence of events which caused the request to be created was - * initiated by a user gesture. - * - * @return whether a gesture was associated with the request. - */ - boolean hasGesture(); - - /** - * Gets the method associated with the request, for example "GET". - * - * @return the method associated with the request. - */ - String getMethod(); - - /** - * Gets the headers associated with the request. These are represented as a - * mapping of header name to header value. - * - * @return the headers associated with the request. - */ - Map getRequestHeaders(); -} \ No newline at end of file +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebResourceResponse.java b/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebResourceResponse.java index 1a2ff3cc1da9..9e0e02256449 100644 --- a/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebResourceResponse.java +++ b/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebResourceResponse.java @@ -1,173 +1,24 @@ -/* - * Copyright (C) 2010 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Generated automatically from android.webkit.WebResourceResponse for testing purposes + package android.webkit; import java.io.InputStream; import java.util.Map; -/** - * Encapsulates a resource response. Applications can return an instance of this - * class from {@link WebViewClient#shouldInterceptRequest} to provide a custom - * response when the WebView requests a particular resource. - */ -public class WebResourceResponse { - /** - * Constructs a resource response with the given MIME type, encoding, and input - * stream. Callers must implement {@link InputStream#read(byte[]) - * InputStream.read(byte[])} for the input stream. - * - * @param mimeType the resource response's MIME type, for example text/html - * @param encoding the resource response's encoding - * @param data the input stream that provides the resource response's data. - * Must not be a StringBufferInputStream. - */ - public WebResourceResponse(String mimeType, String encoding, InputStream data) { - } - - /** - * Constructs a resource response with the given parameters. Callers must - * implement {@link InputStream#read(byte[]) InputStream.read(byte[])} for the - * input stream. - * - * @param mimeType the resource response's MIME type, for example - * text/html - * @param encoding the resource response's encoding - * @param statusCode the status code needs to be in the ranges [100, 299], - * [400, 599]. Causing a redirect by specifying a 3xx - * code is not supported. - * @param reasonPhrase the phrase describing the status code, for example - * "OK". Must be non-empty. - * @param responseHeaders the resource response's headers represented as a - * mapping of header name -> header value. - * @param data the input stream that provides the resource response's - * data. Must not be a StringBufferInputStream. - */ - public WebResourceResponse(String mimeType, String encoding, int statusCode, String reasonPhrase, - Map responseHeaders, InputStream data) { - } - - /** - * Sets the resource response's MIME type, for example "text/html". - * - * @param mimeType The resource response's MIME type - */ - public void setMimeType(String mimeType) { - } - - /** - * Gets the resource response's MIME type. - * - * @return The resource response's MIME type - */ - public String getMimeType() { - return null; - } - - /** - * Sets the resource response's encoding, for example "UTF-8". This is - * used to decode the data from the input stream. - * - * @param encoding The resource response's encoding - */ - public void setEncoding(String encoding) { - } - - /** - * Gets the resource response's encoding. - * - * @return The resource response's encoding - */ - public String getEncoding() { - return null; - } - - /** - * Sets the resource response's status code and reason phrase. - * - * @param statusCode the status code needs to be in the ranges [100, 299], - * [400, 599]. Causing a redirect by specifying a 3xx code - * is not supported. - * @param reasonPhrase the phrase describing the status code, for example "OK". - * Must be non-empty. - */ - public void setStatusCodeAndReasonPhrase(int statusCode, String reasonPhrase) { - } - - /** - * Gets the resource response's status code. - * - * @return The resource response's status code. - */ - public int getStatusCode() { - return -1; - } - - /** - * Gets the description of the resource response's status code. - * - * @return The description of the resource response's status code. - */ - public String getReasonPhrase() { - return null; - } - - /** - * Sets the headers for the resource response. - * - * @param headers Mapping of header name -> header value. - */ - public void setResponseHeaders(Map headers) { - } - - /** - * Gets the headers for the resource response. - * - * @return The headers for the resource response. - */ - public Map getResponseHeaders() { - return null; - } - - /** - * Sets the input stream that provides the resource response's data. Callers - * must implement {@link InputStream#read(byte[]) InputStream.read(byte[])}. - * - * @param data the input stream that provides the resource response's data. Must - * not be a StringBufferInputStream. - */ - public void setData(InputStream data) { - } - - /** - * Gets the input stream that provides the resource response's data. - * - * @return The input stream that provides the resource response's data - */ - public InputStream getData() { - return null; - } - - /** - * The internal version of the constructor that doesn't perform arguments - * checks. - * - * @hide - */ - public WebResourceResponse(boolean immutable, String mimeType, String encoding, int statusCode, String reasonPhrase, - Map responseHeaders, InputStream data) { - } - -} \ No newline at end of file +public class WebResourceResponse +{ + protected WebResourceResponse() {} + public InputStream getData(){ return null; } + public Map getResponseHeaders(){ return null; } + public String getEncoding(){ return null; } + public String getMimeType(){ return null; } + public String getReasonPhrase(){ return null; } + public WebResourceResponse(String p0, String p1, InputStream p2){} + public WebResourceResponse(String p0, String p1, int p2, String p3, Map p4, InputStream p5){} + public int getStatusCode(){ return 0; } + public void setData(InputStream p0){} + public void setEncoding(String p0){} + public void setMimeType(String p0){} + public void setResponseHeaders(Map p0){} + public void setStatusCodeAndReasonPhrase(int p0, String p1){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebSettings.java b/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebSettings.java index 33c9a1b8a571..60d01fe2b972 100644 --- a/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebSettings.java +++ b/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebSettings.java @@ -1,1379 +1,150 @@ -/* - * Copyright (C) 2007 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Generated automatically from android.webkit.WebSettings for testing purposes + package android.webkit; -import java.net.CookieManager; import android.content.Context; -/** - * Manages settings state for a WebView. When a WebView is first created, it - * obtains a set of default settings. These default settings will be returned - * from any getter call. A {@code WebSettings} object obtained from - * {@link WebView#getSettings()} is tied to the life of the WebView. If a - * WebView has been destroyed, any method call on {@code WebSettings} will throw - * an {@link IllegalStateException}. - */ -// This is an abstract base class: concrete WebViewProviders must -// create a class derived from this, and return an instance of it in the -// WebViewProvider.getWebSettingsProvider() method implementation. -public abstract class WebSettings { - /** - * Enum for controlling the layout of html. - *
      - *
    • {@code NORMAL} means no rendering changes. This is the recommended choice - * for maximum compatibility across different platforms and Android - * versions.
    • - *
    • {@code SINGLE_COLUMN} moves all content into one column that is the width - * of the view.
    • - *
    • {@code NARROW_COLUMNS} makes all columns no wider than the screen if - * possible. Only use this for API levels prior to - * {@link android.os.Build.VERSION_CODES#KITKAT}.
    • - *
    • {@code TEXT_AUTOSIZING} boosts font size of paragraphs based on - * heuristics to make the text readable when viewing a wide-viewport layout in - * the overview mode. It is recommended to enable zoom support - * {@link #setSupportZoom} when using this mode. Supported from API level - * {@link android.os.Build.VERSION_CODES#KITKAT}
    • - *
    - */ - // XXX: These must match LayoutAlgorithm in Settings.h in WebCore. - public enum LayoutAlgorithm { - NORMAL, - /** - * @deprecated This algorithm is now obsolete. - */ - @Deprecated - SINGLE_COLUMN, - /** - * @deprecated This algorithm is now obsolete. - */ - @Deprecated - NARROW_COLUMNS, TEXT_AUTOSIZING - } - - /** - * Enum for specifying the text size. - *
      - *
    • SMALLEST is 50%
    • - *
    • SMALLER is 75%
    • - *
    • NORMAL is 100%
    • - *
    • LARGER is 150%
    • - *
    • LARGEST is 200%
    • - *
    - * - * @deprecated Use {@link WebSettings#setTextZoom(int)} and - * {@link WebSettings#getTextZoom()} instead. - */ - @Deprecated - public enum TextSize { - SMALLEST(50), SMALLER(75), NORMAL(100), LARGER(150), LARGEST(200); - - TextSize(int size) { - value = size; - } - - int value; - } - - /** - * Enum for specifying the WebView's desired density. - *
      - *
    • {@code FAR} makes 100% looking like in 240dpi
    • - *
    • {@code MEDIUM} makes 100% looking like in 160dpi
    • - *
    • {@code CLOSE} makes 100% looking like in 120dpi
    • - *
    - */ - public enum ZoomDensity { - FAR(150), // 240dpi - MEDIUM(100), // 160dpi - CLOSE(75); // 120dpi - - ZoomDensity(int size) { - value = size; - } - - /** - * @hide Only for use by WebViewProvider implementations - */ - public int getValue() { - return value; - } - - int value; - } - - public @interface CacheMode { - } - - /** - * Default cache usage mode. If the navigation type doesn't impose any specific - * behavior, use cached resources when they are available and not expired, - * otherwise load resources from the network. Use with {@link #setCacheMode}. - */ - public static final int LOAD_DEFAULT = -1; - /** - * Normal cache usage mode. Use with {@link #setCacheMode}. - * - * @deprecated This value is obsolete, as from API level - * {@link android.os.Build.VERSION_CODES#HONEYCOMB} and onwards it - * has the same effect as {@link #LOAD_DEFAULT}. - */ - @Deprecated - public static final int LOAD_NORMAL = 0; - /** - * Use cached resources when they are available, even if they have expired. - * Otherwise load resources from the network. Use with {@link #setCacheMode}. - */ - public static final int LOAD_CACHE_ELSE_NETWORK = 1; - /** - * Don't use the cache, load from the network. Use with {@link #setCacheMode}. - */ - public static final int LOAD_NO_CACHE = 2; - /** - * Don't use the network, load from the cache. Use with {@link #setCacheMode}. - */ - public static final int LOAD_CACHE_ONLY = 3; - - public enum RenderPriority { - NORMAL, HIGH, LOW - } - - /** - * The plugin state effects how plugins are treated on a page. ON means that any - * object will be loaded even if a plugin does not exist to handle the content. - * ON_DEMAND means that if there is a plugin installed that can handle the - * content, a placeholder is shown until the user clicks on the placeholder. - * Once clicked, the plugin will be enabled on the page. OFF means that all - * plugins will be turned off and any fallback content will be used. - */ - public enum PluginState { - ON, ON_DEMAND, OFF - } - - /** - * Used with {@link #setMixedContentMode} - * - * In this mode, the WebView will allow a secure origin to load content from any - * other origin, even if that origin is insecure. This is the least secure mode - * of operation for the WebView, and where possible apps should not set this - * mode. - */ - public static final int MIXED_CONTENT_ALWAYS_ALLOW = 0; - /** - * Used with {@link #setMixedContentMode} - * - * In this mode, the WebView will not allow a secure origin to load content from - * an insecure origin. This is the preferred and most secure mode of operation - * for the WebView and apps are strongly advised to use this mode. - */ - public static final int MIXED_CONTENT_NEVER_ALLOW = 1; - /** - * Used with {@link #setMixedContentMode} - * - * In this mode, the WebView will attempt to be compatible with the approach of - * a modern web browser with regard to mixed content. Some insecure content may - * be allowed to be loaded by a secure origin and other types of content will be - * blocked. The types of content are allowed or blocked may change release to - * release and are not explicitly defined. - * - * This mode is intended to be used by apps that are not in control of the - * content that they render but desire to operate in a reasonably secure - * environment. For highest security, apps are recommended to use - * {@link #MIXED_CONTENT_NEVER_ALLOW}. - */ - public static final int MIXED_CONTENT_COMPATIBILITY_MODE = 2; - - /** - * Enables dumping the pages navigation cache to a text file. The default is - * {@code false}. - * - * @deprecated This method is now obsolete. - * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} - */ - @Deprecated - public abstract void setNavDump(boolean enabled); - - /** - * Gets whether dumping the navigation cache is enabled. - * - * @return whether dumping the navigation cache is enabled - * @see #setNavDump - * @deprecated This method is now obsolete. - * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} - */ - @Deprecated - public abstract boolean getNavDump(); - - /** - * Sets whether the WebView should support zooming using its on-screen zoom - * controls and gestures. The particular zoom mechanisms that should be used can - * be set with {@link #setBuiltInZoomControls}. This setting does not affect - * zooming performed using the {@link WebView#zoomIn()} and - * {@link WebView#zoomOut()} methods. The default is {@code true}. - * - * @param support whether the WebView should support zoom - */ - public abstract void setSupportZoom(boolean support); - - /** - * Gets whether the WebView supports zoom. - * - * @return {@code true} if the WebView supports zoom - * @see #setSupportZoom - */ - public abstract boolean supportZoom(); - - /** - * Sets whether the WebView requires a user gesture to play media. The default - * is {@code true}. - * - * @param require whether the WebView requires a user gesture to play media - */ - public abstract void setMediaPlaybackRequiresUserGesture(boolean require); - - /** - * Gets whether the WebView requires a user gesture to play media. - * - * @return {@code true} if the WebView requires a user gesture to play media - * @see #setMediaPlaybackRequiresUserGesture - */ - public abstract boolean getMediaPlaybackRequiresUserGesture(); - - /** - * Sets whether the WebView should use its built-in zoom mechanisms. The - * built-in zoom mechanisms comprise on-screen zoom controls, which are - * displayed over the WebView's content, and the use of a pinch gesture to - * control zooming. Whether or not these on-screen controls are displayed can be - * set with {@link #setDisplayZoomControls}. The default is {@code false}. - *

    - * The built-in mechanisms are the only currently supported zoom mechanisms, so - * it is recommended that this setting is always enabled. - * - * @param enabled whether the WebView should use its built-in zoom mechanisms - */ - // This method was intended to select between the built-in zoom mechanisms - // and the separate zoom controls. The latter were obtained using - // {@link WebView#getZoomControls}, which is now hidden. - public abstract void setBuiltInZoomControls(boolean enabled); - - /** - * Gets whether the zoom mechanisms built into WebView are being used. - * - * @return {@code true} if the zoom mechanisms built into WebView are being used - * @see #setBuiltInZoomControls - */ +abstract public class WebSettings +{ + public WebSettings(){} + public WebSettings.TextSize getTextSize(){ return null; } + public abstract String getCursiveFontFamily(); + public abstract String getDatabasePath(); + public abstract String getDefaultTextEncodingName(); + public abstract String getFantasyFontFamily(); + public abstract String getFixedFontFamily(); + public abstract String getSansSerifFontFamily(); + public abstract String getSerifFontFamily(); + public abstract String getStandardFontFamily(); + public abstract String getUserAgentString(); + public abstract WebSettings.LayoutAlgorithm getLayoutAlgorithm(); + public abstract WebSettings.PluginState getPluginState(); + public abstract WebSettings.ZoomDensity getDefaultZoom(); + public abstract boolean enableSmoothTransition(); + public abstract boolean getAllowContentAccess(); + public abstract boolean getAllowFileAccess(); + public abstract boolean getAllowFileAccessFromFileURLs(); + public abstract boolean getAllowUniversalAccessFromFileURLs(); + public abstract boolean getBlockNetworkImage(); + public abstract boolean getBlockNetworkLoads(); public abstract boolean getBuiltInZoomControls(); - - /** - * Sets whether the WebView should display on-screen zoom controls when using - * the built-in zoom mechanisms. See {@link #setBuiltInZoomControls}. The - * default is {@code true}. - * - * @param enabled whether the WebView should display on-screen zoom controls - */ - public abstract void setDisplayZoomControls(boolean enabled); - - /** - * Gets whether the WebView displays on-screen zoom controls when using the - * built-in zoom mechanisms. - * - * @return {@code true} if the WebView displays on-screen zoom controls when - * using the built-in zoom mechanisms - * @see #setDisplayZoomControls - */ + public abstract boolean getDatabaseEnabled(); public abstract boolean getDisplayZoomControls(); - - /** - * Enables or disables file access within WebView. File access is enabled by - * default. Note that this enables or disables file system access only. Assets - * and resources are still accessible using file:///android_asset and - * file:///android_res. - */ - public abstract void setAllowFileAccess(boolean allow); - - /** - * Gets whether this WebView supports file access. - * - * @see #setAllowFileAccess - */ - public abstract boolean getAllowFileAccess(); - - /** - * Enables or disables content URL access within WebView. Content URL access - * allows WebView to load content from a content provider installed in the - * system. The default is enabled. - */ - public abstract void setAllowContentAccess(boolean allow); - - /** - * Gets whether this WebView supports content URL access. - * - * @see #setAllowContentAccess - */ - public abstract boolean getAllowContentAccess(); - - /** - * Sets whether the WebView loads pages in overview mode, that is, zooms out the - * content to fit on screen by width. This setting is taken into account when - * the content width is greater than the width of the WebView control, for - * example, when {@link #getUseWideViewPort} is enabled. The default is - * {@code false}. - */ - public abstract void setLoadWithOverviewMode(boolean overview); - - /** - * Gets whether this WebView loads pages in overview mode. - * - * @return whether this WebView loads pages in overview mode - * @see #setLoadWithOverviewMode - */ + public abstract boolean getDomStorageEnabled(); + public abstract boolean getJavaScriptCanOpenWindowsAutomatically(); + public abstract boolean getJavaScriptEnabled(); + public abstract boolean getLightTouchEnabled(); public abstract boolean getLoadWithOverviewMode(); - - /** - * Sets whether the WebView will enable smooth transition while panning or - * zooming or while the window hosting the WebView does not have focus. If it is - * {@code true}, WebView will choose a solution to maximize the performance. - * e.g. the WebView's content may not be updated during the transition. If it is - * false, WebView will keep its fidelity. The default value is {@code false}. - * - * @deprecated This method is now obsolete, and will become a no-op in future. - */ - @Deprecated - public abstract void setEnableSmoothTransition(boolean enable); - - /** - * Gets whether the WebView enables smooth transition while panning or zooming. - * - * @see #setEnableSmoothTransition - * - * @deprecated This method is now obsolete, and will become a no-op in future. - */ - @Deprecated - public abstract boolean enableSmoothTransition(); - - /** - * Sets whether the WebView uses its background for over scroll background. If - * {@code true}, it will use the WebView's background. If {@code false}, it will - * use an internal pattern. Default is {@code true}. - * - * @deprecated This method is now obsolete. - * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} - */ - @Deprecated - public abstract void setUseWebViewBackgroundForOverscrollBackground(boolean view); - - /** - * Gets whether this WebView uses WebView's background instead of internal - * pattern for over scroll background. - * - * @see #setUseWebViewBackgroundForOverscrollBackground - * @deprecated This method is now obsolete. - * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} - */ - @Deprecated - public abstract boolean getUseWebViewBackgroundForOverscrollBackground(); - - /** - * Sets whether the WebView should save form data. In Android O, the platform - * has implemented a fully functional Autofill feature to store form data. - * Therefore, the Webview form data save feature is disabled. - * - * Note that the feature will continue to be supported on older versions of - * Android as before. - * - * This function does not have any effect. - */ - @Deprecated - public abstract void setSaveFormData(boolean save); - - /** - * Gets whether the WebView saves form data. - * - * @return whether the WebView saves form data - * @see #setSaveFormData - */ - @Deprecated + public abstract boolean getLoadsImagesAutomatically(); + public abstract boolean getMediaPlaybackRequiresUserGesture(); + public abstract boolean getOffscreenPreRaster(); + public abstract boolean getSafeBrowsingEnabled(); public abstract boolean getSaveFormData(); - - /** - * Sets whether the WebView should save passwords. The default is {@code true}. - * - * @deprecated Saving passwords in WebView will not be supported in future - * versions. - */ - @Deprecated - public abstract void setSavePassword(boolean save); - - /** - * Gets whether the WebView saves passwords. - * - * @return whether the WebView saves passwords - * @see #setSavePassword - * @deprecated Saving passwords in WebView will not be supported in future - * versions. - */ - @Deprecated public abstract boolean getSavePassword(); - - /** - * Sets the text zoom of the page in percent. The default is 100. - * - * @param textZoom the text zoom in percent - */ - public abstract void setTextZoom(int textZoom); - - /** - * Gets the text zoom of the page in percent. - * - * @return the text zoom of the page in percent - * @see #setTextZoom - */ - public abstract int getTextZoom(); - - /** - * Sets policy for third party cookies. Developers should access this via - * {@link CookieManager#setShouldAcceptThirdPartyCookies}. - * - * @hide Internal API. - */ - public abstract void setAcceptThirdPartyCookies(boolean accept); - - /** - * Gets policy for third party cookies. Developers should access this via - * {@link CookieManager#getShouldAcceptThirdPartyCookies}. - * - * @hide Internal API - */ - public abstract boolean getAcceptThirdPartyCookies(); - - /** - * Sets the text size of the page. The default is {@link TextSize#NORMAL}. - * - * @param t the text size as a {@link TextSize} value - * @deprecated Use {@link #setTextZoom} instead. - */ - @Deprecated - public synchronized void setTextSize(TextSize t) { - setTextZoom(t.value); - } - - /** - * Gets the text size of the page. If the text size was previously specified in - * percent using {@link #setTextZoom}, this will return the closest matching - * {@link TextSize}. - * - * @return the text size as a {@link TextSize} value - * @see #setTextSize - * @deprecated Use {@link #getTextZoom} instead. - */ - @Deprecated - public synchronized TextSize getTextSize() { - return null; - } - - /** - * Sets the default zoom density of the page. This must be called from the UI - * thread. The default is {@link ZoomDensity#MEDIUM}. - * - * This setting is not recommended for use in new applications. If the WebView - * is utilized to display mobile-oriented pages, the desired effect can be - * achieved by adjusting 'width' and 'initial-scale' attributes of page's 'meta - * viewport' tag. For pages lacking the tag, - * {@link android.webkit.WebView#setInitialScale} and - * {@link #setUseWideViewPort} can be used. - * - * @param zoom the zoom density - * @deprecated This method is no longer supported, see the function - * documentation for recommended alternatives. - */ - @Deprecated - public abstract void setDefaultZoom(ZoomDensity zoom); - - /** - * Gets the default zoom density of the page. This should be called from the UI - * thread. - * - * This setting is not recommended for use in new applications. - * - * @return the zoom density - * @see #setDefaultZoom - * @deprecated Will only return the default value. - */ - @Deprecated - public abstract ZoomDensity getDefaultZoom(); - - /** - * Enables using light touches to make a selection and activate mouseovers. - * - * @deprecated From {@link android.os.Build.VERSION_CODES#JELLY_BEAN} this - * setting is obsolete and has no effect. - */ - @Deprecated - public abstract void setLightTouchEnabled(boolean enabled); - - /** - * Gets whether light touches are enabled. - * - * @see #setLightTouchEnabled - * @deprecated This setting is obsolete. - */ - @Deprecated - public abstract boolean getLightTouchEnabled(); - - /** - * Controlled a rendering optimization that is no longer present. Setting it now - * has no effect. - * - * @deprecated This setting now has no effect. - * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} - */ - @Deprecated - public void setUseDoubleTree(boolean use) { - // Specified to do nothing, so no need for derived classes to override. - } - - /** - * Controlled a rendering optimization that is no longer present. Setting it now - * has no effect. - * - * @deprecated This setting now has no effect. - * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} - */ - @Deprecated - public boolean getUseDoubleTree() { - // Returns false unconditionally, so no need for derived classes to override. - return false; - } - - /** - * Sets the user-agent string using an integer code. - *

      - *
    • 0 means the WebView should use an Android user-agent string
    • - *
    • 1 means the WebView should use a desktop user-agent string
    • - *
    - * Other values are ignored. The default is an Android user-agent string, i.e. - * code value 0. - * - * @param ua the integer code for the user-agent string - * @deprecated Please use {@link #setUserAgentString} instead. - * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} - */ - @Deprecated - public abstract void setUserAgent(int ua); - - /** - * Gets the user-agent as an integer code. - *
      - *
    • -1 means the WebView is using a custom user-agent string set with - * {@link #setUserAgentString}
    • - *
    • 0 means the WebView should use an Android user-agent string
    • - *
    • 1 means the WebView should use a desktop user-agent string
    • - *
    - * - * @return the integer code for the user-agent string - * @see #setUserAgent - * @deprecated Please use {@link #getUserAgentString} instead. - * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} - */ - @Deprecated - public abstract int getUserAgent(); - - /** - * Sets whether the WebView should enable support for the "viewport" - * HTML meta tag or should use a wide viewport. When the value of the setting is - * {@code false}, the layout width is always set to the width of the WebView - * control in device-independent (CSS) pixels. When the value is {@code true} - * and the page contains the viewport meta tag, the value of the width specified - * in the tag is used. If the page does not contain the tag or does not provide - * a width, then a wide viewport will be used. - * - * @param use whether to enable support for the viewport meta tag - */ - public abstract void setUseWideViewPort(boolean use); - - /** - * Gets whether the WebView supports the "viewport" HTML meta tag or - * will use a wide viewport. - * - * @return {@code true} if the WebView supports the viewport meta tag - * @see #setUseWideViewPort - */ public abstract boolean getUseWideViewPort(); - - /** - * Sets whether the WebView whether supports multiple windows. If set to true, - * {@link WebChromeClient#onCreateWindow} must be implemented by the host - * application. The default is {@code false}. - * - * @param support whether to support multiple windows - */ - public abstract void setSupportMultipleWindows(boolean support); - - /** - * Gets whether the WebView supports multiple windows. - * - * @return {@code true} if the WebView supports multiple windows - * @see #setSupportMultipleWindows - */ public abstract boolean supportMultipleWindows(); - - /** - * Sets the underlying layout algorithm. This will cause a re-layout of the - * WebView. The default is {@link LayoutAlgorithm#NARROW_COLUMNS}. - * - * @param l the layout algorithm to use, as a {@link LayoutAlgorithm} value - */ - public abstract void setLayoutAlgorithm(LayoutAlgorithm l); - - /** - * Gets the current layout algorithm. - * - * @return the layout algorithm in use, as a {@link LayoutAlgorithm} value - * @see #setLayoutAlgorithm - */ - public abstract LayoutAlgorithm getLayoutAlgorithm(); - - /** - * Sets the standard font family name. The default is "sans-serif". - * - * @param font a font family name - */ - public abstract void setStandardFontFamily(String font); - - /** - * Gets the standard font family name. - * - * @return the standard font family name as a string - * @see #setStandardFontFamily - */ - public abstract String getStandardFontFamily(); - - /** - * Sets the fixed font family name. The default is "monospace". - * - * @param font a font family name - */ - public abstract void setFixedFontFamily(String font); - - /** - * Gets the fixed font family name. - * - * @return the fixed font family name as a string - * @see #setFixedFontFamily - */ - public abstract String getFixedFontFamily(); - - /** - * Sets the sans-serif font family name. The default is "sans-serif". - * - * @param font a font family name - */ - public abstract void setSansSerifFontFamily(String font); - - /** - * Gets the sans-serif font family name. - * - * @return the sans-serif font family name as a string - * @see #setSansSerifFontFamily - */ - public abstract String getSansSerifFontFamily(); - - /** - * Sets the serif font family name. The default is "sans-serif". - * - * @param font a font family name - */ - public abstract void setSerifFontFamily(String font); - - /** - * Gets the serif font family name. The default is "serif". - * - * @return the serif font family name as a string - * @see #setSerifFontFamily - */ - public abstract String getSerifFontFamily(); - - /** - * Sets the cursive font family name. The default is "cursive". - * - * @param font a font family name - */ - public abstract void setCursiveFontFamily(String font); - - /** - * Gets the cursive font family name. - * - * @return the cursive font family name as a string - * @see #setCursiveFontFamily - */ - public abstract String getCursiveFontFamily(); - - /** - * Sets the fantasy font family name. The default is "fantasy". - * - * @param font a font family name - */ - public abstract void setFantasyFontFamily(String font); - - /** - * Gets the fantasy font family name. - * - * @return the fantasy font family name as a string - * @see #setFantasyFontFamily - */ - public abstract String getFantasyFontFamily(); - - /** - * Sets the minimum font size. The default is 8. - * - * @param size a non-negative integer between 1 and 72. Any number outside the - * specified range will be pinned. - */ - public abstract void setMinimumFontSize(int size); - - /** - * Gets the minimum font size. - * - * @return a non-negative integer between 1 and 72 - * @see #setMinimumFontSize - */ + public abstract boolean supportZoom(); + public abstract int getCacheMode(); + public abstract int getDefaultFixedFontSize(); + public abstract int getDefaultFontSize(); + public abstract int getDisabledActionModeMenuItems(); public abstract int getMinimumFontSize(); - - /** - * Sets the minimum logical font size. The default is 8. - * - * @param size a non-negative integer between 1 and 72. Any number outside the - * specified range will be pinned. - */ - public abstract void setMinimumLogicalFontSize(int size); - - /** - * Gets the minimum logical font size. - * - * @return a non-negative integer between 1 and 72 - * @see #setMinimumLogicalFontSize - */ public abstract int getMinimumLogicalFontSize(); - - /** - * Sets the default font size. The default is 16. - * - * @param size a non-negative integer between 1 and 72. Any number outside the - * specified range will be pinned. - */ - public abstract void setDefaultFontSize(int size); - - /** - * Gets the default font size. - * - * @return a non-negative integer between 1 and 72 - * @see #setDefaultFontSize - */ - public abstract int getDefaultFontSize(); - - /** - * Sets the default fixed font size. The default is 16. - * - * @param size a non-negative integer between 1 and 72. Any number outside the - * specified range will be pinned. - */ - public abstract void setDefaultFixedFontSize(int size); - - /** - * Gets the default fixed font size. - * - * @return a non-negative integer between 1 and 72 - * @see #setDefaultFixedFontSize - */ - public abstract int getDefaultFixedFontSize(); - - /** - * Sets whether the WebView should load image resources. Note that this method - * controls loading of all images, including those embedded using the data URI - * scheme. Use {@link #setBlockNetworkImage} to control loading only of images - * specified using network URI schemes. Note that if the value of this setting - * is changed from {@code false} to {@code true}, all images resources - * referenced by content currently displayed by the WebView are loaded - * automatically. The default is {@code true}. - * - * @param flag whether the WebView should load image resources - */ - public abstract void setLoadsImagesAutomatically(boolean flag); - - /** - * Gets whether the WebView loads image resources. This includes images embedded - * using the data URI scheme. - * - * @return {@code true} if the WebView loads image resources - * @see #setLoadsImagesAutomatically - */ - public abstract boolean getLoadsImagesAutomatically(); - - /** - * Sets whether the WebView should not load image resources from the network - * (resources accessed via http and https URI schemes). Note that this method - * has no effect unless {@link #getLoadsImagesAutomatically} returns - * {@code true}. Also note that disabling all network loads using - * {@link #setBlockNetworkLoads} will also prevent network images from loading, - * even if this flag is set to false. When the value of this setting is changed - * from {@code true} to {@code false}, network images resources referenced by - * content currently displayed by the WebView are fetched automatically. The - * default is {@code false}. - * - * @param flag whether the WebView should not load image resources from the - * network - * @see #setBlockNetworkLoads - */ - public abstract void setBlockNetworkImage(boolean flag); - - /** - * Gets whether the WebView does not load image resources from the network. - * - * @return {@code true} if the WebView does not load image resources from the - * network - * @see #setBlockNetworkImage - */ - public abstract boolean getBlockNetworkImage(); - - /** - * Sets whether the WebView should not load resources from the network. Use - * {@link #setBlockNetworkImage} to only avoid loading image resources. Note - * that if the value of this setting is changed from {@code true} to - * {@code false}, network resources referenced by content currently displayed by - * the WebView are not fetched until {@link android.webkit.WebView#reload} is - * called. If the application does not have the - * {@link android.Manifest.permission#INTERNET} permission, attempts to set a - * value of {@code false} will cause a {@link java.lang.SecurityException} to be - * thrown. The default value is {@code false} if the application has the - * {@link android.Manifest.permission#INTERNET} permission, otherwise it is - * {@code true}. - * - * @param flag {@code true} means block network loads by the WebView - * @see android.webkit.WebView#reload - */ - public abstract void setBlockNetworkLoads(boolean flag); - - /** - * Gets whether the WebView does not load any resources from the network. - * - * @return {@code true} if the WebView does not load any resources from the - * network - * @see #setBlockNetworkLoads - */ - public abstract boolean getBlockNetworkLoads(); - - /** - * Tells the WebView to enable JavaScript execution. The default is - * {@code false}. - * - * @param flag {@code true} if the WebView should execute JavaScript - */ - public abstract void setJavaScriptEnabled(boolean flag); - - /** - * Sets whether JavaScript running in the context of a file scheme URL should be - * allowed to access content from any origin. This includes access to content - * from other file scheme URLs. See {@link #setAllowFileAccessFromFileURLs}. To - * enable the most restrictive, and therefore secure policy, this setting should - * be disabled. Note that this setting affects only JavaScript access to file - * scheme resources. Other access to such resources, for example, from image - * HTML elements, is unaffected. To prevent possible violation of same domain - * policy when targeting - * {@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH_MR1} and earlier, - * you should explicitly set this value to {@code false}. - *

    - * The default value is {@code true} for apps targeting - * {@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH_MR1} and below, and - * {@code false} when targeting - * {@link android.os.Build.VERSION_CODES#JELLY_BEAN} and above. - * - * @param flag whether JavaScript running in the context of a file scheme URL - * should be allowed to access content from any origin - */ - public abstract void setAllowUniversalAccessFromFileURLs(boolean flag); - - /** - * Sets whether JavaScript running in the context of a file scheme URL should be - * allowed to access content from other file scheme URLs. To enable the most - * restrictive, and therefore secure, policy this setting should be disabled. - * Note that the value of this setting is ignored if the value of - * {@link #getAllowUniversalAccessFromFileURLs} is {@code true}. Note too, that - * this setting affects only JavaScript access to file scheme resources. Other - * access to such resources, for example, from image HTML elements, is - * unaffected. To prevent possible violation of same domain policy when - * targeting {@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH_MR1} and - * earlier, you should explicitly set this value to {@code false}. - *

    - * The default value is {@code true} for apps targeting - * {@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH_MR1} and below, and - * {@code false} when targeting - * {@link android.os.Build.VERSION_CODES#JELLY_BEAN} and above. - * - * @param flag whether JavaScript running in the context of a file scheme URL - * should be allowed to access content from other file scheme URLs - */ - public abstract void setAllowFileAccessFromFileURLs(boolean flag); - - /** - * Sets whether the WebView should enable plugins. The default is {@code false}. - * - * @param flag {@code true} if plugins should be enabled - * @deprecated This method has been deprecated in favor of - * {@link #setPluginState} - * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2} - */ - @Deprecated - public abstract void setPluginsEnabled(boolean flag); - - /** - * Tells the WebView to enable, disable, or have plugins on demand. On demand - * mode means that if a plugin exists that can handle the embedded content, a - * placeholder icon will be shown instead of the plugin. When the placeholder is - * clicked, the plugin will be enabled. The default is {@link PluginState#OFF}. - * - * @param state a PluginState value - * @deprecated Plugins will not be supported in future, and should not be used. - */ - @Deprecated - public abstract void setPluginState(PluginState state); - - /** - * Sets a custom path to plugins used by the WebView. This method is obsolete - * since each plugin is now loaded from its own package. - * - * @param pluginsPath a String path to the directory containing plugins - * @deprecated This method is no longer used as plugins are loaded from their - * own APK via the system's package manager. - * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2} - */ - @Deprecated - public void setPluginsPath(String pluginsPath) { - // Specified to do nothing, so no need for derived classes to override. + public abstract int getMixedContentMode(); + public abstract int getTextZoom(); + public abstract void setAllowContentAccess(boolean p0); + public abstract void setAllowFileAccess(boolean p0); + public abstract void setAllowFileAccessFromFileURLs(boolean p0); + public abstract void setAllowUniversalAccessFromFileURLs(boolean p0); + public abstract void setAppCacheEnabled(boolean p0); + public abstract void setAppCacheMaxSize(long p0); + public abstract void setAppCachePath(String p0); + public abstract void setBlockNetworkImage(boolean p0); + public abstract void setBlockNetworkLoads(boolean p0); + public abstract void setBuiltInZoomControls(boolean p0); + public abstract void setCacheMode(int p0); + public abstract void setCursiveFontFamily(String p0); + public abstract void setDatabaseEnabled(boolean p0); + public abstract void setDatabasePath(String p0); + public abstract void setDefaultFixedFontSize(int p0); + public abstract void setDefaultFontSize(int p0); + public abstract void setDefaultTextEncodingName(String p0); + public abstract void setDefaultZoom(WebSettings.ZoomDensity p0); + public abstract void setDisabledActionModeMenuItems(int p0); + public abstract void setDisplayZoomControls(boolean p0); + public abstract void setDomStorageEnabled(boolean p0); + public abstract void setEnableSmoothTransition(boolean p0); + public abstract void setFantasyFontFamily(String p0); + public abstract void setFixedFontFamily(String p0); + public abstract void setGeolocationDatabasePath(String p0); + public abstract void setGeolocationEnabled(boolean p0); + public abstract void setJavaScriptCanOpenWindowsAutomatically(boolean p0); + public abstract void setJavaScriptEnabled(boolean p0); + public abstract void setLayoutAlgorithm(WebSettings.LayoutAlgorithm p0); + public abstract void setLightTouchEnabled(boolean p0); + public abstract void setLoadWithOverviewMode(boolean p0); + public abstract void setLoadsImagesAutomatically(boolean p0); + public abstract void setMediaPlaybackRequiresUserGesture(boolean p0); + public abstract void setMinimumFontSize(int p0); + public abstract void setMinimumLogicalFontSize(int p0); + public abstract void setMixedContentMode(int p0); + public abstract void setNeedInitialFocus(boolean p0); + public abstract void setOffscreenPreRaster(boolean p0); + public abstract void setPluginState(WebSettings.PluginState p0); + public abstract void setRenderPriority(WebSettings.RenderPriority p0); + public abstract void setSafeBrowsingEnabled(boolean p0); + public abstract void setSansSerifFontFamily(String p0); + public abstract void setSaveFormData(boolean p0); + public abstract void setSavePassword(boolean p0); + public abstract void setSerifFontFamily(String p0); + public abstract void setStandardFontFamily(String p0); + public abstract void setSupportMultipleWindows(boolean p0); + public abstract void setSupportZoom(boolean p0); + public abstract void setTextZoom(int p0); + public abstract void setUseWideViewPort(boolean p0); + public abstract void setUserAgentString(String p0); + public int getForceDark(){ return 0; } + public static String getDefaultUserAgent(Context p0){ return null; } + public static int FORCE_DARK_AUTO = 0; + public static int FORCE_DARK_OFF = 0; + public static int FORCE_DARK_ON = 0; + public static int LOAD_CACHE_ELSE_NETWORK = 0; + public static int LOAD_CACHE_ONLY = 0; + public static int LOAD_DEFAULT = 0; + public static int LOAD_NORMAL = 0; + public static int LOAD_NO_CACHE = 0; + public static int MENU_ITEM_NONE = 0; + public static int MENU_ITEM_PROCESS_TEXT = 0; + public static int MENU_ITEM_SHARE = 0; + public static int MENU_ITEM_WEB_SEARCH = 0; + public static int MIXED_CONTENT_ALWAYS_ALLOW = 0; + public static int MIXED_CONTENT_COMPATIBILITY_MODE = 0; + public static int MIXED_CONTENT_NEVER_ALLOW = 0; + public void setForceDark(int p0){} + public void setTextSize(WebSettings.TextSize p0){} + static public enum LayoutAlgorithm + { + NARROW_COLUMNS, NORMAL, SINGLE_COLUMN, TEXT_AUTOSIZING; + private LayoutAlgorithm() {} } - - /** - * Sets the path to where database storage API databases should be saved. In - * order for the database storage API to function correctly, this method must be - * called with a path to which the application can write. This method should - * only be called once: repeated calls are ignored. - * - * @param databasePath a path to the directory where databases should be saved. - * @deprecated Database paths are managed by the implementation and calling this - * method will have no effect. - */ - @Deprecated - public abstract void setDatabasePath(String databasePath); - - /** - * Sets the path where the Geolocation databases should be saved. In order for - * Geolocation permissions and cached positions to be persisted, this method - * must be called with a path to which the application can write. - * - * @param databasePath a path to the directory where databases should be saved. - * @deprecated Geolocation database are managed by the implementation and - * calling this method will have no effect. - */ - @Deprecated - public abstract void setGeolocationDatabasePath(String databasePath); - - /** - * Sets whether the Application Caches API should be enabled. The default is - * {@code false}. Note that in order for the Application Caches API to be - * enabled, a valid database path must also be supplied to - * {@link #setAppCachePath}. - * - * @param flag {@code true} if the WebView should enable Application Caches - */ - public abstract void setAppCacheEnabled(boolean flag); - - /** - * Sets the path to the Application Caches files. In order for the Application - * Caches API to be enabled, this method must be called with a path to which the - * application can write. This method should only be called once: repeated calls - * are ignored. - * - * @param appCachePath a String path to the directory containing Application - * Caches files. - * @see #setAppCacheEnabled - */ - public abstract void setAppCachePath(String appCachePath); - - /** - * Sets the maximum size for the Application Cache content. The passed size will - * be rounded to the nearest value that the database can support, so this should - * be viewed as a guide, not a hard limit. Setting the size to a value less than - * current database size does not cause the database to be trimmed. The default - * size is {@link Long#MAX_VALUE}. It is recommended to leave the maximum size - * set to the default value. - * - * @param appCacheMaxSize the maximum size in bytes - * @deprecated In future quota will be managed automatically. - */ - @Deprecated - public abstract void setAppCacheMaxSize(long appCacheMaxSize); - - /** - * Sets whether the database storage API is enabled. The default value is false. - * See also {@link #setDatabasePath} for how to correctly set up the database - * storage API. - * - * This setting is global in effect, across all WebView instances in a process. - * Note you should only modify this setting prior to making any WebView - * page load within a given process, as the WebView implementation may ignore - * changes to this setting after that point. - * - * @param flag {@code true} if the WebView should use the database storage API - */ - public abstract void setDatabaseEnabled(boolean flag); - - /** - * Sets whether the DOM storage API is enabled. The default value is - * {@code false}. - * - * @param flag {@code true} if the WebView should use the DOM storage API - */ - public abstract void setDomStorageEnabled(boolean flag); - - /** - * Gets whether the DOM Storage APIs are enabled. - * - * @return {@code true} if the DOM Storage APIs are enabled - * @see #setDomStorageEnabled - */ - public abstract boolean getDomStorageEnabled(); - - /** - * Gets the path to where database storage API databases are saved. - * - * @return the String path to the database storage API databases - * @see #setDatabasePath - * @deprecated Database paths are managed by the implementation this method is - * obsolete. - */ - @Deprecated - public abstract String getDatabasePath(); - - /** - * Gets whether the database storage API is enabled. - * - * @return {@code true} if the database storage API is enabled - * @see #setDatabaseEnabled - */ - public abstract boolean getDatabaseEnabled(); - - /** - * Sets whether Geolocation is enabled. The default is {@code true}. - *

    - * Please note that in order for the Geolocation API to be usable by a page in - * the WebView, the following requirements must be met: - *

      - *
    • an application must have permission to access the device location, see - * {@link android.Manifest.permission#ACCESS_COARSE_LOCATION}, - * {@link android.Manifest.permission#ACCESS_FINE_LOCATION}; - *
    • an application must provide an implementation of the - * {@link WebChromeClient#onGeolocationPermissionsShowPrompt} callback to - * receive notifications that a page is requesting access to location via the - * JavaScript Geolocation API. - *
    - *

    - * - * @param flag whether Geolocation should be enabled - */ - public abstract void setGeolocationEnabled(boolean flag); - - /** - * Gets whether JavaScript is enabled. - * - * @return {@code true} if JavaScript is enabled - * @see #setJavaScriptEnabled - */ - public abstract boolean getJavaScriptEnabled(); - - /** - * Gets whether JavaScript running in the context of a file scheme URL can - * access content from any origin. This includes access to content from other - * file scheme URLs. - * - * @return whether JavaScript running in the context of a file scheme URL can - * access content from any origin - * @see #setAllowUniversalAccessFromFileURLs - */ - public abstract boolean getAllowUniversalAccessFromFileURLs(); - - /** - * Gets whether JavaScript running in the context of a file scheme URL can - * access content from other file scheme URLs. - * - * @return whether JavaScript running in the context of a file scheme URL can - * access content from other file scheme URLs - * @see #setAllowFileAccessFromFileURLs - */ - public abstract boolean getAllowFileAccessFromFileURLs(); - - /** - * Gets whether plugins are enabled. - * - * @return {@code true} if plugins are enabled - * @see #setPluginsEnabled - * @deprecated This method has been replaced by {@link #getPluginState} - * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2} - */ - @Deprecated - public abstract boolean getPluginsEnabled(); - - /** - * Gets the current state regarding whether plugins are enabled. - * - * @return the plugin state as a {@link PluginState} value - * @see #setPluginState - * @deprecated Plugins will not be supported in future, and should not be used. - */ - @Deprecated - public abstract PluginState getPluginState(); - - /** - * Gets the directory that contains the plugin libraries. This method is - * obsolete since each plugin is now loaded from its own package. - * - * @return an empty string - * @deprecated This method is no longer used as plugins are loaded from their - * own APK via the system's package manager. - * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2} - */ - @Deprecated - public String getPluginsPath() { - // Unconditionally returns empty string, so no need for derived classes to - // override. - return ""; + static public enum PluginState + { + OFF, ON, ON_DEMAND; + private PluginState() {} } - - /** - * Tells JavaScript to open windows automatically. This applies to the - * JavaScript function {@code window.open()}. The default is {@code false}. - * - * @param flag {@code true} if JavaScript can open windows automatically - */ - public abstract void setJavaScriptCanOpenWindowsAutomatically(boolean flag); - - /** - * Gets whether JavaScript can open windows automatically. - * - * @return {@code true} if JavaScript can open windows automatically during - * {@code window.open()} - * @see #setJavaScriptCanOpenWindowsAutomatically - */ - public abstract boolean getJavaScriptCanOpenWindowsAutomatically(); - - /** - * Sets the default text encoding name to use when decoding html pages. The - * default is "UTF-8". - * - * @param encoding the text encoding name - */ - public abstract void setDefaultTextEncodingName(String encoding); - - /** - * Gets the default text encoding name. - * - * @return the default text encoding name as a string - * @see #setDefaultTextEncodingName - */ - public abstract String getDefaultTextEncodingName(); - - /** - * Sets the WebView's user-agent string. If the string is {@code null} or empty, - * the system default value will be used. - * - * Note that starting from {@link android.os.Build.VERSION_CODES#KITKAT} Android - * version, changing the user-agent while loading a web page causes WebView to - * initiate loading once again. - * - * @param ua new user-agent string - */ - public abstract void setUserAgentString(String ua); - - /** - * Gets the WebView's user-agent string. - * - * @return the WebView's user-agent string - * @see #setUserAgentString - */ - public abstract String getUserAgentString(); - - /** - * Returns the default User-Agent used by a WebView. An instance of WebView - * could use a different User-Agent if a call is made to - * {@link WebSettings#setUserAgentString(String)}. - * - * @param context a Context object used to access application assets - */ - public static String getDefaultUserAgent(Context context) { - return null; + static public enum RenderPriority + { + HIGH, LOW, NORMAL; + private RenderPriority() {} + } + static public enum TextSize + { + LARGER, LARGEST, NORMAL, SMALLER, SMALLEST; + private TextSize() {} + } + static public enum ZoomDensity + { + CLOSE, FAR, MEDIUM; + private ZoomDensity() {} } - - /** - * Tells the WebView whether it needs to set a node to have focus when - * {@link WebView#requestFocus(int, android.graphics.Rect)} is called. The - * default value is {@code true}. - * - * @param flag whether the WebView needs to set a node - */ - public abstract void setNeedInitialFocus(boolean flag); - - /** - * Sets the priority of the Render thread. Unlike the other settings, this one - * only needs to be called once per process. The default value is - * {@link RenderPriority#NORMAL}. - * - * @param priority the priority - * @deprecated It is not recommended to adjust thread priorities, and this will - * not be supported in future versions. - */ - @Deprecated - public abstract void setRenderPriority(RenderPriority priority); - - /** - * Overrides the way the cache is used. The way the cache is used is based on - * the navigation type. For a normal page load, the cache is checked and content - * is re-validated as needed. When navigating back, content is not revalidated, - * instead the content is just retrieved from the cache. This method allows the - * client to override this behavior by specifying one of {@link #LOAD_DEFAULT}, - * {@link #LOAD_CACHE_ELSE_NETWORK}, {@link #LOAD_NO_CACHE} or - * {@link #LOAD_CACHE_ONLY}. The default value is {@link #LOAD_DEFAULT}. - * - * @param mode the mode to use - */ - public abstract void setCacheMode(@CacheMode int mode); - - /** - * Gets the current setting for overriding the cache mode. - * - * @return the current setting for overriding the cache mode - * @see #setCacheMode - */ - public abstract int getCacheMode(); - - /** - * Configures the WebView's behavior when a secure origin attempts to load a - * resource from an insecure origin. - * - * By default, apps that target {@link android.os.Build.VERSION_CODES#KITKAT} or - * below default to {@link #MIXED_CONTENT_ALWAYS_ALLOW}. Apps targeting - * {@link android.os.Build.VERSION_CODES#LOLLIPOP} default to - * {@link #MIXED_CONTENT_NEVER_ALLOW}. - * - * The preferred and most secure mode of operation for the WebView is - * {@link #MIXED_CONTENT_NEVER_ALLOW} and use of - * {@link #MIXED_CONTENT_ALWAYS_ALLOW} is strongly discouraged. - * - * @param mode The mixed content mode to use. One of - * {@link #MIXED_CONTENT_NEVER_ALLOW}, - * {@link #MIXED_CONTENT_ALWAYS_ALLOW} or - * {@link #MIXED_CONTENT_COMPATIBILITY_MODE}. - */ - public abstract void setMixedContentMode(int mode); - - /** - * Gets the current behavior of the WebView with regard to loading insecure - * content from a secure origin. - * - * @return The current setting, one of {@link #MIXED_CONTENT_NEVER_ALLOW}, - * {@link #MIXED_CONTENT_ALWAYS_ALLOW} or - * {@link #MIXED_CONTENT_COMPATIBILITY_MODE}. - */ - public abstract int getMixedContentMode(); - - /** - * Sets whether to use a video overlay for embedded encrypted video. In API - * levels prior to {@link android.os.Build.VERSION_CODES#LOLLIPOP}, encrypted - * video can only be rendered directly on a secure video surface, so it had been - * a hard problem to play encrypted video in HTML. When this flag is on, WebView - * can play encrypted video (MSE/EME) by using a video overlay (aka - * hole-punching) for videos embedded using HTML <video> tag.
    - * Caution: This setting is intended for use only in a narrow set of - * circumstances and apps should only enable it if they require playback of - * encrypted video content. It will impose the following limitations on the - * WebView: - *

      - *
    • Only one video overlay can be played at a time. - *
    • Changes made to position or dimensions of a video element may be - * propagated to the corresponding video overlay with a noticeable delay. - *
    • The video overlay is not visible to web APIs and as such may not interact - * with script or styling. For example, CSS styles applied to the <video> - * tag may be ignored. - *
    - * This is not an exhaustive set of constraints and it may vary with new - * versions of the WebView. - * - * @hide - */ - public abstract void setVideoOverlayForEmbeddedEncryptedVideoEnabled(boolean flag); - - /** - * Gets whether a video overlay will be used for embedded encrypted video. - * - * @return {@code true} if WebView uses a video overlay for embedded encrypted - * video. - * @see #setVideoOverlayForEmbeddedEncryptedVideoEnabled - * @hide - */ - public abstract boolean getVideoOverlayForEmbeddedEncryptedVideoEnabled(); - - /** - * Sets whether this WebView should raster tiles when it is offscreen but - * attached to a window. Turning this on can avoid rendering artifacts when - * animating an offscreen WebView on-screen. Offscreen WebViews in this mode use - * more memory. The default value is false.
    - * Please follow these guidelines to limit memory usage: - *
      - *
    • WebView size should be not be larger than the device screen size. - *
    • Limit use of this mode to a small number of WebViews. Use it for visible - * WebViews and WebViews about to be animated to visible. - *
    - */ - public abstract void setOffscreenPreRaster(boolean enabled); - - /** - * Gets whether this WebView should raster tiles when it is offscreen but - * attached to a window. - * - * @return {@code true} if this WebView will raster tiles when it is offscreen - * but attached to a window. - */ - public abstract boolean getOffscreenPreRaster(); - - /** - * Sets whether Safe Browsing is enabled. Safe Browsing allows WebView to - * protect against malware and phishing attacks by verifying the links. - * - *

    - * Safe Browsing can be disabled for all WebViews using a manifest tag (read - * general Safe - * Browsing info). The manifest tag has a lower precedence than this API. - * - *

    - * Safe Browsing is enabled by default for devices which support it. - * - * @param enabled Whether Safe Browsing is enabled. - */ - public abstract void setSafeBrowsingEnabled(boolean enabled); - - /** - * Gets whether Safe Browsing is enabled. See {@link #setSafeBrowsingEnabled}. - * - * @return {@code true} if Safe Browsing is enabled and {@code false} otherwise. - */ - public abstract boolean getSafeBrowsingEnabled(); } diff --git a/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebStorage.java b/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebStorage.java new file mode 100644 index 000000000000..c63a282b454d --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebStorage.java @@ -0,0 +1,21 @@ +// Generated automatically from android.webkit.WebStorage for testing purposes + +package android.webkit; + +import android.webkit.ValueCallback; +import java.util.Map; + +public class WebStorage +{ + public static WebStorage getInstance(){ return null; } + public void deleteAllData(){} + public void deleteOrigin(String p0){} + public void getOrigins(ValueCallback p0){} + public void getQuotaForOrigin(String p0, ValueCallback p1){} + public void getUsageForOrigin(String p0, ValueCallback p1){} + public void setQuotaForOrigin(String p0, long p1){} + static public interface QuotaUpdater + { + void updateQuota(long p0); + } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebView.java b/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebView.java index 3065a9df966a..b654cc05f617 100644 --- a/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebView.java +++ b/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebView.java @@ -1,151 +1,259 @@ -/* - * Copyright (C) 2008 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ +// Generated automatically from android.webkit.WebView for testing purposes package android.webkit; import android.content.Context; +import android.content.pm.PackageInfo; +import android.content.res.Configuration; +import android.graphics.Bitmap; +import android.graphics.Canvas; +import android.graphics.Paint; +import android.graphics.Picture; +import android.graphics.Rect; +import android.net.Uri; +import android.net.http.SslCertificate; +import android.os.Bundle; +import android.os.Handler; +import android.os.Looper; +import android.os.Message; +import android.print.PrintDocumentAdapter; +import android.util.AttributeSet; +import android.util.LongSparseArray; +import android.util.SparseArray; +import android.view.DragEvent; +import android.view.KeyEvent; +import android.view.MotionEvent; import android.view.View; - -public class WebView extends View { - - public WebView(Context context) { - super(context); - } - - public void setHorizontalScrollbarOverlay(boolean overlay) {} - - public void setVerticalScrollbarOverlay(boolean overlay) {} - - public boolean overlayHorizontalScrollbar() { - return false; - } - - public boolean overlayVerticalScrollbar() { - return false; +import android.view.ViewGroup; +import android.view.ViewStructure; +import android.view.ViewTreeObserver; +import android.view.WindowInsets; +import android.view.accessibility.AccessibilityNodeProvider; +import android.view.autofill.AutofillId; +import android.view.autofill.AutofillValue; +import android.view.inputmethod.EditorInfo; +import android.view.inputmethod.InputConnection; +import android.view.textclassifier.TextClassifier; +import android.view.translation.TranslationCapability; +import android.view.translation.ViewTranslationRequest; +import android.view.translation.ViewTranslationResponse; +import android.webkit.DownloadListener; +import android.webkit.ValueCallback; +import android.webkit.WebBackForwardList; +import android.webkit.WebChromeClient; +import android.webkit.WebMessage; +import android.webkit.WebMessagePort; +import android.webkit.WebSettings; +import android.webkit.WebViewClient; +import android.webkit.WebViewRenderProcess; +import android.webkit.WebViewRenderProcessClient; +import android.widget.AbsoluteLayout; +import java.util.List; +import java.util.Map; +import java.util.concurrent.Executor; +import java.util.function.Consumer; + +public class WebView extends AbsoluteLayout implements ViewGroup.OnHierarchyChangeListener, ViewTreeObserver.OnGlobalFocusChangeListener +{ + protected WebView() {} + abstract static public class VisualStateCallback + { + public VisualStateCallback(){} + public abstract void onComplete(long p0); } - - public void savePassword(String host, String username, String password) {} - - public void setHttpAuthUsernamePassword(String host, String realm, String username, - String password) {} - - public String[] getHttpAuthUsernamePassword(String host, String realm) { - return null; + protected int computeHorizontalScrollOffset(){ return 0; } + protected int computeHorizontalScrollRange(){ return 0; } + protected int computeVerticalScrollExtent(){ return 0; } + protected int computeVerticalScrollOffset(){ return 0; } + protected int computeVerticalScrollRange(){ return 0; } + protected void dispatchDraw(Canvas p0){} + protected void onAttachedToWindow(){} + protected void onConfigurationChanged(Configuration p0){} + protected void onDraw(Canvas p0){} + protected void onFocusChanged(boolean p0, int p1, Rect p2){} + protected void onMeasure(int p0, int p1){} + protected void onOverScrolled(int p0, int p1, boolean p2, boolean p3){} + protected void onScrollChanged(int p0, int p1, int p2, int p3){} + protected void onSizeChanged(int p0, int p1, int p2, int p3){} + protected void onVisibilityChanged(View p0, int p1){} + protected void onWindowVisibilityChanged(int p0){} + public AccessibilityNodeProvider getAccessibilityNodeProvider(){ return null; } + public Bitmap getFavicon(){ return null; } + public CharSequence getAccessibilityClassName(){ return null; } + public Handler getHandler(){ return null; } + public InputConnection onCreateInputConnection(EditorInfo p0){ return null; } + public Looper getWebViewLooper(){ return null; } + public Picture capturePicture(){ return null; } + public PrintDocumentAdapter createPrintDocumentAdapter(){ return null; } + public PrintDocumentAdapter createPrintDocumentAdapter(String p0){ return null; } + public SslCertificate getCertificate(){ return null; } + public String getOriginalUrl(){ return null; } + public String getTitle(){ return null; } + public String getUrl(){ return null; } + public String[] getHttpAuthUsernamePassword(String p0, String p1){ return null; } + public TextClassifier getTextClassifier(){ return null; } + public View findFocus(){ return null; } + public WebBackForwardList copyBackForwardList(){ return null; } + public WebBackForwardList restoreState(Bundle p0){ return null; } + public WebBackForwardList saveState(Bundle p0){ return null; } + public WebChromeClient getWebChromeClient(){ return null; } + public WebMessagePort[] createWebMessageChannel(){ return null; } + public WebSettings getSettings(){ return null; } + public WebView(Context p0){} + public WebView(Context p0, AttributeSet p1){} + public WebView(Context p0, AttributeSet p1, int p2){} + public WebView(Context p0, AttributeSet p1, int p2, boolean p3){} + public WebView(Context p0, AttributeSet p1, int p2, int p3){} + public WebView.HitTestResult getHitTestResult(){ return null; } + public WebViewClient getWebViewClient(){ return null; } + public WebViewRenderProcess getWebViewRenderProcess(){ return null; } + public WebViewRenderProcessClient getWebViewRenderProcessClient(){ return null; } + public WindowInsets onApplyWindowInsets(WindowInsets p0){ return null; } + public boolean canGoBack(){ return false; } + public boolean canGoBackOrForward(int p0){ return false; } + public boolean canGoForward(){ return false; } + public boolean canZoomIn(){ return false; } + public boolean canZoomOut(){ return false; } + public boolean dispatchKeyEvent(KeyEvent p0){ return false; } + public boolean getRendererPriorityWaivedWhenNotVisible(){ return false; } + public boolean isPrivateBrowsingEnabled(){ return false; } + public boolean isVisibleToUserForAutofill(int p0){ return false; } + public boolean onCheckIsTextEditor(){ return false; } + public boolean onDragEvent(DragEvent p0){ return false; } + public boolean onGenericMotionEvent(MotionEvent p0){ return false; } + public boolean onHoverEvent(MotionEvent p0){ return false; } + public boolean onKeyDown(int p0, KeyEvent p1){ return false; } + public boolean onKeyMultiple(int p0, int p1, KeyEvent p2){ return false; } + public boolean onKeyUp(int p0, KeyEvent p1){ return false; } + public boolean onTouchEvent(MotionEvent p0){ return false; } + public boolean onTrackballEvent(MotionEvent p0){ return false; } + public boolean overlayHorizontalScrollbar(){ return false; } + public boolean overlayVerticalScrollbar(){ return false; } + public boolean pageDown(boolean p0){ return false; } + public boolean pageUp(boolean p0){ return false; } + public boolean performLongClick(){ return false; } + public boolean requestChildRectangleOnScreen(View p0, Rect p1, boolean p2){ return false; } + public boolean requestFocus(int p0, Rect p1){ return false; } + public boolean shouldDelayChildPressedState(){ return false; } + public boolean showFindDialog(String p0, boolean p1){ return false; } + public boolean zoomIn(){ return false; } + public boolean zoomOut(){ return false; } + public float getScale(){ return 0; } + public int findAll(String p0){ return 0; } + public int getContentHeight(){ return 0; } + public int getProgress(){ return 0; } + public int getRendererRequestedPriority(){ return 0; } + public static ClassLoader getWebViewClassLoader(){ return null; } + public static PackageInfo getCurrentWebViewPackage(){ return null; } + public static String SCHEME_GEO = null; + public static String SCHEME_MAILTO = null; + public static String SCHEME_TEL = null; + public static String findAddress(String p0){ return null; } + public static Uri getSafeBrowsingPrivacyPolicyUrl(){ return null; } + public static int RENDERER_PRIORITY_BOUND = 0; + public static int RENDERER_PRIORITY_IMPORTANT = 0; + public static int RENDERER_PRIORITY_WAIVED = 0; + public static void clearClientCertPreferences(Runnable p0){} + public static void disableWebView(){} + public static void enableSlowWholeDocumentDraw(){} + public static void setDataDirectorySuffix(String p0){} + public static void setSafeBrowsingWhitelist(List p0, ValueCallback p1){} + public static void setWebContentsDebuggingEnabled(boolean p0){} + public static void startSafeBrowsing(Context p0, ValueCallback p1){} + public void addJavascriptInterface(Object p0, String p1){} + public void autofill(SparseArray p0){} + public void clearCache(boolean p0){} + public void clearFormData(){} + public void clearHistory(){} + public void clearMatches(){} + public void clearSslPreferences(){} + public void clearView(){} + public void computeScroll(){} + public void destroy(){} + public void dispatchCreateViewTranslationRequest(Map p0, int[] p1, TranslationCapability p2, List p3){} + public void documentHasImages(Message p0){} + public void evaluateJavascript(String p0, ValueCallback p1){} + public void findAllAsync(String p0){} + public void findNext(boolean p0){} + public void flingScroll(int p0, int p1){} + public void freeMemory(){} + public void goBack(){} + public void goBackOrForward(int p0){} + public void goForward(){} + public void invokeZoomPicker(){} + public void loadData(String p0, String p1, String p2){} + public void loadDataWithBaseURL(String p0, String p1, String p2, String p3, String p4){} + public void loadUrl(String p0){} + public void loadUrl(String p0, Map p1){} + public void onChildViewAdded(View p0, View p1){} + public void onChildViewRemoved(View p0, View p1){} + public void onCreateVirtualViewTranslationRequests(long[] p0, int[] p1, Consumer p2){} + public void onFinishTemporaryDetach(){} + public void onGlobalFocusChanged(View p0, View p1){} + public void onPause(){} + public void onProvideAutofillVirtualStructure(ViewStructure p0, int p1){} + public void onProvideContentCaptureStructure(ViewStructure p0, int p1){} + public void onProvideVirtualStructure(ViewStructure p0){} + public void onResume(){} + public void onStartTemporaryDetach(){} + public void onVirtualViewTranslationResponses(LongSparseArray p0){} + public void onWindowFocusChanged(boolean p0){} + public void pauseTimers(){} + public void postUrl(String p0, byte[] p1){} + public void postVisualStateCallback(long p0, WebView.VisualStateCallback p1){} + public void postWebMessage(WebMessage p0, Uri p1){} + public void reload(){} + public void removeJavascriptInterface(String p0){} + public void requestFocusNodeHref(Message p0){} + public void requestImageRef(Message p0){} + public void resumeTimers(){} + public void savePassword(String p0, String p1, String p2){} + public void saveWebArchive(String p0){} + public void saveWebArchive(String p0, boolean p1, ValueCallback p2){} + public void setBackgroundColor(int p0){} + public void setCertificate(SslCertificate p0){} + public void setDownloadListener(DownloadListener p0){} + public void setFindListener(WebView.FindListener p0){} + public void setHorizontalScrollbarOverlay(boolean p0){} + public void setHttpAuthUsernamePassword(String p0, String p1, String p2, String p3){} + public void setInitialScale(int p0){} + public void setLayerType(int p0, Paint p1){} + public void setLayoutParams(ViewGroup.LayoutParams p0){} + public void setMapTrackballToArrowKeys(boolean p0){} + public void setNetworkAvailable(boolean p0){} + public void setOverScrollMode(int p0){} + public void setPictureListener(WebView.PictureListener p0){} + public void setRendererPriorityPolicy(int p0, boolean p1){} + public void setScrollBarStyle(int p0){} + public void setTextClassifier(TextClassifier p0){} + public void setVerticalScrollbarOverlay(boolean p0){} + public void setWebChromeClient(WebChromeClient p0){} + public void setWebViewClient(WebViewClient p0){} + public void setWebViewRenderProcessClient(Executor p0, WebViewRenderProcessClient p1){} + public void setWebViewRenderProcessClient(WebViewRenderProcessClient p0){} + public void stopLoading(){} + public void zoomBy(float p0){} + static public class HitTestResult + { + public String getExtra(){ return null; } + public int getType(){ return 0; } + public static int ANCHOR_TYPE = 0; + public static int EDIT_TEXT_TYPE = 0; + public static int EMAIL_TYPE = 0; + public static int GEO_TYPE = 0; + public static int IMAGE_ANCHOR_TYPE = 0; + public static int IMAGE_TYPE = 0; + public static int PHONE_TYPE = 0; + public static int SRC_ANCHOR_TYPE = 0; + public static int SRC_IMAGE_ANCHOR_TYPE = 0; + public static int UNKNOWN_TYPE = 0; } - - public void destroy() {} - - public static void enablePlatformNotifications() {} - - public static void disablePlatformNotifications() {} - - public void loadUrl(String url) {} - - public void loadData(String data, String mimeType, String encoding) {} - - public void loadDataWithBaseURL(String baseUrl, String data, String mimeType, String encoding, - String failUrl) {} - - public void stopLoading() {} - - public void reload() {} - - public boolean canGoBack() { - return false; - } - - public void goBack() {} - - public boolean canGoForward() { - return false; - } - - public void goForward() {} - - public boolean canGoBackOrForward(int steps) { - return false; - } - - public void goBackOrForward(int steps) {} - - public boolean pageUp(boolean top) { - return false; - } - - public boolean pageDown(boolean bottom) { - return false; + static public interface FindListener + { + void onFindResultReceived(int p0, int p1, boolean p2); } - - public void clearView() {} - - public float getScale() { - return 0; - } - - public void setInitialScale(int scaleInPercent) {} - - public void invokeZoomPicker() {} - - public String getUrl() { - return null; - } - - public String getTitle() { - return null; - } - - public int getProgress() { - return 0; - } - - public int getContentHeight() { - return 0; - } - - public void pauseTimers() {} - - public void resumeTimers() {} - - public void clearCache() {} - - public void clearFormData() {} - - public void clearHistory() {} - - public void clearSslPreferences() {} - - public static String findAddress(String addr) { - return null; - } - - public void setWebViewClient(WebViewClient client) {} - - public void addJavascriptInterface(Object obj, String interfaceName) {} - - public View getZoomControls() { - return null; - } - - public boolean zoomIn() { - return false; - } - - public boolean zoomOut() { - return false; - } - - public WebSettings getSettings() { - return null; + static public interface PictureListener + { + void onNewPicture(WebView p0, Picture p1); } } diff --git a/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebViewClient.java b/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebViewClient.java index 03a98480210e..e63cf85c9c8f 100644 --- a/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebViewClient.java +++ b/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebViewClient.java @@ -1,231 +1,66 @@ -/* - * Copyright (C) 2008 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package android.webkit; - -public class WebViewClient { - /** - * Give the host application a chance to take over the control when a new url is - * about to be loaded in the current WebView. If WebViewClient is not provided, - * by default WebView will ask Activity Manager to choose the proper handler for - * the url. If WebViewClient is provided, return {@code true} means the host - * application handles the url, while return {@code false} means the current - * WebView handles the url. This method is not called for requests using the - * POST "method". - * - * @param view The WebView that is initiating the callback. - * @param url The url to be loaded. - * @return {@code true} if the host application wants to leave the current - * WebView and handle the url itself, otherwise return {@code false}. - * @deprecated Use {@link #shouldOverrideUrlLoading(WebView, WebResourceRequest) - * shouldOverrideUrlLoading(WebView, WebResourceRequest)} instead. - */ - @Deprecated - public boolean shouldOverrideUrlLoading(WebView view, String url) { - return false; - } - - /** - * Give the host application a chance to take over the control when a new url is - * about to be loaded in the current WebView. If WebViewClient is not provided, - * by default WebView will ask Activity Manager to choose the proper handler for - * the url. If WebViewClient is provided, return {@code true} means the host - * application handles the url, while return {@code false} means the current - * WebView handles the url. - * - *

    - * Notes: - *

      - *
    • This method is not called for requests using the POST - * "method".
    • - *
    • This method is also called for subframes with non-http schemes, thus it - * is strongly disadvised to unconditionally call - * {@link WebView#loadUrl(String)} with the request's url from inside the method - * and then return {@code true}, as this will make WebView to attempt loading a - * non-http url, and thus fail.
    • - *
    - * - * @param view The WebView that is initiating the callback. - * @param request Object containing the details of the request. - * @return {@code true} if the host application wants to leave the current - * WebView and handle the url itself, otherwise return {@code false}. - */ - public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) { - return false; - } - - /** - * Notify the host application that a page has finished loading. This method is - * called only for main frame. When onPageFinished() is called, the rendering - * picture may not be updated yet. To get the notification for the new Picture, - * use {@link WebView.PictureListener#onNewPicture}. - * - * @param view The WebView that is initiating the callback. - * @param url The url of the page. - */ - public void onPageFinished(WebView view, String url) { - } +// Generated automatically from android.webkit.WebViewClient for testing purposes - /** - * Notify the host application that the WebView will load the resource specified - * by the given url. - * - * @param view The WebView that is initiating the callback. - * @param url The url of the resource the WebView will load. - */ - public void onLoadResource(WebView view, String url) { - } - - /** - * Notify the host application that {@link android.webkit.WebView} content left - * over from previous page navigations will no longer be drawn. - * - *

    - * This callback can be used to determine the point at which it is safe to make - * a recycled {@link android.webkit.WebView} visible, ensuring that no stale - * content is shown. It is called at the earliest point at which it can be - * guaranteed that {@link WebView#onDraw} will no longer draw any content from - * previous navigations. The next draw will display either the - * {@link WebView#setBackgroundColor background color} of the {@link WebView}, - * or some of the contents of the newly loaded page. - * - *

    - * This method is called when the body of the HTTP response has started loading, - * is reflected in the DOM, and will be visible in subsequent draws. This - * callback occurs early in the document loading process, and as such you should - * expect that linked resources (for example, CSS and images) may not be - * available. - * - *

    - * For more fine-grained notification of visual state updates, see - * {@link WebView#postVisualStateCallback}. - * - *

    - * Please note that all the conditions and recommendations applicable to - * {@link WebView#postVisualStateCallback} also apply to this API. - * - *

    - * This callback is only called for main frame navigations. - * - * @param view The {@link android.webkit.WebView} for which the navigation - * occurred. - * @param url The URL corresponding to the page navigation that triggered this - * callback. - */ - public void onPageCommitVisible(WebView view, String url) { - } - - /** - * Notify the host application of a resource request and allow the application - * to return the data. If the return value is {@code null}, the WebView will - * continue to load the resource as usual. Otherwise, the return response and - * data will be used. - * - *

    - * This callback is invoked for a variety of URL schemes (e.g., - * {@code http(s):}, {@code - * data:}, {@code file:}, etc.), not only those schemes which send requests over - * the network. This is not called for {@code javascript:} URLs, {@code blob:} - * URLs, or for assets accessed via {@code file:///android_asset/} or - * {@code file:///android_res/} URLs. - * - *

    - * In the case of redirects, this is only called for the initial resource URL, - * not any subsequent redirect URLs. - * - *

    - * Note: This method is called on a thread other than the UI thread so - * clients should exercise caution when accessing private data or the view - * system. - * - *

    - * Note: When Safe Browsing is enabled, these URLs still undergo Safe - * Browsing checks. If this is undesired, whitelist the URL with - * {@link WebView#setSafeBrowsingWhitelist} or ignore the warning with - * {@link #onSafeBrowsingHit}. - * - * @param view The {@link android.webkit.WebView} that is requesting the - * resource. - * @param url The raw url of the resource. - * @return A {@link android.webkit.WebResourceResponse} containing the response - * information or {@code null} if the WebView should load the resource - * itself. - * @deprecated Use {@link #shouldInterceptRequest(WebView, WebResourceRequest) - * shouldInterceptRequest(WebView, WebResourceRequest)} instead. - */ - @Deprecated - public WebResourceResponse shouldInterceptRequest(WebView view, String url) { - return null; - } - - /** - * Notify the host application of a resource request and allow the application - * to return the data. If the return value is {@code null}, the WebView will - * continue to load the resource as usual. Otherwise, the return response and - * data will be used. - * - *

    - * This callback is invoked for a variety of URL schemes (e.g., - * {@code http(s):}, {@code - * data:}, {@code file:}, etc.), not only those schemes which send requests over - * the network. This is not called for {@code javascript:} URLs, {@code blob:} - * URLs, or for assets accessed via {@code file:///android_asset/} or - * {@code file:///android_res/} URLs. - * - *

    - * In the case of redirects, this is only called for the initial resource URL, - * not any subsequent redirect URLs. - * - *

    - * Note: This method is called on a thread other than the UI thread so - * clients should exercise caution when accessing private data or the view - * system. - * - *

    - * Note: When Safe Browsing is enabled, these URLs still undergo Safe - * Browsing checks. If this is undesired, whitelist the URL with - * {@link WebView#setSafeBrowsingWhitelist} or ignore the warning with - * {@link #onSafeBrowsingHit}. - * - * @param view The {@link android.webkit.WebView} that is requesting the - * resource. - * @param request Object containing the details of the request. - * @return A {@link android.webkit.WebResourceResponse} containing the response - * information or {@code null} if the WebView should load the resource - * itself. - */ - public WebResourceResponse shouldInterceptRequest(WebView view, WebResourceRequest request) { - return null; - } +package android.webkit; - /** - * Report an error to the host application. These errors are unrecoverable (i.e. - * the main resource is unavailable). The {@code errorCode} parameter - * corresponds to one of the {@code ERROR_*} constants. - * - * @param view The WebView that is initiating the callback. - * @param errorCode The error code corresponding to an ERROR_* value. - * @param description A String describing the error. - * @param failingUrl The url that failed to load. - * @deprecated Use - * {@link #onReceivedError(WebView, WebResourceRequest, WebResourceError) - * onReceivedError(WebView, WebResourceRequest, WebResourceError)} - * instead. - */ - @Deprecated - public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { - } +import android.graphics.Bitmap; +import android.net.http.SslError; +import android.os.Message; +import android.view.KeyEvent; +import android.webkit.ClientCertRequest; +import android.webkit.HttpAuthHandler; +import android.webkit.RenderProcessGoneDetail; +import android.webkit.SafeBrowsingResponse; +import android.webkit.SslErrorHandler; +import android.webkit.WebResourceError; +import android.webkit.WebResourceRequest; +import android.webkit.WebResourceResponse; +import android.webkit.WebView; +public class WebViewClient +{ + public WebResourceResponse shouldInterceptRequest(WebView p0, String p1){ return null; } + public WebResourceResponse shouldInterceptRequest(WebView p0, WebResourceRequest p1){ return null; } + public WebViewClient(){} + public boolean onRenderProcessGone(WebView p0, RenderProcessGoneDetail p1){ return false; } + public boolean shouldOverrideKeyEvent(WebView p0, KeyEvent p1){ return false; } + public boolean shouldOverrideUrlLoading(WebView p0, String p1){ return false; } + public boolean shouldOverrideUrlLoading(WebView p0, WebResourceRequest p1){ return false; } + public static int ERROR_AUTHENTICATION = 0; + public static int ERROR_BAD_URL = 0; + public static int ERROR_CONNECT = 0; + public static int ERROR_FAILED_SSL_HANDSHAKE = 0; + public static int ERROR_FILE = 0; + public static int ERROR_FILE_NOT_FOUND = 0; + public static int ERROR_HOST_LOOKUP = 0; + public static int ERROR_IO = 0; + public static int ERROR_PROXY_AUTHENTICATION = 0; + public static int ERROR_REDIRECT_LOOP = 0; + public static int ERROR_TIMEOUT = 0; + public static int ERROR_TOO_MANY_REQUESTS = 0; + public static int ERROR_UNKNOWN = 0; + public static int ERROR_UNSAFE_RESOURCE = 0; + public static int ERROR_UNSUPPORTED_AUTH_SCHEME = 0; + public static int ERROR_UNSUPPORTED_SCHEME = 0; + public static int SAFE_BROWSING_THREAT_BILLING = 0; + public static int SAFE_BROWSING_THREAT_MALWARE = 0; + public static int SAFE_BROWSING_THREAT_PHISHING = 0; + public static int SAFE_BROWSING_THREAT_UNKNOWN = 0; + public static int SAFE_BROWSING_THREAT_UNWANTED_SOFTWARE = 0; + public void doUpdateVisitedHistory(WebView p0, String p1, boolean p2){} + public void onFormResubmission(WebView p0, Message p1, Message p2){} + public void onLoadResource(WebView p0, String p1){} + public void onPageCommitVisible(WebView p0, String p1){} + public void onPageFinished(WebView p0, String p1){} + public void onPageStarted(WebView p0, String p1, Bitmap p2){} + public void onReceivedClientCertRequest(WebView p0, ClientCertRequest p1){} + public void onReceivedError(WebView p0, WebResourceRequest p1, WebResourceError p2){} + public void onReceivedError(WebView p0, int p1, String p2, String p3){} + public void onReceivedHttpAuthRequest(WebView p0, HttpAuthHandler p1, String p2, String p3){} + public void onReceivedHttpError(WebView p0, WebResourceRequest p1, WebResourceResponse p2){} + public void onReceivedLoginRequest(WebView p0, String p1, String p2, String p3){} + public void onReceivedSslError(WebView p0, SslErrorHandler p1, SslError p2){} + public void onSafeBrowsingHit(WebView p0, WebResourceRequest p1, int p2, SafeBrowsingResponse p3){} + public void onScaleChanged(WebView p0, float p1, float p2){} + public void onTooManyRedirects(WebView p0, Message p1, Message p2){} + public void onUnhandledKeyEvent(WebView p0, KeyEvent p1){} } diff --git a/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebViewRenderProcess.java b/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebViewRenderProcess.java new file mode 100644 index 000000000000..0c9d0d1385c8 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebViewRenderProcess.java @@ -0,0 +1,10 @@ +// Generated automatically from android.webkit.WebViewRenderProcess for testing purposes + +package android.webkit; + + +abstract public class WebViewRenderProcess +{ + public WebViewRenderProcess(){} + public abstract boolean terminate(); +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebViewRenderProcessClient.java b/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebViewRenderProcessClient.java new file mode 100644 index 000000000000..742a6ed14382 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/webkit/WebViewRenderProcessClient.java @@ -0,0 +1,13 @@ +// Generated automatically from android.webkit.WebViewRenderProcessClient for testing purposes + +package android.webkit; + +import android.webkit.WebView; +import android.webkit.WebViewRenderProcess; + +abstract public class WebViewRenderProcessClient +{ + public WebViewRenderProcessClient(){} + public abstract void onRenderProcessResponsive(WebView p0, WebViewRenderProcess p1); + public abstract void onRenderProcessUnresponsive(WebView p0, WebViewRenderProcess p1); +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/widget/AbsListView.java b/java/ql/test/stubs/google-android-9.0.0/android/widget/AbsListView.java new file mode 100644 index 000000000000..64da209cc564 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/widget/AbsListView.java @@ -0,0 +1,212 @@ +// Generated automatically from android.widget.AbsListView for testing purposes + +package android.widget; + +import android.content.Context; +import android.content.Intent; +import android.graphics.Canvas; +import android.graphics.Rect; +import android.graphics.drawable.Drawable; +import android.os.Parcelable; +import android.text.Editable; +import android.text.TextWatcher; +import android.util.AttributeSet; +import android.util.SparseBooleanArray; +import android.view.ActionMode; +import android.view.ContextMenu; +import android.view.KeyEvent; +import android.view.MotionEvent; +import android.view.PointerIcon; +import android.view.View; +import android.view.ViewGroup; +import android.view.ViewTreeObserver; +import android.view.accessibility.AccessibilityNodeInfo; +import android.view.inputmethod.EditorInfo; +import android.view.inputmethod.InputConnection; +import android.widget.Adapter; +import android.widget.AdapterView; +import android.widget.Filter; +import android.widget.ListAdapter; +import java.util.ArrayList; +import java.util.List; + +abstract public class AbsListView extends AdapterView implements Filter.FilterListener, TextWatcher, ViewTreeObserver.OnGlobalLayoutListener, ViewTreeObserver.OnTouchModeChangeListener +{ + protected AbsListView() {} + protected ContextMenu.ContextMenuInfo getContextMenuInfo(){ return null; } + protected ViewGroup.LayoutParams generateDefaultLayoutParams(){ return null; } + protected ViewGroup.LayoutParams generateLayoutParams(ViewGroup.LayoutParams p0){ return null; } + protected boolean checkLayoutParams(ViewGroup.LayoutParams p0){ return false; } + protected boolean isInFilterMode(){ return false; } + protected boolean isPaddingOffsetRequired(){ return false; } + protected float getBottomFadingEdgeStrength(){ return 0; } + protected float getTopFadingEdgeStrength(){ return 0; } + protected int computeVerticalScrollExtent(){ return 0; } + protected int computeVerticalScrollOffset(){ return 0; } + protected int computeVerticalScrollRange(){ return 0; } + protected int getBottomPaddingOffset(){ return 0; } + protected int getLeftPaddingOffset(){ return 0; } + protected int getRightPaddingOffset(){ return 0; } + protected int getTopPaddingOffset(){ return 0; } + protected void dispatchDraw(Canvas p0){} + protected void dispatchSetPressed(boolean p0){} + protected void drawableStateChanged(){} + protected void handleDataChanged(){} + protected void layoutChildren(){} + protected void onAttachedToWindow(){} + protected void onDetachedFromWindow(){} + protected void onDisplayHint(int p0){} + protected void onFocusChanged(boolean p0, int p1, Rect p2){} + protected void onLayout(boolean p0, int p1, int p2, int p3, int p4){} + protected void onMeasure(int p0, int p1){} + protected void onOverScrolled(int p0, int p1, boolean p2, boolean p3){} + protected void onSizeChanged(int p0, int p1, int p2, int p3){} + public AbsListView(Context p0){} + public AbsListView(Context p0, AttributeSet p1){} + public AbsListView(Context p0, AttributeSet p1, int p2){} + public AbsListView(Context p0, AttributeSet p1, int p2, int p3){} + public AbsListView.LayoutParams generateLayoutParams(AttributeSet p0){ return null; } + public CharSequence getAccessibilityClassName(){ return null; } + public CharSequence getTextFilter(){ return null; } + public Drawable getSelector(){ return null; } + public InputConnection onCreateInputConnection(EditorInfo p0){ return null; } + public Parcelable onSaveInstanceState(){ return null; } + public PointerIcon onResolvePointerIcon(MotionEvent p0, int p1){ return null; } + public SparseBooleanArray getCheckedItemPositions(){ return null; } + public View getSelectedView(){ return null; } + public boolean canScrollList(int p0){ return false; } + public boolean checkInputConnectionProxy(View p0){ return false; } + public boolean hasTextFilter(){ return false; } + public boolean isDrawSelectorOnTop(){ return false; } + public boolean isFastScrollAlwaysVisible(){ return false; } + public boolean isFastScrollEnabled(){ return false; } + public boolean isItemChecked(int p0){ return false; } + public boolean isScrollingCacheEnabled(){ return false; } + public boolean isSmoothScrollbarEnabled(){ return false; } + public boolean isStackFromBottom(){ return false; } + public boolean isTextFilterEnabled(){ return false; } + public boolean onGenericMotionEvent(MotionEvent p0){ return false; } + public boolean onInterceptHoverEvent(MotionEvent p0){ return false; } + public boolean onInterceptTouchEvent(MotionEvent p0){ return false; } + public boolean onKeyDown(int p0, KeyEvent p1){ return false; } + public boolean onKeyUp(int p0, KeyEvent p1){ return false; } + public boolean onNestedFling(View p0, float p1, float p2, boolean p3){ return false; } + public boolean onRemoteAdapterConnected(){ return false; } + public boolean onStartNestedScroll(View p0, View p1, int p2){ return false; } + public boolean onTouchEvent(MotionEvent p0){ return false; } + public boolean performItemClick(View p0, int p1, long p2){ return false; } + public boolean showContextMenu(){ return false; } + public boolean showContextMenu(float p0, float p1){ return false; } + public boolean showContextMenuForChild(View p0){ return false; } + public boolean showContextMenuForChild(View p0, float p1, float p2){ return false; } + public boolean verifyDrawable(Drawable p0){ return false; } + public int getBottomEdgeEffectColor(){ return 0; } + public int getCacheColorHint(){ return 0; } + public int getCheckedItemCount(){ return 0; } + public int getCheckedItemPosition(){ return 0; } + public int getChoiceMode(){ return 0; } + public int getListPaddingBottom(){ return 0; } + public int getListPaddingLeft(){ return 0; } + public int getListPaddingRight(){ return 0; } + public int getListPaddingTop(){ return 0; } + public int getSolidColor(){ return 0; } + public int getTopEdgeEffectColor(){ return 0; } + public int getTranscriptMode(){ return 0; } + public int getVerticalScrollbarWidth(){ return 0; } + public int pointToPosition(int p0, int p1){ return 0; } + public long pointToRowId(int p0, int p1){ return 0; } + public long[] getCheckedItemIds(){ return null; } + public static int CHOICE_MODE_MULTIPLE = 0; + public static int CHOICE_MODE_MULTIPLE_MODAL = 0; + public static int CHOICE_MODE_NONE = 0; + public static int CHOICE_MODE_SINGLE = 0; + public static int TRANSCRIPT_MODE_ALWAYS_SCROLL = 0; + public static int TRANSCRIPT_MODE_DISABLED = 0; + public static int TRANSCRIPT_MODE_NORMAL = 0; + public void addTouchables(ArrayList p0){} + public void afterTextChanged(Editable p0){} + public void beforeTextChanged(CharSequence p0, int p1, int p2, int p3){} + public void clearChoices(){} + public void clearTextFilter(){} + public void deferNotifyDataSetChanged(){} + public void dispatchDrawableHotspotChanged(float p0, float p1){} + public void draw(Canvas p0){} + public void fling(int p0){} + public void getFocusedRect(Rect p0){} + public void invalidateViews(){} + public void jumpDrawablesToCurrentState(){} + public void onCancelPendingInputEvents(){} + public void onFilterComplete(int p0){} + public void onGlobalLayout(){} + public void onInitializeAccessibilityNodeInfoForItem(View p0, int p1, AccessibilityNodeInfo p2){} + public void onNestedScroll(View p0, int p1, int p2, int p3, int p4){} + public void onNestedScrollAccepted(View p0, View p1, int p2){} + public void onRemoteAdapterDisconnected(){} + public void onRestoreInstanceState(Parcelable p0){} + public void onRtlPropertiesChanged(int p0){} + public void onTextChanged(CharSequence p0, int p1, int p2, int p3){} + public void onTouchModeChanged(boolean p0){} + public void onWindowFocusChanged(boolean p0){} + public void reclaimViews(List p0){} + public void requestDisallowInterceptTouchEvent(boolean p0){} + public void requestLayout(){} + public void scrollListBy(int p0){} + public void setAdapter(ListAdapter p0){} + public void setBottomEdgeEffectColor(int p0){} + public void setCacheColorHint(int p0){} + public void setChoiceMode(int p0){} + public void setDrawSelectorOnTop(boolean p0){} + public void setEdgeEffectColor(int p0){} + public void setFastScrollAlwaysVisible(boolean p0){} + public void setFastScrollEnabled(boolean p0){} + public void setFastScrollStyle(int p0){} + public void setFilterText(String p0){} + public void setFriction(float p0){} + public void setItemChecked(int p0, boolean p1){} + public void setMultiChoiceModeListener(AbsListView.MultiChoiceModeListener p0){} + public void setOnScrollListener(AbsListView.OnScrollListener p0){} + public void setRecyclerListener(AbsListView.RecyclerListener p0){} + public void setRemoteViewsAdapter(Intent p0){} + public void setScrollBarStyle(int p0){} + public void setScrollIndicators(View p0, View p1){} + public void setScrollingCacheEnabled(boolean p0){} + public void setSelectionFromTop(int p0, int p1){} + public void setSelector(Drawable p0){} + public void setSelector(int p0){} + public void setSmoothScrollbarEnabled(boolean p0){} + public void setStackFromBottom(boolean p0){} + public void setTextFilterEnabled(boolean p0){} + public void setTopEdgeEffectColor(int p0){} + public void setTranscriptMode(int p0){} + public void setVelocityScale(float p0){} + public void setVerticalScrollbarPosition(int p0){} + public void smoothScrollBy(int p0, int p1){} + public void smoothScrollToPosition(int p0){} + public void smoothScrollToPosition(int p0, int p1){} + public void smoothScrollToPositionFromTop(int p0, int p1){} + public void smoothScrollToPositionFromTop(int p0, int p1, int p2){} + static public class LayoutParams extends ViewGroup.LayoutParams + { + protected LayoutParams() {} + public LayoutParams(Context p0, AttributeSet p1){} + public LayoutParams(ViewGroup.LayoutParams p0){} + public LayoutParams(int p0, int p1){} + public LayoutParams(int p0, int p1, int p2){} + } + static public interface MultiChoiceModeListener extends ActionMode.Callback + { + void onItemCheckedStateChanged(ActionMode p0, int p1, long p2, boolean p3); + } + static public interface OnScrollListener + { + static int SCROLL_STATE_FLING = 0; + static int SCROLL_STATE_IDLE = 0; + static int SCROLL_STATE_TOUCH_SCROLL = 0; + void onScroll(AbsListView p0, int p1, int p2, int p3); + void onScrollStateChanged(AbsListView p0, int p1); + } + static public interface RecyclerListener + { + void onMovedToScrapHeap(View p0); + } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/widget/AbsoluteLayout.java b/java/ql/test/stubs/google-android-9.0.0/android/widget/AbsoluteLayout.java new file mode 100644 index 000000000000..438d8feca869 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/widget/AbsoluteLayout.java @@ -0,0 +1,23 @@ +// Generated automatically from android.widget.AbsoluteLayout for testing purposes + +package android.widget; + +import android.content.Context; +import android.util.AttributeSet; +import android.view.ViewGroup; + +public class AbsoluteLayout extends ViewGroup +{ + protected AbsoluteLayout() {} + protected ViewGroup.LayoutParams generateDefaultLayoutParams(){ return null; } + protected ViewGroup.LayoutParams generateLayoutParams(ViewGroup.LayoutParams p0){ return null; } + protected boolean checkLayoutParams(ViewGroup.LayoutParams p0){ return false; } + protected void onLayout(boolean p0, int p1, int p2, int p3, int p4){} + protected void onMeasure(int p0, int p1){} + public AbsoluteLayout(Context p0){} + public AbsoluteLayout(Context p0, AttributeSet p1){} + public AbsoluteLayout(Context p0, AttributeSet p1, int p2){} + public AbsoluteLayout(Context p0, AttributeSet p1, int p2, int p3){} + public ViewGroup.LayoutParams generateLayoutParams(AttributeSet p0){ return null; } + public boolean shouldDelayChildPressedState(){ return false; } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/widget/Adapter.java b/java/ql/test/stubs/google-android-9.0.0/android/widget/Adapter.java new file mode 100644 index 000000000000..06f719feab0f --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/widget/Adapter.java @@ -0,0 +1,24 @@ +// Generated automatically from android.widget.Adapter for testing purposes + +package android.widget; + +import android.database.DataSetObserver; +import android.view.View; +import android.view.ViewGroup; + +public interface Adapter +{ + Object getItem(int p0); + View getView(int p0, View p1, ViewGroup p2); + boolean hasStableIds(); + boolean isEmpty(); + default CharSequence[] getAutofillOptions(){ return null; } + int getCount(); + int getItemViewType(int p0); + int getViewTypeCount(); + long getItemId(int p0); + static int IGNORE_ITEM_VIEW_TYPE = 0; + static int NO_SELECTION = 0; + void registerDataSetObserver(DataSetObserver p0); + void unregisterDataSetObserver(DataSetObserver p0); +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/widget/AdapterView.java b/java/ql/test/stubs/google-android-9.0.0/android/widget/AdapterView.java new file mode 100644 index 000000000000..a071941461c1 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/widget/AdapterView.java @@ -0,0 +1,77 @@ +// Generated automatically from android.widget.AdapterView for testing purposes + +package android.widget; + +import android.content.Context; +import android.os.Parcelable; +import android.util.AttributeSet; +import android.util.SparseArray; +import android.view.View; +import android.view.ViewGroup; +import android.view.ViewStructure; +import android.widget.Adapter; + +abstract public class AdapterView extends ViewGroup +{ + protected AdapterView() {} + protected boolean canAnimate(){ return false; } + protected void dispatchRestoreInstanceState(SparseArray p0){} + protected void dispatchSaveInstanceState(SparseArray p0){} + protected void onDetachedFromWindow(){} + protected void onLayout(boolean p0, int p1, int p2, int p3, int p4){} + public AdapterView(Context p0){} + public AdapterView(Context p0, AttributeSet p1){} + public AdapterView(Context p0, AttributeSet p1, int p2){} + public AdapterView(Context p0, AttributeSet p1, int p2, int p3){} + public CharSequence getAccessibilityClassName(){ return null; } + public Object getItemAtPosition(int p0){ return null; } + public Object getSelectedItem(){ return null; } + public View getEmptyView(){ return null; } + public abstract T getAdapter(); + public abstract View getSelectedView(); + public abstract void setAdapter(T p0); + public abstract void setSelection(int p0); + public boolean performItemClick(View p0, int p1, long p2){ return false; } + public final AdapterView.OnItemClickListener getOnItemClickListener(){ return null; } + public final AdapterView.OnItemLongClickListener getOnItemLongClickListener(){ return null; } + public final AdapterView.OnItemSelectedListener getOnItemSelectedListener(){ return null; } + public int getCount(){ return 0; } + public int getFirstVisiblePosition(){ return 0; } + public int getLastVisiblePosition(){ return 0; } + public int getPositionForView(View p0){ return 0; } + public int getSelectedItemPosition(){ return 0; } + public long getItemIdAtPosition(int p0){ return 0; } + public long getSelectedItemId(){ return 0; } + public static int INVALID_POSITION = 0; + public static int ITEM_VIEW_TYPE_HEADER_OR_FOOTER = 0; + public static int ITEM_VIEW_TYPE_IGNORE = 0; + public static long INVALID_ROW_ID = 0; + public void addView(View p0){} + public void addView(View p0, ViewGroup.LayoutParams p1){} + public void addView(View p0, int p1){} + public void addView(View p0, int p1, ViewGroup.LayoutParams p2){} + public void onProvideAutofillStructure(ViewStructure p0, int p1){} + public void removeAllViews(){} + public void removeView(View p0){} + public void removeViewAt(int p0){} + public void setEmptyView(View p0){} + public void setFocusable(int p0){} + public void setFocusableInTouchMode(boolean p0){} + public void setOnClickListener(View.OnClickListener p0){} + public void setOnItemClickListener(AdapterView.OnItemClickListener p0){} + public void setOnItemLongClickListener(AdapterView.OnItemLongClickListener p0){} + public void setOnItemSelectedListener(AdapterView.OnItemSelectedListener p0){} + static public interface OnItemClickListener + { + void onItemClick(AdapterView p0, View p1, int p2, long p3); + } + static public interface OnItemLongClickListener + { + boolean onItemLongClick(AdapterView p0, View p1, int p2, long p3); + } + static public interface OnItemSelectedListener + { + void onItemSelected(AdapterView p0, View p1, int p2, long p3); + void onNothingSelected(AdapterView p0); + } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/widget/Button.java b/java/ql/test/stubs/google-android-9.0.0/android/widget/Button.java index 69cf1911ffdd..53413c878b4b 100644 --- a/java/ql/test/stubs/google-android-9.0.0/android/widget/Button.java +++ b/java/ql/test/stubs/google-android-9.0.0/android/widget/Button.java @@ -1,42 +1,20 @@ -/* - * Copyright (C) 2006 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ +// Generated automatically from android.widget.Button for testing purposes package android.widget; import android.content.Context; import android.util.AttributeSet; - -public class Button extends TextView { - public Button(Context context) { - super(null); - } - - public Button(Context context, AttributeSet attrs) { - super(null); - } - - public Button(Context context, AttributeSet attrs, int defStyleAttr) { - super(null); - } - - public Button(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { - super(null); - } - - @Override - public CharSequence getAccessibilityClassName() { - return null; - } - +import android.view.MotionEvent; +import android.view.PointerIcon; +import android.widget.TextView; + +public class Button extends TextView +{ + protected Button() {} + public Button(Context p0){} + public Button(Context p0, AttributeSet p1){} + public Button(Context p0, AttributeSet p1, int p2){} + public Button(Context p0, AttributeSet p1, int p2, int p3){} + public CharSequence getAccessibilityClassName(){ return null; } + public PointerIcon onResolvePointerIcon(MotionEvent p0, int p1){ return null; } } diff --git a/java/ql/test/stubs/google-android-9.0.0/android/widget/Filter.java b/java/ql/test/stubs/google-android-9.0.0/android/widget/Filter.java new file mode 100644 index 000000000000..f0572f12d784 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/widget/Filter.java @@ -0,0 +1,24 @@ +// Generated automatically from android.widget.Filter for testing purposes + +package android.widget; + + +abstract public class Filter +{ + protected abstract Filter.FilterResults performFiltering(CharSequence p0); + protected abstract void publishResults(CharSequence p0, Filter.FilterResults p1); + public CharSequence convertResultToString(Object p0){ return null; } + public Filter(){} + public final void filter(CharSequence p0){} + public final void filter(CharSequence p0, Filter.FilterListener p1){} + static class FilterResults + { + public FilterResults(){} + public Object values = null; + public int count = 0; + } + static public interface FilterListener + { + void onFilterComplete(int p0); + } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/widget/FrameLayout.java b/java/ql/test/stubs/google-android-9.0.0/android/widget/FrameLayout.java new file mode 100644 index 000000000000..6901b838087f --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/widget/FrameLayout.java @@ -0,0 +1,40 @@ +// Generated automatically from android.widget.FrameLayout for testing purposes + +package android.widget; + +import android.content.Context; +import android.util.AttributeSet; +import android.view.ViewGroup; + +public class FrameLayout extends ViewGroup +{ + protected FrameLayout() {} + protected FrameLayout.LayoutParams generateDefaultLayoutParams(){ return null; } + protected ViewGroup.LayoutParams generateLayoutParams(ViewGroup.LayoutParams p0){ return null; } + protected boolean checkLayoutParams(ViewGroup.LayoutParams p0){ return false; } + protected void onLayout(boolean p0, int p1, int p2, int p3, int p4){} + protected void onMeasure(int p0, int p1){} + public CharSequence getAccessibilityClassName(){ return null; } + public FrameLayout(Context p0){} + public FrameLayout(Context p0, AttributeSet p1){} + public FrameLayout(Context p0, AttributeSet p1, int p2){} + public FrameLayout(Context p0, AttributeSet p1, int p2, int p3){} + public FrameLayout.LayoutParams generateLayoutParams(AttributeSet p0){ return null; } + public boolean getConsiderGoneChildrenWhenMeasuring(){ return false; } + public boolean getMeasureAllChildren(){ return false; } + public boolean shouldDelayChildPressedState(){ return false; } + public void setForegroundGravity(int p0){} + public void setMeasureAllChildren(boolean p0){} + static public class LayoutParams extends ViewGroup.MarginLayoutParams + { + protected LayoutParams() {} + public LayoutParams(Context p0, AttributeSet p1){} + public LayoutParams(FrameLayout.LayoutParams p0){} + public LayoutParams(ViewGroup.LayoutParams p0){} + public LayoutParams(ViewGroup.MarginLayoutParams p0){} + public LayoutParams(int p0, int p1){} + public LayoutParams(int p0, int p1, int p2){} + public int gravity = 0; + public static int UNSPECIFIED_GRAVITY = 0; + } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/widget/ListAdapter.java b/java/ql/test/stubs/google-android-9.0.0/android/widget/ListAdapter.java new file mode 100644 index 000000000000..c23fea65b27d --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/widget/ListAdapter.java @@ -0,0 +1,11 @@ +// Generated automatically from android.widget.ListAdapter for testing purposes + +package android.widget; + +import android.widget.Adapter; + +public interface ListAdapter extends Adapter +{ + boolean areAllItemsEnabled(); + boolean isEnabled(int p0); +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/widget/ListView.java b/java/ql/test/stubs/google-android-9.0.0/android/widget/ListView.java new file mode 100644 index 000000000000..088efbc883f9 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/widget/ListView.java @@ -0,0 +1,73 @@ +// Generated automatically from android.widget.ListView for testing purposes + +package android.widget; + +import android.content.Context; +import android.content.Intent; +import android.graphics.Canvas; +import android.graphics.Rect; +import android.graphics.drawable.Drawable; +import android.util.AttributeSet; +import android.view.KeyEvent; +import android.view.View; +import android.view.accessibility.AccessibilityNodeInfo; +import android.widget.AbsListView; +import android.widget.ListAdapter; + +public class ListView extends AbsListView +{ + protected ListView() {} + protected boolean canAnimate(){ return false; } + protected boolean drawChild(Canvas p0, View p1, long p2){ return false; } + protected void dispatchDraw(Canvas p0){} + protected void layoutChildren(){} + protected void onDetachedFromWindow(){} + protected void onFinishInflate(){} + protected void onFocusChanged(boolean p0, int p1, Rect p2){} + protected void onMeasure(int p0, int p1){} + protected void onSizeChanged(int p0, int p1, int p2, int p3){} + public CharSequence getAccessibilityClassName(){ return null; } + public Drawable getDivider(){ return null; } + public Drawable getOverscrollFooter(){ return null; } + public Drawable getOverscrollHeader(){ return null; } + public ListAdapter getAdapter(){ return null; } + public ListView(Context p0){} + public ListView(Context p0, AttributeSet p1){} + public ListView(Context p0, AttributeSet p1, int p2){} + public ListView(Context p0, AttributeSet p1, int p2, int p3){} + public boolean areFooterDividersEnabled(){ return false; } + public boolean areHeaderDividersEnabled(){ return false; } + public boolean dispatchKeyEvent(KeyEvent p0){ return false; } + public boolean getItemsCanFocus(){ return false; } + public boolean isOpaque(){ return false; } + public boolean onKeyDown(int p0, KeyEvent p1){ return false; } + public boolean onKeyMultiple(int p0, int p1, KeyEvent p2){ return false; } + public boolean onKeyUp(int p0, KeyEvent p1){ return false; } + public boolean removeFooterView(View p0){ return false; } + public boolean removeHeaderView(View p0){ return false; } + public boolean requestChildRectangleOnScreen(View p0, Rect p1, boolean p2){ return false; } + public int getDividerHeight(){ return 0; } + public int getFooterViewsCount(){ return 0; } + public int getHeaderViewsCount(){ return 0; } + public int getMaxScrollAmount(){ return 0; } + public long[] getCheckItemIds(){ return null; } + public void addFooterView(View p0){} + public void addFooterView(View p0, Object p1, boolean p2){} + public void addHeaderView(View p0){} + public void addHeaderView(View p0, Object p1, boolean p2){} + public void onInitializeAccessibilityNodeInfoForItem(View p0, int p1, AccessibilityNodeInfo p2){} + public void setAdapter(ListAdapter p0){} + public void setCacheColorHint(int p0){} + public void setDivider(Drawable p0){} + public void setDividerHeight(int p0){} + public void setFooterDividersEnabled(boolean p0){} + public void setHeaderDividersEnabled(boolean p0){} + public void setItemsCanFocus(boolean p0){} + public void setOverscrollFooter(Drawable p0){} + public void setOverscrollHeader(Drawable p0){} + public void setRemoteViewsAdapter(Intent p0){} + public void setSelection(int p0){} + public void setSelectionAfterHeaderView(){} + public void smoothScrollByOffset(int p0){} + public void smoothScrollToPosition(int p0){} +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/widget/SpinnerAdapter.java b/java/ql/test/stubs/google-android-9.0.0/android/widget/SpinnerAdapter.java new file mode 100644 index 000000000000..9a389615336f --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/widget/SpinnerAdapter.java @@ -0,0 +1,12 @@ +// Generated automatically from android.widget.SpinnerAdapter for testing purposes + +package android.widget; + +import android.view.View; +import android.view.ViewGroup; +import android.widget.Adapter; + +public interface SpinnerAdapter extends Adapter +{ + View getDropDownView(int p0, View p1, ViewGroup p2); +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/widget/TextView.java b/java/ql/test/stubs/google-android-9.0.0/android/widget/TextView.java index 7ff5e1f71438..491cf47514a6 100644 --- a/java/ql/test/stubs/google-android-9.0.0/android/widget/TextView.java +++ b/java/ql/test/stubs/google-android-9.0.0/android/widget/TextView.java @@ -1,816 +1,383 @@ -/* - * Copyright (C) 2006 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ +// Generated automatically from android.widget.TextView for testing purposes package android.widget; -import java.util.ArrayList; -import java.util.Locale; -import android.annotation.Nullable; import android.content.Context; import android.content.res.ColorStateList; -import android.content.res.TypedArray; +import android.content.res.Configuration; import android.graphics.BlendMode; +import android.graphics.Canvas; import android.graphics.PorterDuff; import android.graphics.Rect; import android.graphics.Typeface; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.os.LocaleList; -import android.os.UserHandle; +import android.os.Parcelable; +import android.text.Editable; +import android.text.InputFilter; +import android.text.Layout; +import android.text.PrecomputedText; +import android.text.Spannable; +import android.text.TextDirectionHeuristic; +import android.text.TextPaint; +import android.text.TextUtils; +import android.text.TextWatcher; +import android.text.method.KeyListener; +import android.text.method.MovementMethod; +import android.text.method.TransformationMethod; +import android.text.style.URLSpan; import android.util.AttributeSet; +import android.view.ActionMode; +import android.view.ContentInfo; +import android.view.ContextMenu; +import android.view.DragEvent; +import android.view.KeyEvent; +import android.view.MotionEvent; +import android.view.PointerIcon; import android.view.View; - -public class TextView extends View { - public @interface XMLTypefaceAttr { - - } - public @interface AutoSizeTextType { - } - - public static void preloadFontCache() {} - - public TextView(Context context) { - super(null); - } - - public TextView(Context context, AttributeSet attrs) { - super(null); - } - - public TextView(Context context, AttributeSet attrs, int defStyleAttr) { - super(null); - } - - public TextView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { - super(null); - } - - public void setAutoSizeTextTypeWithDefaults(int autoSizeTextType) {} - - public void setAutoSizeTextTypeUniformWithConfiguration(int autoSizeMinTextSize, - int autoSizeMaxTextSize, int autoSizeStepGranularity, int unit) {} - - public void setAutoSizeTextTypeUniformWithPresetSizes(int[] presetSizes, int unit) {} - - public int getAutoSizeTextType() { - return 0; - } - - public int getAutoSizeStepGranularity() { - return 0; - } - - public int getAutoSizeMinTextSize() { - return 0; - } - - public int getAutoSizeMaxTextSize() { - return 0; - } - - public int[] getAutoSizeTextAvailableSizes() { - return null; - } - - public void setTypeface(Typeface tf, int style) {} - - public CharSequence getText() { - return null; - } - - public int length() { - return 0; - } - - public CharSequence getTransformed() { - return null; - } - - public int getLineHeight() { - return 0; - } - - public int getCompoundPaddingTop() { - return 0; - } - - public int getCompoundPaddingBottom() { - return 0; - } - - public int getCompoundPaddingLeft() { - return 0; - } - - public int getCompoundPaddingRight() { - return 0; - } - - public int getCompoundPaddingStart() { - return 0; - } - - public int getCompoundPaddingEnd() { - return 0; - } - - public int getExtendedPaddingTop() { - return 0; - } - - public int getExtendedPaddingBottom() { - return 0; - } - - public int getTotalPaddingLeft() { - return 0; - } - - public int getTotalPaddingRight() { - return 0; - } - - public int getTotalPaddingStart() { - return 0; - } - - public int getTotalPaddingEnd() { - return 0; - } - - public int getTotalPaddingTop() { - return 0; - } - - public int getTotalPaddingBottom() { - return 0; - } - - public void setCompoundDrawables(Drawable left, Drawable top, Drawable right, Drawable bottom) {} - - public void setCompoundDrawablesWithIntrinsicBounds(int left, int top, int right, int bottom) {} - - public void setCompoundDrawablesWithIntrinsicBounds(Drawable left, Drawable top, Drawable right, - Drawable bottom) {} - - public void setCompoundDrawablesRelative(Drawable start, Drawable top, Drawable end, - Drawable bottom) {} - - public void setCompoundDrawablesRelativeWithIntrinsicBounds(int start, int top, int end, - int bottom) {} - - public void setCompoundDrawablesRelativeWithIntrinsicBounds(Drawable start, Drawable top, - Drawable end, Drawable bottom) {} - - public Drawable[] getCompoundDrawables() { - return null; - } - - public Drawable[] getCompoundDrawablesRelative() { - return null; - } - - public void setCompoundDrawablePadding(int pad) {} - - public int getCompoundDrawablePadding() { - return 0; - } - - public void setCompoundDrawableTintList(ColorStateList tint) {} - - public ColorStateList getCompoundDrawableTintList() { - return null; - } - - public void setCompoundDrawableTintMode(PorterDuff.Mode tintMode) {} - - public void setCompoundDrawableTintBlendMode(BlendMode blendMode) {} - - public PorterDuff.Mode getCompoundDrawableTintMode() { - return null; - } - - public BlendMode getCompoundDrawableTintBlendMode() { - return null; - } - - public void setFirstBaselineToTopHeight(int firstBaselineToTopHeight) {} - - public void setLastBaselineToBottomHeight(int lastBaselineToBottomHeight) {} - - public int getFirstBaselineToTopHeight() { - return 0; - } - - public int getLastBaselineToBottomHeight() { - return 0; - } - - public final int getAutoLinkMask() { - return 0; - } - - public void setTextSelectHandle(Drawable textSelectHandle) {} - - public void setTextSelectHandle(int textSelectHandle) {} - - @Nullable - public Drawable getTextSelectHandle() { - return null; - } - - public void setTextSelectHandleLeft(Drawable textSelectHandleLeft) {} - - public void setTextSelectHandleLeft(int textSelectHandleLeft) {} - - @Nullable - public Drawable getTextSelectHandleLeft() { - return null; - } - - public void setTextSelectHandleRight(Drawable textSelectHandleRight) {} - - public void setTextSelectHandleRight(int textSelectHandleRight) {} - - @Nullable - public Drawable getTextSelectHandleRight() { - return null; - } - - public void setTextCursorDrawable(Drawable textCursorDrawable) {} - - public void setTextCursorDrawable(int textCursorDrawable) {} - - @Nullable - public Drawable getTextCursorDrawable() { - return null; - } - - public void setTextAppearance(int resId) {} - - public void setTextAppearance(Context context, int resId) {} - - public Locale getTextLocale() { - return null; - } - - public LocaleList getTextLocales() { - return null; - } - - public void setTextLocale(Locale locale) {} - - public void setTextLocales(LocaleList locales) {} - - public float getTextSize() { - return 0; - } - - public float getScaledTextSize() { - return 0; - } - - public int getTypefaceStyle() { - return 0; - } - - public void setTextSize(float size) {} - - public void setTextSize(int unit, float size) {} - - public int getTextSizeUnit() { - return 0; - } - - public float getTextScaleX() { - return 0; - } - - public void setTextScaleX(float size) {} - - public void setTypeface(Typeface tf) {} - - public Typeface getTypeface() { - return null; - } - - public void setElegantTextHeight(boolean elegant) {} - - public void setFallbackLineSpacing(boolean enabled) {} - - public boolean isFallbackLineSpacing() { - return false; - } - - public boolean isElegantTextHeight() { - return false; - } - - public float getLetterSpacing() { - return 0; - } - - public void setLetterSpacing(float letterSpacing) {} - - public String getFontFeatureSettings() { - return null; - } - - public String getFontVariationSettings() { - return null; - } - - public void setBreakStrategy(int breakStrategy) {} - - public int getBreakStrategy() { - return 0; - } - - public void setHyphenationFrequency(int hyphenationFrequency) {} - - public int getHyphenationFrequency() { - return 0; - } - - public void setJustificationMode(int justificationMode) {} - - public int getJustificationMode() { - return 0; - } - - public void setFontFeatureSettings(String fontFeatureSettings) {} - - public boolean setFontVariationSettings(String fontVariationSettings) { - return false; - } - - public void setTextColor(int color) {} - - public void setTextColor(ColorStateList colors) {} - - public final ColorStateList getTextColors() { - return null; - } - - public final int getCurrentTextColor() { - return 0; - } - - public void setHighlightColor(int color) {} - - public int getHighlightColor() { - return 0; - } - - public final void setShowSoftInputOnFocus(boolean show) {} - - public final boolean getShowSoftInputOnFocus() { - return false; - } - - public void setShadowLayer(float radius, float dx, float dy, int color) {} - - public float getShadowRadius() { - return 0; - } - - public float getShadowDx() { - return 0; - } - - public float getShadowDy() { - return 0; - } - - public int getShadowColor() { - return 0; - } - - public final void setAutoLinkMask(int mask) {} - - public final void setLinksClickable(boolean whether) {} - - public final boolean getLinksClickable() { - return false; - } - - public final void setHintTextColor(int color) {} - - public final void setHintTextColor(ColorStateList colors) {} - - public final ColorStateList getHintTextColors() { - return null; - } - - public final int getCurrentHintTextColor() { - return 0; - } - - public final void setLinkTextColor(int color) {} - - public final void setLinkTextColor(ColorStateList colors) {} - - public final ColorStateList getLinkTextColors() { - return null; - } - - public void setGravity(int gravity) {} - - public int getGravity() { - return 0; - } - - public int getPaintFlags() { - return 0; - } - - public void setPaintFlags(int flags) {} - - public void setHorizontallyScrolling(boolean whether) {} - - public final boolean isHorizontallyScrollable() { - return false; - } - - public boolean getHorizontallyScrolling() { - return false; - } - - public void setMinLines(int minLines) {} - - public int getMinLines() { - return 0; - } - - public void setMinHeight(int minPixels) {} - - public int getMinHeight() { - return 0; - } - - public void setMaxLines(int maxLines) {} - - public int getMaxLines() { - return 0; - } - - public void setMaxHeight(int maxPixels) {} - - public int getMaxHeight() { - return 0; - } - - public void setLines(int lines) {} - - public void setHeight(int pixels) {} - - public void setMinEms(int minEms) {} - - public int getMinEms() { - return 0; - } - - public void setMinWidth(int minPixels) {} - - public int getMinWidth() { - return 0; - } - - public void setMaxEms(int maxEms) {} - - public int getMaxEms() { - return 0; - } - - public void setMaxWidth(int maxPixels) {} - - public int getMaxWidth() { - return 0; - } - - public void setEms(int ems) {} - - public void setWidth(int pixels) {} - - public void setLineSpacing(float add, float mult) {} - - public float getLineSpacingMultiplier() { - return 0; - } - - public float getLineSpacingExtra() { - return 0; - } - - public void setLineHeight(int lineHeight) {} - - public final void append(CharSequence text) {} - - public void append(CharSequence text, int start, int end) {} - - - public void setFreezesText(boolean freezesText) {} - - public boolean getFreezesText() { - return false; - } - - public final void setText(CharSequence text) {} - - public final void setTextKeepState(CharSequence text) {} - - public void setText(CharSequence text, BufferType type) {} - - public final void setText(char[] text, int start, int len) {} - - public final void setTextKeepState(CharSequence text, BufferType type) {} - - public final void setText(int resid) {} - - public final void setText(int resid, BufferType type) {} - - public final void setHint(CharSequence hint) {} - - public final void setHint(int resid) {} - - public CharSequence getHint() { - return null; - } - - public boolean isSingleLine() { - return false; - } - - public void setInputType(int type) {} - - public boolean isAnyPasswordInputType() { - return false; - } - - public void setRawInputType(int type) {} - - public int getInputType() { - return 0; - } - - public void setImeOptions(int imeOptions) {} - - public int getImeOptions() { - return 0; - } - - public void setImeActionLabel(CharSequence label, int actionId) {} - - public CharSequence getImeActionLabel() { - return null; - } - - public int getImeActionId() { - return 0; - } - - public void onEditorAction(int actionCode) {} - - public void setPrivateImeOptions(String type) {} - - public String getPrivateImeOptions() { - return null; - } - - public Bundle getInputExtras(boolean create) { - return null; - } - - public void setImeHintLocales(LocaleList hintLocales) {} - - public LocaleList getImeHintLocales() { - return null; - } - - public CharSequence getError() { - return null; - } - - public void setError(CharSequence error) {} - - public void setError(CharSequence error, Drawable icon) {} - - public boolean isTextSelectable() { - return false; - } - - public void setTextIsSelectable(boolean selectable) {} - - public int getHorizontalOffsetForDrawables() { - return 0; - } - - public int getLineCount() { - return 0; - } - - public int getLineBounds(int line, Rect bounds) { - return 0; - } - - public int getBaseline() { - return 0; - } - - public void resetErrorChangedFlag() {} - - public void hideErrorIfUnchanged() {} - - public boolean onCheckIsTextEditor() { - return false; - } - - public void beginBatchEdit() {} - - public void endBatchEdit() {} - - public void onBeginBatchEdit() {} - - public void onEndBatchEdit() {} - - public boolean onPrivateIMECommand(String action, Bundle data) { - return false; - } - - public void nullLayouts() {} - - public boolean useDynamicLayout() { - return false; - } - - public void setIncludeFontPadding(boolean includepad) {} - - public boolean getIncludeFontPadding() { - return false; - } - - public boolean bringPointIntoView(int offset) { - return false; - } - - public boolean moveCursorToVisibleOffset() { - return false; - } - - public void computeScroll() {} - - public void debug(int depth) {} - - public int getSelectionStart() { - return 0; - } - - public int getSelectionEnd() { - return 0; - } - - public boolean hasSelection() { - return false; - } - - public void setSingleLine() {} - - public void setAllCaps(boolean allCaps) {} - - public boolean isAllCaps() { - return false; - } - - public void setSingleLine(boolean singleLine) {} - - public void setMarqueeRepeatLimit(int marqueeLimit) {} - - public int getMarqueeRepeatLimit() { - return 0; - } - - public void setSelectAllOnFocus(boolean selectAllOnFocus) {} - - public void setCursorVisible(boolean visible) {} - - public boolean isCursorVisible() { - return false; - } - - public void onWindowFocusChanged(boolean hasWindowFocus) {} - - public void clearComposingText() {} - - public void setSelected(boolean selected) {} - - public boolean showContextMenu() { - return false; - } - - public boolean showContextMenu(float x, float y) { - return false; - } - - public boolean didTouchFocusSelect() { - return false; - } - - public void cancelLongPress() {} - - public void findViewsWithText(ArrayList outViews, CharSequence searched, int flags) {} - - public enum BufferType { - } - - public static ColorStateList getTextColors(Context context, TypedArray attrs) { - return null; - } - - public static int getTextColor(Context context, TypedArray attrs, int def) { - return 0; - } - - public final void setTextOperationUser(UserHandle user) {} - - public Locale getTextServicesLocale() { - return null; - } - - public boolean isInExtractedMode() { - return false; - } - - public Locale getSpellCheckerLocale() { - return null; - } - - public CharSequence getAccessibilityClassName() { - return null; - } - - public boolean isPositionVisible(final float positionX, final float positionY) { - return false; - } - - public boolean performAccessibilityActionInternal(int action, Bundle arguments) { - return false; - } - - public void sendAccessibilityEventInternal(int eventType) {} - - public boolean isInputMethodTarget() { - return false; - } - - public boolean onTextContextMenuItem(int id) { - return false; - } - - public boolean performLongClick() { - return false; - } - - public boolean isSuggestionsEnabled() { - return false; - } - - public void hideFloatingToolbar(int durationMs) {} - - public int getOffsetForPosition(float x, float y) { - return 0; - } - - public void onRtlPropertiesChanged(int layoutDirection) {} - - public void onResolveDrawables(int layoutDirection) {} - - public CharSequence getIterableTextForAccessibility() { - return null; - } - - public int getAccessibilitySelectionStart() { - return 0; - } - - public boolean isAccessibilitySelectionExtendable() { - return false; - } - - public int getAccessibilitySelectionEnd() { - return 0; - } - - public void setAccessibilitySelection(int start, int end) {} - +import android.view.ViewTreeObserver; +import android.view.accessibility.AccessibilityEvent; +import android.view.accessibility.AccessibilityNodeInfo; +import android.view.autofill.AutofillValue; +import android.view.inputmethod.CompletionInfo; +import android.view.inputmethod.CorrectionInfo; +import android.view.inputmethod.EditorInfo; +import android.view.inputmethod.ExtractedText; +import android.view.inputmethod.ExtractedTextRequest; +import android.view.inputmethod.InputConnection; +import android.view.textclassifier.TextClassifier; +import android.view.translation.ViewTranslationRequest; +import android.widget.Scroller; +import java.util.ArrayList; +import java.util.Locale; +import java.util.function.Consumer; + +public class TextView extends View implements ViewTreeObserver.OnPreDrawListener +{ + protected TextView() {} + protected MovementMethod getDefaultMovementMethod(){ return null; } + protected boolean getDefaultEditable(){ return false; } + protected boolean isPaddingOffsetRequired(){ return false; } + protected boolean setFrame(int p0, int p1, int p2, int p3){ return false; } + protected boolean verifyDrawable(Drawable p0){ return false; } + protected float getLeftFadingEdgeStrength(){ return 0; } + protected float getRightFadingEdgeStrength(){ return 0; } + protected int computeHorizontalScrollRange(){ return 0; } + protected int computeVerticalScrollExtent(){ return 0; } + protected int computeVerticalScrollRange(){ return 0; } + protected int getBottomPaddingOffset(){ return 0; } + protected int getLeftPaddingOffset(){ return 0; } + protected int getRightPaddingOffset(){ return 0; } + protected int getTopPaddingOffset(){ return 0; } + protected int[] onCreateDrawableState(int p0){ return null; } + protected void drawableStateChanged(){} + protected void onAttachedToWindow(){} + protected void onConfigurationChanged(Configuration p0){} + protected void onCreateContextMenu(ContextMenu p0){} + protected void onDraw(Canvas p0){} + protected void onFocusChanged(boolean p0, int p1, Rect p2){} + protected void onLayout(boolean p0, int p1, int p2, int p3, int p4){} + protected void onMeasure(int p0, int p1){} + protected void onScrollChanged(int p0, int p1, int p2, int p3){} + protected void onSelectionChanged(int p0, int p1){} + protected void onTextChanged(CharSequence p0, int p1, int p2, int p3){} + protected void onVisibilityChanged(View p0, int p1){} + public ActionMode.Callback getCustomInsertionActionModeCallback(){ return null; } + public ActionMode.Callback getCustomSelectionActionModeCallback(){ return null; } + public AutofillValue getAutofillValue(){ return null; } + public BlendMode getCompoundDrawableTintBlendMode(){ return null; } + public Bundle getInputExtras(boolean p0){ return null; } + public CharSequence getAccessibilityClassName(){ return null; } + public CharSequence getError(){ return null; } + public CharSequence getHint(){ return null; } + public CharSequence getImeActionLabel(){ return null; } + public CharSequence getText(){ return null; } + public ColorStateList getCompoundDrawableTintList(){ return null; } + public ContentInfo onReceiveContent(ContentInfo p0){ return null; } + public Drawable getTextCursorDrawable(){ return null; } + public Drawable getTextSelectHandle(){ return null; } + public Drawable getTextSelectHandleLeft(){ return null; } + public Drawable getTextSelectHandleRight(){ return null; } + public Drawable[] getCompoundDrawables(){ return null; } + public Drawable[] getCompoundDrawablesRelative(){ return null; } + public Editable getEditableText(){ return null; } + public InputConnection onCreateInputConnection(EditorInfo p0){ return null; } + public InputFilter[] getFilters(){ return null; } + public Locale getTextLocale(){ return null; } + public LocaleList getImeHintLocales(){ return null; } + public LocaleList getTextLocales(){ return null; } + public Parcelable onSaveInstanceState(){ return null; } + public PointerIcon onResolvePointerIcon(MotionEvent p0, int p1){ return null; } + public PorterDuff.Mode getCompoundDrawableTintMode(){ return null; } + public PrecomputedText.Params getTextMetricsParams(){ return null; } + public String getFontFeatureSettings(){ return null; } + public String getFontVariationSettings(){ return null; } + public String getPrivateImeOptions(){ return null; } + public TextClassifier getTextClassifier(){ return null; } + public TextDirectionHeuristic getTextDirectionHeuristic(){ return null; } + public TextPaint getPaint(){ return null; } + public TextUtils.TruncateAt getEllipsize(){ return null; } + public TextView(Context p0){} + public TextView(Context p0, AttributeSet p1){} + public TextView(Context p0, AttributeSet p1, int p2){} + public TextView(Context p0, AttributeSet p1, int p2, int p3){} + public Typeface getTypeface(){ return null; } + public URLSpan[] getUrls(){ return null; } + public boolean bringPointIntoView(int p0){ return false; } + public boolean didTouchFocusSelect(){ return false; } + public boolean extractText(ExtractedTextRequest p0, ExtractedText p1){ return false; } + public boolean getFreezesText(){ return false; } + public boolean getIncludeFontPadding(){ return false; } + public boolean hasOverlappingRendering(){ return false; } + public boolean hasSelection(){ return false; } + public boolean isAllCaps(){ return false; } + public boolean isCursorVisible(){ return false; } + public boolean isElegantTextHeight(){ return false; } + public boolean isFallbackLineSpacing(){ return false; } + public boolean isInputMethodTarget(){ return false; } + public boolean isSingleLine(){ return false; } + public boolean isSuggestionsEnabled(){ return false; } + public boolean isTextSelectable(){ return false; } + public boolean moveCursorToVisibleOffset(){ return false; } + public boolean onCheckIsTextEditor(){ return false; } + public boolean onDragEvent(DragEvent p0){ return false; } + public boolean onGenericMotionEvent(MotionEvent p0){ return false; } + public boolean onKeyDown(int p0, KeyEvent p1){ return false; } + public boolean onKeyMultiple(int p0, int p1, KeyEvent p2){ return false; } + public boolean onKeyPreIme(int p0, KeyEvent p1){ return false; } + public boolean onKeyShortcut(int p0, KeyEvent p1){ return false; } + public boolean onKeyUp(int p0, KeyEvent p1){ return false; } + public boolean onPreDraw(){ return false; } + public boolean onPrivateIMECommand(String p0, Bundle p1){ return false; } + public boolean onTextContextMenuItem(int p0){ return false; } + public boolean onTouchEvent(MotionEvent p0){ return false; } + public boolean onTrackballEvent(MotionEvent p0){ return false; } + public boolean performLongClick(){ return false; } + public boolean setFontVariationSettings(String p0){ return false; } + public boolean showContextMenu(){ return false; } + public boolean showContextMenu(float p0, float p1){ return false; } + public final ColorStateList getHintTextColors(){ return null; } + public final ColorStateList getLinkTextColors(){ return null; } + public final ColorStateList getTextColors(){ return null; } + public final KeyListener getKeyListener(){ return null; } + public final Layout getLayout(){ return null; } + public final MovementMethod getMovementMethod(){ return null; } + public final TransformationMethod getTransformationMethod(){ return null; } + public final boolean getLinksClickable(){ return false; } + public final boolean getShowSoftInputOnFocus(){ return false; } + public final boolean isHorizontallyScrollable(){ return false; } + public final int getAutoLinkMask(){ return 0; } + public final int getCurrentHintTextColor(){ return 0; } + public final int getCurrentTextColor(){ return 0; } + public final void append(CharSequence p0){} + public final void setAutoLinkMask(int p0){} + public final void setEditableFactory(Editable.Factory p0){} + public final void setHint(CharSequence p0){} + public final void setHint(int p0){} + public final void setHintTextColor(ColorStateList p0){} + public final void setHintTextColor(int p0){} + public final void setLinkTextColor(ColorStateList p0){} + public final void setLinkTextColor(int p0){} + public final void setLinksClickable(boolean p0){} + public final void setMovementMethod(MovementMethod p0){} + public final void setShowSoftInputOnFocus(boolean p0){} + public final void setSpannableFactory(Spannable.Factory p0){} + public final void setText(CharSequence p0){} + public final void setText(char[] p0, int p1, int p2){} + public final void setText(int p0){} + public final void setText(int p0, TextView.BufferType p1){} + public final void setTextKeepState(CharSequence p0){} + public final void setTextKeepState(CharSequence p0, TextView.BufferType p1){} + public final void setTransformationMethod(TransformationMethod p0){} + public float getLetterSpacing(){ return 0; } + public float getLineSpacingExtra(){ return 0; } + public float getLineSpacingMultiplier(){ return 0; } + public float getShadowDx(){ return 0; } + public float getShadowDy(){ return 0; } + public float getShadowRadius(){ return 0; } + public float getTextScaleX(){ return 0; } + public float getTextSize(){ return 0; } + public int getAutoSizeMaxTextSize(){ return 0; } + public int getAutoSizeMinTextSize(){ return 0; } + public int getAutoSizeStepGranularity(){ return 0; } + public int getAutoSizeTextType(){ return 0; } + public int getAutofillType(){ return 0; } + public int getBaseline(){ return 0; } + public int getBreakStrategy(){ return 0; } + public int getCompoundDrawablePadding(){ return 0; } + public int getCompoundPaddingBottom(){ return 0; } + public int getCompoundPaddingEnd(){ return 0; } + public int getCompoundPaddingLeft(){ return 0; } + public int getCompoundPaddingRight(){ return 0; } + public int getCompoundPaddingStart(){ return 0; } + public int getCompoundPaddingTop(){ return 0; } + public int getExtendedPaddingBottom(){ return 0; } + public int getExtendedPaddingTop(){ return 0; } + public int getFirstBaselineToTopHeight(){ return 0; } + public int getGravity(){ return 0; } + public int getHighlightColor(){ return 0; } + public int getHyphenationFrequency(){ return 0; } + public int getImeActionId(){ return 0; } + public int getImeOptions(){ return 0; } + public int getInputType(){ return 0; } + public int getJustificationMode(){ return 0; } + public int getLastBaselineToBottomHeight(){ return 0; } + public int getLineBounds(int p0, Rect p1){ return 0; } + public int getLineCount(){ return 0; } + public int getLineHeight(){ return 0; } + public int getMarqueeRepeatLimit(){ return 0; } + public int getMaxEms(){ return 0; } + public int getMaxHeight(){ return 0; } + public int getMaxLines(){ return 0; } + public int getMaxWidth(){ return 0; } + public int getMinEms(){ return 0; } + public int getMinHeight(){ return 0; } + public int getMinLines(){ return 0; } + public int getMinWidth(){ return 0; } + public int getOffsetForPosition(float p0, float p1){ return 0; } + public int getPaintFlags(){ return 0; } + public int getSelectionEnd(){ return 0; } + public int getSelectionStart(){ return 0; } + public int getShadowColor(){ return 0; } + public int getTextSizeUnit(){ return 0; } + public int getTotalPaddingBottom(){ return 0; } + public int getTotalPaddingEnd(){ return 0; } + public int getTotalPaddingLeft(){ return 0; } + public int getTotalPaddingRight(){ return 0; } + public int getTotalPaddingStart(){ return 0; } + public int getTotalPaddingTop(){ return 0; } + public int length(){ return 0; } + public int[] getAutoSizeTextAvailableSizes(){ return null; } + public static int AUTO_SIZE_TEXT_TYPE_NONE = 0; + public static int AUTO_SIZE_TEXT_TYPE_UNIFORM = 0; + public void addExtraDataToAccessibilityNodeInfo(AccessibilityNodeInfo p0, String p1, Bundle p2){} + public void addTextChangedListener(TextWatcher p0){} + public void append(CharSequence p0, int p1, int p2){} + public void autofill(AutofillValue p0){} + public void beginBatchEdit(){} + public void cancelLongPress(){} + public void clearComposingText(){} + public void computeScroll(){} + public void debug(int p0){} + public void drawableHotspotChanged(float p0, float p1){} + public void endBatchEdit(){} + public void findViewsWithText(ArrayList p0, CharSequence p1, int p2){} + public void getFocusedRect(Rect p0){} + public void invalidateDrawable(Drawable p0){} + public void jumpDrawablesToCurrentState(){} + public void onBeginBatchEdit(){} + public void onCommitCompletion(CompletionInfo p0){} + public void onCommitCorrection(CorrectionInfo p0){} + public void onCreateViewTranslationRequest(int[] p0, Consumer p1){} + public void onEditorAction(int p0){} + public void onEndBatchEdit(){} + public void onRestoreInstanceState(Parcelable p0){} + public void onRtlPropertiesChanged(int p0){} + public void onScreenStateChanged(int p0){} + public void onWindowFocusChanged(boolean p0){} + public void removeTextChangedListener(TextWatcher p0){} + public void sendAccessibilityEventUnchecked(AccessibilityEvent p0){} + public void setAllCaps(boolean p0){} + public void setAutoSizeTextTypeUniformWithConfiguration(int p0, int p1, int p2, int p3){} + public void setAutoSizeTextTypeUniformWithPresetSizes(int[] p0, int p1){} + public void setAutoSizeTextTypeWithDefaults(int p0){} + public void setBreakStrategy(int p0){} + public void setCompoundDrawablePadding(int p0){} + public void setCompoundDrawableTintBlendMode(BlendMode p0){} + public void setCompoundDrawableTintList(ColorStateList p0){} + public void setCompoundDrawableTintMode(PorterDuff.Mode p0){} + public void setCompoundDrawables(Drawable p0, Drawable p1, Drawable p2, Drawable p3){} + public void setCompoundDrawablesRelative(Drawable p0, Drawable p1, Drawable p2, Drawable p3){} + public void setCompoundDrawablesRelativeWithIntrinsicBounds(Drawable p0, Drawable p1, Drawable p2, Drawable p3){} + public void setCompoundDrawablesRelativeWithIntrinsicBounds(int p0, int p1, int p2, int p3){} + public void setCompoundDrawablesWithIntrinsicBounds(Drawable p0, Drawable p1, Drawable p2, Drawable p3){} + public void setCompoundDrawablesWithIntrinsicBounds(int p0, int p1, int p2, int p3){} + public void setCursorVisible(boolean p0){} + public void setCustomInsertionActionModeCallback(ActionMode.Callback p0){} + public void setCustomSelectionActionModeCallback(ActionMode.Callback p0){} + public void setElegantTextHeight(boolean p0){} + public void setEllipsize(TextUtils.TruncateAt p0){} + public void setEms(int p0){} + public void setEnabled(boolean p0){} + public void setError(CharSequence p0){} + public void setError(CharSequence p0, Drawable p1){} + public void setExtractedText(ExtractedText p0){} + public void setFallbackLineSpacing(boolean p0){} + public void setFilters(InputFilter[] p0){} + public void setFirstBaselineToTopHeight(int p0){} + public void setFontFeatureSettings(String p0){} + public void setFreezesText(boolean p0){} + public void setGravity(int p0){} + public void setHeight(int p0){} + public void setHighlightColor(int p0){} + public void setHorizontallyScrolling(boolean p0){} + public void setHyphenationFrequency(int p0){} + public void setImeActionLabel(CharSequence p0, int p1){} + public void setImeHintLocales(LocaleList p0){} + public void setImeOptions(int p0){} + public void setIncludeFontPadding(boolean p0){} + public void setInputExtras(int p0){} + public void setInputType(int p0){} + public void setJustificationMode(int p0){} + public void setKeyListener(KeyListener p0){} + public void setLastBaselineToBottomHeight(int p0){} + public void setLetterSpacing(float p0){} + public void setLineHeight(int p0){} + public void setLineSpacing(float p0, float p1){} + public void setLines(int p0){} + public void setMarqueeRepeatLimit(int p0){} + public void setMaxEms(int p0){} + public void setMaxHeight(int p0){} + public void setMaxLines(int p0){} + public void setMaxWidth(int p0){} + public void setMinEms(int p0){} + public void setMinHeight(int p0){} + public void setMinLines(int p0){} + public void setMinWidth(int p0){} + public void setOnEditorActionListener(TextView.OnEditorActionListener p0){} + public void setPadding(int p0, int p1, int p2, int p3){} + public void setPaddingRelative(int p0, int p1, int p2, int p3){} + public void setPaintFlags(int p0){} + public void setPrivateImeOptions(String p0){} + public void setRawInputType(int p0){} + public void setScroller(Scroller p0){} + public void setSelectAllOnFocus(boolean p0){} + public void setSelected(boolean p0){} + public void setShadowLayer(float p0, float p1, float p2, int p3){} + public void setSingleLine(){} + public void setSingleLine(boolean p0){} + public void setText(CharSequence p0, TextView.BufferType p1){} + public void setTextAppearance(Context p0, int p1){} + public void setTextAppearance(int p0){} + public void setTextClassifier(TextClassifier p0){} + public void setTextColor(ColorStateList p0){} + public void setTextColor(int p0){} + public void setTextCursorDrawable(Drawable p0){} + public void setTextCursorDrawable(int p0){} + public void setTextIsSelectable(boolean p0){} + public void setTextLocale(Locale p0){} + public void setTextLocales(LocaleList p0){} + public void setTextMetricsParams(PrecomputedText.Params p0){} + public void setTextScaleX(float p0){} + public void setTextSelectHandle(Drawable p0){} + public void setTextSelectHandle(int p0){} + public void setTextSelectHandleLeft(Drawable p0){} + public void setTextSelectHandleLeft(int p0){} + public void setTextSelectHandleRight(Drawable p0){} + public void setTextSelectHandleRight(int p0){} + public void setTextSize(float p0){} + public void setTextSize(int p0, float p1){} + public void setTypeface(Typeface p0){} + public void setTypeface(Typeface p0, int p1){} + public void setWidth(int p0){} + static public enum BufferType + { + EDITABLE, NORMAL, SPANNABLE; + private BufferType() {} + } + static public interface OnEditorActionListener + { + boolean onEditorAction(TextView p0, int p1, KeyEvent p2); + } } diff --git a/java/ql/test/stubs/google-android-9.0.0/android/widget/Toolbar.java b/java/ql/test/stubs/google-android-9.0.0/android/widget/Toolbar.java new file mode 100644 index 000000000000..91b6be9e53d3 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/widget/Toolbar.java @@ -0,0 +1,116 @@ +// Generated automatically from android.widget.Toolbar for testing purposes + +package android.widget; + +import android.app.ActionBar; +import android.content.Context; +import android.graphics.drawable.Drawable; +import android.os.Parcelable; +import android.util.AttributeSet; +import android.view.Menu; +import android.view.MenuItem; +import android.view.MotionEvent; +import android.view.View; +import android.view.ViewGroup; + +public class Toolbar extends ViewGroup +{ + protected Toolbar() {} + protected Parcelable onSaveInstanceState(){ return null; } + protected Toolbar.LayoutParams generateDefaultLayoutParams(){ return null; } + protected Toolbar.LayoutParams generateLayoutParams(ViewGroup.LayoutParams p0){ return null; } + protected boolean checkLayoutParams(ViewGroup.LayoutParams p0){ return false; } + protected void onAttachedToWindow(){} + protected void onDetachedFromWindow(){} + protected void onLayout(boolean p0, int p1, int p2, int p3, int p4){} + protected void onMeasure(int p0, int p1){} + protected void onRestoreInstanceState(Parcelable p0){} + public CharSequence getCollapseContentDescription(){ return null; } + public CharSequence getLogoDescription(){ return null; } + public CharSequence getNavigationContentDescription(){ return null; } + public CharSequence getSubtitle(){ return null; } + public CharSequence getTitle(){ return null; } + public Drawable getCollapseIcon(){ return null; } + public Drawable getLogo(){ return null; } + public Drawable getNavigationIcon(){ return null; } + public Drawable getOverflowIcon(){ return null; } + public Menu getMenu(){ return null; } + public Toolbar(Context p0){} + public Toolbar(Context p0, AttributeSet p1){} + public Toolbar(Context p0, AttributeSet p1, int p2){} + public Toolbar(Context p0, AttributeSet p1, int p2, int p3){} + public Toolbar.LayoutParams generateLayoutParams(AttributeSet p0){ return null; } + public boolean hasExpandedActionView(){ return false; } + public boolean hideOverflowMenu(){ return false; } + public boolean isOverflowMenuShowing(){ return false; } + public boolean onTouchEvent(MotionEvent p0){ return false; } + public boolean showOverflowMenu(){ return false; } + public int getContentInsetEnd(){ return 0; } + public int getContentInsetEndWithActions(){ return 0; } + public int getContentInsetLeft(){ return 0; } + public int getContentInsetRight(){ return 0; } + public int getContentInsetStart(){ return 0; } + public int getContentInsetStartWithNavigation(){ return 0; } + public int getCurrentContentInsetEnd(){ return 0; } + public int getCurrentContentInsetLeft(){ return 0; } + public int getCurrentContentInsetRight(){ return 0; } + public int getCurrentContentInsetStart(){ return 0; } + public int getPopupTheme(){ return 0; } + public int getTitleMarginBottom(){ return 0; } + public int getTitleMarginEnd(){ return 0; } + public int getTitleMarginStart(){ return 0; } + public int getTitleMarginTop(){ return 0; } + public void collapseActionView(){} + public void dismissPopupMenus(){} + public void inflateMenu(int p0){} + public void onRtlPropertiesChanged(int p0){} + public void setCollapseContentDescription(CharSequence p0){} + public void setCollapseContentDescription(int p0){} + public void setCollapseIcon(Drawable p0){} + public void setCollapseIcon(int p0){} + public void setContentInsetEndWithActions(int p0){} + public void setContentInsetStartWithNavigation(int p0){} + public void setContentInsetsAbsolute(int p0, int p1){} + public void setContentInsetsRelative(int p0, int p1){} + public void setLogo(Drawable p0){} + public void setLogo(int p0){} + public void setLogoDescription(CharSequence p0){} + public void setLogoDescription(int p0){} + public void setNavigationContentDescription(CharSequence p0){} + public void setNavigationContentDescription(int p0){} + public void setNavigationIcon(Drawable p0){} + public void setNavigationIcon(int p0){} + public void setNavigationOnClickListener(View.OnClickListener p0){} + public void setOnMenuItemClickListener(Toolbar.OnMenuItemClickListener p0){} + public void setOverflowIcon(Drawable p0){} + public void setPopupTheme(int p0){} + public void setSubtitle(CharSequence p0){} + public void setSubtitle(int p0){} + public void setSubtitleTextAppearance(Context p0, int p1){} + public void setSubtitleTextColor(int p0){} + public void setTitle(CharSequence p0){} + public void setTitle(int p0){} + public void setTitleMargin(int p0, int p1, int p2, int p3){} + public void setTitleMarginBottom(int p0){} + public void setTitleMarginEnd(int p0){} + public void setTitleMarginStart(int p0){} + public void setTitleMarginTop(int p0){} + public void setTitleTextAppearance(Context p0, int p1){} + public void setTitleTextColor(int p0){} + static public class LayoutParams extends ActionBar.LayoutParams + { + protected LayoutParams() {} + public LayoutParams(ActionBar.LayoutParams p0){} + public LayoutParams(Context p0, AttributeSet p1){} + public LayoutParams(Toolbar.LayoutParams p0){} + public LayoutParams(ViewGroup.LayoutParams p0){} + public LayoutParams(ViewGroup.MarginLayoutParams p0){} + public LayoutParams(int p0){} + public LayoutParams(int p0, int p1){} + public LayoutParams(int p0, int p1, int p2){} + } + static public interface OnMenuItemClickListener + { + boolean onMenuItemClick(MenuItem p0); + } +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/window/SplashScreen.java b/java/ql/test/stubs/google-android-9.0.0/android/window/SplashScreen.java new file mode 100644 index 000000000000..1c927807b454 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/window/SplashScreen.java @@ -0,0 +1,16 @@ +// Generated automatically from android.window.SplashScreen for testing purposes + +package android.window; + +import android.window.SplashScreenView; + +public interface SplashScreen +{ + static public interface OnExitAnimationListener + { + void onSplashScreenExit(SplashScreenView p0); + } + void clearOnExitAnimationListener(); + void setOnExitAnimationListener(SplashScreen.OnExitAnimationListener p0); + void setSplashScreenTheme(int p0); +} diff --git a/java/ql/test/stubs/google-android-9.0.0/android/window/SplashScreenView.java b/java/ql/test/stubs/google-android-9.0.0/android/window/SplashScreenView.java new file mode 100644 index 000000000000..01ad6a2cd0b8 --- /dev/null +++ b/java/ql/test/stubs/google-android-9.0.0/android/window/SplashScreenView.java @@ -0,0 +1,18 @@ +// Generated automatically from android.window.SplashScreenView for testing purposes + +package android.window; + +import android.view.View; +import android.widget.FrameLayout; +import java.time.Duration; +import java.time.Instant; + +public class SplashScreenView extends FrameLayout +{ + protected void onDetachedFromWindow(){} + public Duration getIconAnimationDuration(){ return null; } + public Instant getIconAnimationStart(){ return null; } + public View getIconView(){ return null; } + public void remove(){} + public void setAlpha(float p0){} +}