Merge "API Review: Add @IntDef and other annotations to Menu Item flags." into nyc-dev
This commit is contained in:
@@ -16,9 +16,15 @@
|
|||||||
|
|
||||||
package android.webkit;
|
package android.webkit;
|
||||||
|
|
||||||
|
import android.annotation.IntDef;
|
||||||
import android.annotation.SystemApi;
|
import android.annotation.SystemApi;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manages settings state for a WebView. When a WebView is first created, it
|
* 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
|
* obtains a set of default settings. These default settings will be returned
|
||||||
@@ -1361,19 +1367,33 @@ public abstract class WebSettings {
|
|||||||
*/
|
*/
|
||||||
public abstract boolean getOffscreenPreRaster();
|
public abstract boolean getOffscreenPreRaster();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
@IntDef(flag = true,
|
||||||
|
value = {
|
||||||
|
MENU_ITEM_NONE,
|
||||||
|
MENU_ITEM_SHARE,
|
||||||
|
MENU_ITEM_WEB_SEARCH,
|
||||||
|
MENU_ITEM_PROCESS_TEXT
|
||||||
|
})
|
||||||
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
|
@Target({ElementType.PARAMETER, ElementType.METHOD})
|
||||||
|
private @interface MenuItemFlags {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disables the action mode menu items according to {@code menuItems} flag.
|
* Disables the action mode menu items according to {@code menuItems} flag.
|
||||||
* @param menuItems an integer field flag for the menu items to be disabled.
|
* @param menuItems an integer field flag for the menu items to be disabled.
|
||||||
*/
|
*/
|
||||||
public abstract void setDisabledActionModeMenuItems(int menuItems);
|
public abstract void setDisabledActionModeMenuItems(@MenuItemFlags int menuItems);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the action mode menu items that are disabled, expressed in an integer field flag.
|
* Gets the action mode menu items that are disabled, expressed in an integer field flag.
|
||||||
* The default value is {@link #MENU_ITEM_NONE}
|
* The default value is {@link #MENU_ITEM_NONE}
|
||||||
*
|
*
|
||||||
* @return all the disabled menu item flags combined with OR.
|
* @return all the disabled menu item flags combined with bitwise OR.
|
||||||
*/
|
*/
|
||||||
public abstract int getDisabledActionModeMenuItems();
|
public abstract @MenuItemFlags int getDisabledActionModeMenuItems();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used with {@link #setDisabledActionModeMenuItems}.
|
* Used with {@link #setDisabledActionModeMenuItems}.
|
||||||
|
|||||||
Reference in New Issue
Block a user