field public static final java.lang.String FEATURE_NFC_HOST_CARD_EMULATION = "android.hardware.nfc.hce";
field public static final java.lang.String FEATURE_NFC_HOST_CARD_EMULATION_NFCF = "android.hardware.nfc.hcef";
field public static final java.lang.String FEATURE_OPENGLES_EXTENSION_PACK = "android.hardware.opengles.aep";
- field public static final java.lang.String FEATURE_PC = "android.hardware.type.pc";
field public static final java.lang.String FEATURE_PICTURE_IN_PICTURE = "android.software.picture_in_picture";
field public static final java.lang.String FEATURE_PRINTING = "android.software.print";
field public static final java.lang.String FEATURE_SCREEN_LANDSCAPE = "android.hardware.screen.landscape";
field public static final java.lang.String FEATURE_WIFI = "android.hardware.wifi";
field public static final java.lang.String FEATURE_WIFI_AWARE = "android.hardware.wifi.aware";
field public static final java.lang.String FEATURE_WIFI_DIRECT = "android.hardware.wifi.direct";
- field public static final java.lang.String FEATURE_WIFI_PASSPOINT = "android.hardware.wifi.passpoint";
field public static final int GET_ACTIVITIES = 1; // 0x1
field public static final int GET_CONFIGURATIONS = 16384; // 0x4000
field public static final deprecated int GET_DISABLED_COMPONENTS = 512; // 0x200
public static final class Call.RttCall {
method public int getRttAudioMode();
- method public java.lang.String read() throws java.io.IOException;
- method public java.lang.String readImmediately() throws java.io.IOException;
+ method public java.lang.String read();
method public void setRttMode(int);
method public void write(java.lang.String) throws java.io.IOException;
field public static final int RTT_MODE_FULL = 1; // 0x1
method public android.os.Vibrator getVibrator();
method public boolean[] hasKeys(int...);
method public boolean hasMicrophone();
- method public boolean isEnabled();
method public boolean isVirtual();
method public boolean supportsSource(int);
method public void writeToParcel(android.os.Parcel, int);
}
public final class AccessibilityManager {
- method public void addAccessibilityRequestPreparer(android.view.accessibility.AccessibilityRequestPreparer);
method public boolean addAccessibilityStateChangeListener(android.view.accessibility.AccessibilityManager.AccessibilityStateChangeListener);
method public void addAccessibilityStateChangeListener(android.view.accessibility.AccessibilityManager.AccessibilityStateChangeListener, android.os.Handler);
method public boolean addTouchExplorationStateChangeListener(android.view.accessibility.AccessibilityManager.TouchExplorationStateChangeListener);
method public void interrupt();
method public boolean isEnabled();
method public boolean isTouchExplorationEnabled();
- method public void removeAccessibilityRequestPreparer(android.view.accessibility.AccessibilityRequestPreparer);
method public boolean removeAccessibilityStateChangeListener(android.view.accessibility.AccessibilityManager.AccessibilityStateChangeListener);
method public boolean removeTouchExplorationStateChangeListener(android.view.accessibility.AccessibilityManager.TouchExplorationStateChangeListener);
method public void sendAccessibilityEvent(android.view.accessibility.AccessibilityEvent);
method public void setToIndex(int);
}
- public abstract class AccessibilityRequestPreparer {
- ctor public AccessibilityRequestPreparer(android.view.View, int);
- method public android.view.View getView();
- method public abstract void onPrepareExtraData(int, java.lang.String, android.os.Bundle, android.os.Message);
- field public static final int REQUEST_TYPE_EXTRA_DATA = 1; // 0x1
- }
-
public final class AccessibilityWindowInfo implements android.os.Parcelable {
method public int describeContents();
method public android.view.accessibility.AccessibilityNodeInfo getAnchor();
method public void goBack();
method public void goBackOrForward(int);
method public void goForward();
- method public static void initSafeBrowsing(android.content.Context, android.webkit.ValueCallback<java.lang.Boolean>);
method public void invokeZoomPicker();
method public boolean isPrivateBrowsingEnabled();
method public void loadData(java.lang.String, java.lang.String, java.lang.String);
method public static void setWebContentsDebuggingEnabled(boolean);
method public void setWebViewClient(android.webkit.WebViewClient);
method public deprecated boolean showFindDialog(java.lang.String, boolean);
- method public static void shutdownSafeBrowsing();
method public void stopLoading();
method public void zoomBy(float);
method public boolean zoomIn();
field public static final java.lang.String ACTION_SET_NEW_PASSWORD = "android.app.action.SET_NEW_PASSWORD";
field public static final java.lang.String ACTION_SET_PROFILE_OWNER = "android.app.action.SET_PROFILE_OWNER";
field public static final java.lang.String ACTION_START_ENCRYPTION = "android.app.action.START_ENCRYPTION";
- field public static final java.lang.String ACTION_STATE_USER_SETUP_COMPLETE = "android.app.action.STATE_USER_SETUP_COMPLETE";
field public static final java.lang.String ACTION_SYSTEM_UPDATE_POLICY_CHANGED = "android.app.action.SYSTEM_UPDATE_POLICY_CHANGED";
field public static final java.lang.String DELEGATION_APP_RESTRICTIONS = "delegation-app-restrictions";
field public static final java.lang.String DELEGATION_BLOCK_UNINSTALL = "delegation-block-uninstall";
method public abstract java.util.List<android.content.pm.ResolveInfo> queryIntentContentProviders(android.content.Intent, int);
method public abstract java.util.List<android.content.pm.ResolveInfo> queryIntentServices(android.content.Intent, int);
method public abstract java.util.List<android.content.pm.PermissionInfo> queryPermissionsByGroup(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
- method public abstract void registerDexModule(java.lang.String, android.content.pm.PackageManager.DexModuleRegisterCallback);
method public abstract void removeOnPermissionsChangeListener(android.content.pm.PackageManager.OnPermissionsChangedListener);
method public abstract deprecated void removePackageFromPreferred(java.lang.String);
method public abstract void removePermission(java.lang.String);
field public static final java.lang.String FEATURE_NFC_HOST_CARD_EMULATION = "android.hardware.nfc.hce";
field public static final java.lang.String FEATURE_NFC_HOST_CARD_EMULATION_NFCF = "android.hardware.nfc.hcef";
field public static final java.lang.String FEATURE_OPENGLES_EXTENSION_PACK = "android.hardware.opengles.aep";
- field public static final java.lang.String FEATURE_PC = "android.hardware.type.pc";
field public static final java.lang.String FEATURE_PICTURE_IN_PICTURE = "android.software.picture_in_picture";
field public static final java.lang.String FEATURE_PRINTING = "android.software.print";
field public static final java.lang.String FEATURE_SCREEN_LANDSCAPE = "android.hardware.screen.landscape";
field public static final java.lang.String FEATURE_WIFI = "android.hardware.wifi";
field public static final java.lang.String FEATURE_WIFI_AWARE = "android.hardware.wifi.aware";
field public static final java.lang.String FEATURE_WIFI_DIRECT = "android.hardware.wifi.direct";
- field public static final java.lang.String FEATURE_WIFI_PASSPOINT = "android.hardware.wifi.passpoint";
field public static final int FLAG_PERMISSION_GRANTED_BY_DEFAULT = 32; // 0x20
field public static final int FLAG_PERMISSION_POLICY_FIXED = 4; // 0x4
field public static final int FLAG_PERMISSION_REVIEW_REQUIRED = 64; // 0x40
field public static final int VERSION_CODE_HIGHEST = -1; // 0xffffffff
}
- public static abstract class PackageManager.DexModuleRegisterCallback {
- ctor public PackageManager.DexModuleRegisterCallback();
- method public abstract void onDexModuleRegistered(java.lang.String, boolean, java.lang.String);
- }
-
public static class PackageManager.NameNotFoundException extends android.util.AndroidException {
ctor public PackageManager.NameNotFoundException();
ctor public PackageManager.NameNotFoundException(java.lang.String);
public static final class Call.RttCall {
method public int getRttAudioMode();
- method public java.lang.String read() throws java.io.IOException;
- method public java.lang.String readImmediately() throws java.io.IOException;
+ method public java.lang.String read();
method public void setRttMode(int);
method public void write(java.lang.String) throws java.io.IOException;
field public static final int RTT_MODE_FULL = 1; // 0x1
method public java.util.List<android.content.pm.ResolveInfo> queryIntentContentProviders(android.content.Intent, int);
method public java.util.List<android.content.pm.ResolveInfo> queryIntentServices(android.content.Intent, int);
method public java.util.List<android.content.pm.PermissionInfo> queryPermissionsByGroup(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
- method public void registerDexModule(java.lang.String, android.content.pm.PackageManager.DexModuleRegisterCallback);
method public void removeOnPermissionsChangeListener(android.content.pm.PackageManager.OnPermissionsChangedListener);
method public void removePackageFromPreferred(java.lang.String);
method public void removePermission(java.lang.String);
method public android.os.Vibrator getVibrator();
method public boolean[] hasKeys(int...);
method public boolean hasMicrophone();
- method public boolean isEnabled();
method public boolean isVirtual();
method public boolean supportsSource(int);
method public void writeToParcel(android.os.Parcel, int);
}
public final class AccessibilityManager {
- method public void addAccessibilityRequestPreparer(android.view.accessibility.AccessibilityRequestPreparer);
method public boolean addAccessibilityStateChangeListener(android.view.accessibility.AccessibilityManager.AccessibilityStateChangeListener);
method public void addAccessibilityStateChangeListener(android.view.accessibility.AccessibilityManager.AccessibilityStateChangeListener, android.os.Handler);
method public boolean addTouchExplorationStateChangeListener(android.view.accessibility.AccessibilityManager.TouchExplorationStateChangeListener);
method public static boolean isAccessibilityButtonSupported();
method public boolean isEnabled();
method public boolean isTouchExplorationEnabled();
- method public void removeAccessibilityRequestPreparer(android.view.accessibility.AccessibilityRequestPreparer);
method public boolean removeAccessibilityStateChangeListener(android.view.accessibility.AccessibilityManager.AccessibilityStateChangeListener);
method public boolean removeTouchExplorationStateChangeListener(android.view.accessibility.AccessibilityManager.TouchExplorationStateChangeListener);
method public void sendAccessibilityEvent(android.view.accessibility.AccessibilityEvent);
method public void setToIndex(int);
}
- public abstract class AccessibilityRequestPreparer {
- ctor public AccessibilityRequestPreparer(android.view.View, int);
- method public android.view.View getView();
- method public abstract void onPrepareExtraData(int, java.lang.String, android.os.Bundle, android.os.Message);
- field public static final int REQUEST_TYPE_EXTRA_DATA = 1; // 0x1
- }
-
public final class AccessibilityWindowInfo implements android.os.Parcelable {
method public int describeContents();
method public android.view.accessibility.AccessibilityNodeInfo getAnchor();
method public void goBack();
method public void goBackOrForward(int);
method public void goForward();
- method public static void initSafeBrowsing(android.content.Context, android.webkit.ValueCallback<java.lang.Boolean>);
method public void invokeZoomPicker();
method public boolean isPrivateBrowsingEnabled();
method public void loadData(java.lang.String, java.lang.String, java.lang.String);
method public static void setWebContentsDebuggingEnabled(boolean);
method public void setWebViewClient(android.webkit.WebViewClient);
method public deprecated boolean showFindDialog(java.lang.String, boolean);
- method public static void shutdownSafeBrowsing();
method public void stopLoading();
method public void zoomBy(float);
method public boolean zoomIn();
method public abstract java.lang.String findAddress(java.lang.String);
method public abstract void freeMemoryForTests();
method public abstract java.lang.String getDefaultUserAgent(android.content.Context);
- method public abstract void initSafeBrowsing(android.content.Context, android.webkit.ValueCallback<java.lang.Boolean>);
method public abstract android.net.Uri[] parseFileChooserResult(int, android.content.Intent);
method public abstract void setWebContentsDebuggingEnabled(boolean);
- method public abstract void shutdownSafeBrowsing();
}
public class WebViewFragment extends android.app.Fragment {
field public static final java.lang.String FEATURE_NFC_HOST_CARD_EMULATION = "android.hardware.nfc.hce";
field public static final java.lang.String FEATURE_NFC_HOST_CARD_EMULATION_NFCF = "android.hardware.nfc.hcef";
field public static final java.lang.String FEATURE_OPENGLES_EXTENSION_PACK = "android.hardware.opengles.aep";
- field public static final java.lang.String FEATURE_PC = "android.hardware.type.pc";
field public static final java.lang.String FEATURE_PICTURE_IN_PICTURE = "android.software.picture_in_picture";
field public static final java.lang.String FEATURE_PRINTING = "android.software.print";
field public static final java.lang.String FEATURE_SCREEN_LANDSCAPE = "android.hardware.screen.landscape";
field public static final java.lang.String FEATURE_WIFI = "android.hardware.wifi";
field public static final java.lang.String FEATURE_WIFI_AWARE = "android.hardware.wifi.aware";
field public static final java.lang.String FEATURE_WIFI_DIRECT = "android.hardware.wifi.direct";
- field public static final java.lang.String FEATURE_WIFI_PASSPOINT = "android.hardware.wifi.passpoint";
field public static final int GET_ACTIVITIES = 1; // 0x1
field public static final int GET_CONFIGURATIONS = 16384; // 0x4000
field public static final deprecated int GET_DISABLED_COMPONENTS = 512; // 0x200
public static final class Call.RttCall {
method public int getRttAudioMode();
- method public java.lang.String read() throws java.io.IOException;
+ method public java.lang.String read();
method public java.lang.String readImmediately() throws java.io.IOException;
method public void setRttMode(int);
method public void write(java.lang.String) throws java.io.IOException;
method public android.os.Vibrator getVibrator();
method public boolean[] hasKeys(int...);
method public boolean hasMicrophone();
- method public boolean isEnabled();
method public boolean isVirtual();
method public boolean supportsSource(int);
method public void writeToParcel(android.os.Parcel, int);
method public void goBack();
method public void goBackOrForward(int);
method public void goForward();
- method public static void initSafeBrowsing(android.content.Context, android.webkit.ValueCallback<java.lang.Boolean>);
method public void invokeZoomPicker();
method public boolean isPrivateBrowsingEnabled();
method public void loadData(java.lang.String, java.lang.String, java.lang.String);
method public static void setWebContentsDebuggingEnabled(boolean);
method public void setWebViewClient(android.webkit.WebViewClient);
method public deprecated boolean showFindDialog(java.lang.String, boolean);
- method public static void shutdownSafeBrowsing();
method public void stopLoading();
method public void zoomBy(float);
method public boolean zoomIn();
* @hide
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
- @SystemApi
public static final String ACTION_STATE_USER_SETUP_COMPLETE =
"android.app.action.STATE_USER_SETUP_COMPLETE";
/**
* Feature for {@link #getSystemAvailableFeatures} and
* {@link #hasSystemFeature}: The device supports Wi-Fi Passpoint.
+ * @hide
*/
@SdkConstant(SdkConstantType.FEATURE)
public static final String FEATURE_WIFI_PASSPOINT = "android.hardware.wifi.passpoint";
* computers, laptops and variants such as convertibles or detachables.
* Due to the larger screen, the device will most likely use the
* {@link #FEATURE_FREEFORM_WINDOW_MANAGEMENT} feature as well.
+ * @hide
*/
@SdkConstant(SdkConstantType.FEATURE)
public static final String FEATURE_PC = "android.hardware.type.pc";
*
* @hide
*/
- @SystemApi
public static abstract class DexModuleRegisterCallback {
public abstract void onDexModuleRegistered(String dexModulePath, boolean success,
String message);
*
* @hide
*/
- @SystemApi
public abstract void registerDexModule(String dexModulePath,
@Nullable DexModuleRegisterCallback callback);
}
/**
* Returns true if input device is enabled.
* @return Whether the input device is enabled.
+ * @hide
*/
public boolean isEnabled() {
return InputManager.getInstance().isInputDeviceEnabled(mId);
import android.annotation.SdkConstant;
import android.annotation.SystemApi;
import android.annotation.SystemService;
+import android.annotation.TestApi;
import android.content.ComponentName;
import android.content.Context;
import android.content.pm.PackageManager;
/**
* Registers a {@link AccessibilityRequestPreparer}.
+ * @hide
*/
+ @TestApi
public void addAccessibilityRequestPreparer(AccessibilityRequestPreparer preparer) {
if (mRequestPreparerLists == null) {
mRequestPreparerLists = new SparseArray<>(1);
/**
* Unregisters a {@link AccessibilityRequestPreparer}.
+ * @hide
*/
+ @TestApi
public void removeAccessibilityRequestPreparer(AccessibilityRequestPreparer preparer) {
if (mRequestPreparerLists == null) {
return;
import android.annotation.IntDef;
import android.annotation.Nullable;
+import android.annotation.TestApi;
import android.content.Context;
import android.os.Bundle;
import android.os.Message;
* <p>
* <strong>Note:</strong> This class should only be needed in exceptional situations where a
* {@link View} cannot otherwise synchronously meet the request for accessibility data.
+ * @hide
*/
+@TestApi
public abstract class AccessibilityRequestPreparer {
public static final int REQUEST_TYPE_EXTRA_DATA = 0x00000001;
* @param context is the activity context the WebView will be used in.
* @param callback will be called with the value true if initialization is
* successful. The callback will be run on the UI thread.
+ * @hide
*/
public static void initSafeBrowsing(Context context, ValueCallback<Boolean> callback) {
getFactory().getStatics().initSafeBrowsing(context, callback);
/**
* Shuts down Safe Browsing. This should only be called once.
+ * @hide
*/
public static void shutdownSafeBrowsing() {
getFactory().getStatics().shutdownSafeBrowsing();
/**
* Implement the API method
* {@link android.webkit.WebView#initSafeBrowsing(Context , ValueCallback<Boolean>)}
+ * @hide
*/
- void initSafeBrowsing(Context context, ValueCallback<Boolean> callback);
+ default void initSafeBrowsing(Context context, ValueCallback<Boolean> callback) {
+ }
/**
* Implement the API method
* {@link android.webkit.WebView#shutdownSafeBrowsing()}
+ * @hide
*/
- void shutdownSafeBrowsing();
+ default void shutdownSafeBrowsing() {
+ }
}
Statics getStatics();
}
- public synchronized RemoteViews clone() {
- Preconditions.checkState(mIsRoot, "RemoteView has been attached to another RemoteView. "
- + "May only clone the root of a RemoteView hierarchy.");
+ public RemoteViews clone() {
+ synchronized (this) {
+ Preconditions.checkState(mIsRoot, "RemoteView has been attached to another RemoteView. "
+ + "May only clone the root of a RemoteView hierarchy.");
- Parcel p = Parcel.obtain();
+ Parcel p = Parcel.obtain();
- // Do not parcel the Bitmap cache - doing so creates an expensive copy of all bitmaps.
- // Instead pretend we're not owning the cache while parceling.
- mIsRoot = false;
- writeToParcel(p, PARCELABLE_ELIDE_DUPLICATES);
- p.setDataPosition(0);
- mIsRoot = true;
+ // Do not parcel the Bitmap cache - doing so creates an expensive copy of all bitmaps.
+ // Instead pretend we're not owning the cache while parceling.
+ mIsRoot = false;
+ writeToParcel(p, PARCELABLE_ELIDE_DUPLICATES);
+ p.setDataPosition(0);
+ mIsRoot = true;
- RemoteViews rv = new RemoteViews(p, mBitmapCache.clone(), mApplication, 0);
- rv.mIsRoot = true;
+ RemoteViews rv = new RemoteViews(p, mBitmapCache.clone(), mApplication, 0);
+ rv.mIsRoot = true;
- p.recycle();
- return rv;
+ p.recycle();
+ return rv;
+ }
}
public String getPackage() {
import android.annotation.IntDef;
import android.annotation.Nullable;
import android.annotation.SystemApi;
+import android.annotation.TestApi;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
* @return A string containing text sent by the remote user, or {@code null} if the
* conversation has been terminated or if there was an error while reading.
*/
- public String read() throws IOException {
- int numRead = mReceiveStream.read(mReadBuffer, 0, READ_BUFFER_SIZE);
- if (numRead < 0) {
- return null;
+ public String read() {
+ try {
+ int numRead = mReceiveStream.read(mReadBuffer, 0, READ_BUFFER_SIZE);
+ if (numRead < 0) {
+ return null;
+ }
+ return new String(mReadBuffer, 0, numRead);
+ } catch (IOException e) {
+ Log.w(this, "Exception encountered when reading from InputStreamReader: %s", e);
}
- return new String(mReadBuffer, 0, numRead);
+ return null;
}
/**
* be read.
* @return A string containing text entered by the user, or {@code null} if the user has
* not entered any new text yet.
+ * @hide
*/
+ @TestApi
public String readImmediately() throws IOException {
if (mReceiveStream.ready()) {
return read();