merge in nyc-release history after reset to master
diff --git a/Android.mk b/Android.mk
index d22273c..137ef85 100644
--- a/Android.mk
+++ b/Android.mk
@@ -677,6 +677,16 @@
$(fwbase_dirs_to_document) \
$(non_base_dirs)
+###########################################################
+## Return all directories that have a 'NO_DOCS' file in
+## them, appending a '%' to them to form a pattern to
+## filter out files under those directories.
+## $(1): A list of base directories to look at.
+###########################################################
+define find-no-docs-pattern
+$(addsuffix %, $(dir $(foreach dir, $(1), $(shell cd $(LOCAL_PATH); find $(dir) -name NO_DOCS))))
+endef
+
# These are relative to frameworks/base
# FRAMEWORKS_BASE_SUBDIRS comes from build/core/pathmap.mk
dirs_to_document := \
@@ -684,6 +694,9 @@
$(addprefix ../../, $(FRAMEWORKS_DATA_BINDING_JAVA_SRC_DIRS)) \
$(addprefix ../../, $(FRAMEWORKS_SUPPORT_JAVA_SRC_DIRS)) \
+patterns_to_not_document := \
+ $(call find-no-docs-pattern, $(dirs_to_document))
+
# These are relative to frameworks/base
html_dirs := \
$(FRAMEWORKS_BASE_SUBDIRS) \
@@ -697,7 +710,7 @@
# These are relative to frameworks/base
framework_docs_LOCAL_SRC_FILES := \
- $(call find-other-java-files, $(dirs_to_document)) \
+ $(filter-out $(patterns_to_not_document), $(call find-other-java-files, $(dirs_to_document))) \
$(common_src_files)
# These are relative to frameworks/base
diff --git a/api/current.txt b/api/current.txt
index d54b7fd..c017754 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -28,6 +28,7 @@
field public static final java.lang.String BIND_INPUT_METHOD = "android.permission.BIND_INPUT_METHOD";
field public static final java.lang.String BIND_MIDI_DEVICE_SERVICE = "android.permission.BIND_MIDI_DEVICE_SERVICE";
field public static final java.lang.String BIND_NFC_SERVICE = "android.permission.BIND_NFC_SERVICE";
+ field public static final java.lang.String BIND_NOTIFICATION_ASSISTANT_SERVICE = "android.permission.BIND_NOTIFICATION_ASSISTANT_SERVICE";
field public static final java.lang.String BIND_NOTIFICATION_LISTENER_SERVICE = "android.permission.BIND_NOTIFICATION_LISTENER_SERVICE";
field public static final java.lang.String BIND_PRINT_SERVICE = "android.permission.BIND_PRINT_SERVICE";
field public static final java.lang.String BIND_QUICK_SETTINGS_TILE = "android.permission.BIND_QUICK_SETTINGS_TILE";
@@ -2727,6 +2728,7 @@
method public android.os.Bundle addAccountFromCredentials(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, android.os.Bundle) throws android.accounts.NetworkErrorException;
method public abstract android.os.Bundle confirmCredentials(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, android.os.Bundle) throws android.accounts.NetworkErrorException;
method public abstract android.os.Bundle editProperties(android.accounts.AccountAuthenticatorResponse, java.lang.String);
+ method public android.os.Bundle finishSession(android.accounts.AccountAuthenticatorResponse, java.lang.String, android.os.Bundle) throws android.accounts.NetworkErrorException;
method public android.os.Bundle getAccountCredentialsForCloning(android.accounts.AccountAuthenticatorResponse, android.accounts.Account) throws android.accounts.NetworkErrorException;
method public android.os.Bundle getAccountRemovalAllowed(android.accounts.AccountAuthenticatorResponse, android.accounts.Account) throws android.accounts.NetworkErrorException;
method public abstract android.os.Bundle getAuthToken(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, java.lang.String, android.os.Bundle) throws android.accounts.NetworkErrorException;
@@ -2772,6 +2774,7 @@
method public void clearPassword(android.accounts.Account);
method public android.accounts.AccountManagerFuture<android.os.Bundle> confirmCredentials(android.accounts.Account, android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
method public android.accounts.AccountManagerFuture<android.os.Bundle> editProperties(java.lang.String, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
+ method public android.accounts.AccountManagerFuture<android.os.Bundle> finishSession(android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
method public static android.accounts.AccountManager get(android.content.Context);
method public android.accounts.Account[] getAccounts();
method public android.accounts.Account[] getAccountsByType(java.lang.String);
@@ -5529,6 +5532,8 @@
method public void enableCarMode(int);
method public int getCurrentModeType();
method public int getNightMode();
+ method public boolean isNightModeLocked();
+ method public boolean isUiModeLocked();
method public void setNightMode(int);
field public static java.lang.String ACTION_ENTER_CAR_MODE;
field public static java.lang.String ACTION_ENTER_DESK_MODE;
@@ -8285,6 +8290,7 @@
field public static final java.lang.String ACTION_INSERT_OR_EDIT = "android.intent.action.INSERT_OR_EDIT";
field public static final java.lang.String ACTION_INSTALL_PACKAGE = "android.intent.action.INSTALL_PACKAGE";
field public static final java.lang.String ACTION_LOCALE_CHANGED = "android.intent.action.LOCALE_CHANGED";
+ field public static final java.lang.String ACTION_LOCKED_BOOT_COMPLETED = "android.intent.action.LOCKED_BOOT_COMPLETED";
field public static final java.lang.String ACTION_MAIN = "android.intent.action.MAIN";
field public static final java.lang.String ACTION_MANAGED_PROFILE_ADDED = "android.intent.action.MANAGED_PROFILE_ADDED";
field public static final java.lang.String ACTION_MANAGED_PROFILE_REMOVED = "android.intent.action.MANAGED_PROFILE_REMOVED";
@@ -22927,7 +22933,9 @@
method public static void incrementOperationCount(int);
method public static void incrementOperationCount(int, int);
method public static void setThreadStatsTag(int);
+ method public static void tagDatagramSocket(java.net.DatagramSocket) throws java.net.SocketException;
method public static void tagSocket(java.net.Socket) throws java.net.SocketException;
+ method public static void untagDatagramSocket(java.net.DatagramSocket) throws java.net.SocketException;
method public static void untagSocket(java.net.Socket) throws java.net.SocketException;
field public static final int UNSUPPORTED = -1; // 0xffffffff
}
@@ -28064,8 +28072,9 @@
method public boolean isSystemUser();
method public boolean isUserAGoat();
method public boolean isUserRunning(android.os.UserHandle);
+ method public boolean isUserRunningAndLocked(android.os.UserHandle);
+ method public boolean isUserRunningAndUnlocked(android.os.UserHandle);
method public boolean isUserRunningOrStopping(android.os.UserHandle);
- method public boolean isUserRunningUnlocked(android.os.UserHandle);
method public deprecated boolean setRestrictionsChallenge(java.lang.String);
method public deprecated void setUserRestriction(java.lang.String, boolean);
method public deprecated void setUserRestrictions(android.os.Bundle);
@@ -29631,6 +29640,7 @@
ctor public ContactsContract.CommonDataKinds.Callable();
field public static final android.net.Uri CONTENT_FILTER_URI;
field public static final android.net.Uri CONTENT_URI;
+ field public static final android.net.Uri ENTERPRISE_CONTENT_FILTER_URI;
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
@@ -29777,6 +29787,7 @@
field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/phone_v2";
field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/phone_v2";
field public static final android.net.Uri CONTENT_URI;
+ field public static final android.net.Uri ENTERPRISE_CONTENT_FILTER_URI;
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
@@ -29956,7 +29967,7 @@
field public static final android.net.Uri CONTENT_URI;
field public static final java.lang.String CONTENT_VCARD_TYPE = "text/x-vcard";
field public static final android.net.Uri CONTENT_VCARD_URI;
- field public static final android.net.Uri CORP_CONTENT_FILTER_URI;
+ field public static final android.net.Uri ENTERPRISE_CONTENT_FILTER_URI;
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
@@ -30085,10 +30096,12 @@
field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/contact_directory";
field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/contact_directories";
field public static final android.net.Uri CONTENT_URI;
- field public static final android.net.Uri CORP_CONTENT_URI;
field public static final long DEFAULT = 0L; // 0x0L
field public static final java.lang.String DIRECTORY_AUTHORITY = "authority";
field public static final java.lang.String DISPLAY_NAME = "displayName";
+ field public static final android.net.Uri ENTERPRISE_CONTENT_URI;
+ field public static final long ENTERPRISE_DEFAULT = 1000000000L; // 0x3b9aca00L
+ field public static final long ENTERPRISE_LOCAL_INVISIBLE = 1000000001L; // 0x3b9aca01L
field public static final java.lang.String EXPORT_SUPPORT = "exportSupport";
field public static final int EXPORT_SUPPORT_ANY_ACCOUNT = 2; // 0x2
field public static final int EXPORT_SUPPORT_NONE = 0; // 0x0
@@ -30435,6 +30448,7 @@
field public static final java.lang.String COLUMN_MIME_TYPE = "mime_type";
field public static final java.lang.String COLUMN_SIZE = "_size";
field public static final java.lang.String COLUMN_SUMMARY = "summary";
+ field public static final int FLAG_ARCHIVE = 2048; // 0x800
field public static final int FLAG_DIR_PREFERS_GRID = 16; // 0x10
field public static final int FLAG_DIR_PREFERS_LAST_MODIFIED = 32; // 0x20
field public static final int FLAG_DIR_SUPPORTS_CREATE = 8; // 0x8
@@ -33148,6 +33162,35 @@
field public static final java.lang.String SERVICE_INTERFACE = "android.service.notification.ConditionProviderService";
}
+ public abstract class NotificationAssistantService extends android.service.notification.NotificationListenerService {
+ ctor public NotificationAssistantService();
+ method public final void adjustImportance(java.lang.String, android.service.notification.NotificationAssistantService.Adjustment);
+ method public final void clearAnnotation(java.lang.String);
+ method public void onNotificationActionClick(java.lang.String, long, int);
+ method public void onNotificationClick(java.lang.String, long);
+ method public abstract android.service.notification.NotificationAssistantService.Adjustment onNotificationEnqueued(android.service.notification.StatusBarNotification, int, boolean);
+ method public void onNotificationRemoved(java.lang.String, long, int);
+ method public void onNotificationVisibilityChanged(java.lang.String, long, boolean);
+ method public final void setAnnotation(java.lang.String, android.app.Notification);
+ field public static final int REASON_APP_CANCEL = 8; // 0x8
+ field public static final int REASON_APP_CANCEL_ALL = 9; // 0x9
+ field public static final int REASON_DELEGATE_CANCEL = 2; // 0x2
+ field public static final int REASON_DELEGATE_CANCEL_ALL = 3; // 0x3
+ field public static final int REASON_DELEGATE_CLICK = 1; // 0x1
+ field public static final int REASON_DELEGATE_ERROR = 4; // 0x4
+ field public static final int REASON_GROUP_OPTIMIZATION = 13; // 0xd
+ field public static final int REASON_GROUP_SUMMARY_CANCELED = 12; // 0xc
+ field public static final int REASON_LISTENER_CANCEL = 10; // 0xa
+ field public static final int REASON_LISTENER_CANCEL_ALL = 11; // 0xb
+ field public static final int REASON_PACKAGE_BANNED = 7; // 0x7
+ field public static final int REASON_PACKAGE_CHANGED = 5; // 0x5
+ field public static final int REASON_USER_STOPPED = 6; // 0x6
+ }
+
+ public class NotificationAssistantService.Adjustment {
+ ctor public NotificationAssistantService.Adjustment(int, java.lang.CharSequence, android.net.Uri);
+ }
+
public abstract class NotificationListenerService extends android.app.Service {
ctor public NotificationListenerService();
method public final void cancelAllNotifications();
@@ -33184,11 +33227,19 @@
public static class NotificationListenerService.Ranking {
ctor public NotificationListenerService.Ranking();
+ method public int getImportance();
+ method public java.lang.CharSequence getImportanceExplanation();
method public java.lang.String getKey();
method public int getRank();
method public int getSuppressedVisualEffects();
method public boolean isAmbient();
method public boolean matchesInterruptionFilter();
+ field public static final int IMPORTANCE_DEFAULT = 0; // 0x0
+ field public static final int IMPORTANCE_HIGH = 1; // 0x1
+ field public static final int IMPORTANCE_LOW = -1; // 0xffffffff
+ field public static final int IMPORTANCE_MAX = 2; // 0x2
+ field public static final int IMPORTANCE_NONE = -2; // 0xfffffffe
+ field public static final int IMPORTANCE_UNSPECIFIED = -1000; // 0xfffffc18
}
public static class NotificationListenerService.RankingMap implements android.os.Parcelable {
@@ -33245,6 +33296,7 @@
method public void onStopListening();
method public void onTileAdded();
method public void onTileRemoved();
+ method public final void showDialog(android.app.Dialog);
field public static final java.lang.String ACTION_QS_TILE = "android.service.quicksettings.action.QS_TILE";
}
@@ -38609,10 +38661,11 @@
field public static final int RTL = 1; // 0x1
}
- public final class LocaleList {
+ public final class LocaleList implements android.os.Parcelable {
ctor public LocaleList();
ctor public LocaleList(java.util.Locale);
ctor public LocaleList(java.util.Locale[]);
+ method public int describeContents();
method public static android.util.LocaleList forLanguageTags(java.lang.String);
method public java.util.Locale get(int);
method public java.util.Locale getBestMatch(java.lang.String[]);
@@ -38622,6 +38675,8 @@
method public boolean isEmpty();
method public int size();
method public java.lang.String toLanguageTags();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.util.LocaleList> CREATOR;
}
public final class Log {
@@ -42905,6 +42960,7 @@
field public int initialSelStart;
field public int inputType;
field public java.lang.CharSequence label;
+ field public android.util.LocaleList locales;
field public java.lang.String packageName;
field public java.lang.String privateImeOptions;
}
@@ -64043,4 +64099,3 @@
}
}
-
diff --git a/api/system-current.txt b/api/system-current.txt
index 2ea5ebb..8128819 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -41,6 +41,7 @@
field public static final java.lang.String BIND_KEYGUARD_APPWIDGET = "android.permission.BIND_KEYGUARD_APPWIDGET";
field public static final java.lang.String BIND_MIDI_DEVICE_SERVICE = "android.permission.BIND_MIDI_DEVICE_SERVICE";
field public static final java.lang.String BIND_NFC_SERVICE = "android.permission.BIND_NFC_SERVICE";
+ field public static final java.lang.String BIND_NOTIFICATION_ASSISTANT_SERVICE = "android.permission.BIND_NOTIFICATION_ASSISTANT_SERVICE";
field public static final java.lang.String BIND_NOTIFICATION_LISTENER_SERVICE = "android.permission.BIND_NOTIFICATION_LISTENER_SERVICE";
field public static final java.lang.String BIND_PRINT_SERVICE = "android.permission.BIND_PRINT_SERVICE";
field public static final java.lang.String BIND_QUICK_SETTINGS_TILE = "android.permission.BIND_QUICK_SETTINGS_TILE";
@@ -133,6 +134,7 @@
field public static final java.lang.String MODIFY_AUDIO_ROUTING = "android.permission.MODIFY_AUDIO_ROUTING";
field public static final java.lang.String MODIFY_AUDIO_SETTINGS = "android.permission.MODIFY_AUDIO_SETTINGS";
field public static final java.lang.String MODIFY_CELL_BROADCASTS = "android.permission.MODIFY_CELL_BROADCASTS";
+ field public static final java.lang.String MODIFY_DAY_NIGHT_MODE = "android.permission.MODIFY_DAY_NIGHT_MODE";
field public static final java.lang.String MODIFY_NETWORK_ACCOUNTING = "android.permission.MODIFY_NETWORK_ACCOUNTING";
field public static final java.lang.String MODIFY_PARENTAL_CONTROLS = "android.permission.MODIFY_PARENTAL_CONTROLS";
field public static final java.lang.String MODIFY_PHONE_STATE = "android.permission.MODIFY_PHONE_STATE";
@@ -2827,6 +2829,7 @@
method public android.os.Bundle addAccountFromCredentials(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, android.os.Bundle) throws android.accounts.NetworkErrorException;
method public abstract android.os.Bundle confirmCredentials(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, android.os.Bundle) throws android.accounts.NetworkErrorException;
method public abstract android.os.Bundle editProperties(android.accounts.AccountAuthenticatorResponse, java.lang.String);
+ method public android.os.Bundle finishSession(android.accounts.AccountAuthenticatorResponse, java.lang.String, android.os.Bundle) throws android.accounts.NetworkErrorException;
method public android.os.Bundle getAccountCredentialsForCloning(android.accounts.AccountAuthenticatorResponse, android.accounts.Account) throws android.accounts.NetworkErrorException;
method public android.os.Bundle getAccountRemovalAllowed(android.accounts.AccountAuthenticatorResponse, android.accounts.Account) throws android.accounts.NetworkErrorException;
method public abstract android.os.Bundle getAuthToken(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, java.lang.String, android.os.Bundle) throws android.accounts.NetworkErrorException;
@@ -2872,6 +2875,7 @@
method public void clearPassword(android.accounts.Account);
method public android.accounts.AccountManagerFuture<android.os.Bundle> confirmCredentials(android.accounts.Account, android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
method public android.accounts.AccountManagerFuture<android.os.Bundle> editProperties(java.lang.String, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
+ method public android.accounts.AccountManagerFuture<android.os.Bundle> finishSession(android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
method public static android.accounts.AccountManager get(android.content.Context);
method public android.accounts.Account[] getAccounts();
method public android.accounts.Account[] getAccountsByType(java.lang.String);
@@ -5648,6 +5652,8 @@
method public void enableCarMode(int);
method public int getCurrentModeType();
method public int getNightMode();
+ method public boolean isNightModeLocked();
+ method public boolean isUiModeLocked();
method public void setNightMode(int);
field public static java.lang.String ACTION_ENTER_CAR_MODE;
field public static java.lang.String ACTION_ENTER_DESK_MODE;
@@ -8542,6 +8548,7 @@
field public static final java.lang.String ACTION_INSTALL_PACKAGE = "android.intent.action.INSTALL_PACKAGE";
field public static final java.lang.String ACTION_INTENT_FILTER_NEEDS_VERIFICATION = "android.intent.action.INTENT_FILTER_NEEDS_VERIFICATION";
field public static final java.lang.String ACTION_LOCALE_CHANGED = "android.intent.action.LOCALE_CHANGED";
+ field public static final java.lang.String ACTION_LOCKED_BOOT_COMPLETED = "android.intent.action.LOCKED_BOOT_COMPLETED";
field public static final java.lang.String ACTION_MAIN = "android.intent.action.MAIN";
field public static final java.lang.String ACTION_MANAGED_PROFILE_ADDED = "android.intent.action.MANAGED_PROFILE_ADDED";
field public static final java.lang.String ACTION_MANAGED_PROFILE_REMOVED = "android.intent.action.MANAGED_PROFILE_REMOVED";
@@ -24513,7 +24520,9 @@
method public static void setThreadStatsTagBackup();
method public static void setThreadStatsTagRestore();
method public static void setThreadStatsUid(int);
+ method public static void tagDatagramSocket(java.net.DatagramSocket) throws java.net.SocketException;
method public static void tagSocket(java.net.Socket) throws java.net.SocketException;
+ method public static void untagDatagramSocket(java.net.DatagramSocket) throws java.net.SocketException;
method public static void untagSocket(java.net.Socket) throws java.net.SocketException;
field public static final int UNSUPPORTED = -1; // 0xffffffff
}
@@ -25523,10 +25532,12 @@
field public static final java.lang.String EXTRA_NETWORK_INFO = "networkInfo";
field public static final java.lang.String EXTRA_NEW_RSSI = "newRssi";
field public static final java.lang.String EXTRA_NEW_STATE = "newState";
+ field public static final java.lang.String EXTRA_PREVIOUS_WIFI_AP_STATE = "previous_wifi_state";
field public static final java.lang.String EXTRA_PREVIOUS_WIFI_STATE = "previous_wifi_state";
field public static final java.lang.String EXTRA_RESULTS_UPDATED = "resultsUpdated";
field public static final java.lang.String EXTRA_SUPPLICANT_CONNECTED = "connected";
field public static final java.lang.String EXTRA_SUPPLICANT_ERROR = "supplicantError";
+ field public static final java.lang.String EXTRA_WIFI_AP_STATE = "wifi_state";
field public static final java.lang.String EXTRA_WIFI_CONFIGURATION = "wifiConfiguration";
field public static final java.lang.String EXTRA_WIFI_CREDENTIAL_EVENT_TYPE = "et";
field public static final java.lang.String EXTRA_WIFI_CREDENTIAL_SSID = "ssid";
@@ -25538,6 +25549,12 @@
field public static final java.lang.String SCAN_RESULTS_AVAILABLE_ACTION = "android.net.wifi.SCAN_RESULTS";
field public static final java.lang.String SUPPLICANT_CONNECTION_CHANGE_ACTION = "android.net.wifi.supplicant.CONNECTION_CHANGE";
field public static final java.lang.String SUPPLICANT_STATE_CHANGED_ACTION = "android.net.wifi.supplicant.STATE_CHANGE";
+ field public static final java.lang.String WIFI_AP_STATE_CHANGED_ACTION = "android.net.wifi.WIFI_AP_STATE_CHANGED";
+ field public static final int WIFI_AP_STATE_DISABLED = 11; // 0xb
+ field public static final int WIFI_AP_STATE_DISABLING = 10; // 0xa
+ field public static final int WIFI_AP_STATE_ENABLED = 13; // 0xd
+ field public static final int WIFI_AP_STATE_ENABLING = 12; // 0xc
+ field public static final int WIFI_AP_STATE_FAILED = 14; // 0xe
field public static final java.lang.String WIFI_CREDENTIAL_CHANGED_ACTION = "android.net.wifi.WIFI_CREDENTIAL_CHANGED";
field public static final int WIFI_CREDENTIAL_FORGOT = 1; // 0x1
field public static final int WIFI_CREDENTIAL_SAVED = 0; // 0x0
@@ -30048,8 +30065,9 @@
method public boolean isSystemUser();
method public boolean isUserAGoat();
method public boolean isUserRunning(android.os.UserHandle);
+ method public boolean isUserRunningAndLocked(android.os.UserHandle);
+ method public boolean isUserRunningAndUnlocked(android.os.UserHandle);
method public boolean isUserRunningOrStopping(android.os.UserHandle);
- method public boolean isUserRunningUnlocked(android.os.UserHandle);
method public deprecated boolean setRestrictionsChallenge(java.lang.String);
method public deprecated void setUserRestriction(java.lang.String, boolean);
method public deprecated void setUserRestrictions(android.os.Bundle);
@@ -31615,6 +31633,7 @@
ctor public ContactsContract.CommonDataKinds.Callable();
field public static final android.net.Uri CONTENT_FILTER_URI;
field public static final android.net.Uri CONTENT_URI;
+ field public static final android.net.Uri ENTERPRISE_CONTENT_FILTER_URI;
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
@@ -31761,6 +31780,7 @@
field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/phone_v2";
field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/phone_v2";
field public static final android.net.Uri CONTENT_URI;
+ field public static final android.net.Uri ENTERPRISE_CONTENT_FILTER_URI;
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
@@ -31940,7 +31960,7 @@
field public static final android.net.Uri CONTENT_URI;
field public static final java.lang.String CONTENT_VCARD_TYPE = "text/x-vcard";
field public static final android.net.Uri CONTENT_VCARD_URI;
- field public static final android.net.Uri CORP_CONTENT_FILTER_URI;
+ field public static final android.net.Uri ENTERPRISE_CONTENT_FILTER_URI;
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
@@ -32069,10 +32089,12 @@
field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/contact_directory";
field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/contact_directories";
field public static final android.net.Uri CONTENT_URI;
- field public static final android.net.Uri CORP_CONTENT_URI;
field public static final long DEFAULT = 0L; // 0x0L
field public static final java.lang.String DIRECTORY_AUTHORITY = "authority";
field public static final java.lang.String DISPLAY_NAME = "displayName";
+ field public static final android.net.Uri ENTERPRISE_CONTENT_URI;
+ field public static final long ENTERPRISE_DEFAULT = 1000000000L; // 0x3b9aca00L
+ field public static final long ENTERPRISE_LOCAL_INVISIBLE = 1000000001L; // 0x3b9aca01L
field public static final java.lang.String EXPORT_SUPPORT = "exportSupport";
field public static final int EXPORT_SUPPORT_ANY_ACCOUNT = 2; // 0x2
field public static final int EXPORT_SUPPORT_NONE = 0; // 0x0
@@ -32449,6 +32471,7 @@
field public static final java.lang.String COLUMN_MIME_TYPE = "mime_type";
field public static final java.lang.String COLUMN_SIZE = "_size";
field public static final java.lang.String COLUMN_SUMMARY = "summary";
+ field public static final int FLAG_ARCHIVE = 2048; // 0x800
field public static final int FLAG_DIR_PREFERS_GRID = 16; // 0x10
field public static final int FLAG_DIR_PREFERS_LAST_MODIFIED = 32; // 0x20
field public static final int FLAG_DIR_SUPPORTS_CREATE = 8; // 0x8
@@ -35265,6 +35288,35 @@
field public static final java.lang.String SERVICE_INTERFACE = "android.service.notification.ConditionProviderService";
}
+ public abstract class NotificationAssistantService extends android.service.notification.NotificationListenerService {
+ ctor public NotificationAssistantService();
+ method public final void adjustImportance(java.lang.String, android.service.notification.NotificationAssistantService.Adjustment);
+ method public final void clearAnnotation(java.lang.String);
+ method public void onNotificationActionClick(java.lang.String, long, int);
+ method public void onNotificationClick(java.lang.String, long);
+ method public abstract android.service.notification.NotificationAssistantService.Adjustment onNotificationEnqueued(android.service.notification.StatusBarNotification, int, boolean);
+ method public void onNotificationRemoved(java.lang.String, long, int);
+ method public void onNotificationVisibilityChanged(java.lang.String, long, boolean);
+ method public final void setAnnotation(java.lang.String, android.app.Notification);
+ field public static final int REASON_APP_CANCEL = 8; // 0x8
+ field public static final int REASON_APP_CANCEL_ALL = 9; // 0x9
+ field public static final int REASON_DELEGATE_CANCEL = 2; // 0x2
+ field public static final int REASON_DELEGATE_CANCEL_ALL = 3; // 0x3
+ field public static final int REASON_DELEGATE_CLICK = 1; // 0x1
+ field public static final int REASON_DELEGATE_ERROR = 4; // 0x4
+ field public static final int REASON_GROUP_OPTIMIZATION = 13; // 0xd
+ field public static final int REASON_GROUP_SUMMARY_CANCELED = 12; // 0xc
+ field public static final int REASON_LISTENER_CANCEL = 10; // 0xa
+ field public static final int REASON_LISTENER_CANCEL_ALL = 11; // 0xb
+ field public static final int REASON_PACKAGE_BANNED = 7; // 0x7
+ field public static final int REASON_PACKAGE_CHANGED = 5; // 0x5
+ field public static final int REASON_USER_STOPPED = 6; // 0x6
+ }
+
+ public class NotificationAssistantService.Adjustment {
+ ctor public NotificationAssistantService.Adjustment(int, java.lang.CharSequence, android.net.Uri);
+ }
+
public abstract class NotificationListenerService extends android.app.Service {
ctor public NotificationListenerService();
method public final void cancelAllNotifications();
@@ -35308,11 +35360,19 @@
public static class NotificationListenerService.Ranking {
ctor public NotificationListenerService.Ranking();
+ method public int getImportance();
+ method public java.lang.CharSequence getImportanceExplanation();
method public java.lang.String getKey();
method public int getRank();
method public int getSuppressedVisualEffects();
method public boolean isAmbient();
method public boolean matchesInterruptionFilter();
+ field public static final int IMPORTANCE_DEFAULT = 0; // 0x0
+ field public static final int IMPORTANCE_HIGH = 1; // 0x1
+ field public static final int IMPORTANCE_LOW = -1; // 0xffffffff
+ field public static final int IMPORTANCE_MAX = 2; // 0x2
+ field public static final int IMPORTANCE_NONE = -2; // 0xfffffffe
+ field public static final int IMPORTANCE_UNSPECIFIED = -1000; // 0xfffffc18
}
public static class NotificationListenerService.RankingMap implements android.os.Parcelable {
@@ -35394,6 +35454,7 @@
method public void onStopListening();
method public void onTileAdded();
method public void onTileRemoved();
+ method public final void showDialog(android.app.Dialog);
field public static final java.lang.String ACTION_QS_TILE = "android.service.quicksettings.action.QS_TILE";
}
@@ -37330,6 +37391,8 @@
method public void notifyConfigChangedForSubId(int);
method public void updateConfigForPhoneId(int, java.lang.String);
field public static final java.lang.String ACTION_CARRIER_CONFIG_CHANGED = "android.telephony.action.CARRIER_CONFIG_CHANGED";
+ field public static final java.lang.String BOOL_ALLOW_EMERGENCY_VIDEO_CALLS = "bool_allow_emergency_video_calls";
+ field public static final java.lang.String BOOL_ALLOW_VIDEO_PAUSE = "bool_allow_video_pause";
field public static final java.lang.String KEY_ADDITIONAL_CALL_SETTING_BOOL = "additional_call_setting_bool";
field public static final java.lang.String KEY_ALLOW_EMERGENCY_NUMBERS_IN_CALL_LOG_BOOL = "allow_emergency_numbers_in_call_log_bool";
field public static final java.lang.String KEY_ALLOW_LOCAL_DTMF_TONES_BOOL = "allow_local_dtmf_tones_bool";
@@ -40934,10 +40997,11 @@
field public static final int RTL = 1; // 0x1
}
- public final class LocaleList {
+ public final class LocaleList implements android.os.Parcelable {
ctor public LocaleList();
ctor public LocaleList(java.util.Locale);
ctor public LocaleList(java.util.Locale[]);
+ method public int describeContents();
method public static android.util.LocaleList forLanguageTags(java.lang.String);
method public java.util.Locale get(int);
method public java.util.Locale getBestMatch(java.lang.String[]);
@@ -40947,6 +41011,8 @@
method public boolean isEmpty();
method public int size();
method public java.lang.String toLanguageTags();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.util.LocaleList> CREATOR;
}
public final class Log {
@@ -45233,6 +45299,7 @@
field public int initialSelStart;
field public int inputType;
field public java.lang.CharSequence label;
+ field public android.util.LocaleList locales;
field public java.lang.String packageName;
field public java.lang.String privateImeOptions;
}
diff --git a/api/test-current.txt b/api/test-current.txt
index 904347d..d05dba2 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -28,6 +28,7 @@
field public static final java.lang.String BIND_INPUT_METHOD = "android.permission.BIND_INPUT_METHOD";
field public static final java.lang.String BIND_MIDI_DEVICE_SERVICE = "android.permission.BIND_MIDI_DEVICE_SERVICE";
field public static final java.lang.String BIND_NFC_SERVICE = "android.permission.BIND_NFC_SERVICE";
+ field public static final java.lang.String BIND_NOTIFICATION_ASSISTANT_SERVICE = "android.permission.BIND_NOTIFICATION_ASSISTANT_SERVICE";
field public static final java.lang.String BIND_NOTIFICATION_LISTENER_SERVICE = "android.permission.BIND_NOTIFICATION_LISTENER_SERVICE";
field public static final java.lang.String BIND_PRINT_SERVICE = "android.permission.BIND_PRINT_SERVICE";
field public static final java.lang.String BIND_QUICK_SETTINGS_TILE = "android.permission.BIND_QUICK_SETTINGS_TILE";
@@ -2727,6 +2728,7 @@
method public android.os.Bundle addAccountFromCredentials(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, android.os.Bundle) throws android.accounts.NetworkErrorException;
method public abstract android.os.Bundle confirmCredentials(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, android.os.Bundle) throws android.accounts.NetworkErrorException;
method public abstract android.os.Bundle editProperties(android.accounts.AccountAuthenticatorResponse, java.lang.String);
+ method public android.os.Bundle finishSession(android.accounts.AccountAuthenticatorResponse, java.lang.String, android.os.Bundle) throws android.accounts.NetworkErrorException;
method public android.os.Bundle getAccountCredentialsForCloning(android.accounts.AccountAuthenticatorResponse, android.accounts.Account) throws android.accounts.NetworkErrorException;
method public android.os.Bundle getAccountRemovalAllowed(android.accounts.AccountAuthenticatorResponse, android.accounts.Account) throws android.accounts.NetworkErrorException;
method public abstract android.os.Bundle getAuthToken(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, java.lang.String, android.os.Bundle) throws android.accounts.NetworkErrorException;
@@ -2772,6 +2774,7 @@
method public void clearPassword(android.accounts.Account);
method public android.accounts.AccountManagerFuture<android.os.Bundle> confirmCredentials(android.accounts.Account, android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
method public android.accounts.AccountManagerFuture<android.os.Bundle> editProperties(java.lang.String, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
+ method public android.accounts.AccountManagerFuture<android.os.Bundle> finishSession(android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
method public static android.accounts.AccountManager get(android.content.Context);
method public android.accounts.Account[] getAccounts();
method public android.accounts.Account[] getAccountsByType(java.lang.String);
@@ -5529,6 +5532,8 @@
method public void enableCarMode(int);
method public int getCurrentModeType();
method public int getNightMode();
+ method public boolean isNightModeLocked();
+ method public boolean isUiModeLocked();
method public void setNightMode(int);
field public static java.lang.String ACTION_ENTER_CAR_MODE;
field public static java.lang.String ACTION_ENTER_DESK_MODE;
@@ -8285,6 +8290,7 @@
field public static final java.lang.String ACTION_INSERT_OR_EDIT = "android.intent.action.INSERT_OR_EDIT";
field public static final java.lang.String ACTION_INSTALL_PACKAGE = "android.intent.action.INSTALL_PACKAGE";
field public static final java.lang.String ACTION_LOCALE_CHANGED = "android.intent.action.LOCALE_CHANGED";
+ field public static final java.lang.String ACTION_LOCKED_BOOT_COMPLETED = "android.intent.action.LOCKED_BOOT_COMPLETED";
field public static final java.lang.String ACTION_MAIN = "android.intent.action.MAIN";
field public static final java.lang.String ACTION_MANAGED_PROFILE_ADDED = "android.intent.action.MANAGED_PROFILE_ADDED";
field public static final java.lang.String ACTION_MANAGED_PROFILE_REMOVED = "android.intent.action.MANAGED_PROFILE_REMOVED";
@@ -22927,7 +22933,9 @@
method public static void incrementOperationCount(int);
method public static void incrementOperationCount(int, int);
method public static void setThreadStatsTag(int);
+ method public static void tagDatagramSocket(java.net.DatagramSocket) throws java.net.SocketException;
method public static void tagSocket(java.net.Socket) throws java.net.SocketException;
+ method public static void untagDatagramSocket(java.net.DatagramSocket) throws java.net.SocketException;
method public static void untagSocket(java.net.Socket) throws java.net.SocketException;
field public static final int UNSUPPORTED = -1; // 0xffffffff
}
@@ -28064,8 +28072,9 @@
method public boolean isSystemUser();
method public boolean isUserAGoat();
method public boolean isUserRunning(android.os.UserHandle);
+ method public boolean isUserRunningAndLocked(android.os.UserHandle);
+ method public boolean isUserRunningAndUnlocked(android.os.UserHandle);
method public boolean isUserRunningOrStopping(android.os.UserHandle);
- method public boolean isUserRunningUnlocked(android.os.UserHandle);
method public deprecated boolean setRestrictionsChallenge(java.lang.String);
method public deprecated void setUserRestriction(java.lang.String, boolean);
method public deprecated void setUserRestrictions(android.os.Bundle);
@@ -29633,6 +29642,7 @@
ctor public ContactsContract.CommonDataKinds.Callable();
field public static final android.net.Uri CONTENT_FILTER_URI;
field public static final android.net.Uri CONTENT_URI;
+ field public static final android.net.Uri ENTERPRISE_CONTENT_FILTER_URI;
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
@@ -29779,6 +29789,7 @@
field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/phone_v2";
field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/phone_v2";
field public static final android.net.Uri CONTENT_URI;
+ field public static final android.net.Uri ENTERPRISE_CONTENT_FILTER_URI;
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
@@ -29958,7 +29969,7 @@
field public static final android.net.Uri CONTENT_URI;
field public static final java.lang.String CONTENT_VCARD_TYPE = "text/x-vcard";
field public static final android.net.Uri CONTENT_VCARD_URI;
- field public static final android.net.Uri CORP_CONTENT_FILTER_URI;
+ field public static final android.net.Uri ENTERPRISE_CONTENT_FILTER_URI;
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
@@ -30087,10 +30098,12 @@
field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/contact_directory";
field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/contact_directories";
field public static final android.net.Uri CONTENT_URI;
- field public static final android.net.Uri CORP_CONTENT_URI;
field public static final long DEFAULT = 0L; // 0x0L
field public static final java.lang.String DIRECTORY_AUTHORITY = "authority";
field public static final java.lang.String DISPLAY_NAME = "displayName";
+ field public static final android.net.Uri ENTERPRISE_CONTENT_URI;
+ field public static final long ENTERPRISE_DEFAULT = 1000000000L; // 0x3b9aca00L
+ field public static final long ENTERPRISE_LOCAL_INVISIBLE = 1000000001L; // 0x3b9aca01L
field public static final java.lang.String EXPORT_SUPPORT = "exportSupport";
field public static final int EXPORT_SUPPORT_ANY_ACCOUNT = 2; // 0x2
field public static final int EXPORT_SUPPORT_NONE = 0; // 0x0
@@ -30437,6 +30450,7 @@
field public static final java.lang.String COLUMN_MIME_TYPE = "mime_type";
field public static final java.lang.String COLUMN_SIZE = "_size";
field public static final java.lang.String COLUMN_SUMMARY = "summary";
+ field public static final int FLAG_ARCHIVE = 2048; // 0x800
field public static final int FLAG_DIR_PREFERS_GRID = 16; // 0x10
field public static final int FLAG_DIR_PREFERS_LAST_MODIFIED = 32; // 0x20
field public static final int FLAG_DIR_SUPPORTS_CREATE = 8; // 0x8
@@ -33150,6 +33164,35 @@
field public static final java.lang.String SERVICE_INTERFACE = "android.service.notification.ConditionProviderService";
}
+ public abstract class NotificationAssistantService extends android.service.notification.NotificationListenerService {
+ ctor public NotificationAssistantService();
+ method public final void adjustImportance(java.lang.String, android.service.notification.NotificationAssistantService.Adjustment);
+ method public final void clearAnnotation(java.lang.String);
+ method public void onNotificationActionClick(java.lang.String, long, int);
+ method public void onNotificationClick(java.lang.String, long);
+ method public abstract android.service.notification.NotificationAssistantService.Adjustment onNotificationEnqueued(android.service.notification.StatusBarNotification, int, boolean);
+ method public void onNotificationRemoved(java.lang.String, long, int);
+ method public void onNotificationVisibilityChanged(java.lang.String, long, boolean);
+ method public final void setAnnotation(java.lang.String, android.app.Notification);
+ field public static final int REASON_APP_CANCEL = 8; // 0x8
+ field public static final int REASON_APP_CANCEL_ALL = 9; // 0x9
+ field public static final int REASON_DELEGATE_CANCEL = 2; // 0x2
+ field public static final int REASON_DELEGATE_CANCEL_ALL = 3; // 0x3
+ field public static final int REASON_DELEGATE_CLICK = 1; // 0x1
+ field public static final int REASON_DELEGATE_ERROR = 4; // 0x4
+ field public static final int REASON_GROUP_OPTIMIZATION = 13; // 0xd
+ field public static final int REASON_GROUP_SUMMARY_CANCELED = 12; // 0xc
+ field public static final int REASON_LISTENER_CANCEL = 10; // 0xa
+ field public static final int REASON_LISTENER_CANCEL_ALL = 11; // 0xb
+ field public static final int REASON_PACKAGE_BANNED = 7; // 0x7
+ field public static final int REASON_PACKAGE_CHANGED = 5; // 0x5
+ field public static final int REASON_USER_STOPPED = 6; // 0x6
+ }
+
+ public class NotificationAssistantService.Adjustment {
+ ctor public NotificationAssistantService.Adjustment(int, java.lang.CharSequence, android.net.Uri);
+ }
+
public abstract class NotificationListenerService extends android.app.Service {
ctor public NotificationListenerService();
method public final void cancelAllNotifications();
@@ -33186,11 +33229,19 @@
public static class NotificationListenerService.Ranking {
ctor public NotificationListenerService.Ranking();
+ method public int getImportance();
+ method public java.lang.CharSequence getImportanceExplanation();
method public java.lang.String getKey();
method public int getRank();
method public int getSuppressedVisualEffects();
method public boolean isAmbient();
method public boolean matchesInterruptionFilter();
+ field public static final int IMPORTANCE_DEFAULT = 0; // 0x0
+ field public static final int IMPORTANCE_HIGH = 1; // 0x1
+ field public static final int IMPORTANCE_LOW = -1; // 0xffffffff
+ field public static final int IMPORTANCE_MAX = 2; // 0x2
+ field public static final int IMPORTANCE_NONE = -2; // 0xfffffffe
+ field public static final int IMPORTANCE_UNSPECIFIED = -1000; // 0xfffffc18
}
public static class NotificationListenerService.RankingMap implements android.os.Parcelable {
@@ -33247,6 +33298,7 @@
method public void onStopListening();
method public void onTileAdded();
method public void onTileRemoved();
+ method public final void showDialog(android.app.Dialog);
field public static final java.lang.String ACTION_QS_TILE = "android.service.quicksettings.action.QS_TILE";
}
@@ -38611,10 +38663,11 @@
field public static final int RTL = 1; // 0x1
}
- public final class LocaleList {
+ public final class LocaleList implements android.os.Parcelable {
ctor public LocaleList();
ctor public LocaleList(java.util.Locale);
ctor public LocaleList(java.util.Locale[]);
+ method public int describeContents();
method public static android.util.LocaleList forLanguageTags(java.lang.String);
method public java.util.Locale get(int);
method public java.util.Locale getBestMatch(java.lang.String[]);
@@ -38624,6 +38677,8 @@
method public boolean isEmpty();
method public int size();
method public java.lang.String toLanguageTags();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.util.LocaleList> CREATOR;
}
public final class Log {
@@ -42907,6 +42962,7 @@
field public int initialSelStart;
field public int inputType;
field public java.lang.CharSequence label;
+ field public android.util.LocaleList locales;
field public java.lang.String packageName;
field public java.lang.String privateImeOptions;
}
diff --git a/core/java/android/accounts/AbstractAccountAuthenticator.java b/core/java/android/accounts/AbstractAccountAuthenticator.java
index 041f591..a312e3f 100644
--- a/core/java/android/accounts/AbstractAccountAuthenticator.java
+++ b/core/java/android/accounts/AbstractAccountAuthenticator.java
@@ -18,6 +18,7 @@
import android.os.Bundle;
import android.os.RemoteException;
+import android.text.TextUtils;
import android.os.Binder;
import android.os.IBinder;
import android.content.pm.PackageManager;
@@ -121,24 +122,28 @@
* This is used in the default implementation of
* {@link #startAddAccountSession} and {@link startUpdateCredentialsSession}.
*/
- private static final String KEY_AUTH_TOKEN_TYPE = "android.accounts.KEY_AUTH_TOKEN_TYPE";
+ private static final String KEY_AUTH_TOKEN_TYPE =
+ "android.accounts.AbstractAccountAuthenticato.KEY_AUTH_TOKEN_TYPE";
/**
* Bundle key used for the {@link String} array of required features in
* session bundle. This is used in the default implementation of
* {@link #startAddAccountSession} and {@link startUpdateCredentialsSession}.
*/
- private static final String KEY_REQUIRED_FEATURES = "android.accounts.AbstractAccountAuthenticator.KEY_REQUIRED_FEATURES";
+ private static final String KEY_REQUIRED_FEATURES =
+ "android.accounts.AbstractAccountAuthenticator.KEY_REQUIRED_FEATURES";
/**
* Bundle key used for the {@link Bundle} options in session bundle. This is
* used in default implementation of {@link #startAddAccountSession} and
* {@link startUpdateCredentialsSession}.
*/
- private static final String KEY_OPTIONS = "android.accounts.AbstractAccountAuthenticator.KEY_OPTIONS";
+ private static final String KEY_OPTIONS =
+ "android.accounts.AbstractAccountAuthenticator.KEY_OPTIONS";
/**
* Bundle key used for the {@link Account} account in session bundle. This is used
* used in default implementation of {@link startUpdateCredentialsSession}.
*/
- private static final String KEY_ACCOUNT = "android.accounts.AbstractAccountAuthenticator.KEY_ACCOUNT";
+ private static final String KEY_ACCOUNT =
+ "android.accounts.AbstractAccountAuthenticator.KEY_ACCOUNT";
private final Context mContext;
@@ -418,6 +423,7 @@
}
Log.v(TAG, "startUpdateCredentialsSession: result "
+ AccountManager.sanitizeResult(result));
+
}
if (result != null) {
response.onResult(result);
@@ -425,6 +431,33 @@
} catch (Exception e) {
handleException(response, "startUpdateCredentialsSession",
account.toString() + "," + authTokenType, e);
+
+ }
+ }
+
+ public void finishSession(
+ IAccountAuthenticatorResponse response,
+ String accountType,
+ Bundle sessionBundle) throws RemoteException {
+ if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ Log.v(TAG, "finishSession: accountType " + accountType);
+ }
+ checkBinderPermission();
+ try {
+ final Bundle result = AbstractAccountAuthenticator.this.finishSession(
+ new AccountAuthenticatorResponse(response), accountType, sessionBundle);
+ if (result != null) {
+ result.keySet(); // force it to be unparcelled
+ }
+ if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ Log.v(TAG, "finishSession: result " + AccountManager.sanitizeResult(result));
+ }
+ if (result != null) {
+ response.onResult(result);
+ }
+ } catch (Exception e) {
+ handleException(response, "finishSession", accountType, e);
+
}
}
}
@@ -697,7 +730,13 @@
/**
* Starts the add account session to authenticate user to an account of the
- * specified accountType.
+ * specified accountType. No file I/O should be performed in this call.
+ * Account should be added to device only when {@link #finishSession} is
+ * called after this.
+ * <p>
+ * Note: when overriding this method, {@link #finishSession} should be
+ * overridden too.
+ * </p>
*
* @param response to send the result back to the AccountManager, will never
* be null
@@ -722,9 +761,13 @@
* </ul>
* @throws NetworkErrorException if the authenticator could not honor the
* request due to a network error
+ * @see #finishSession(AccountAuthenticatorResponse, String, Bundle)
*/
- public Bundle startAddAccountSession(final AccountAuthenticatorResponse response,
- final String accountType, final String authTokenType, final String[] requiredFeatures,
+ public Bundle startAddAccountSession(
+ final AccountAuthenticatorResponse response,
+ final String accountType,
+ final String authTokenType,
+ final String[] requiredFeatures,
final Bundle options)
throws NetworkErrorException {
new Thread(new Runnable() {
@@ -744,34 +787,43 @@
}
/**
- * Asks user to re-authenticate for an account but defers updating the locally stored
- * credentials.
+ * Asks user to re-authenticate for an account but defers updating the
+ * locally stored credentials. No file I/O should be performed in this call.
+ * Local credentials should be updated only when {@link #finishSession} is
+ * called after this.
+ * <p>
+ * Note: when overriding this method, {@link #finishSession} should be
+ * overridden too.
+ * </p>
*
* @param response to send the result back to the AccountManager, will never
* be null
* @param account the account whose credentials are to be updated, will
* never be null
* @param authTokenType the type of auth token to retrieve after updating
- * the credentials, may be null (TODO)
+ * the credentials, may be null
* @param options a Bundle of authenticator-specific options, may be null
* @return a Bundle result or null if the result is to be returned via the
* response. The result will contain either:
* <ul>
* <li>{@link AccountManager#KEY_INTENT}, or
- * <li>{@link AccountManager#KEY_ACCOUNT_SESSION_BUNDLE} for updating the
- * locally stored credentials later, and if account is
- * re-authenticated, {@link AccountManager#KEY_PASSWORD} and
- * {@link AccountManager#KEY_ACCOUNT_STATUS_TOKEN} for checking the
- * status of the account later, or
+ * <li>{@link AccountManager#KEY_ACCOUNT_SESSION_BUNDLE} for
+ * updating the locally stored credentials later, and if account is
+ * re-authenticated, optional {@link AccountManager#KEY_PASSWORD}
+ * and {@link AccountManager#KEY_ACCOUNT_STATUS_TOKEN} for checking
+ * the status of the account later, or
* <li>{@link AccountManager#KEY_ERROR_CODE} and
* {@link AccountManager#KEY_ERROR_MESSAGE} to indicate an error
* </ul>
* @throws NetworkErrorException if the authenticator could not honor the
* request due to a network error
+ * @see #finishSession(AccountAuthenticatorResponse, String, Bundle)
*/
- public Bundle startUpdateCredentialsSession(final AccountAuthenticatorResponse response,
- final Account account, final String authTokenType, final Bundle options)
- throws NetworkErrorException {
+ public Bundle startUpdateCredentialsSession(
+ final AccountAuthenticatorResponse response,
+ final Account account,
+ final String authTokenType,
+ final Bundle options) throws NetworkErrorException {
new Thread(new Runnable() {
@Override
public void run() {
@@ -787,4 +839,102 @@
}).start();
return null;
}
+
+ /**
+ * Finishes the session started by #startAddAccountSession or
+ * #startUpdateCredentials by installing the account to device with
+ * AccountManager, or updating the local credentials. File I/O may be
+ * performed in this call.
+ * <p>
+ * Note: when overriding this method, {@link #startAddAccountSession} and
+ * {@link #startUpdateCredentialsSession} should be overridden too.
+ * </p>
+ *
+ * @param response to send the result back to the AccountManager, will never
+ * be null
+ * @param accountType the type of account to authenticate with, will never
+ * be null
+ * @param sessionBundle a bundle of session data created by
+ * {@link #startAddAccountSession} used for adding account to
+ * device, or by {@link #startUpdateCredentialsSession} used for
+ * updating local credentials.
+ * @return a Bundle result or null if the result is to be returned via the
+ * response. The result will contain either:
+ * <ul>
+ * <li>{@link AccountManager#KEY_INTENT}, or
+ * <li>{@link AccountManager#KEY_ACCOUNT_NAME} and
+ * {@link AccountManager#KEY_ACCOUNT_TYPE} of the account that was
+ * added or local credentials were updated, or
+ * <li>{@link AccountManager#KEY_ERROR_CODE} and
+ * {@link AccountManager#KEY_ERROR_MESSAGE} to indicate an error
+ * </ul>
+ * @throws NetworkErrorException
+ * @see #startAddAccountSession and #startUpdateCredentialsSession
+ */
+ public Bundle finishSession(
+ final AccountAuthenticatorResponse response,
+ final String accountType,
+ final Bundle sessionBundle) throws NetworkErrorException {
+ if (TextUtils.isEmpty(accountType)) {
+ Log.e(TAG, "Account type cannot be empty.");
+ Bundle result = new Bundle();
+ result.putInt(AccountManager.KEY_ERROR_CODE, AccountManager.ERROR_CODE_BAD_ARGUMENTS);
+ result.putString(AccountManager.KEY_ERROR_MESSAGE,
+ "accountType cannot be empty.");
+ return result;
+ }
+
+ if (sessionBundle == null) {
+ Log.e(TAG, "Session bundle cannot be null.");
+ Bundle result = new Bundle();
+ result.putInt(AccountManager.KEY_ERROR_CODE, AccountManager.ERROR_CODE_BAD_ARGUMENTS);
+ result.putString(AccountManager.KEY_ERROR_MESSAGE,
+ "sessionBundle cannot be null.");
+ return result;
+ }
+
+ if (!sessionBundle.containsKey(KEY_AUTH_TOKEN_TYPE)) {
+ // We cannot handle Session bundle not created by default startAddAccountSession(...)
+ // nor startUpdateCredentialsSession(...) implementation. Return error.
+ Bundle result = new Bundle();
+ result.putInt(AccountManager.KEY_ERROR_CODE,
+ AccountManager.ERROR_CODE_UNSUPPORTED_OPERATION);
+ result.putString(AccountManager.KEY_ERROR_MESSAGE,
+ "Authenticator must override finishSession if startAddAccountSession"
+ + " or startUpdateCredentialsSession is overridden.");
+ response.onResult(result);
+ return result;
+ }
+ String authTokenType = sessionBundle.getString(KEY_AUTH_TOKEN_TYPE);
+ Bundle options = sessionBundle.getBundle(KEY_OPTIONS);
+ String[] requiredFeatures = sessionBundle.getStringArray(KEY_REQUIRED_FEATURES);
+ Account account = sessionBundle.getParcelable(KEY_ACCOUNT);
+ boolean containsKeyAccount = sessionBundle.containsKey(KEY_ACCOUNT);
+
+ // Actual options passed to add account or update credentials flow.
+ Bundle sessionOptions = new Bundle(sessionBundle);
+ // Remove redundant extras in session bundle before passing it to addAccount(...) or
+ // updateCredentials(...).
+ sessionOptions.remove(KEY_AUTH_TOKEN_TYPE);
+ sessionOptions.remove(KEY_REQUIRED_FEATURES);
+ sessionOptions.remove(KEY_OPTIONS);
+ sessionOptions.remove(KEY_ACCOUNT);
+
+ if (options != null) {
+ // options may contains old system info such as
+ // AccountManager.KEY_ANDROID_PACKAGE_NAME required by the add account flow or update
+ // credentials flow, we should replace with the new values of the current call added
+ // to sessionBundle by AccountManager or AccountManagerService.
+ options.putAll(sessionOptions);
+ sessionOptions = options;
+ }
+
+ // Session bundle created by startUpdateCredentialsSession default implementation should
+ // contain KEY_ACCOUNT.
+ if (containsKeyAccount) {
+ return updateCredentials(response, account, authTokenType, options);
+ }
+ // Otherwise, session bundle was created by startAddAccountSession default implementation.
+ return addAccount(response, accountType, authTokenType, requiredFeatures, sessionOptions);
+ }
}
diff --git a/core/java/android/accounts/AccountManager.java b/core/java/android/accounts/AccountManager.java
index 5557905..ada1ac2 100644
--- a/core/java/android/accounts/AccountManager.java
+++ b/core/java/android/accounts/AccountManager.java
@@ -2617,7 +2617,8 @@
* <p>
* <p>
* <b>NOTE:</b> The account will not be installed to the device by calling
- * this api alone.
+ * this api alone. #finishSession should be called after this to install the
+ * account on device.
*
* @param accountType The type of account to add; must not be null
* @param authTokenType The type of auth token (see {@link #getAuthToken})
@@ -2665,6 +2666,7 @@
* problem creating a new account, usually because of network
* trouble
* </ul>
+ * @see #finishSession
*/
public AccountManagerFuture<Bundle> startAddAccountSession(
final String accountType,
@@ -2697,14 +2699,14 @@
/**
* Asks the user to enter a new password for an account but not updating the
- * saved credentials for the account until finishSession is
- * called.
+ * saved credentials for the account until {@link #finishSession} is called.
* <p>
* This method may be called from any thread, but the returned
* {@link AccountManagerFuture} must not be used on the main thread.
* <p>
* <b>NOTE:</b> The saved credentials for the account alone will not be
- * updated by calling this API alone .
+ * updated by calling this API alone. #finishSession should be called after
+ * this to update local credentials
*
* @param account The account to update credentials for
* @param authTokenType The credentials entered must allow an auth token of
@@ -2723,15 +2725,14 @@
* the main thread
* @return An {@link AccountManagerFuture} which resolves to a Bundle with
* these fields if an activity was supplied and user was
- * successfully re-authenticated to the account (TODO: default impl
- * only returns escorw?):
+ * successfully re-authenticated to the account:
* <ul>
* <li>{@link #KEY_ACCOUNT_SESSION_BUNDLE} - encrypted Bundle for
* updating the local credentials on device later.
- * <li>{@link #KEY_PASSWORD} - optional, the password or password hash of the
- * account
- * <li>{@link #KEY_ACCOUNT_STATUS_TOKEN} - optional, token to check status of
- * the account
+ * <li>{@link #KEY_PASSWORD} - optional, the password or password
+ * hash of the account
+ * <li>{@link #KEY_ACCOUNT_STATUS_TOKEN} - optional, token to check
+ * status of the account
* </ul>
* If no activity was specified, the returned Bundle contains
* {@link #KEY_INTENT} with the {@link Intent} needed to launch the
@@ -2747,6 +2748,7 @@
* problem verifying the password, usually because of network
* trouble
* </ul>
+ * @see #finishSession
*/
public AccountManagerFuture<Bundle> startUpdateCredentialsSession(
final Account account,
@@ -2770,4 +2772,71 @@
}
}.start();
}
+
+ /**
+ * Finishes the session started by {@link #startAddAccountSession} or
+ * {@link #startUpdateCredentialsSession}. This will either add the account
+ * to AccountManager or update the local credentials stored.
+ * <p>
+ * This method may be called from any thread, but the returned
+ * {@link AccountManagerFuture} must not be used on the main thread.
+ *
+ * @param sessionBundle a {@link Bundle} created by {@link #startAddAccountSession} or
+ * {@link #startUpdateCredentialsSession}
+ * @param activity The {@link Activity} context to use for launching a new
+ * authenticator-defined sub-Activity to prompt the user to
+ * create an account or reauthenticate existing account; used
+ * only to call startActivity(); if null, the prompt will not
+ * be launched directly, but the necessary {@link Intent} will
+ * be returned to the caller instead
+ * @param callback Callback to invoke when the request completes, null for
+ * no callback
+ * @param handler {@link Handler} identifying the callback thread, null for
+ * the main thread
+ * @return An {@link AccountManagerFuture} which resolves to a Bundle with
+ * these fields if an activity was supplied and an account was added
+ * to device or local credentials were updated::
+ * <ul>
+ * <li>{@link #KEY_ACCOUNT_NAME} - the name of the account created
+ * <li>{@link #KEY_ACCOUNT_TYPE} - the type of the account
+ * </ul>
+ * If no activity was specified and additional information is needed
+ * from user, the returned Bundle may contains only
+ * {@link #KEY_INTENT} with the {@link Intent} needed to launch the
+ * actual account creation process. If an error occurred,
+ * {@link AccountManagerFuture#getResult()} throws:
+ * <ul>
+ * <li>{@link AuthenticatorException} if no authenticator was
+ * registered for this account type or the authenticator failed to
+ * respond
+ * <li>{@link OperationCanceledException} if the operation was
+ * canceled for any reason, including the user canceling the
+ * creation process or adding accounts (of this type) has been
+ * disabled by policy
+ * <li>{@link IOException} if the authenticator experienced an I/O
+ * problem creating a new account, usually because of network
+ * trouble
+ * </ul>
+ * @see #startAddAccountSession and #startUpdateCredentialsSession
+ */
+ public AccountManagerFuture<Bundle> finishSession(
+ final Bundle sessionBundle,
+ final Activity activity,
+ AccountManagerCallback<Bundle> callback,
+ Handler handler) {
+ if (sessionBundle == null) {
+ throw new IllegalArgumentException("sessionBundle is null");
+ }
+
+ /* Add information required by add account flow */
+ final Bundle appInfo = new Bundle();
+ appInfo.putString(KEY_ANDROID_PACKAGE_NAME, mContext.getPackageName());
+
+ return new AmsTask(activity, handler, callback) {
+ @Override
+ public void doWork() throws RemoteException {
+ mService.finishSession(mResponse, sessionBundle, activity != null, appInfo);
+ }
+ }.start();
+ }
}
diff --git a/core/java/android/accounts/IAccountAuthenticator.aidl b/core/java/android/accounts/IAccountAuthenticator.aidl
index 921fb19..6bda800 100644
--- a/core/java/android/accounts/IAccountAuthenticator.aidl
+++ b/core/java/android/accounts/IAccountAuthenticator.aidl
@@ -96,4 +96,12 @@
*/
void startUpdateCredentialsSession(in IAccountAuthenticatorResponse response, in Account account,
String authTokenType, in Bundle options);
+
+ /**
+ * Finishes the session started by startAddAccountSession(...) or
+ * startUpdateCredentialsSession(...) by adding account to or updating local credentials
+ * in the IAccountManager.
+ */
+ void finishSession(in IAccountAuthenticatorResponse response, String accountType,
+ in Bundle sessionBundle);
}
diff --git a/core/java/android/accounts/IAccountManager.aidl b/core/java/android/accounts/IAccountManager.aidl
index 8489e47..4af9f33 100644
--- a/core/java/android/accounts/IAccountManager.aidl
+++ b/core/java/android/accounts/IAccountManager.aidl
@@ -91,4 +91,8 @@
/* Update credentials in two steps. */
void startUpdateCredentialsSession(in IAccountManagerResponse response, in Account account,
String authTokenType, boolean expectActivityLaunch, in Bundle options);
+
+ /* Finish session started by startAddAccountSession(...) or startUpdateCredentialsSession(...) */
+ void finishSession(in IAccountManagerResponse response, in Bundle sessionBundle,
+ boolean expectActivityLaunch, in Bundle appInfo);
}
diff --git a/core/java/android/annotation/BinderThread.java b/core/java/android/annotation/BinderThread.java
index c69ba10..6f85e04 100644
--- a/core/java/android/annotation/BinderThread.java
+++ b/core/java/android/annotation/BinderThread.java
@@ -29,10 +29,10 @@
* on the binder thread.
* <p>
* Example:
- * <pre>{@code
- * (@BinderThread
+ * <pre><code>
+ * @BinderThread
* public BeamShareData createBeamShareData() { ... }
- * }</pre>
+ * </code></pre>
*
* {@hide}
*/
diff --git a/core/java/android/annotation/CallSuper.java b/core/java/android/annotation/CallSuper.java
index 82e2723..b10a28a 100644
--- a/core/java/android/annotation/CallSuper.java
+++ b/core/java/android/annotation/CallSuper.java
@@ -25,10 +25,10 @@
* Denotes that any overriding methods should invoke this method as well.
* <p>
* Example:
- * <pre>{@code
+ * <pre><code>
* @CallSuper
* public abstract void onFocusLost();
- * }</pre>
+ * </code></pre>
*
* @hide
*/
diff --git a/core/java/android/annotation/CheckResult.java b/core/java/android/annotation/CheckResult.java
index 787514e..97d031a 100644
--- a/core/java/android/annotation/CheckResult.java
+++ b/core/java/android/annotation/CheckResult.java
@@ -29,7 +29,7 @@
* <p>
* Example:
* <pre>{@code
- * public @CheckResult String trim(String s) { return s.trim(); }
+ * public @CheckResult String trim(String s) { return s.trim(); }
* ...
* s.trim(); // this is probably an error
* s = s.trim(); // ok
diff --git a/core/java/android/annotation/ColorInt.java b/core/java/android/annotation/ColorInt.java
index 69d196c..4671b1b 100644
--- a/core/java/android/annotation/ColorInt.java
+++ b/core/java/android/annotation/ColorInt.java
@@ -31,7 +31,7 @@
* <p>
* Example:
* <pre>{@code
- * public abstract void setTextColor(@ColorInt int color);
+ * public abstract void setTextColor(@ColorInt int color);
* }</pre>
*
* @hide
diff --git a/core/java/android/annotation/FloatRange.java b/core/java/android/annotation/FloatRange.java
index 3a7c150..05b51680 100644
--- a/core/java/android/annotation/FloatRange.java
+++ b/core/java/android/annotation/FloatRange.java
@@ -28,12 +28,12 @@
* Denotes that the annotated element should be a float or double in the given range
* <p>
* Example:
- * <pre>{@code
+ * <pre><code>
* @FloatRange(from=0.0,to=1.0)
* public float getAlpha() {
* ...
* }
- * }</pre>
+ * </code></pre>
*
* @hide
*/
diff --git a/core/java/android/annotation/IntDef.java b/core/java/android/annotation/IntDef.java
index 3cae9c5..a18bfa5 100644
--- a/core/java/android/annotation/IntDef.java
+++ b/core/java/android/annotation/IntDef.java
@@ -27,25 +27,24 @@
* named constants. If the {@link #flag()} attribute is set to true,
* multiple constants can be combined.
* <p>
- * Example:
- * <pre>{@code
- * @Retention(CLASS)
- * @IntDef({NAVIGATION_MODE_STANDARD, NAVIGATION_MODE_LIST, NAVIGATION_MODE_TABS})
- * public @interface NavigationMode {}
+ * <pre><code>
+ * @Retention(SOURCE)
+ * @IntDef({NAVIGATION_MODE_STANDARD, NAVIGATION_MODE_LIST, NAVIGATION_MODE_TABS})
+ * public @interface NavigationMode {}
* public static final int NAVIGATION_MODE_STANDARD = 0;
* public static final int NAVIGATION_MODE_LIST = 1;
* public static final int NAVIGATION_MODE_TABS = 2;
* ...
- * public abstract void setNavigationMode(@NavigationMode int mode);
+ * public abstract void setNavigationMode(@NavigationMode int mode);
* @NavigationMode
* public abstract int getNavigationMode();
- * }</pre>
+ * </code></pre>
* For a flag, set the flag attribute:
- * <pre>{@code
+ * <pre><code>
* @IntDef(
* flag = true
- * value = {NAVIGATION_MODE_STANDARD, NAVIGATION_MODE_LIST, NAVIGATION_MODE_TABS})
- * }</pre>
+ * value = {NAVIGATION_MODE_STANDARD, NAVIGATION_MODE_LIST, NAVIGATION_MODE_TABS})
+ * </code></pre>
*
* @hide
*/
diff --git a/core/java/android/annotation/IntRange.java b/core/java/android/annotation/IntRange.java
index b489c01..c043e2d 100644
--- a/core/java/android/annotation/IntRange.java
+++ b/core/java/android/annotation/IntRange.java
@@ -29,12 +29,12 @@
* Denotes that the annotated element should be an int or long in the given range
* <p>
* Example:
- * <pre>{@code
+ * <pre><code>
* @IntRange(from=0,to=255)
* public int getAlpha() {
* ...
* }
- * }</pre>
+ * </code></pre>
*
* @hide
*/
diff --git a/core/java/android/annotation/MainThread.java b/core/java/android/annotation/MainThread.java
index 18a4283..52f8dfb 100644
--- a/core/java/android/annotation/MainThread.java
+++ b/core/java/android/annotation/MainThread.java
@@ -29,10 +29,10 @@
* on the main thread.
* <p>
* Example:
- * <pre>{@code
+ * <pre><code>
* @MainThread
* public void deliverResult(D data) { ... }
- * }</pre>
+ * </code></pre>
*
* {@hide}
*/
diff --git a/core/java/android/annotation/RequiresPermission.java b/core/java/android/annotation/RequiresPermission.java
index 113c055..59d419f 100644
--- a/core/java/android/annotation/RequiresPermission.java
+++ b/core/java/android/annotation/RequiresPermission.java
@@ -32,26 +32,26 @@
* <p/>
* Example of requiring a single permission:
* <pre>{@code
- * @RequiresPermission(Manifest.permission.SET_WALLPAPER)
+ * {@literal @}RequiresPermission(Manifest.permission.SET_WALLPAPER)
* public abstract void setWallpaper(Bitmap bitmap) throws IOException;
*
- * @RequiresPermission(ACCESS_COARSE_LOCATION)
+ * {@literal @}RequiresPermission(ACCESS_COARSE_LOCATION)
* public abstract Location getLastKnownLocation(String provider);
* }</pre>
* Example of requiring at least one permission from a set:
* <pre>{@code
- * @RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
+ * {@literal @}RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
* public abstract Location getLastKnownLocation(String provider);
* }</pre>
* Example of requiring multiple permissions:
* <pre>{@code
- * @RequiresPermission(allOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
+ * {@literal @}RequiresPermission(allOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
* public abstract Location getLastKnownLocation(String provider);
* }</pre>
* Example of requiring separate read and write permissions for a content provider:
* <pre>{@code
- * @RequiresPermission.Read(@RequiresPermission(READ_HISTORY_BOOKMARKS))
- * @RequiresPermission.Write(@RequiresPermission(WRITE_HISTORY_BOOKMARKS))
+ * {@literal @}RequiresPermission.Read(@RequiresPermission(READ_HISTORY_BOOKMARKS))
+ * {@literal @}RequiresPermission.Write(@RequiresPermission(WRITE_HISTORY_BOOKMARKS))
* public static final Uri BOOKMARKS_URI = Uri.parse("content://browser/bookmarks");
* }</pre>
* <p>
@@ -59,7 +59,7 @@
* a permission which depends on the value of the parameter. For example, consider
* {@link android.app.Activity#startActivity(Intent)}:
* <pre>{@code
- * public void startActivity(@RequiresPermission Intent intent) { ... }
+ * public void startActivity(@RequiresPermission Intent intent) { ... }
* }</pre>
* Notice how there are no actual permission names listed in the annotation. The actual
* permissions required will depend on the particular intent passed in. For example,
@@ -71,7 +71,7 @@
* and the actual permission requirement for this particular intent is described on
* the Intent name itself:
* <pre>{@code
- * @RequiresPermission(Manifest.permission.CALL_PHONE)
+ * {@literal @}RequiresPermission(Manifest.permission.CALL_PHONE)
* public static final String ACTION_CALL = "android.intent.action.CALL";
* }</pre>
*
@@ -115,7 +115,7 @@
* When specified on a parameter, the annotation indicates that the method requires
* a permission which depends on the value of the parameter (and typically
* the corresponding field passed in will be one of a set of constants which have
- * been annotated with a {@code @RequiresPermission} annotation.)
+ * been annotated with a <code>@RequiresPermission</code> annotation.)
*/
@Target({FIELD, METHOD, PARAMETER})
@interface Read {
@@ -128,7 +128,7 @@
* When specified on a parameter, the annotation indicates that the method requires
* a permission which depends on the value of the parameter (and typically
* the corresponding field passed in will be one of a set of constants which have
- * been annotated with a {@code @RequiresPermission} annotation.)
+ * been annotated with a <code>@RequiresPermission</code> annotation.)
*/
@Target({FIELD, METHOD, PARAMETER})
@interface Write {
diff --git a/core/java/android/annotation/Size.java b/core/java/android/annotation/Size.java
index 389b819..7c3e70f 100644
--- a/core/java/android/annotation/Size.java
+++ b/core/java/android/annotation/Size.java
@@ -31,7 +31,7 @@
* <p>
* Example:
* <pre>{@code
- * public void getLocationInWindow(@Size(2) int[] location) {
+ * public void getLocationInWindow(@Size(2) int[] location) {
* ...
* }
* }</pre>
diff --git a/core/java/android/annotation/StringDef.java b/core/java/android/annotation/StringDef.java
index 5f7f380..8c8d5d8 100644
--- a/core/java/android/annotation/StringDef.java
+++ b/core/java/android/annotation/StringDef.java
@@ -26,20 +26,20 @@
* type and that its value should be one of the explicitly named constants.
* <p>
* Example:
- * <pre>{@code
+ * <pre><code>
* @Retention(SOURCE)
- * @StringDef({
+ * @StringDef({
* POWER_SERVICE,
* WINDOW_SERVICE,
* LAYOUT_INFLATER_SERVICE
- * })
- * public @interface ServiceName {}
+ * })
+ * public @interface ServiceName {}
* public static final String POWER_SERVICE = "power";
* public static final String WINDOW_SERVICE = "window";
* public static final String LAYOUT_INFLATER_SERVICE = "layout_inflater";
* ...
- * public abstract Object getSystemService(@ServiceName String name);
- * }</pre>
+ * public abstract Object getSystemService(@ServiceName String name);
+ * </code></pre>
*
* @hide
*/
diff --git a/core/java/android/annotation/UiThread.java b/core/java/android/annotation/UiThread.java
index b814600..53121e7 100644
--- a/core/java/android/annotation/UiThread.java
+++ b/core/java/android/annotation/UiThread.java
@@ -29,10 +29,10 @@
* on the UI thread.
* <p>
* Example:
- * <pre>{@code
+ * <pre><code>
* @UiThread
- * public abstract void setText(@NonNull String text) { ... }
- * }</pre>
+ * public abstract void setText(@NonNull String text) { ... }
+ * </code></pre>
*
* {@hide}
*/
diff --git a/core/java/android/annotation/WorkerThread.java b/core/java/android/annotation/WorkerThread.java
index dd12e05..0d2c43e 100644
--- a/core/java/android/annotation/WorkerThread.java
+++ b/core/java/android/annotation/WorkerThread.java
@@ -29,10 +29,10 @@
* on a worker thread.
* <p>
* Example:
- * <pre>{@code
- * (@WorkerThread
+ * <pre><code>
+ * @WorkerThread
* protected abstract FilterResults performFiltering(CharSequence constraint);
- * }</pre>
+ * </code></pre>
*
* {@hide}
*/
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java
index c203854..b11a12f 100644
--- a/core/java/android/app/ActivityManager.java
+++ b/core/java/android/app/ActivityManager.java
@@ -81,9 +81,9 @@
/**
* <a href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code
- * <meta-data>}</a> name for a 'home' Activity that declares a package that is to be
+ * <meta-data>}</a> name for a 'home' Activity that declares a package that is to be
* uninstalled in lieu of the declaring one. The package named here must be
- * signed with the same certificate as the one declaring the {@code <meta-data>}.
+ * signed with the same certificate as the one declaring the {@code <meta-data>}.
*/
public static final String META_HOME_ALTERNATE = "android.app.home.alternate";
@@ -548,6 +548,17 @@
public static boolean canReceiveKeys(int stackId) {
return stackId != PINNED_STACK_ID;
}
+
+ /**
+ * Returns true if the stack can be visible above lockscreen.
+ */
+ public static boolean isAllowedOverLockscreen(int stackId) {
+ return stackId == HOME_STACK_ID || stackId == FULLSCREEN_WORKSPACE_STACK_ID;
+ }
+
+ public static boolean isAlwaysOnTop(int stackId) {
+ return stackId == PINNED_STACK_ID;
+ }
}
/**
@@ -2113,7 +2124,9 @@
public int[] taskIds;
public String[] taskNames;
public Rect[] taskBounds;
+ public int[] taskUserIds;
public int displayId;
+ public int userId;
@Override
public int describeContents() {
@@ -2137,7 +2150,9 @@
dest.writeInt(taskBounds[i].right);
dest.writeInt(taskBounds[i].bottom);
}
+ dest.writeIntArray(taskUserIds);
dest.writeInt(displayId);
+ dest.writeInt(userId);
}
public void readFromParcel(Parcel source) {
@@ -2157,7 +2172,9 @@
} else {
taskBounds = null;
}
+ taskUserIds = source.createIntArray();
displayId = source.readInt();
+ userId = source.readInt();
}
public static final Creator<StackInfo> CREATOR = new Creator<StackInfo>() {
@@ -2183,6 +2200,7 @@
sb.append(prefix); sb.append("Stack id="); sb.append(stackId);
sb.append(" bounds="); sb.append(bounds.toShortString());
sb.append(" displayId="); sb.append(displayId);
+ sb.append(" userId="); sb.append(userId);
sb.append("\n");
prefix = prefix + " ";
for (int i = 0; i < taskIds.length; ++i) {
@@ -2191,6 +2209,7 @@
if (taskBounds != null) {
sb.append(" bounds="); sb.append(taskBounds[i].toShortString());
}
+ sb.append(" userId=").append(taskUserIds[i]);
sb.append("\n");
}
return sb.toString();
@@ -3108,9 +3127,29 @@
* @param userid the user's id. Zero indicates the default user.
* @hide
*/
- public boolean isUserRunning(int userid) {
+ public boolean isUserRunning(int userId) {
try {
- return ActivityManagerNative.getDefault().isUserRunning(userid, 0);
+ return ActivityManagerNative.getDefault().isUserRunning(userId, 0);
+ } catch (RemoteException e) {
+ return false;
+ }
+ }
+
+ /** {@hide} */
+ public boolean isUserRunningAndLocked(int userId) {
+ try {
+ return ActivityManagerNative.getDefault().isUserRunning(userId,
+ ActivityManager.FLAG_AND_LOCKED);
+ } catch (RemoteException e) {
+ return false;
+ }
+ }
+
+ /** {@hide} */
+ public boolean isUserRunningAndUnlocked(int userId) {
+ try {
+ return ActivityManagerNative.getDefault().isUserRunning(userId,
+ ActivityManager.FLAG_AND_UNLOCKED);
} catch (RemoteException e) {
return false;
}
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 74f0c0e..c264368 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -4841,7 +4841,7 @@
if (ii != null) {
final ApplicationInfo instrApp = new ApplicationInfo();
ii.copyTo(instrApp);
-
+ instrApp.initForUser(UserHandle.myUserId());
final LoadedApk pi = getPackageInfo(instrApp, data.compatInfo,
appContext.getClassLoader(), false, true, false);
final ContextImpl instrContext = ContextImpl.createAppContext(this, pi);
diff --git a/core/java/android/app/BackStackRecord.java b/core/java/android/app/BackStackRecord.java
index 9081ef8..984a186 100644
--- a/core/java/android/app/BackStackRecord.java
+++ b/core/java/android/app/BackStackRecord.java
@@ -798,21 +798,33 @@
}
}
- private static void setFirstOut(SparseArray<Fragment> fragments, Fragment fragment) {
+ private static void setFirstOut(SparseArray<Fragment> firstOutFragments,
+ SparseArray<Fragment> lastInFragments, Fragment fragment) {
if (fragment != null) {
int containerId = fragment.mContainerId;
- if (containerId != 0 && !fragment.isHidden() && fragment.isAdded() &&
- fragment.getView() != null && fragments.get(containerId) == null) {
- fragments.put(containerId, fragment);
+ if (containerId != 0 && !fragment.isHidden()) {
+ if (fragment.isAdded() && fragment.getView() != null
+ && firstOutFragments.get(containerId) == null) {
+ firstOutFragments.put(containerId, fragment);
+ }
+ if (lastInFragments.get(containerId) == fragment) {
+ lastInFragments.remove(containerId);
+ }
}
}
}
- private void setLastIn(SparseArray<Fragment> fragments, Fragment fragment) {
+ private void setLastIn(SparseArray<Fragment> firstOutFragments,
+ SparseArray<Fragment> lastInFragments, Fragment fragment) {
if (fragment != null) {
int containerId = fragment.mContainerId;
if (containerId != 0) {
- fragments.put(containerId, fragment);
+ if (!fragment.isAdded()) {
+ lastInFragments.put(containerId, fragment);
+ }
+ if (firstOutFragments.get(containerId) == fragment) {
+ firstOutFragments.remove(containerId);
+ }
}
}
}
@@ -835,7 +847,7 @@
while (op != null) {
switch (op.cmd) {
case OP_ADD:
- setLastIn(lastInFragments, op.fragment);
+ setLastIn(firstOutFragments, lastInFragments, op.fragment);
break;
case OP_REPLACE: {
Fragment f = op.fragment;
@@ -845,29 +857,30 @@
if (f == null || old.mContainerId == f.mContainerId) {
if (old == f) {
f = null;
+ lastInFragments.remove(old.mContainerId);
} else {
- setFirstOut(firstOutFragments, old);
+ setFirstOut(firstOutFragments, lastInFragments, old);
}
}
}
}
- setLastIn(lastInFragments, f);
+ setLastIn(firstOutFragments, lastInFragments, op.fragment);
break;
}
case OP_REMOVE:
- setFirstOut(firstOutFragments, op.fragment);
+ setFirstOut(firstOutFragments, lastInFragments, op.fragment);
break;
case OP_HIDE:
- setFirstOut(firstOutFragments, op.fragment);
+ setFirstOut(firstOutFragments, lastInFragments, op.fragment);
break;
case OP_SHOW:
- setLastIn(lastInFragments, op.fragment);
+ setLastIn(firstOutFragments, lastInFragments, op.fragment);
break;
case OP_DETACH:
- setFirstOut(firstOutFragments, op.fragment);
+ setFirstOut(firstOutFragments, lastInFragments, op.fragment);
break;
case OP_ATTACH:
- setLastIn(lastInFragments, op.fragment);
+ setLastIn(firstOutFragments, lastInFragments, op.fragment);
break;
}
@@ -889,38 +902,38 @@
if (!mManager.mContainer.onHasView()) {
return; // nothing to see, so no transitions
}
- Op op = mHead;
+ Op op = mTail;
while (op != null) {
switch (op.cmd) {
case OP_ADD:
- setFirstOut(firstOutFragments, op.fragment);
+ setFirstOut(firstOutFragments, lastInFragments, op.fragment);
break;
case OP_REPLACE:
if (op.removed != null) {
for (int i = op.removed.size() - 1; i >= 0; i--) {
- setLastIn(lastInFragments, op.removed.get(i));
+ setLastIn(firstOutFragments, lastInFragments, op.removed.get(i));
}
}
- setFirstOut(firstOutFragments, op.fragment);
+ setFirstOut(firstOutFragments, lastInFragments, op.fragment);
break;
case OP_REMOVE:
- setLastIn(lastInFragments, op.fragment);
+ setLastIn(firstOutFragments, lastInFragments, op.fragment);
break;
case OP_HIDE:
- setLastIn(lastInFragments, op.fragment);
+ setLastIn(firstOutFragments, lastInFragments, op.fragment);
break;
case OP_SHOW:
- setFirstOut(firstOutFragments, op.fragment);
+ setFirstOut(firstOutFragments, lastInFragments, op.fragment);
break;
case OP_DETACH:
- setLastIn(lastInFragments, op.fragment);
+ setLastIn(firstOutFragments, lastInFragments, op.fragment);
break;
case OP_ATTACH:
- setFirstOut(firstOutFragments, op.fragment);
+ setFirstOut(firstOutFragments, lastInFragments, op.fragment);
break;
}
- op = op.next;
+ op = op.prev;
}
}
@@ -957,6 +970,7 @@
*/
private TransitionState beginTransition(SparseArray<Fragment> firstOutFragments,
SparseArray<Fragment> lastInFragments, boolean isBack) {
+ ensureFragmentsAreInitialized(lastInFragments);
TransitionState state = new TransitionState();
// Adding a non-existent target view makes sure that the transitions don't target
@@ -982,6 +996,21 @@
return state;
}
+ /**
+ * Ensure that fragments that are entering are at least at the CREATED state
+ * so that they may load Transitions using TransitionInflater.
+ */
+ private void ensureFragmentsAreInitialized(SparseArray<Fragment> lastInFragments) {
+ final int count = lastInFragments.size();
+ for (int i = 0; i < count; i++) {
+ final Fragment fragment = lastInFragments.valueAt(i);
+ if (fragment.mState < Fragment.CREATED) {
+ mManager.makeActive(fragment);
+ mManager.moveToState(fragment, Fragment.CREATED, 0, 0, false);
+ }
+ }
+ }
+
private static Transition cloneTransition(Transition transition) {
if (transition != null) {
transition = transition.clone();
diff --git a/core/java/android/app/INotificationManager.aidl b/core/java/android/app/INotificationManager.aidl
index c504ce3..136b810 100644
--- a/core/java/android/app/INotificationManager.aidl
+++ b/core/java/android/app/INotificationManager.aidl
@@ -52,6 +52,8 @@
int getTopicVisibilityOverride(String pkg, int uid, in Notification.Topic topic);
void setTopicPriority(String pkg, int uid, in Notification.Topic topic, int priority);
int getTopicPriority(String pkg, int uid, in Notification.Topic topic);
+ void setTopicImportance(String pkg, int uid, in Notification.Topic topic, int importance);
+ int getTopicImportance(String pkg, int uid, in Notification.Topic topic);
// TODO: Remove this when callers have been migrated to the equivalent
// INotificationListener method.
diff --git a/core/java/android/app/IUiModeManager.aidl b/core/java/android/app/IUiModeManager.aidl
index 7e9873e..cae54b6 100644
--- a/core/java/android/app/IUiModeManager.aidl
+++ b/core/java/android/app/IUiModeManager.aidl
@@ -51,4 +51,14 @@
* 2 for night, and 3 for automatic mode switching.
*/
int getNightMode();
+
+ /**
+ * Tells if UI mode is locked or not.
+ */
+ boolean isUiModeLocked();
+
+ /**
+ * Tells if Night mode is locked or not.
+ */
+ boolean isNightModeLocked();
}
diff --git a/core/java/android/app/KeyguardManager.java b/core/java/android/app/KeyguardManager.java
index 2c12317..23e4d97 100644
--- a/core/java/android/app/KeyguardManager.java
+++ b/core/java/android/app/KeyguardManager.java
@@ -248,8 +248,9 @@
* @hide
*/
public boolean isDeviceLocked(int userId) {
+ ITrustManager trustManager = getTrustManager();
try {
- return mTrustManager.isDeviceLocked(userId);
+ return trustManager.isDeviceLocked(userId);
} catch (RemoteException e) {
return false;
}
@@ -273,13 +274,22 @@
* @hide
*/
public boolean isDeviceSecure(int userId) {
+ ITrustManager trustManager = getTrustManager();
try {
- return mTrustManager.isDeviceSecure(userId);
+ return trustManager.isDeviceSecure(userId);
} catch (RemoteException e) {
return false;
}
}
+ private synchronized ITrustManager getTrustManager() {
+ if (mTrustManager == null) {
+ mTrustManager = ITrustManager.Stub.asInterface(
+ ServiceManager.getService(Context.TRUST_SERVICE));
+ }
+ return mTrustManager;
+ }
+
/**
* @deprecated Use {@link android.view.WindowManager.LayoutParams#FLAG_DISMISS_KEYGUARD}
* and/or {@link android.view.WindowManager.LayoutParams#FLAG_SHOW_WHEN_LOCKED}
diff --git a/core/java/android/app/UiModeManager.java b/core/java/android/app/UiModeManager.java
index 0f6ce12..44164158 100644
--- a/core/java/android/app/UiModeManager.java
+++ b/core/java/android/app/UiModeManager.java
@@ -233,4 +233,35 @@
}
return -1;
}
+
+ /**
+ * @return If UI mode is locked or not. When UI mode is locked, calls to change UI mode
+ * like {@link #enableCarMode(int)} will silently fail.
+ */
+ public boolean isUiModeLocked() {
+ if (mService != null) {
+ try {
+ return mService.isUiModeLocked();
+ } catch (RemoteException e) {
+ Log.e(TAG, "isUiModeLocked: RemoteException", e);
+ }
+ }
+ return true;
+ }
+
+ /**
+ * @return If Night mode is locked or not. When Night mode is locked, changing Night mode
+ * is only allowed to privileged system components and normal application's call
+ * to change Night mode using {@link #setNightMode(int)} will silently fail.
+ */
+ public boolean isNightModeLocked() {
+ if (mService != null) {
+ try {
+ return mService.isNightModeLocked();
+ } catch (RemoteException e) {
+ Log.e(TAG, "isNightModeLocked: RemoteException", e);
+ }
+ }
+ return true;
+ }
}
diff --git a/core/java/android/app/assist/AssistContent.java b/core/java/android/app/assist/AssistContent.java
index 39902d7..1c9f573 100644
--- a/core/java/android/app/assist/AssistContent.java
+++ b/core/java/android/app/assist/AssistContent.java
@@ -35,7 +35,9 @@
*/
public void setDefaultIntent(Intent intent) {
mIntent = intent;
- setWebUri(null);
+ mIsAppProvidedIntent = false;
+ mIsAppProvidedWebUri = false;
+ mUri = null;
if (intent != null && Intent.ACTION_VIEW.equals(intent.getAction())) {
Uri uri = intent.getData();
if (uri != null) {
@@ -161,6 +163,7 @@
}
mIsAppProvidedIntent = in.readInt() == 1;
mExtras = in.readBundle();
+ mIsAppProvidedWebUri = in.readInt() == 1;
}
void writeToParcelInternal(Parcel dest, int flags) {
@@ -190,6 +193,7 @@
}
dest.writeInt(mIsAppProvidedIntent ? 1 : 0);
dest.writeBundle(mExtras);
+ dest.writeInt(mIsAppProvidedWebUri ? 1 : 0);
}
@Override
diff --git a/core/java/android/app/trust/ITrustManager.aidl b/core/java/android/app/trust/ITrustManager.aidl
index 2dea545..a3fe6ab 100644
--- a/core/java/android/app/trust/ITrustManager.aidl
+++ b/core/java/android/app/trust/ITrustManager.aidl
@@ -29,6 +29,7 @@
void registerTrustListener(in ITrustListener trustListener);
void unregisterTrustListener(in ITrustListener trustListener);
void reportKeyguardShowingChanged();
+ void setDeviceLockedForUser(int userId, boolean locked);
boolean isDeviceLocked(int userId);
boolean isDeviceSecure(int userId);
}
diff --git a/core/java/android/app/trust/TrustManager.java b/core/java/android/app/trust/TrustManager.java
index aff69f0..ee591d3 100644
--- a/core/java/android/app/trust/TrustManager.java
+++ b/core/java/android/app/trust/TrustManager.java
@@ -51,6 +51,21 @@
}
/**
+ * Changes the lock status for the given user. This is only applicable to Managed Profiles,
+ * other users should be handled by Keyguard.
+ *
+ * @param userId The id for the user to be locked/unlocked.
+ * @param locked The value for that user's locked state.
+ */
+ public void setDeviceLockedForUser(int userId, boolean locked) {
+ try {
+ mService.setDeviceLockedForUser(userId, locked);
+ } catch (RemoteException e) {
+ onError(e);
+ }
+ }
+
+ /**
* Reports that user {@param userId} has tried to unlock the device.
*
* @param successful if true, the unlock attempt was successful.
diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java
index 2d825fa..3e8a51e 100644
--- a/core/java/android/bluetooth/BluetoothAdapter.java
+++ b/core/java/android/bluetooth/BluetoothAdapter.java
@@ -74,6 +74,8 @@
* {@link #listenUsingRfcommWithServiceRecord(String,UUID)}; or start a scan for
* Bluetooth LE devices with {@link #startLeScan(LeScanCallback callback)}.
*
+ * <p>This class is thread safe.
+ *
* <p class="note"><strong>Note:</strong>
* Most methods require the {@link android.Manifest.permission#BLUETOOTH}
* permission and some also require the
@@ -82,7 +84,7 @@
* <div class="special reference">
* <h3>Developer Guides</h3>
* <p>For more information about using Bluetooth, read the
- * <a href="{@docRoot}guide/topics/wireless/bluetooth.html">Bluetooth</a> developer guide.</p>
+ * <a href="{@docRoot}guide/topics/wireless/bluetooth.html">Bluetooth</a> developer guide.
* </div>
*
* {@see BluetoothDevice}
diff --git a/core/java/android/bluetooth/BluetoothDevice.java b/core/java/android/bluetooth/BluetoothDevice.java
index d27dfa0..cd5c205 100644
--- a/core/java/android/bluetooth/BluetoothDevice.java
+++ b/core/java/android/bluetooth/BluetoothDevice.java
@@ -25,6 +25,7 @@
import android.os.Parcel;
import android.os.Parcelable;
import android.os.ParcelUuid;
+import android.os.Process;
import android.os.RemoteException;
import android.util.Log;
@@ -823,6 +824,9 @@
return false;
}
try {
+ Log.i(TAG, "createBond() for device " + getAddress() +
+ " called by pid: " + Process.myPid() +
+ " tid: " + Process.myTid());
return sService.createBond(this, TRANSPORT_AUTO);
} catch (RemoteException e) {Log.e(TAG, "", e);}
return false;
@@ -854,6 +858,9 @@
throw new IllegalArgumentException(transport + " is not a valid Bluetooth transport");
}
try {
+ Log.i(TAG, "createBond() for device " + getAddress() +
+ " called by pid: " + Process.myPid() +
+ " tid: " + Process.myTid());
return sService.createBond(this, transport);
} catch (RemoteException e) {Log.e(TAG, "", e);}
return false;
@@ -922,6 +929,9 @@
return false;
}
try {
+ Log.i(TAG, "cancelBondProcess() for device " + getAddress() +
+ " called by pid: " + Process.myPid() +
+ " tid: " + Process.myTid());
return sService.cancelBondProcess(this);
} catch (RemoteException e) {Log.e(TAG, "", e);}
return false;
@@ -943,6 +953,9 @@
return false;
}
try {
+ Log.i(TAG, "removeBond() for device " + getAddress() +
+ " called by pid: " + Process.myPid() +
+ " tid: " + Process.myTid());
return sService.removeBond(this);
} catch (RemoteException e) {Log.e(TAG, "", e);}
return false;
diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java
index 853bc6c..9d0ebc2 100644
--- a/core/java/android/content/ContentResolver.java
+++ b/core/java/android/content/ContentResolver.java
@@ -986,6 +986,7 @@
stableProvider = acquireProvider(uri);
}
releaseUnstableProvider(unstableProvider);
+ unstableProvider = null;
ParcelFileDescriptor pfd = new ParcelFileDescriptorInner(
fd.getParcelFileDescriptor(), stableProvider);
@@ -1130,6 +1131,7 @@
stableProvider = acquireProvider(uri);
}
releaseUnstableProvider(unstableProvider);
+ unstableProvider = null;
ParcelFileDescriptor pfd = new ParcelFileDescriptorInner(
fd.getParcelFileDescriptor(), stableProvider);
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index 2178c38..b65d825 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -1926,6 +1926,24 @@
*/
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
public static final String ACTION_ALARM_CHANGED = "android.intent.action.ALARM_CHANGED";
+
+ /**
+ * Broadcast Action: This is broadcast once, after the system has finished
+ * booting and the user is in a "locked" state. A user is locked when their
+ * credential-encrypted private app data storage is unavailable. Once the
+ * user has entered their credentials (such as a lock pattern or PIN) for
+ * the first time, the {@link #ACTION_BOOT_COMPLETED} broadcast will be
+ * sent.
+ * <p>
+ * You must hold the
+ * {@link android.Manifest.permission#RECEIVE_BOOT_COMPLETED} permission in
+ * order to receive this broadcast.
+ * <p class="note">
+ * This is a protected intent that can only be sent by the system.
+ */
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String ACTION_LOCKED_BOOT_COMPLETED = "android.intent.action.LOCKED_BOOT_COMPLETED";
+
/**
* Broadcast Action: This is broadcast once, after the system has finished
* booting. It can be used to perform application-specific initialization,
@@ -1938,6 +1956,7 @@
*/
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
public static final String ACTION_BOOT_COMPLETED = "android.intent.action.BOOT_COMPLETED";
+
/**
* Broadcast Action: This is broadcast when a user action should request a
* temporary system dialog to dismiss. Some examples of temporary system
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index aa960a4..abd4c28 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -259,6 +259,14 @@
*/
public static final int SKIP_CURRENT_PROFILE = 0x00000002;
+ /**
+ * Flag for {@link addCrossProfileIntentFilter}: if this flag is set:
+ * activities in the other profiles can respond to the intent only if no activity with
+ * non-negative priority in current profile can respond to the intent.
+ * @hide
+ */
+ public static final int ONLY_IF_NO_MATCH_FOUND = 0x00000004;
+
/** @hide */
@IntDef({PERMISSION_GRANTED, PERMISSION_DENIED})
@Retention(RetentionPolicy.SOURCE)
@@ -4636,7 +4644,8 @@
* @param filter The {@link IntentFilter} the intent has to match
* @param sourceUserId The source user id.
* @param targetUserId The target user id.
- * @param flags The only possible value is {@link SKIP_CURRENT_PROFILE}
+ * @param flags The possible values are {@link SKIP_CURRENT_PROFILE} and
+ * {@link ONLY_IF_NO_MATCH_FOUND}.
* @hide
*/
public abstract void addCrossProfileIntentFilter(IntentFilter filter, int sourceUserId,
diff --git a/core/java/android/content/pm/RegisteredServicesCache.java b/core/java/android/content/pm/RegisteredServicesCache.java
index b3f03c3..a413f36 100644
--- a/core/java/android/content/pm/RegisteredServicesCache.java
+++ b/core/java/android/content/pm/RegisteredServicesCache.java
@@ -294,14 +294,16 @@
*/
public static class ServiceInfo<V> {
public final V type;
+ public final ComponentInfo componentInfo;
public final ComponentName componentName;
public final int uid;
/** @hide */
- public ServiceInfo(V type, ComponentName componentName, int uid) {
+ public ServiceInfo(V type, ComponentInfo componentInfo, ComponentName componentName) {
this.type = type;
+ this.componentInfo = componentInfo;
this.componentName = componentName;
- this.uid = uid;
+ this.uid = (componentInfo != null) ? componentInfo.applicationInfo.uid : -1;
}
@Override
@@ -362,8 +364,9 @@
@VisibleForTesting
protected List<ResolveInfo> queryIntentServices(int userId) {
final PackageManager pm = mContext.getPackageManager();
- return pm.queryIntentServicesAsUser(
- new Intent(mInterfaceName), PackageManager.GET_META_DATA, userId);
+ return pm.queryIntentServicesAsUser(new Intent(mInterfaceName),
+ PackageManager.GET_META_DATA | PackageManager.GET_ENCRYPTION_UNAWARE_COMPONENTS,
+ userId);
}
/**
@@ -563,9 +566,7 @@
return null;
}
final android.content.pm.ServiceInfo serviceInfo = service.serviceInfo;
- final ApplicationInfo applicationInfo = serviceInfo.applicationInfo;
- final int uid = applicationInfo.uid;
- return new ServiceInfo<V>(v, componentName, uid);
+ return new ServiceInfo<V>(v, serviceInfo, componentName);
} catch (NameNotFoundException e) {
throw new XmlPullParserException(
"Unable to load resources for pacakge " + si.packageName);
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java
index 73bb426..8a87bff 100644
--- a/core/java/android/hardware/Camera.java
+++ b/core/java/android/hardware/Camera.java
@@ -2891,8 +2891,7 @@
* <var>y</var> for the Y plane and row <var>c</var> for the U and V
* planes:
*
- * {@code
- * <pre>
+ * <pre>{@code
* yStride = (int) ceil(width / 16.0) * 16;
* uvStride = (int) ceil( (yStride / 2) / 16.0) * 16;
* ySize = yStride * height;
@@ -2900,8 +2899,9 @@
* yRowIndex = yStride * y;
* uRowIndex = ySize + uvSize + uvStride * c;
* vRowIndex = ySize + uvStride * c;
- * size = ySize + uvSize * 2;</pre>
+ * size = ySize + uvSize * 2;
* }
+ *</pre>
*
* @param pixel_format the desired preview picture format, defined by
* one of the {@link android.graphics.ImageFormat} constants. (E.g.,
diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java
index 6fc998f..bb0a04f 100644
--- a/core/java/android/hardware/camera2/CameraCharacteristics.java
+++ b/core/java/android/hardware/camera2/CameraCharacteristics.java
@@ -398,17 +398,24 @@
* this camera device.</p>
* <p>For devices at the LEGACY level or above:</p>
* <ul>
- * <li>This list will always include (30, 30).</li>
- * <li>Also, for constant-framerate recording, for each normal
+ * <li>
+ * <p>For constant-framerate recording, for each normal
+ * {@link android.media.CamcorderProfile CamcorderProfile}, that is, a
* {@link android.media.CamcorderProfile CamcorderProfile} that has
* {@link android.media.CamcorderProfile#quality quality} in
* the range [{@link android.media.CamcorderProfile#QUALITY_LOW QUALITY_LOW},
* {@link android.media.CamcorderProfile#QUALITY_2160P QUALITY_2160P}], if the profile is
* supported by the device and has
* {@link android.media.CamcorderProfile#videoFrameRate videoFrameRate} <code>x</code>, this list will
- * always include (<code>x</code>,<code>x</code>).</li>
- * <li>For preview streaming use case, this list will always include (<code>min</code>, <code>max</code>) where
- * <code>min</code> <= 15 and <code>max</code> >= 30.</li>
+ * always include (<code>x</code>,<code>x</code>).</p>
+ * </li>
+ * <li>
+ * <p>Also, a camera device must either not support any
+ * {@link android.media.CamcorderProfile CamcorderProfile},
+ * or support at least one
+ * normal {@link android.media.CamcorderProfile CamcorderProfile} that has
+ * {@link android.media.CamcorderProfile#videoFrameRate videoFrameRate} <code>x</code> >= 24.</p>
+ * </li>
* </ul>
* <p>For devices at the LIMITED level or above:</p>
* <ul>
diff --git a/core/java/android/hardware/package.html b/core/java/android/hardware/package.html
index 5b04da1..ee54476 100644
--- a/core/java/android/hardware/package.html
+++ b/core/java/android/hardware/package.html
@@ -4,6 +4,6 @@
not all Android-powered devices support all hardware features, so you should declare hardware
that your application requires using the <a
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code
-<uses-feature>}</a> manifest element.</p>
+<uses-feature>}</a> manifest element.</p>
</BODY>
</HTML>
diff --git a/core/java/android/net/LocalSocket.java b/core/java/android/net/LocalSocket.java
index a374a86..e14facb1 100644
--- a/core/java/android/net/LocalSocket.java
+++ b/core/java/android/net/LocalSocket.java
@@ -25,7 +25,8 @@
/**
* Creates a (non-server) socket in the UNIX-domain namespace. The interface
- * here is not entirely unlike that of java.net.Socket
+ * here is not entirely unlike that of java.net.Socket. This class and the streams
+ * returned from it may be used from multiple threads.
*/
public class LocalSocket implements Closeable {
diff --git a/core/java/android/net/PskKeyManager.java b/core/java/android/net/PskKeyManager.java
index f82e635..667abb4 100644
--- a/core/java/android/net/PskKeyManager.java
+++ b/core/java/android/net/PskKeyManager.java
@@ -97,7 +97,7 @@
*
* SSLContext sslContext = SSLContext.getInstance("TLS");
* sslContext.init(
- * new KeyManager[] {pskKeyManager},
+ * new KeyManager[] { pskKeyManager },
* new TrustManager[0], // No TrustManagers needed for TLS-PSK
* null // Use the default source of entropy
* );
diff --git a/core/java/android/net/TrafficStats.java b/core/java/android/net/TrafficStats.java
index 2137c3a..e82485d 100644
--- a/core/java/android/net/TrafficStats.java
+++ b/core/java/android/net/TrafficStats.java
@@ -28,6 +28,7 @@
import dalvik.system.SocketTagger;
+import java.net.DatagramSocket;
import java.net.Socket;
import java.net.SocketException;
@@ -226,6 +227,27 @@
}
/**
+ * Tag the given {@link DatagramSocket} with any statistics parameters
+ * active for the current thread. Subsequent calls always replace any
+ * existing parameters. When finished, call
+ * {@link #untagDatagramSocket(DatagramSocket)} to remove statistics
+ * parameters.
+ *
+ * @see #setThreadStatsTag(int)
+ * @see #setThreadStatsUid(int)
+ */
+ public static void tagDatagramSocket(DatagramSocket socket) throws SocketException {
+ SocketTagger.get().tag(socket);
+ }
+
+ /**
+ * Remove any statistics parameters from the given {@link DatagramSocket}.
+ */
+ public static void untagDatagramSocket(DatagramSocket socket) throws SocketException {
+ SocketTagger.get().untag(socket);
+ }
+
+ /**
* Start profiling data usage for current UID. Only one profiling session
* can be active at a time.
*
diff --git a/core/java/android/net/http/HttpResponseCache.java b/core/java/android/net/http/HttpResponseCache.java
index 188287f..729aff0 100644
--- a/core/java/android/net/http/HttpResponseCache.java
+++ b/core/java/android/net/http/HttpResponseCache.java
@@ -36,7 +36,8 @@
* saving time and bandwidth. This class supports {@link
* java.net.HttpURLConnection} and {@link javax.net.ssl.HttpsURLConnection};
* there is no platform-provided cache for {@code DefaultHttpClient} or
- * {@code AndroidHttpClient}.
+ * {@code AndroidHttpClient}. Installation and instances are thread
+ * safe.
*
* <h3>Installing an HTTP response cache</h3>
* Enable caching of all of your application's HTTP requests by installing the
diff --git a/core/java/android/nfc/NfcAdapter.java b/core/java/android/nfc/NfcAdapter.java
index b492deb..ff6eb40 100644
--- a/core/java/android/nfc/NfcAdapter.java
+++ b/core/java/android/nfc/NfcAdapter.java
@@ -914,7 +914,7 @@
*
* <p>If you want to prevent the Android OS from sending default NDEF
* messages completely (for all activities), you can include a
- * {@code <meta-data>} element inside the {@code <application>}
+ * {@code <meta-data>} element inside the {@code <application>}
* element of your AndroidManifest.xml file, like this:
* <pre>
* <application ...>
@@ -1022,7 +1022,7 @@
*
* <p>If you want to prevent the Android OS from sending default NDEF
* messages completely (for all activities), you can include a
- * {@code <meta-data>} element inside the {@code <application>}
+ * {@code <meta-data>} element inside the {@code <application>}
* element of your AndroidManifest.xml file, like this:
* <pre>
* <application ...>
diff --git a/core/java/android/os/Parcelable.java b/core/java/android/os/Parcelable.java
index 13b5de9..c10abec 100644
--- a/core/java/android/os/Parcelable.java
+++ b/core/java/android/os/Parcelable.java
@@ -73,19 +73,31 @@
*/
public static final int PARCELABLE_ELIDE_DUPLICATES = 0x0002;
- /**
+ /*
* Bit masks for use with {@link #describeContents}: each bit represents a
* kind of object considered to have potential special significance when
* marshalled.
*/
+
+ /**
+ * Descriptor bit used with {@link #describeContents()}: indicates that
+ * the Parcelable object's flattened representation includes a file descriptor.
+ *
+ * @see #describeContents()
+ */
public static final int CONTENTS_FILE_DESCRIPTOR = 0x0001;
/**
- * Describe the kinds of special objects contained in this Parcelable's
- * marshalled representation.
+ * Describe the kinds of special objects contained in this Parcelable
+ * instance's marshaled representation. For example, if the object will
+ * include a file descriptor in the output of {@link #writeToParcel(Parcel, int)},
+ * the return value of this method must include the
+ * {@link #CONTENTS_FILE_DESCRIPTOR} bit.
*
- * @return a bitmask indicating the set of special object types marshalled
- * by the Parcelable.
+ * @return a bitmask indicating the set of special object types marshaled
+ * by this Parcelable object instance.
+ *
+ * @see #CONTENTS_FILE_DESCRIPTOR
*/
public int describeContents();
diff --git a/core/java/android/os/PowerManager.java b/core/java/android/os/PowerManager.java
index 1cffa832..a0a0060 100644
--- a/core/java/android/os/PowerManager.java
+++ b/core/java/android/os/PowerManager.java
@@ -96,7 +96,7 @@
* </table>
* <p>
* Any application using a WakeLock must request the {@code android.permission.WAKE_LOCK}
- * permission in an {@code <uses-permission>} element of the application's manifest.
+ * permission in an {@code <uses-permission>} element of the application's manifest.
* </p>
*/
public final class PowerManager {
@@ -1033,7 +1033,7 @@
* to have the device stay on.
* <p>
* Any application using a WakeLock must request the {@code android.permission.WAKE_LOCK}
- * permission in an {@code <uses-permission>} element of the application's manifest.
+ * permission in an {@code <uses-permission>} element of the application's manifest.
* Obtain a wake lock by calling {@link PowerManager#newWakeLock(int, String)}.
* </p><p>
* Call {@link #acquire()} to acquire the wake lock and force the device to stay
diff --git a/core/java/android/os/StrictMode.java b/core/java/android/os/StrictMode.java
index 8b2c74f..f1672df 100644
--- a/core/java/android/os/StrictMode.java
+++ b/core/java/android/os/StrictMode.java
@@ -1931,9 +1931,9 @@
// so we'll report it and bail on all of the current strict mode violations
// we currently are maintaining for this thread.
// First, drain the remaining violations from the parcel.
- while (i < numViolations) {
+ i++; // Skip the current entry.
+ for (; i < numViolations; i++) {
info = new ViolationInfo(p, !currentlyGathering);
- i++;
}
// Next clear out all gathered violations.
clearGatheredViolations();
diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java
index 79390d4..c2fc5e4 100644
--- a/core/java/android/os/UserManager.java
+++ b/core/java/android/os/UserManager.java
@@ -755,6 +755,23 @@
}
/**
+ * Return whether the given user is running in a "locked" state. A user
+ * is unlocked only after they've entered their credentials (such as a lock
+ * pattern or PIN), and credential-encrypted private app data storage is
+ * available.
+ *
+ * @param user to retrieve the unlocked state for.
+ */
+ public boolean isUserRunningAndLocked(UserHandle user) {
+ try {
+ return ActivityManagerNative.getDefault().isUserRunning(
+ user.getIdentifier(), ActivityManager.FLAG_AND_LOCKED);
+ } catch (RemoteException e) {
+ return false;
+ }
+ }
+
+ /**
* Return whether the given user is running in an "unlocked" state. A user
* is unlocked only after they've entered their credentials (such as a lock
* pattern or PIN), and credential-encrypted private app data storage is
@@ -762,7 +779,7 @@
*
* @param user to retrieve the unlocked state for.
*/
- public boolean isUserRunningUnlocked(UserHandle user) {
+ public boolean isUserRunningAndUnlocked(UserHandle user) {
try {
return ActivityManagerNative.getDefault().isUserRunning(
user.getIdentifier(), ActivityManager.FLAG_AND_UNLOCKED);
diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java
index 94a2bea..c0d95a1 100644
--- a/core/java/android/provider/ContactsContract.java
+++ b/core/java/android/provider/ContactsContract.java
@@ -394,12 +394,19 @@
Uri.withAppendedPath(AUTHORITY_URI, "directories");
/**
- * The content:// style URI for enterprise Directory table. Requests to this URI can be
- * performed on the UI thread because they are always unblocking.
+ * URI used for getting all directories from primary and managed profile.
+ * It supports the same semantics as {@link #CONTENT_URI} and returns the same columns.
+ * If the device has no managed profile that is linked to the current profile, it behaves
+ * in the exact same way as {@link #CONTENT_URI}.
+ * If there is a managed profile linked to the current profile, it will merge
+ * managed profile and current profile's results and return.
+ *
+ * Note: this query returns primary profile results before managed profile results,
+ * and this order is not affected by sorting parameter.
*
*/
- public static final Uri CORP_CONTENT_URI = Uri.withAppendedPath(AUTHORITY_URI,
- "directories_corp");
+ public static final Uri ENTERPRISE_CONTENT_URI = Uri.withAppendedPath(AUTHORITY_URI,
+ "directories_enterprise");
/**
* The MIME-type of {@link #CONTENT_URI} providing a directory of
@@ -426,16 +433,12 @@
/**
* _ID of the work profile default directory, which represents locally stored contacts.
- *
- * @hide
*/
public static final long ENTERPRISE_DEFAULT = Directory.ENTERPRISE_DIRECTORY_ID_BASE
+ DEFAULT;
/**
* _ID of the work profile directory that represents locally stored invisible contacts.
- *
- * @hide
*/
public static final long ENTERPRISE_LOCAL_INVISIBLE = Directory.ENTERPRISE_DIRECTORY_ID_BASE
+ LOCAL_INVISIBLE;
@@ -1640,12 +1643,12 @@
CONTENT_URI, "filter");
/**
- * It supports the same semantics as {@link #CONTENT_FILTER_URI} and returns the same
- * columns. If there is a corp profile linked to the current profile, it will query corp
- * profile, otherwise it will return null.
+ * It supports the similar semantics as {@link #CONTENT_FILTER_URI} and returns the same
+ * columns. This URI requires {@link ContactsContract#DIRECTORY_PARAM_KEY} in parameters,
+ * otherwise it will throw UnsupportedOperationException.
*/
- public static final Uri CORP_CONTENT_FILTER_URI = Uri.withAppendedPath(
- CORP_CONTENT_URI, "filter");
+ public static final Uri ENTERPRISE_CONTENT_FILTER_URI = Uri.withAppendedPath(
+ CONTENT_URI, "filter_enterprise");
/**
* The content:// style URI for this table joined with useful data from
@@ -5915,6 +5918,14 @@
"filter");
/**
+ * It supports the similar semantics as {@link #CONTENT_FILTER_URI} and returns the same
+ * columns. This URI requires {@link ContactsContract#DIRECTORY_PARAM_KEY} in
+ * parameters, otherwise it will throw UnsupportedOperationException.
+ */
+ public static final Uri ENTERPRISE_CONTENT_FILTER_URI = Uri.withAppendedPath(
+ CONTENT_URI, "filter_enterprise");
+
+ /**
* A boolean query parameter that can be used with {@link #CONTENT_FILTER_URI}.
* If "1" or "true", display names are searched. If "0" or "false", display names
* are not searched. Default is "1".
@@ -7395,6 +7406,14 @@
*/
public static final Uri CONTENT_FILTER_URI = Uri.withAppendedPath(CONTENT_URI,
"filter");
+
+ /**
+ * Similar to {@link Phone#ENTERPRISE_CONTENT_FILTER_URI}, but allows users to filter
+ * callable data. This URI requires {@link ContactsContract#DIRECTORY_PARAM_KEY} in
+ * parameters, otherwise it will throw UnsupportedOperationException.
+ */
+ public static final Uri ENTERPRISE_CONTENT_FILTER_URI = Uri.withAppendedPath(
+ CONTENT_URI, "filter_enterprise");
}
/**
diff --git a/core/java/android/provider/DocumentsContract.java b/core/java/android/provider/DocumentsContract.java
index d53bb0d..77a4485 100644
--- a/core/java/android/provider/DocumentsContract.java
+++ b/core/java/android/provider/DocumentsContract.java
@@ -234,6 +234,7 @@
* @see #FLAG_DIR_PREFERS_GRID
* @see #FLAG_DIR_PREFERS_LAST_MODIFIED
* @see #FLAG_VIRTUAL_DOCUMENT
+ * @see #FLAG_ARCHIVE
*/
public static final String COLUMN_FLAGS = "flags";
@@ -368,6 +369,18 @@
public static final int FLAG_VIRTUAL_DOCUMENT = 1 << 10;
/**
+ * Flag indicating that a document is an archive, and it's contents can be
+ * obtained via {@link DocumentsProvider#queryChildDocuments}.
+ * <p>
+ * The <em>provider</em> support library offers utility classes to add common
+ * archive support.
+ *
+ * @see #COLUMN_FLAGS
+ * @see DocumentsProvider#queryChildDocuments(String, String[], String)
+ */
+ public static final int FLAG_ARCHIVE = 1 << 11;
+
+ /**
* Flag indicating that document titles should be hidden when viewing
* this directory in a larger format grid. For example, a directory
* containing only images may want the image thumbnails to speak for
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index c92382a..dad3c67 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -4931,6 +4931,15 @@
"accessibility_autoclick_delay";
/**
+ * Whether or not larger size icons are used for the pointer of mouse/trackpad for
+ * accessibility.
+ * (0 = false, 1 = true)
+ * @hide
+ */
+ public static final String ACCESSIBILITY_LARGE_POINTER_ICON =
+ "accessibility_large_pointer_icon";
+
+ /**
* The timeout for considering a press to be a long press in milliseconds.
* @hide
*/
@@ -7730,7 +7739,7 @@
public static final String REQUIRE_PASSWORD_TO_DECRYPT = "require_password_to_decrypt";
/**
- * Whether the Volte/VT is enabled
+ * Whether the Volte is enabled
* <p>
* Type: int (0 for false, 1 for true)
* @hide
@@ -7738,6 +7747,15 @@
public static final String ENHANCED_4G_MODE_ENABLED = "volte_vt_enabled";
/**
+ * Whether VT (Video Telephony over IMS) is enabled
+ * <p>
+ * Type: int (0 for false, 1 for true)
+ *
+ * @hide
+ */
+ public static final String VT_IMS_ENABLED = "vt_ims_enabled";
+
+ /**
* Whether WFC is enabled
* <p>
* Type: int (0 for false, 1 for true)
diff --git a/core/java/android/service/dreams/DreamService.java b/core/java/android/service/dreams/DreamService.java
index 01718694..bb46e83 100644
--- a/core/java/android/service/dreams/DreamService.java
+++ b/core/java/android/service/dreams/DreamService.java
@@ -98,7 +98,7 @@
* </service>
* </pre>
*
- * <p>If specified with the {@code <meta-data>} element,
+ * <p>If specified with the {@code <meta-data>} element,
* additional information for the dream is defined using the
* {@link android.R.styleable#Dream <dream>} element in a separate XML file.
* Currently, the only addtional
diff --git a/core/java/android/service/notification/NotificationAssistantService.java b/core/java/android/service/notification/NotificationAssistantService.java
new file mode 100644
index 0000000..5d1317c
--- /dev/null
+++ b/core/java/android/service/notification/NotificationAssistantService.java
@@ -0,0 +1,191 @@
+/*
+ * Copyright (C) 2015 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.service.notification;
+
+import android.app.Notification;
+import android.net.Uri;
+
+/**
+ * A service that helps the user manage notifications by modifying the
+ * relative importance of notifications.
+ * <p>To extend this class, you must declare the service in your manifest file with
+ * the {@link android.Manifest.permission#BIND_NOTIFICATION_ASSISTANT_SERVICE} permission
+ * and include an intent filter with the {@link #SERVICE_INTERFACE} action. For example:</p>
+ * <pre>
+ * <service android:name=".NotificationAssistant"
+ * android:label="@string/service_name"
+ * android:permission="android.permission.BIND_NOTIFICATION_ASSISTANT_SERVICE">
+ * <intent-filter>
+ * <action android:name="android.service.notification.NotificationAssistantService" />
+ * </intent-filter>
+ * </service></pre>
+ */
+public abstract class NotificationAssistantService extends NotificationListenerService {
+ /** Notification was canceled by the status bar reporting a click. */
+ public static final int REASON_DELEGATE_CLICK = 1;
+
+ /** Notification was canceled by the status bar reporting a user dismissal. */
+ public static final int REASON_DELEGATE_CANCEL = 2;
+
+ /** Notification was canceled by the status bar reporting a user dismiss all. */
+ public static final int REASON_DELEGATE_CANCEL_ALL = 3;
+
+ /** Notification was canceled by the status bar reporting an inflation error. */
+ public static final int REASON_DELEGATE_ERROR = 4;
+
+ /** Notification was canceled by the package manager modifying the package. */
+ public static final int REASON_PACKAGE_CHANGED = 5;
+
+ /** Notification was canceled by the owning user context being stopped. */
+ public static final int REASON_USER_STOPPED = 6;
+
+ /** Notification was canceled by the user banning the package. */
+ public static final int REASON_PACKAGE_BANNED = 7;
+
+ /** Notification was canceled by the app canceling this specific notification. */
+ public static final int REASON_APP_CANCEL = 8;
+
+ /** Notification was canceled by the app cancelling all its notifications. */
+ public static final int REASON_APP_CANCEL_ALL = 9;
+
+ /** Notification was canceled by a listener reporting a user dismissal. */
+ public static final int REASON_LISTENER_CANCEL = 10;
+
+ /** Notification was canceled by a listener reporting a user dismiss all. */
+ public static final int REASON_LISTENER_CANCEL_ALL = 11;
+
+ /** Notification was canceled because it was a member of a canceled group. */
+ public static final int REASON_GROUP_SUMMARY_CANCELED = 12;
+
+ /** Notification was canceled because it was an invisible member of a group. */
+ public static final int REASON_GROUP_OPTIMIZATION = 13;
+
+ public class Adjustment {
+ int mImportance;
+ CharSequence mExplanation;
+ Uri mReference;
+
+ /**
+ * Create a notification importance adjustment.
+ *
+ * @param importance The final importance of the notification.
+ * @param explanation A human-readable justification for the adjustment.
+ * @param reference A reference to an external object that augments the
+ * explanation, such as a
+ * {@link android.provider.ContactsContract.Contacts#CONTENT_LOOKUP_URI},
+ * or null.
+ */
+ public Adjustment(int importance, CharSequence explanation, Uri reference) {
+ mImportance = importance;
+ mExplanation = explanation;
+ mReference = reference;
+ }
+ }
+
+ /**
+ * A notification was posted by an app. Called before alert.
+ *
+ * @param sbn the new notification
+ * @param importance the initial importance of the notification.
+ * @param user true if the initial importance reflects an explicit user preference.
+ * @return an adjustment or null to take no action, within 100ms.
+ */
+ abstract public Adjustment onNotificationEnqueued(StatusBarNotification sbn,
+ int importance, boolean user);
+
+ /**
+ * The visibility of a notification has changed.
+ *
+ * @param key the notification key
+ * @param time milliseconds since midnight, January 1, 1970 UTC.
+ * @param visible true if the notification became visible, false if hidden.
+ */
+ public void onNotificationVisibilityChanged(String key, long time, boolean visible)
+ {
+ // Do nothing, Override this to collect visibility statistics.
+ }
+
+ /**
+ * The user clicked on a notification.
+ *
+ * @param key the notification key
+ * @param time milliseconds since midnight, January 1, 1970 UTC.
+ */
+ public void onNotificationClick(String key, long time)
+ {
+ // Do nothing, Override this to collect click statistics
+ }
+
+ /**
+ * The user clicked on a notification action.
+ *
+ * @param key the notification key
+ * @param time milliseconds since midnight, January 1, 1970 UTC.
+ * @param actionIndex the index of the action button that was pressed.
+ */
+ public void onNotificationActionClick(String key, long time, int actionIndex)
+ {
+ // Do nothing, Override this to collect action button click statistics
+ }
+
+ /**
+ * A notification was removed.
+
+ * @param key the notification key
+ * @param time milliseconds since midnight, January 1, 1970 UTC.
+ * @param reason see {@link #REASON_LISTENER_CANCEL}, etc.
+ */
+ public void onNotificationRemoved(String key, long time, int reason) {
+ // Do nothing, Override this to collect dismissal statistics
+ }
+
+ /**
+ * Change the importance of an existing notification. N.B. this won’t cause
+ * an existing notification to alert, but might allow a future update to
+ * this notification to alert.
+ *
+ * @param key the notification key
+ * @param adjustment the new importance with an explanation
+ */
+ public final void adjustImportance(String key, Adjustment adjustment)
+ {
+ // TODO: pack up the adjustment and send it to the NotificationManager.
+ }
+
+ /**
+ * Add an annotation to a an existing notification. The delete intent will
+ * be fired when the host notification is deleted, or when this annotation
+ * is removed or replaced.
+ *
+ * @param key the notification key
+ * @param annotation the new annotation object
+ */
+ public final void setAnnotation(String key, Notification annotation)
+ {
+ // TODO: pack up the annotation and send it to the NotificationManager.
+ }
+
+ /**
+ * Remove the annotation from a notification.
+ *
+ * @param key the notification key
+ */
+ public final void clearAnnotation(String key)
+ {
+ // TODO: ask the NotificationManager to clear the annotation.
+ }
+}
diff --git a/core/java/android/service/notification/NotificationListenerService.java b/core/java/android/service/notification/NotificationListenerService.java
index ee97e8e..a7545f2 100644
--- a/core/java/android/service/notification/NotificationListenerService.java
+++ b/core/java/android/service/notification/NotificationListenerService.java
@@ -822,6 +822,41 @@
* @hide */
public static final int VISIBILITY_NO_OVERRIDE = -1000;
+ /**
+ * Value signifying that the user has not expressed an importance.
+ *
+ * This value is for persisting preferences, and should never be associated with
+ * an actual notification.
+ */
+ public static final int IMPORTANCE_UNSPECIFIED = -1000;
+
+ /**
+ * A notification with no importance: shows nowhere, is blocked.
+ */
+ public static final int IMPORTANCE_NONE = -2;
+
+ /**
+ * Low notification importance: only shows in the shade, below the fold.
+ */
+ public static final int IMPORTANCE_LOW = -1;
+
+ /**
+ * Default notification importance: shows everywhere, but is not intrusive.
+ */
+ public static final int IMPORTANCE_DEFAULT = 0;
+
+ /**
+ * Higher notification importance: shows everywhere, makes noise,
+ * but does not visually intrude.
+ */
+ public static final int IMPORTANCE_HIGH = 1;
+
+ /**
+ * Highest notification importance: shows everywhere, makes noise,
+ * and also visually intrudes.
+ */
+ public static final int IMPORTANCE_MAX = 2;
+
private String mKey;
private int mRank = -1;
private boolean mIsAmbient;
@@ -875,7 +910,6 @@
return mSuppressedVisualEffects;
}
-
/**
* Returns whether the notification matches the user's interruption
* filter.
@@ -887,6 +921,27 @@
return mMatchesInterruptionFilter;
}
+ /**
+ * Returns the importance of the notification, which dictates its
+ * modes of presentation, see: {@link #IMPORTANCE_DEFAULT}, etc.
+ *
+ * @return the rank of the notification
+ */
+ public int getImportance() {
+ return IMPORTANCE_DEFAULT; // TODO implement;
+ }
+
+ /**
+ * If the importance has been overriden by user preference, or by a
+ * {@link NotificationAssistantService}, then this will be non-null,
+ * and should be displayed to the user.
+ *
+ * @return the explanation for the importance, or null if it is the natural importance
+ */
+ public CharSequence getImportanceExplanation() {
+ return null; // TODO implement
+ }
+
private void populate(String key, int rank, boolean isAmbient,
boolean matchesInterruptionFilter, int visibilityOverride,
int suppressedVisualEffects) {
@@ -897,6 +952,28 @@
mVisibilityOverride = visibilityOverride;
mSuppressedVisualEffects = suppressedVisualEffects;
}
+
+ /**
+ * {@hide}
+ */
+ public static String importanceToString(int importance) {
+ switch (importance) {
+ case IMPORTANCE_UNSPECIFIED:
+ return "UNSPECIFIED";
+ case IMPORTANCE_NONE:
+ return "NONE";
+ case IMPORTANCE_LOW:
+ return "LOW";
+ case IMPORTANCE_DEFAULT:
+ return "DEFAULT";
+ case IMPORTANCE_HIGH:
+ return "HIGH";
+ case IMPORTANCE_MAX:
+ return "MAX";
+ default:
+ return "UNKNOWN(" + String.valueOf(importance) + ")";
+ }
+ }
}
/**
diff --git a/core/java/android/service/quicksettings/IQSService.aidl b/core/java/android/service/quicksettings/IQSService.aidl
index 087eb61..7e70501 100644
--- a/core/java/android/service/quicksettings/IQSService.aidl
+++ b/core/java/android/service/quicksettings/IQSService.aidl
@@ -23,4 +23,5 @@
*/
interface IQSService {
void updateQsTile(in Tile tile);
+ void onShowDialog(in Tile tile);
}
diff --git a/core/java/android/service/quicksettings/IQSTileService.aidl b/core/java/android/service/quicksettings/IQSTileService.aidl
index 6b46bee5..63a4c5e 100644
--- a/core/java/android/service/quicksettings/IQSTileService.aidl
+++ b/core/java/android/service/quicksettings/IQSTileService.aidl
@@ -27,5 +27,5 @@
void onTileRemoved();
void onStartListening();
void onStopListening();
- void onClick();
+ void onClick(IBinder wtoken);
}
diff --git a/core/java/android/service/quicksettings/Tile.java b/core/java/android/service/quicksettings/Tile.java
index c8ae171..a53fc59 100644
--- a/core/java/android/service/quicksettings/Tile.java
+++ b/core/java/android/service/quicksettings/Tile.java
@@ -137,6 +137,18 @@
}
}
+ /**
+ * @hide
+ * Notifies the IQSService that this tile is showing a dialog.
+ */
+ void onShowDialog() {
+ try {
+ mService.onShowDialog(this);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Couldn't onShowDialog");
+ }
+ }
+
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeStrongInterface(mService);
diff --git a/core/java/android/service/quicksettings/TileService.java b/core/java/android/service/quicksettings/TileService.java
index eba4c6f..fd2d5b0 100644
--- a/core/java/android/service/quicksettings/TileService.java
+++ b/core/java/android/service/quicksettings/TileService.java
@@ -15,6 +15,7 @@
*/
package android.service.quicksettings;
+import android.app.Dialog;
import android.app.Service;
import android.content.Intent;
import android.os.Handler;
@@ -22,6 +23,7 @@
import android.os.Looper;
import android.os.Message;
import android.os.RemoteException;
+import android.view.WindowManager;
/**
* A QSTileService provides the user a tile that can be added to Quick Settings.
@@ -55,7 +57,7 @@
* android:icon="@drawable/my_default_icon_label"
* android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
* <intent-filter>
- * <action android:name="android.intent.action.QS_TILE" />
+ * <action android:name="android.service.quicksettings.action.QS_TILE" />
* </intent-filter>
* </service>}
* </pre>
@@ -73,6 +75,7 @@
private boolean mListening = false;
private Tile mTile;
+ private IBinder mToken;
/**
* Called when the user adds this tile to Quick Settings.
@@ -116,6 +119,20 @@
}
/**
+ * Used to show a dialog.
+ *
+ * This will collapse the Quick Settings panel and show the dialog.
+ *
+ * @param dialog Dialog to show.
+ */
+ public final void showDialog(Dialog dialog) {
+ dialog.getWindow().getAttributes().token = mToken;
+ dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_QS_DIALOG);
+ dialog.show();
+ getQsTile().onShowDialog();
+ }
+
+ /**
* Gets the {@link Tile} for this service.
* <p/>
* This tile may be used to get or set the current state for this
@@ -155,8 +172,8 @@
}
@Override
- public void onClick() throws RemoteException {
- mHandler.sendEmptyMessage(H.MSG_TILE_CLICKED);
+ public void onClick(IBinder wtoken) throws RemoteException {
+ mHandler.obtainMessage(H.MSG_TILE_CLICKED, wtoken).sendToTarget();
}
};
}
@@ -185,19 +202,20 @@
case MSG_TILE_REMOVED:
TileService.this.onTileAdded();
break;
- case MSG_START_LISTENING:
+ case MSG_STOP_LISTENING:
if (mListening) {
mListening = false;
TileService.this.onStopListening();
}
break;
- case MSG_STOP_LISTENING:
+ case MSG_START_LISTENING:
if (!mListening) {
mListening = true;
TileService.this.onStartListening();
}
break;
case MSG_TILE_CLICKED:
+ mToken = (IBinder) msg.obj;
TileService.this.onClick();
break;
}
diff --git a/core/java/android/service/textservice/package.html b/core/java/android/service/textservice/package.html
index 0b5113b..4124922 100644
--- a/core/java/android/service/textservice/package.html
+++ b/core/java/android/service/textservice/package.html
@@ -12,9 +12,9 @@
<p>Applications with a spell checker service must declare the {@link
android.Manifest.permission#BIND_TEXT_SERVICE} permission as required by the service. The service
-must also declare an intent filter with {@code <action
+must also declare an intent filter with {@code <action
android:name="android.service.textservice.SpellCheckerService" />} as the intent’s action and should
-include a {@code <meta-data>} element that declares configuration information for the spell
+include a {@code <meta-data>} element that declares configuration information for the spell
checker. For example:</p>
<pre>
diff --git a/core/java/android/speech/RecognitionListener.java b/core/java/android/speech/RecognitionListener.java
index bdb3ba9..1ffdf08 100644
--- a/core/java/android/speech/RecognitionListener.java
+++ b/core/java/android/speech/RecognitionListener.java
@@ -69,7 +69,7 @@
* Called when recognition results are ready.
*
* @param results the recognition results. To retrieve the results in {@code
- * ArrayList<String>} format use {@link Bundle#getStringArrayList(String)} with
+ * ArrayList<String>} format use {@link Bundle#getStringArrayList(String)} with
* {@link SpeechRecognizer#RESULTS_RECOGNITION} as a parameter. A float array of
* confidence values might also be given in {@link SpeechRecognizer#CONFIDENCE_SCORES}.
*/
diff --git a/core/java/android/speech/RecognitionService.java b/core/java/android/speech/RecognitionService.java
index 3e74d22..674f809 100644
--- a/core/java/android/speech/RecognitionService.java
+++ b/core/java/android/speech/RecognitionService.java
@@ -303,7 +303,7 @@
* The service should call this method when recognition results are ready.
*
* @param results the recognition results. To retrieve the results in {@code
- * ArrayList<String>} format use {@link Bundle#getStringArrayList(String)} with
+ * ArrayList<String>} format use {@link Bundle#getStringArrayList(String)} with
* {@link SpeechRecognizer#RESULTS_RECOGNITION} as a parameter
*/
public void results(Bundle results) throws RemoteException {
diff --git a/core/java/android/text/format/Time.java b/core/java/android/text/format/Time.java
index d567d90..66e2ec3 100644
--- a/core/java/android/text/format/Time.java
+++ b/core/java/android/text/format/Time.java
@@ -842,7 +842,7 @@
* the given time.
*
* <p>
- * Equivalent to {@code Time.compare(this, that) < 0}. See
+ * Equivalent to {@code Time.compare(this, that) < 0}. See
* {@link #compare(Time, Time)} for details.
*
* @param that a given Time object to compare against
@@ -858,7 +858,7 @@
* the given time.
*
* <p>
- * Equivalent to {@code Time.compare(this, that) > 0}. See
+ * Equivalent to {@code Time.compare(this, that) > 0}. See
* {@link #compare(Time, Time)} for details.
*
* @param that a given Time object to compare against
diff --git a/core/java/android/transition/ArcMotion.java b/core/java/android/transition/ArcMotion.java
index 70dfe7f..fa4c8d2 100644
--- a/core/java/android/transition/ArcMotion.java
+++ b/core/java/android/transition/ArcMotion.java
@@ -36,13 +36,12 @@
* arc between two points.
* </p>
* <p>This may be used in XML as an element inside a transition.</p>
- * <pre>
- * {@code
- * <changeBounds>
- * <arcMotion android:minimumHorizontalAngle="15"
+ * <pre>{@code
+ * <changeBounds>
+ * <arcMotion android:minimumHorizontalAngle="15"
* android:minimumVerticalAngle="0"
* android:maximumAngle="90"/>
- * </changeBounds>}
+ * </changeBounds>}
* </pre>
*/
public class ArcMotion extends PathMotion {
diff --git a/core/java/android/transition/PathMotion.java b/core/java/android/transition/PathMotion.java
index 651223d..01102a4 100644
--- a/core/java/android/transition/PathMotion.java
+++ b/core/java/android/transition/PathMotion.java
@@ -31,9 +31,9 @@
* <p>This may be used in XML as an element inside a transition.</p>
* <pre>
* {@code
- * <changeBounds>
- * <pathMotion class="my.app.transition.MyPathMotion"/>
- * </changeBounds>
+ * <changeBounds>
+ * <pathMotion class="my.app.transition.MyPathMotion"/>
+ * </changeBounds>
* }
* </pre>
*/
diff --git a/core/java/android/transition/PatternPathMotion.java b/core/java/android/transition/PatternPathMotion.java
index 773c387..f23863f 100644
--- a/core/java/android/transition/PatternPathMotion.java
+++ b/core/java/android/transition/PatternPathMotion.java
@@ -30,11 +30,10 @@
* The starting point of the Path will be moved to the origin and the end point will be scaled
* and rotated so that it matches with the target end point.
* <p>This may be used in XML as an element inside a transition.</p>
- * <pre>
- * {@code
- * <changeBounds>
- * <patternPathMotion android:patternPathData="M0 0 L0 100 L100 100"/>
- * </changeBounds>}
+ * <pre>{@code
+ * <changeBounds>
+ * <patternPathMotion android:patternPathData="M0 0 L0 100 L100 100"/>
+ * </changeBounds>}
* </pre>
*/
public class PatternPathMotion extends PathMotion {
diff --git a/core/java/android/transition/Transition.java b/core/java/android/transition/Transition.java
index e958058..48614c0 100644
--- a/core/java/android/transition/Transition.java
+++ b/core/java/android/transition/Transition.java
@@ -2052,18 +2052,18 @@
* attributed with the fully-described class name. For example:</p>
* <pre>
* {@code
- * <changeBounds>
- * <pathMotion class="my.app.transition.MyPathMotion"/>
- * </changeBounds>
+ * <changeBounds>
+ * <pathMotion class="my.app.transition.MyPathMotion"/>
+ * </changeBounds>
* }
* </pre>
* <p>or</p>
* <pre>
* {@code
- * <changeBounds>
- * <arcMotion android:minimumHorizontalAngle="15"
+ * <changeBounds>
+ * <arcMotion android:minimumHorizontalAngle="15"
* android:minimumVerticalAngle="0" android:maximumAngle="90"/>
- * </changeBounds>
+ * </changeBounds>
* }
* </pre>
*
@@ -2090,20 +2090,18 @@
* the built-in tags <code>arcMotion</code> or <code>patternPathMotion</code> or it can
* be a custom PathMotion using <code>pathMotion</code> with the <code>class</code>
* attributed with the fully-described class name. For example:</p>
- * <pre>
- * {@code
- * <changeBounds>
- * <pathMotion class="my.app.transition.MyPathMotion"/>
- * </changeBounds>}
+ * <pre>{@code
+ * <changeBounds>
+ * <pathMotion class="my.app.transition.MyPathMotion"/>
+ * </changeBounds>}
* </pre>
* <p>or</p>
- * <pre>
- * {@code
- * <changeBounds>
- * <arcMotion android:minimumHorizontalAngle="15"
+ * <pre>{@code
+ * <changeBounds>
+ * <arcMotion android:minimumHorizontalAngle="15"
* android:minimumVerticalAngle="0"
* android:maximumAngle="90"/>
- * </changeBounds>}
+ * </changeBounds>}
* </pre>
*
* @return The algorithm object used to interpolate along two dimensions.
diff --git a/core/java/android/util/EventLog.java b/core/java/android/util/EventLog.java
index 558b8f5..6bda83d2 100644
--- a/core/java/android/util/EventLog.java
+++ b/core/java/android/util/EventLog.java
@@ -52,7 +52,7 @@
private static HashMap<String, Integer> sTagCodes = null;
private static HashMap<Integer, String> sTagNames = null;
- /** A previously logged event read from the logs. */
+ /** A previously logged event read from the logs. Instances are thread safe. */
public static final class Event {
private final ByteBuffer mBuffer;
diff --git a/core/java/android/util/LocaleList.aidl b/core/java/android/util/LocaleList.aidl
new file mode 100644
index 0000000..f5de354
--- /dev/null
+++ b/core/java/android/util/LocaleList.aidl
@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 2015 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.util;
+
+parcelable LocaleList;
diff --git a/core/java/android/util/LocaleList.java b/core/java/android/util/LocaleList.java
index c1d23bb..b2ee045 100644
--- a/core/java/android/util/LocaleList.java
+++ b/core/java/android/util/LocaleList.java
@@ -19,6 +19,8 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.Size;
+import android.os.Parcel;
+import android.os.Parcelable;
import com.android.internal.annotations.GuardedBy;
@@ -35,11 +37,12 @@
* LocaleList is an immutable list of Locales, typically used to keep an
* ordered user preferences for locales.
*/
-public final class LocaleList {
+public final class LocaleList implements Parcelable {
private final Locale[] mList;
// This is a comma-separated list of the locales in the LocaleList created at construction time,
// basically the result of running each locale's toLanguageTag() method and concatenating them
// with commas in between.
+ @NonNull
private final String mStringRepresentation;
private static final Locale[] sEmptyList = new Locale[0];
@@ -101,6 +104,16 @@
return sb.toString();
}
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int parcelableFlags) {
+ dest.writeString(mStringRepresentation);
+ }
+
@NonNull
public String toLanguageTags() {
return mStringRepresentation;
@@ -163,10 +176,25 @@
}
}
+ public static final Parcelable.Creator<LocaleList> CREATOR
+ = new Parcelable.Creator<LocaleList>() {
+ @Override
+ public LocaleList createFromParcel(Parcel source) {
+ return LocaleList.forLanguageTags(source.readString());
+ }
+
+ @Override
+ public LocaleList[] newArray(int size) {
+ return new LocaleList[size];
+ }
+ };
+
+ @NonNull
public static LocaleList getEmptyLocaleList() {
return sEmptyLocaleList;
}
+ @NonNull
public static LocaleList forLanguageTags(@Nullable String list) {
if (list == null || list.equals("")) {
return getEmptyLocaleList();
diff --git a/core/java/android/view/IWindowManager.aidl b/core/java/android/view/IWindowManager.aidl
index bd65532..7a379d50 100644
--- a/core/java/android/view/IWindowManager.aidl
+++ b/core/java/android/view/IWindowManager.aidl
@@ -110,11 +110,14 @@
*
* @param token The token we are adding to the input task Id.
* @param taskId The Id of the task we are adding the token to.
+ * @param stackId Stack Id to create a new Task with the input task Id on
+ * if the task doesn't exist yet.
* @param taskBounds Bounds to use when creating a new Task with the input task Id if
* the task doesn't exist yet.
* @param config Configuration that is being used with this task.
*/
- void setAppTask(IBinder token, int taskId, in Rect taskBounds, in Configuration config);
+ void setAppTask(
+ IBinder token, int taskId, int stackId, in Rect taskBounds, in Configuration config);
void setAppOrientation(IApplicationToken token, int requestedOrientation);
int getAppOrientation(IApplicationToken token);
void setFocusedApp(IBinder token, boolean moveFocusNow);
diff --git a/core/java/android/view/PointerIcon.java b/core/java/android/view/PointerIcon.java
index b61706e..d2a7d4a 100644
--- a/core/java/android/view/PointerIcon.java
+++ b/core/java/android/view/PointerIcon.java
@@ -16,6 +16,8 @@
package android.view;
+import android.os.UserHandle;
+import android.provider.Settings;
import com.android.internal.util.XmlUtils;
import android.annotation.XmlRes;
@@ -199,9 +201,14 @@
styleIndex = getSystemIconStyleIndex(STYLE_DEFAULT);
}
+ int accessibilityConfig = Settings.Secure.getIntForUser(
+ context.getContentResolver(), Settings.Secure.ACCESSIBILITY_LARGE_POINTER_ICON,
+ 0, UserHandle.USER_CURRENT);
+ int defStyle = (accessibilityConfig == 1) ?
+ com.android.internal.R.style.LargePointer : com.android.internal.R.style.Pointer;
TypedArray a = context.obtainStyledAttributes(null,
com.android.internal.R.styleable.Pointer,
- com.android.internal.R.attr.pointerStyle, 0);
+ 0, defStyle);
int resourceId = a.getResourceId(styleIndex, -1);
a.recycle();
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 1b8ef9e..6dd87a0 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -580,7 +580,7 @@
* <p>
* Tags may be specified with character sequence values in layout XML as either
* a single tag using the {@link android.R.styleable#View_tag android:tag}
- * attribute or multiple tags using the {@code <tag>} child element:
+ * attribute or multiple tags using the {@code <tag>} child element:
* <pre>
* <View ...
* android:tag="@string/mytag_value" />
@@ -3057,14 +3057,29 @@
/**
* @hide
*
- * Makes system ui transparent.
+ * Makes navigation bar transparent (but not the status bar).
*/
- public static final int SYSTEM_UI_TRANSPARENT = 0x00008000;
+ public static final int NAVIGATION_BAR_TRANSPARENT = 0x00008000;
+
+ /**
+ * @hide
+ *
+ * Makes status bar transparent (but not the navigation bar).
+ */
+ public static final int STATUS_BAR_TRANSPARENT = 0x0000008;
+
+ /**
+ * @hide
+ *
+ * Makes both status bar and navigation bar transparent.
+ */
+ public static final int SYSTEM_UI_TRANSPARENT = NAVIGATION_BAR_TRANSPARENT
+ | STATUS_BAR_TRANSPARENT;
/**
* @hide
*/
- public static final int PUBLIC_STATUS_BAR_VISIBILITY_MASK = 0x00003FFF;
+ public static final int PUBLIC_STATUS_BAR_VISIBILITY_MASK = 0x00003FF7;
/**
* These are the system UI flags that can be cleared by events outside
@@ -5505,20 +5520,26 @@
}
/**
- * Bring up the context menu for this view.
+ * Shows the context menu for this view.
*
- * @return Whether a context menu was displayed.
+ * @return {@code true} if the context menu was shown, {@code false}
+ * otherwise
+ * @see #showContextMenu(float, float)
*/
public boolean showContextMenu() {
return getParent().showContextMenuForChild(this);
}
/**
- * Bring up the context menu for this view, referring to the item under the specified point.
+ * Shows the context menu for this view anchored to the specified
+ * view-relative coordinate.
*
- * @param x The referenced x coordinate.
- * @param y The referenced y coordinate.
- * @return Whether a context menu was displayed.
+ * @param x the X coordinate in pixels relative to the view to which the
+ * menu should be anchored
+ * @param y the Y coordinate in pixels relative to the view to which the
+ * menu should be anchored
+ * @return {@code true} if the context menu was shown, {@code false}
+ * otherwise
*/
public boolean showContextMenu(float x, float y) {
return getParent().showContextMenuForChild(this, x, y);
@@ -18551,15 +18572,15 @@
* must be an array of two integers. After the method returns, the array
* contains the x and y location in that order.</p>
*
- * @param location an array of two integers in which to hold the coordinates
+ * @param outLocation an array of two integers in which to hold the coordinates
*/
- public void getLocationOnScreen(@Size(2) int[] location) {
- getLocationInWindow(location);
+ public void getLocationOnScreen(@Size(2) int[] outLocation) {
+ getLocationInWindow(outLocation);
final AttachInfo info = mAttachInfo;
if (info != null) {
- location[0] += info.mWindowLeft;
- location[1] += info.mWindowTop;
+ outLocation[0] += info.mWindowLeft;
+ outLocation[1] += info.mWindowTop;
}
}
@@ -18568,13 +18589,17 @@
* must be an array of two integers. After the method returns, the array
* contains the x and y location in that order.</p>
*
- * @param outWindowSpace an array of two integers in which to hold the coordinates
+ * @param outLocation an array of two integers in which to hold the coordinates
*/
- public void getLocationInWindow(@Size(2) int[] outWindowSpace) {
- outWindowSpace[0] = 0;
- outWindowSpace[1] = 0;
+ public void getLocationInWindow(@Size(2) int[] outLocation) {
+ if (outLocation == null || outLocation.length < 2) {
+ throw new IllegalArgumentException("outLocation must be an array of two integers");
+ }
- transformFromViewToWindowSpace(outWindowSpace);
+ outLocation[0] = 0;
+ outLocation[1] = 0;
+
+ transformFromViewToWindowSpace(outLocation);
}
void transformFromViewToWindowSpace(@Size(2) int[] inOutLocation) {
diff --git a/core/java/android/view/ViewParent.java b/core/java/android/view/ViewParent.java
index 6ae448a..f2ab35e 100644
--- a/core/java/android/view/ViewParent.java
+++ b/core/java/android/view/ViewParent.java
@@ -174,26 +174,38 @@
public void focusableViewAvailable(View v);
/**
- * Bring up a context menu for the specified view or its ancestors.
- *
- * <p>In most cases, a subclass does not need to override this. However, if
+ * Shows the context menu for the specified view or its ancestors.
+ * <p>
+ * In most cases, a subclass does not need to override this. However, if
* the subclass is added directly to the window manager (for example,
* {@link ViewManager#addView(View, android.view.ViewGroup.LayoutParams)})
- * then it should override this and show the context menu.</p>
- *
- * @param originalView The source view where the context menu was first invoked
- * @return true if a context menu was displayed
+ * then it should override this and show the context menu.
+ *
+ * @param originalView the source view where the context menu was first
+ * invoked
+ * @return {@code true} if the context menu was shown, {@code false}
+ * otherwise
+ * @see #showContextMenuForChild(View, float, float)
*/
public boolean showContextMenuForChild(View originalView);
/**
- * Bring up a context menu for the specified view at the given x/y offset from
- * the top left corner.
+ * Shows the context menu for the specified view or its ancestors anchored
+ * to the specified view-relative coordinate.
+ * <p>
+ * In most cases, a subclass does not need to override this. However, if
+ * the subclass is added directly to the window manager (for example,
+ * {@link ViewManager#addView(View, android.view.ViewGroup.LayoutParams)})
+ * then it should override this and show the context menu.
*
- * @param originalView
- * @param x The x offset at which to open the menu
- * @param y The y offset at which to open the menu
- * @return true if a context menu was displayed
+ * @param originalView the source view where the context menu was first
+ * invoked
+ * @param x the X coordinate in pixels relative to the original view to
+ * which the menu should be anchored
+ * @param y the Y coordinate in pixels relative to the original view to
+ * which the menu should be anchored
+ * @return {@code true} if the context menu was shown, {@code false}
+ * otherwise
*/
public boolean showContextMenuForChild(View originalView, float x, float y);
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java
index 1521f2e..d6bc27c 100644
--- a/core/java/android/view/WindowManager.java
+++ b/core/java/android/view/WindowManager.java
@@ -238,6 +238,7 @@
@ViewDebug.IntToString(from = TYPE_VOICE_INTERACTION, to = "TYPE_VOICE_INTERACTION"),
@ViewDebug.IntToString(from = TYPE_VOICE_INTERACTION_STARTING, to = "TYPE_VOICE_INTERACTION_STARTING"),
@ViewDebug.IntToString(from = TYPE_DOCK_DIVIDER, to = "TYPE_DOCK_DIVIDER"),
+ @ViewDebug.IntToString(from = TYPE_QS_DIALOG, to = "TYPE_QS_DIALOG"),
})
public int type;
@@ -584,6 +585,13 @@
public static final int TYPE_DOCK_DIVIDER = FIRST_SYSTEM_WINDOW+34;
/**
+ * Window type: like {@link #TYPE_APPLICATION_ATTACHED_DIALOG}, but used
+ * by Quick Settings Tiles.
+ * @hide
+ */
+ public static final int TYPE_QS_DIALOG = FIRST_SYSTEM_WINDOW+35;
+
+ /**
* End of types of system windows.
*/
public static final int LAST_SYSTEM_WINDOW = 2999;
diff --git a/core/java/android/view/inputmethod/EditorInfo.java b/core/java/android/view/inputmethod/EditorInfo.java
index 6130fd5..3ff9522 100644
--- a/core/java/android/view/inputmethod/EditorInfo.java
+++ b/core/java/android/view/inputmethod/EditorInfo.java
@@ -21,6 +21,7 @@
import android.os.Parcelable;
import android.text.InputType;
import android.text.TextUtils;
+import android.util.LocaleList;
import android.util.Printer;
/**
@@ -340,6 +341,22 @@
public Bundle extras;
/**
+ * Additional context information that tells what languages are expected by the user.
+ *
+ * <p><strong>IME authors:</strong> Possible use cases for IME developers would be:</p>
+ * <ul>
+ * <li>Automatically switching keyboard layout.</li>
+ * <li>Changing language model for better typing experience.</li>
+ * </ul>
+ *
+ * <p><strong>Editor authors:</strong> Providing this context information can help IMEs to
+ * improve text input experience. For example, chat applications can remember what language is
+ * used in the last conversation for each chat session, and put the last used language at the
+ * top of {@link #locales}.</p>
+ */
+ public LocaleList locales = LocaleList.getEmptyLocaleList();
+
+ /**
* Ensure that the data in this EditorInfo is compatible with an application
* that was developed against the given target API version. This can
* impact the following input types:
@@ -393,6 +410,7 @@
+ " fieldId=" + fieldId
+ " fieldName=" + fieldName);
pw.println(prefix + "extras=" + extras);
+ pw.println(prefix + "locales=" + locales);
}
/**
@@ -416,6 +434,7 @@
dest.writeInt(fieldId);
dest.writeString(fieldName);
dest.writeBundle(extras);
+ locales.writeToParcel(dest, flags);
}
/**
@@ -439,6 +458,7 @@
res.fieldId = source.readInt();
res.fieldName = source.readString();
res.extras = source.readBundle();
+ res.locales = LocaleList.CREATOR.createFromParcel(source);
return res;
}
diff --git a/core/java/android/view/inputmethod/InputMethodInfo.java b/core/java/android/view/inputmethod/InputMethodInfo.java
index 4ac547a..4fc6665 100644
--- a/core/java/android/view/inputmethod/InputMethodInfo.java
+++ b/core/java/android/view/inputmethod/InputMethodInfo.java
@@ -48,7 +48,7 @@
/**
* This class is used to specify meta information of an input method.
*
- * <p>It should be defined in an XML resource file with an {@code <input-method>} element.
+ * <p>It should be defined in an XML resource file with an {@code <input-method>} element.
* For more information, see the guide to
* <a href="{@docRoot}guide/topics/text/creating-input-method.html">
* Creating an Input Method</a>.</p>
diff --git a/core/java/android/view/inputmethod/InputMethodSubtype.java b/core/java/android/view/inputmethod/InputMethodSubtype.java
index 4ee155c..fbaf51c 100644
--- a/core/java/android/view/inputmethod/InputMethodSubtype.java
+++ b/core/java/android/view/inputmethod/InputMethodSubtype.java
@@ -41,7 +41,7 @@
* the specified subtype of the designated IME directly.
*
* <p>It should be defined in an XML resource file of the input method with the
- * <code><subtype></code> element, which resides within an {@code <input-method>} element.
+ * <code><subtype></code> element, which resides within an {@code <input-method>} element.
* For more information, see the guide to
* <a href="{@docRoot}guide/topics/text/creating-input-method.html">
* Creating an Input Method</a>.</p>
diff --git a/core/java/android/view/textservice/SpellCheckerSubtype.java b/core/java/android/view/textservice/SpellCheckerSubtype.java
index c753188..77fd002 100644
--- a/core/java/android/view/textservice/SpellCheckerSubtype.java
+++ b/core/java/android/view/textservice/SpellCheckerSubtype.java
@@ -16,6 +16,9 @@
package android.view.textservice;
+import com.android.internal.inputmethod.InputMethodUtils;
+
+import android.annotation.Nullable;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.os.Parcel;
@@ -147,22 +150,15 @@
}
/**
+ * @return The normalized {@link Locale} object of the subtype. The returned locale may or may
+ * not equal to "locale" string parameter passed to the constructor.
+ *
+ * <p>TODO: Consider to make this a public API.</p>
* @hide
*/
- public static Locale constructLocaleFromString(String localeStr) {
- if (TextUtils.isEmpty(localeStr))
- return null;
- String[] localeParams = localeStr.split("_", 3);
- // The length of localeStr is guaranteed to always return a 1 <= value <= 3
- // because localeStr is not empty.
- if (localeParams.length == 1) {
- return new Locale(localeParams[0]);
- } else if (localeParams.length == 2) {
- return new Locale(localeParams[0], localeParams[1]);
- } else if (localeParams.length == 3) {
- return new Locale(localeParams[0], localeParams[1], localeParams[2]);
- }
- return null;
+ @Nullable
+ public Locale getLocaleObject() {
+ return InputMethodUtils.constructLocaleFromString(mSubtypeLocale);
}
/**
@@ -177,7 +173,7 @@
*/
public CharSequence getDisplayName(
Context context, String packageName, ApplicationInfo appInfo) {
- final Locale locale = constructLocaleFromString(mSubtypeLocale);
+ final Locale locale = getLocaleObject();
final String localeStr = locale != null ? locale.getDisplayName() : mSubtypeLocale;
if (mSubtypeNameResId == 0) {
return localeStr;
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 358f939..7443bce 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -93,7 +93,7 @@
* </pre>
* <p>See {@link android.content.Intent} for more information.</p>
*
- * <p>To provide a WebView in your own Activity, include a {@code <WebView>} in your layout,
+ * <p>To provide a WebView in your own Activity, include a {@code <WebView>} in your layout,
* or set the entire Activity window as a WebView during {@link
* android.app.Activity#onCreate(Bundle) onCreate()}:</p>
* <pre class="prettyprint">
diff --git a/core/java/android/widget/ActionMenuPresenter.java b/core/java/android/widget/ActionMenuPresenter.java
index 41f1ce7..0032f17 100644
--- a/core/java/android/widget/ActionMenuPresenter.java
+++ b/core/java/android/widget/ActionMenuPresenter.java
@@ -933,7 +933,7 @@
super(context, menu, anchorView, overflowOnly,
com.android.internal.R.attr.actionOverflowMenuStyle);
setGravity(Gravity.END);
- setCallback(mPopupPresenterCallback);
+ setPresenterCallback(mPopupPresenterCallback);
}
@Override
@@ -956,7 +956,7 @@
setAnchorView(mOverflowButton == null ? (View) mMenuView : mOverflowButton);
}
- setCallback(mPopupPresenterCallback);
+ setPresenterCallback(mPopupPresenterCallback);
}
@Override
diff --git a/core/java/android/widget/ProgressBar.java b/core/java/android/widget/ProgressBar.java
index 04c68ae..2099b04 100644
--- a/core/java/android/widget/ProgressBar.java
+++ b/core/java/android/widget/ProgressBar.java
@@ -121,7 +121,7 @@
* }
* }</pre>
*
- * <p>To add a progress bar to a layout file, you can use the {@code <ProgressBar>} element.
+ * <p>To add a progress bar to a layout file, you can use the {@code <ProgressBar>} element.
* By default, the progress bar is a spinning wheel (an indeterminate indicator). To change to a
* horizontal progress bar, apply the {@link android.R.style#Widget_ProgressBar_Horizontal
* Widget.ProgressBar.Horizontal} style, like so:</p>
diff --git a/core/java/android/widget/SearchView.java b/core/java/android/widget/SearchView.java
index 88f02d1..45fc6c3 100644
--- a/core/java/android/widget/SearchView.java
+++ b/core/java/android/widget/SearchView.java
@@ -45,7 +45,9 @@
import android.text.TextWatcher;
import android.text.style.ImageSpan;
import android.util.AttributeSet;
+import android.util.DisplayMetrics;
import android.util.Log;
+import android.util.TypedValue;
import android.view.CollapsibleActionView;
import android.view.KeyEvent;
import android.view.LayoutInflater;
@@ -1722,6 +1724,14 @@
mThreshold = getThreshold();
}
+ @Override
+ protected void onFinishInflate() {
+ super.onFinishInflate();
+ DisplayMetrics metrics = getResources().getDisplayMetrics();
+ setMinWidth((int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,
+ getSearchViewTextMinWidthDp(), metrics));
+ }
+
void setSearchView(SearchView searchView) {
mSearchView = searchView;
}
@@ -1818,5 +1828,21 @@
return super.onKeyPreIme(keyCode, event);
}
+ /**
+ * Get minimum width of the search view text entry area.
+ */
+ private int getSearchViewTextMinWidthDp() {
+ final Configuration configuration = getResources().getConfiguration();
+ final int width = configuration.screenWidthDp;
+ final int height = configuration.screenHeightDp;
+ final int orientation = configuration.orientation;
+ if (width >= 960 && height >= 720
+ && orientation == Configuration.ORIENTATION_LANDSCAPE) {
+ return 256;
+ } else if (width >= 600 || (width >= 640 && height >= 480)) {
+ return 192;
+ };
+ return 160;
+ }
}
}
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index d666939..56513a3 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -6439,6 +6439,9 @@
outAttrs.initialCapsMode = ic.getCursorCapsMode(getInputType());
return ic;
}
+ // LocaleList is designed to be immutable. This is theoretically equivalent to copy
+ // the snapshot of the current text locales.
+ outAttrs.locales = getTextLocales();
}
return null;
}
@@ -8782,7 +8785,7 @@
final SpellCheckerSubtype subtype = textServicesManager.getCurrentSpellCheckerSubtype(true);
final Locale locale;
if (subtype != null) {
- locale = SpellCheckerSubtype.constructLocaleFromString(subtype.getLocale());
+ locale = subtype.getLocaleObject();
} else {
locale = null;
}
diff --git a/core/java/com/android/internal/inputmethod/InputMethodUtils.java b/core/java/com/android/internal/inputmethod/InputMethodUtils.java
index 01ac22e..f0c1094 100644
--- a/core/java/com/android/internal/inputmethod/InputMethodUtils.java
+++ b/core/java/com/android/internal/inputmethod/InputMethodUtils.java
@@ -371,17 +371,17 @@
}
// TODO: Use {@link Locale#toLanguageTag()} and {@link Locale#forLanguageTag(languageTag)}.
String[] localeParams = localeStr.split("_", 3);
+ if (localeParams.length >= 1 && "tl".equals(localeParams[0])) {
+ // Convert a locale whose language is "tl" to one whose language is "fil".
+ // For example, "tl_PH" will get converted to "fil_PH".
+ // Versions of Android earlier than Lollipop did not support three letter language
+ // codes, and used "tl" (Tagalog) as the language string for "fil" (Filipino).
+ // On Lollipop and above, the current three letter version must be used.
+ localeParams[0] = "fil";
+ }
// The length of localeStr is guaranteed to always return a 1 <= value <= 3
// because localeStr is not empty.
if (localeParams.length == 1) {
- if (localeParams.length >= 1 && "tl".equals(localeParams[0])) {
- // Convert a locale whose language is "tl" to one whose language is "fil".
- // For example, "tl_PH" will get converted to "fil_PH".
- // Versions of Android earlier than Lollipop did not support three letter language
- // codes, and used "tl" (Tagalog) as the language string for "fil" (Filipino).
- // On Lollipop and above, the current three letter version must be used.
- localeParams[0] = "fil";
- }
return new Locale(localeParams[0]);
} else if (localeParams.length == 2) {
return new Locale(localeParams[0], localeParams[1]);
diff --git a/core/java/com/android/internal/policy/BackdropFrameRenderer.java b/core/java/com/android/internal/policy/BackdropFrameRenderer.java
index b101733..75ca639 100644
--- a/core/java/com/android/internal/policy/BackdropFrameRenderer.java
+++ b/core/java/com/android/internal/policy/BackdropFrameRenderer.java
@@ -17,6 +17,7 @@
package com.android.internal.policy;
import android.graphics.Rect;
+import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Looper;
import android.view.Choreographer;
@@ -44,6 +45,7 @@
// The render nodes for the multi threaded renderer.
private ThreadedRenderer mRenderer;
private RenderNode mFrameAndBackdropNode;
+ private RenderNode mSystemBarBackgroundNode;
private final Rect mOldTargetRect = new Rect();
private final Rect mNewTargetRect = new Rect();
@@ -62,13 +64,16 @@
private Drawable mCaptionBackgroundDrawable;
private Drawable mResizingBackgroundDrawable;
+ private ColorDrawable mStatusBarColor;
public BackdropFrameRenderer(DecorView decorView, ThreadedRenderer renderer, Rect initialBounds,
- Drawable resizingBackgroundDrawable, Drawable captionBackgroundDrawable) {
+ Drawable resizingBackgroundDrawable, Drawable captionBackgroundDrawable,
+ int statusBarColor) {
setName("ResizeFrame");
mRenderer = renderer;
- onResourcesLoaded(decorView, resizingBackgroundDrawable, captionBackgroundDrawable);
+ onResourcesLoaded(decorView, resizingBackgroundDrawable, captionBackgroundDrawable,
+ statusBarColor);
// Create a render node for the content and frame backdrop
// which can be resized independently from the content.
@@ -87,10 +92,24 @@
}
void onResourcesLoaded(DecorView decorView, Drawable resizingBackgroundDrawable,
- Drawable captionBackgroundDrawableDrawable) {
+ Drawable captionBackgroundDrawableDrawable, int statusBarColor) {
mDecorView = decorView;
mResizingBackgroundDrawable = resizingBackgroundDrawable;
mCaptionBackgroundDrawable = captionBackgroundDrawableDrawable;
+ if (statusBarColor != 0) {
+ mStatusBarColor = new ColorDrawable(statusBarColor);
+ addSystemBarNodeIfNeeded();
+ } else {
+ mStatusBarColor = null;
+ }
+ }
+
+ private void addSystemBarNodeIfNeeded() {
+ if (mSystemBarBackgroundNode != null) {
+ return;
+ }
+ mSystemBarBackgroundNode = RenderNode.create("SystemBarBackgroundNode", null);
+ mRenderer.addRenderNode(mSystemBarBackgroundNode, false);
}
/**
@@ -132,6 +151,9 @@
// Remove the render node again
// (see comment above - better to do that only once).
mRenderer.removeRenderNode(mFrameAndBackdropNode);
+ if (mSystemBarBackgroundNode != null) {
+ mRenderer.removeRenderNode(mSystemBarBackgroundNode);
+ }
mRenderer = null;
@@ -232,6 +254,8 @@
// inaccessible. For that case we remember the previous metrics to avoid flashes.
// Note that even when there is no visible caption, the caption child will exist.
final int captionHeight = mDecorView.getCaptionHeight();
+ final int statusBarHeight = mDecorView.getStatusBarHeight();
+
// The caption height will probably never dynamically change while we are resizing.
// Once set to something other then 0 it should be kept that way.
if (captionHeight != 0) {
@@ -256,7 +280,7 @@
mFrameAndBackdropNode.setLeftTopRightBottom(left, top, left + width, top + height);
// Draw the caption and content backdrops in to our render node.
- final DisplayListCanvas canvas = mFrameAndBackdropNode.start(width, height);
+ DisplayListCanvas canvas = mFrameAndBackdropNode.start(width, height);
mCaptionBackgroundDrawable.setBounds(0, 0, left + width, top + mLastCaptionHeight);
mCaptionBackgroundDrawable.draw(canvas);
@@ -265,6 +289,15 @@
mResizingBackgroundDrawable.draw(canvas);
mFrameAndBackdropNode.end(canvas);
+ if (mSystemBarBackgroundNode != null && mStatusBarColor != null) {
+ canvas = mSystemBarBackgroundNode.start(width, height);
+ mSystemBarBackgroundNode.setLeftTopRightBottom(left, top, left + width, top + height);
+ mStatusBarColor.setBounds(0, 0, left + width, statusBarHeight);
+ mStatusBarColor.draw(canvas);
+ mSystemBarBackgroundNode.end(canvas);
+ mRenderer.drawRenderNode(mSystemBarBackgroundNode);
+ }
+
// We need to render the node explicitly
mRenderer.drawRenderNode(mFrameAndBackdropNode);
diff --git a/core/java/com/android/internal/policy/DecorView.java b/core/java/com/android/internal/policy/DecorView.java
index 27fe03c..9107b1f 100644
--- a/core/java/com/android/internal/policy/DecorView.java
+++ b/core/java/com/android/internal/policy/DecorView.java
@@ -21,8 +21,7 @@
import com.android.internal.view.RootViewSurfaceTaker;
import com.android.internal.view.StandaloneActionMode;
import com.android.internal.view.menu.ContextMenuBuilder;
-import com.android.internal.view.menu.MenuDialogHelper;
-import com.android.internal.view.menu.MenuPopupHelper;
+import com.android.internal.view.menu.MenuHelper;
import com.android.internal.widget.ActionBarContextView;
import com.android.internal.widget.BackgroundFallback;
import com.android.internal.widget.DecorCaptionView;
@@ -152,6 +151,8 @@
private final Interpolator mShowInterpolator;
private final Interpolator mHideInterpolator;
private final int mBarEnterExitDuration;
+ private final boolean mForceWindowDrawsStatusBarBackground;
+ private final int mSemiTransparentStatusBarColor;
private final BackgroundFallback mBackgroundFallback = new BackgroundFallback();
@@ -198,6 +199,10 @@
mBarEnterExitDuration = context.getResources().getInteger(
R.integer.dock_enter_exit_duration);
+ mForceWindowDrawsStatusBarBackground = context.getResources().getBoolean(
+ R.bool.config_forceWindowDrawsStatusBarBackground);
+ mSemiTransparentStatusBarColor = context.getResources().getColor(
+ R.color.system_bar_background_semi_transparent, null /* theme */);
setWindow(window);
}
@@ -659,30 +664,23 @@
@Override
public boolean showContextMenuForChild(View originalView) {
- // Reuse the context menu builder
- if (mWindow.mContextMenu == null) {
- mWindow.mContextMenu = new ContextMenuBuilder(getContext());
- mWindow.mContextMenu.setCallback(mWindow.mContextMenuCallback);
- } else {
- mWindow.mContextMenu.clearAll();
- }
-
- final MenuDialogHelper helper = mWindow.mContextMenu.show(originalView,
- originalView.getWindowToken());
- if (helper != null) {
- helper.setPresenterCallback(mWindow.mContextMenuCallback);
- } else if (mWindow.mContextMenuHelper != null) {
- // No menu to show, but if we have a menu currently showing it just became blank.
- // Close it.
- mWindow.mContextMenuHelper.dismiss();
- }
- mWindow.mContextMenuHelper = helper;
- return helper != null;
+ return showContextMenuForChildInternal(originalView, 0, 0, false);
}
@Override
public boolean showContextMenuForChild(View originalView, float x, float y) {
- // Reuse the context menu builder
+ return showContextMenuForChildInternal(originalView, x, y, true);
+ }
+
+ private boolean showContextMenuForChildInternal(View originalView,
+ float x, float y, boolean isPopup) {
+ // Only allow one context menu at a time.
+ if (mWindow.mContextMenuHelper != null) {
+ mWindow.mContextMenuHelper.dismiss();
+ mWindow.mContextMenuHelper = null;
+ }
+
+ // Reuse the context menu builder.
if (mWindow.mContextMenu == null) {
mWindow.mContextMenu = new ContextMenuBuilder(getContext());
mWindow.mContextMenu.setCallback(mWindow.mContextMenuCallback);
@@ -690,16 +688,18 @@
mWindow.mContextMenu.clearAll();
}
- final MenuPopupHelper helper = mWindow.mContextMenu.showPopup(
- getContext(), originalView, x, y);
- if (helper != null) {
- helper.setCallback(mWindow.mContextMenuCallback);
- } else if (mWindow.mContextMenuPopupHelper != null) {
- // No menu to show, but if we have a menu currently showing it just became blank.
- // Close it.
- mWindow.mContextMenuPopupHelper.dismiss();
+ final MenuHelper helper;
+ if (isPopup) {
+ helper = mWindow.mContextMenu.showPopup(getContext(), originalView, x, y);
+ } else {
+ helper = mWindow.mContextMenu.showDialog(originalView, originalView.getWindowToken());
}
- mWindow.mContextMenuPopupHelper = helper;
+
+ if (helper != null) {
+ helper.setPresenterCallback(mWindow.mContextMenuCallback);
+ }
+
+ mWindow.mContextMenuHelper = helper;
return helper != null;
}
@@ -890,14 +890,15 @@
int navBarSize = navBarToRightEdge ? mLastRightInset : mLastBottomInset;
updateColorViewInt(mNavigationColorViewState, sysUiVisibility,
mWindow.mNavigationBarColor, navBarSize, navBarToRightEdge,
- 0 /* rightInset */, animate && !disallowAnimate);
+ 0 /* rightInset */, animate && !disallowAnimate, false /* force */);
boolean statusBarNeedsRightInset = navBarToRightEdge
&& mNavigationColorViewState.present;
int statusBarRightInset = statusBarNeedsRightInset ? mLastRightInset : 0;
- updateColorViewInt(mStatusColorViewState, sysUiVisibility, mWindow.mStatusBarColor,
- mLastTopInset, false /* matchVertical */, statusBarRightInset,
- animate && !disallowAnimate);
+ updateColorViewInt(mStatusColorViewState, sysUiVisibility,
+ calculateStatusBarColor(), mLastTopInset,
+ false /* matchVertical */, statusBarRightInset, animate && !disallowAnimate,
+ mForceWindowDrawsStatusBarBackground);
}
// When we expand the window with FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS, we still need
@@ -941,6 +942,21 @@
return insets;
}
+ private int calculateStatusBarColor() {
+ int flags = mWindow.getAttributes().flags;
+ return (flags & FLAG_TRANSLUCENT_STATUS) != 0 ? mSemiTransparentStatusBarColor
+ : (flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0 ? mWindow.mStatusBarColor
+ : Color.BLACK;
+ }
+
+ private int getCurrentColor(ColorViewState state) {
+ if (state.visible) {
+ return state.color;
+ } else {
+ return 0;
+ }
+ }
+
/**
* Update a color view
*
@@ -954,13 +970,15 @@
* @param animate if true, the change will be animated.
*/
private void updateColorViewInt(final ColorViewState state, int sysUiVis, int color,
- int size, boolean verticalBar, int rightMargin, boolean animate) {
+ int size, boolean verticalBar, int rightMargin, boolean animate, boolean force) {
state.present = size > 0 && (sysUiVis & state.systemUiHideFlag) == 0
&& (mWindow.getAttributes().flags & state.hideWindowFlag) == 0
- && (mWindow.getAttributes().flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0;
+ && ((mWindow.getAttributes().flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0
+ || force);
boolean show = state.present
&& (color & Color.BLACK) != 0
- && (mWindow.getAttributes().flags & state.translucentFlag) == 0;
+ && ((mWindow.getAttributes().flags & state.translucentFlag) == 0 || force);
+ boolean showView = show && !isResizing();
boolean visibilityChanged = false;
View view = state.view;
@@ -970,7 +988,7 @@
int resolvedGravity = verticalBar ? state.horizontalGravity : state.verticalGravity;
if (view == null) {
- if (show) {
+ if (showView) {
state.view = view = new View(mContext);
view.setBackgroundColor(color);
view.setTransitionName(state.transitionName);
@@ -986,7 +1004,7 @@
updateColorViewTranslations();
}
} else {
- int vis = show ? VISIBLE : INVISIBLE;
+ int vis = showView ? VISIBLE : INVISIBLE;
visibilityChanged = state.targetVisibility != vis;
state.targetVisibility = vis;
LayoutParams lp = (LayoutParams) view.getLayoutParams();
@@ -998,14 +1016,14 @@
lp.rightMargin = rightMargin;
view.setLayoutParams(lp);
}
- if (show) {
+ if (showView) {
view.setBackgroundColor(color);
}
}
if (visibilityChanged) {
view.animate().cancel();
- if (animate) {
- if (show) {
+ if (animate && !isResizing()) {
+ if (showView) {
if (view.getVisibility() != VISIBLE) {
view.setVisibility(VISIBLE);
view.setAlpha(0.0f);
@@ -1025,9 +1043,11 @@
}
} else {
view.setAlpha(1.0f);
- view.setVisibility(show ? VISIBLE : INVISIBLE);
+ view.setVisibility(showView ? VISIBLE : INVISIBLE);
}
}
+ state.visible = show;
+ state.color = color;
}
private void updateColorViewTranslations() {
@@ -1559,7 +1579,8 @@
if (mBackdropFrameRenderer != null) {
mBackdropFrameRenderer.onResourcesLoaded(
- this, mResizingBackgroundDrawable, mCaptionBackgroundDrawable);
+ this, mResizingBackgroundDrawable, mCaptionBackgroundDrawable,
+ getCurrentColor(mStatusColorViewState));
}
mDecorCaptionView = createDecorCaptionView(inflater);
@@ -1674,9 +1695,15 @@
if (mDecorCaptionView != null) {
mDecorCaptionView.removeContentView();
} else {
- // This window doesn't have caption, so we need to just remove the
- // children of the decor view.
- removeAllViews();
+ // This window doesn't have caption, so we need to remove everything except our views
+ // we might have added.
+ for (int i = getChildCount() - 1; i >= 0; i--) {
+ View v = getChildAt(i);
+ if (v != mStatusColorViewState.view && v != mNavigationColorViewState.view
+ && v != mStatusGuard && v != mNavigationGuard) {
+ removeViewAt(i);
+ }
+ }
}
}
@@ -1700,18 +1727,22 @@
final ThreadedRenderer renderer = (ThreadedRenderer) getHardwareRenderer();
if (renderer != null) {
mBackdropFrameRenderer = new BackdropFrameRenderer(this, renderer,
- initialBounds, mResizingBackgroundDrawable, mCaptionBackgroundDrawable);
+ initialBounds, mResizingBackgroundDrawable, mCaptionBackgroundDrawable,
+ getCurrentColor(mStatusColorViewState));
// Get rid of the shadow while we are resizing. Shadow drawing takes considerable time.
// If we want to get the shadow shown while resizing, we would need to elevate a new
// element which owns the caption and has the elevation.
updateElevation();
+
+ updateColorViews(null /* insets */, false);
}
}
@Override
public void onWindowDragResizeEnd() {
releaseThreadedRenderer();
+ updateColorViews(null /* insets */, false);
}
@Override
@@ -1744,6 +1775,10 @@
}
}
+ private boolean isResizing() {
+ return mBackdropFrameRenderer != null;
+ }
+
/**
* The elevation gets set for the first time and the framework needs to be informed that
* the surface layer gets created with the shadow size in mind.
@@ -1759,8 +1794,7 @@
final boolean wasAdjustedForStack = mElevationAdjustedForStack;
// Do not use a shadow when we are in resizing mode (mBackdropFrameRenderer not null)
// since the shadow is bound to the content size and not the target size.
- if (ActivityManager.StackId.hasWindowShadow(mStackId)
- && mBackdropFrameRenderer == null) {
+ if (ActivityManager.StackId.hasWindowShadow(mStackId) && !isResizing()) {
elevation = hasWindowFocus() ?
DECOR_SHADOW_FOCUSED_HEIGHT_IN_DIP : DECOR_SHADOW_UNFOCUSED_HEIGHT_IN_DIP;
// TODO(skuhne): Remove this if clause once b/22668382 got fixed.
@@ -1790,6 +1824,10 @@
return isShowingCaption() ? mDecorCaptionView.getCaptionHeight() : 0;
}
+ int getStatusBarHeight() {
+ return mStatusColorViewState.view != null ? mStatusColorViewState.view.getHeight() : 0;
+ }
+
/**
* Converts a DIP measure into physical pixels.
* @param dip The dip value.
@@ -1804,6 +1842,8 @@
View view = null;
int targetVisibility = View.INVISIBLE;
boolean present = false;
+ boolean visible;
+ int color;
final int id;
final int systemUiHideFlag;
diff --git a/core/java/com/android/internal/policy/PhoneWindow.java b/core/java/com/android/internal/policy/PhoneWindow.java
index 6e7e5cf..57d2244 100644
--- a/core/java/com/android/internal/policy/PhoneWindow.java
+++ b/core/java/com/android/internal/policy/PhoneWindow.java
@@ -53,7 +53,7 @@
import com.android.internal.view.menu.ListMenuPresenter;
import com.android.internal.view.menu.MenuBuilder;
import com.android.internal.view.menu.MenuDialogHelper;
-import com.android.internal.view.menu.MenuPopupHelper;
+import com.android.internal.view.menu.MenuHelper;
import com.android.internal.view.menu.MenuPresenter;
import com.android.internal.view.menu.MenuView;
import com.android.internal.widget.DecorContentParent;
@@ -232,8 +232,7 @@
private boolean mAlwaysReadCloseOnTouchAttr = false;
ContextMenuBuilder mContextMenu;
- MenuDialogHelper mContextMenuHelper;
- MenuPopupHelper mContextMenuPopupHelper;
+ MenuHelper mContextMenuHelper;
private boolean mClosingActionMenu;
private int mVolumeControlStreamType = AudioManager.USE_DEFAULT_STREAM_TYPE;
@@ -1103,10 +1102,6 @@
mContextMenuHelper.dismiss();
mContextMenuHelper = null;
}
- if (mContextMenuPopupHelper != null) {
- mContextMenuPopupHelper.dismiss();
- mContextMenuPopupHelper = null;
- }
}
@Override
@@ -2411,6 +2406,13 @@
setNeedsMenuKey(WindowManager.LayoutParams.NEEDS_MENU_SET_FALSE);
}
+ if (!mForcedStatusBarColor) {
+ mStatusBarColor = a.getColor(R.styleable.Window_statusBarColor, 0xFF000000);
+ }
+ if (!mForcedNavigationBarColor) {
+ mNavigationBarColor = a.getColor(R.styleable.Window_navigationBarColor, 0xFF000000);
+ }
+
// Non-floating windows on high end devices must put up decor beneath the system bars and
// therefore must know about visibility changes of those.
if (!mIsFloating && ActivityManager.isHighEndGfx()) {
@@ -2421,12 +2423,6 @@
FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS & ~getForcedWindowFlags());
}
}
- if (!mForcedStatusBarColor) {
- mStatusBarColor = a.getColor(R.styleable.Window_statusBarColor, 0xFF000000);
- }
- if (!mForcedNavigationBarColor) {
- mNavigationBarColor = a.getColor(R.styleable.Window_navigationBarColor, 0xFF000000);
- }
if (a.getBoolean(R.styleable.Window_windowLightStatusBar, false)) {
decor.setSystemUiVisibility(
decor.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
diff --git a/core/java/com/android/internal/view/ActionBarPolicy.java b/core/java/com/android/internal/view/ActionBarPolicy.java
index 007ab29..755faf3 100644
--- a/core/java/com/android/internal/view/ActionBarPolicy.java
+++ b/core/java/com/android/internal/view/ActionBarPolicy.java
@@ -78,7 +78,11 @@
// The embedded tabs policy changed in Jellybean; give older apps the old policy
// so they get what they expect.
- return mContext.getResources().getBoolean(R.bool.action_bar_embed_tabs_pre_jb);
+ final Configuration configuration = mContext.getResources().getConfiguration();
+ final int width = configuration.screenWidthDp;
+ final int height = configuration.screenHeightDp;
+ return configuration.orientation == Configuration.ORIENTATION_LANDSCAPE ||
+ width >= 480 || (width >= 640 && height >= 480);
}
public int getTabContainerHeight() {
diff --git a/core/java/com/android/internal/view/menu/ActionMenuItemView.java b/core/java/com/android/internal/view/menu/ActionMenuItemView.java
index ce5bc90..bd97e5d 100644
--- a/core/java/com/android/internal/view/menu/ActionMenuItemView.java
+++ b/core/java/com/android/internal/view/menu/ActionMenuItemView.java
@@ -72,8 +72,7 @@
public ActionMenuItemView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
final Resources res = context.getResources();
- mAllowTextWithIcon = res.getBoolean(
- com.android.internal.R.bool.config_allowActionMenuItemTextWithIcon);
+ mAllowTextWithIcon = shouldAllowTextWithIcon();
final TypedArray a = context.obtainStyledAttributes(attrs,
com.android.internal.R.styleable.ActionMenuItemView, defStyleAttr, defStyleRes);
mMinWidth = a.getDimensionPixelSize(
@@ -93,11 +92,22 @@
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
- mAllowTextWithIcon = getContext().getResources().getBoolean(
- com.android.internal.R.bool.config_allowActionMenuItemTextWithIcon);
+ mAllowTextWithIcon = shouldAllowTextWithIcon();
updateTextButtonVisibility();
}
+ /**
+ * Whether action menu items should obey the "withText" showAsAction flag. This may be set to
+ * false for situations where space is extremely limited. -->
+ */
+ private boolean shouldAllowTextWithIcon() {
+ final Configuration configuration = getContext().getResources().getConfiguration();
+ final int width = configuration.screenWidthDp;
+ final int height = configuration.screenHeightDp;
+ return width >= 480 || (width >= 640 && height >= 480)
+ || configuration.orientation == Configuration.ORIENTATION_LANDSCAPE;
+ }
+
@Override
public void setPadding(int l, int t, int r, int b) {
mSavedPaddingLeft = l;
diff --git a/core/java/com/android/internal/view/menu/ContextMenuBuilder.java b/core/java/com/android/internal/view/menu/ContextMenuBuilder.java
index aaa1bf16..82f061c 100644
--- a/core/java/com/android/internal/view/menu/ContextMenuBuilder.java
+++ b/core/java/com/android/internal/view/menu/ContextMenuBuilder.java
@@ -17,7 +17,6 @@
package com.android.internal.view.menu;
import android.content.Context;
-import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.os.IBinder;
import android.util.EventLog;
@@ -35,7 +34,7 @@
* <p>
* To use this class, instantiate it via {@link #ContextMenuBuilder(Context)},
* and optionally populate it with any of your custom items. Finally,
- * call {@link #show(View, IBinder)} which will populate the menu
+ * call {@link #showDialog(View, IBinder)} which will populate the menu
* with a view's context menu items and show the context menu.
*/
public class ContextMenuBuilder extends MenuBuilder implements ContextMenu {
@@ -75,7 +74,7 @@
* @return If the context menu was shown, the {@link MenuDialogHelper} for
* dismissing it. Otherwise, null.
*/
- public MenuDialogHelper show(View originalView, IBinder token) {
+ public MenuDialogHelper showDialog(View originalView, IBinder token) {
if (originalView != null) {
// Let relevant views and their populate context listeners populate
// the context menu
diff --git a/core/java/com/android/internal/view/menu/MenuDialogHelper.java b/core/java/com/android/internal/view/menu/MenuDialogHelper.java
index b9e0e40..ecab29f 100644
--- a/core/java/com/android/internal/view/menu/MenuDialogHelper.java
+++ b/core/java/com/android/internal/view/menu/MenuDialogHelper.java
@@ -26,13 +26,10 @@
import android.view.WindowManager;
/**
- * Helper for menus that appear as Dialogs (context and submenus).
- *
- * @hide
+ * Presents a menu as a modal dialog.
*/
-public class MenuDialogHelper implements DialogInterface.OnKeyListener,
- DialogInterface.OnClickListener,
- DialogInterface.OnDismissListener,
+public class MenuDialogHelper implements MenuHelper, DialogInterface.OnKeyListener,
+ DialogInterface.OnClickListener, DialogInterface.OnDismissListener,
MenuPresenter.Callback {
private MenuBuilder mMenu;
private AlertDialog mDialog;
@@ -125,6 +122,7 @@
}
+ @Override
public void setPresenterCallback(MenuPresenter.Callback cb) {
mPresenterCallback = cb;
}
@@ -134,6 +132,7 @@
*
* @see Dialog#dismiss()
*/
+ @Override
public void dismiss() {
if (mDialog != null) {
mDialog.dismiss();
diff --git a/core/java/com/android/internal/view/menu/MenuHelper.java b/core/java/com/android/internal/view/menu/MenuHelper.java
new file mode 100644
index 0000000..9534722
--- /dev/null
+++ b/core/java/com/android/internal/view/menu/MenuHelper.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2015 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 com.android.internal.view.menu;
+
+/**
+ * Interface for a helper capable of presenting a menu.
+ */
+public interface MenuHelper {
+ void setPresenterCallback(MenuPresenter.Callback cb);
+ void dismiss();
+}
diff --git a/core/java/com/android/internal/view/menu/MenuPopupHelper.java b/core/java/com/android/internal/view/menu/MenuPopupHelper.java
index 59d5f94..044ee6e 100644
--- a/core/java/com/android/internal/view/menu/MenuPopupHelper.java
+++ b/core/java/com/android/internal/view/menu/MenuPopupHelper.java
@@ -30,7 +30,7 @@
/**
* Presents a menu as a small, simple popup anchored to another view.
*/
-public class MenuPopupHelper {
+public class MenuPopupHelper implements MenuHelper {
private final Context mContext;
// Immutable cached popup menu properties.
@@ -244,6 +244,7 @@
/**
* Dismisses the popup, if showing.
*/
+ @Override
public void dismiss() {
if (isShowing()) {
mPopup.dismiss();
@@ -270,7 +271,8 @@
return mPopup != null && mPopup.isShowing();
}
- public void setCallback(@Nullable MenuPresenter.Callback cb) {
+ @Override
+ public void setPresenterCallback(@Nullable MenuPresenter.Callback cb) {
mPresenterCallback = cb;
if (mPopup != null) {
mPopup.setCallback(cb);
diff --git a/core/java/com/android/internal/view/menu/StandardMenuPopup.java b/core/java/com/android/internal/view/menu/StandardMenuPopup.java
index caee0d2..6a5f6d8 100644
--- a/core/java/com/android/internal/view/menu/StandardMenuPopup.java
+++ b/core/java/com/android/internal/view/menu/StandardMenuPopup.java
@@ -245,7 +245,7 @@
MenuPopupHelper subPopup = new MenuPopupHelper(
mContext, subMenu, mShownAnchorView, mOverflowOnly, mPopupStyleAttr,
mPopupStyleRes);
- subPopup.setCallback(mPresenterCallback);
+ subPopup.setPresenterCallback(mPresenterCallback);
subPopup.setForceShowIcon(mAdapter.getForceShowIcon());
if (subPopup.tryShow()) {
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java
index 889c7b3..6c223c3 100644
--- a/core/java/com/android/internal/widget/LockPatternUtils.java
+++ b/core/java/com/android/internal/widget/LockPatternUtils.java
@@ -1270,6 +1270,10 @@
}
}
+ public static boolean isSeparateWorkChallengeEnabled() {
+ return StorageManager.isFileBasedEncryptionEnabled();
+ }
+
public void registerStrongAuthTracker(final StrongAuthTracker strongAuthTracker) {
try {
getLockSettings().registerStrongAuthTracker(strongAuthTracker.mStub);
diff --git a/core/jni/Android.mk b/core/jni/Android.mk
index 0473016f..f1e7afb 100644
--- a/core/jni/Android.mk
+++ b/core/jni/Android.mk
@@ -199,7 +199,6 @@
external/sqlite/android \
external/expat/lib \
external/tremor/Tremor \
- external/jpeg \
external/harfbuzz_ng/src \
libcore/include \
$(call include-path-for, audio-utils) \
diff --git a/core/jni/android/graphics/BitmapRegionDecoder.cpp b/core/jni/android/graphics/BitmapRegionDecoder.cpp
index 3cdf640..f10f4bd 100644
--- a/core/jni/android/graphics/BitmapRegionDecoder.cpp
+++ b/core/jni/android/graphics/BitmapRegionDecoder.cpp
@@ -16,17 +16,20 @@
#define LOG_TAG "BitmapRegionDecoder"
-#include "AutoDecodeCancel.h"
#include "BitmapFactory.h"
#include "CreateJavaOutputStreamAdaptor.h"
-#include "SkBitmap.h"
-#include "SkData.h"
#include "GraphicsJNI.h"
-#include "SkImageEncoder.h"
+#include "Utils.h"
+
+#include "SkBitmap.h"
+#include "SkBitmapRegionDecoder.h"
+#include "SkCodec.h"
+#include "SkData.h"
+#include "SkEncodedFormat.h"
#include "SkUtils.h"
#include "SkPixelRef.h"
#include "SkStream.h"
-#include "Utils.h"
+
#include "android_nio_utils.h"
#include "android_util_Binder.h"
#include "core_jni_helpers.h"
@@ -39,60 +42,54 @@
using namespace android;
-class BitmapRegionDecoder {
-public:
- BitmapRegionDecoder(SkImageDecoder* decoder, int width, int height) {
- fDecoder = decoder;
- fWidth = width;
- fHeight = height;
- }
- ~BitmapRegionDecoder() {
- delete fDecoder;
+// This is very similar to, and based on, getMimeTypeString() in BitmapFactory.
+jstring encodedFormatToString(JNIEnv* env, SkEncodedFormat format) {
+ const char* mimeType;
+ switch (format) {
+ case SkEncodedFormat::kBMP_SkEncodedFormat:
+ mimeType = "image/bmp";
+ break;
+ case SkEncodedFormat::kGIF_SkEncodedFormat:
+ mimeType = "image/gif";
+ break;
+ case SkEncodedFormat::kICO_SkEncodedFormat:
+ mimeType = "image/x-ico";
+ break;
+ case SkEncodedFormat::kJPEG_SkEncodedFormat:
+ mimeType = "image/jpeg";
+ break;
+ case SkEncodedFormat::kPNG_SkEncodedFormat:
+ mimeType = "image/png";
+ break;
+ case SkEncodedFormat::kWEBP_SkEncodedFormat:
+ mimeType = "image/webp";
+ break;
+ case SkEncodedFormat::kWBMP_SkEncodedFormat:
+ mimeType = "image/vnd.wap.wbmp";
+ break;
+ default:
+ mimeType = nullptr;
+ break;
}
- bool decodeRegion(SkBitmap* bitmap, const SkIRect& rect,
- SkColorType pref, int sampleSize) {
- fDecoder->setSampleSize(sampleSize);
- return fDecoder->decodeSubset(bitmap, rect, pref);
+ jstring jstr = nullptr;
+ if (mimeType != nullptr) {
+ jstr = env->NewStringUTF(mimeType);
}
-
- SkImageDecoder* getDecoder() const { return fDecoder; }
- int getWidth() const { return fWidth; }
- int getHeight() const { return fHeight; }
-
-private:
- SkImageDecoder* fDecoder;
- int fWidth;
- int fHeight;
-};
+ return jstr;
+}
// Takes ownership of the SkStreamRewindable. For consistency, deletes stream even
// when returning null.
static jobject createBitmapRegionDecoder(JNIEnv* env, SkStreamRewindable* stream) {
- SkImageDecoder* decoder = SkImageDecoder::Factory(stream);
- int width, height;
- if (NULL == decoder) {
- delete stream;
+ SkAutoTDelete<SkBitmapRegionDecoder> brd(
+ SkBitmapRegionDecoder::Create(stream, SkBitmapRegionDecoder::kAndroidCodec_Strategy));
+ if (NULL == brd) {
doThrowIOE(env, "Image format not supported");
- return nullObjectReturn("SkImageDecoder::Factory returned null");
+ return nullObjectReturn("CreateBitmapRegionDecoder returned null");
}
- JavaPixelAllocator *javaAllocator = new JavaPixelAllocator(env);
- decoder->setAllocator(javaAllocator);
- javaAllocator->unref();
-
- // This call passes ownership of stream to the decoder, or deletes on failure.
- if (!decoder->buildTileIndex(stream, &width, &height)) {
- char msg[100];
- snprintf(msg, sizeof(msg), "Image failed to decode using %s decoder",
- decoder->getFormatName());
- doThrowIOE(env, msg);
- delete decoder;
- return nullObjectReturn("decoder->buildTileIndex returned false");
- }
-
- BitmapRegionDecoder *bm = new BitmapRegionDecoder(decoder, width, height);
- return GraphicsJNI::createBitmapRegionDecoder(env, bm);
+ return GraphicsJNI::createBitmapRegionDecoder(env, brd.detach());
}
static jobject nativeNewInstanceFromByteArray(JNIEnv* env, jobject, jbyteArray byteArray,
@@ -160,102 +157,106 @@
/*
* nine patch not supported
- *
* purgeable not supported
* reportSizeToVM not supported
*/
-static jobject nativeDecodeRegion(JNIEnv* env, jobject, jlong brdHandle,
- jint start_x, jint start_y, jint width, jint height, jobject options) {
- BitmapRegionDecoder *brd = reinterpret_cast<BitmapRegionDecoder*>(brdHandle);
- jobject tileBitmap = NULL;
- SkImageDecoder *decoder = brd->getDecoder();
- int sampleSize = 1;
- SkColorType prefColorType = kUnknown_SkColorType;
- bool doDither = true;
- bool preferQualityOverSpeed = false;
- bool requireUnpremultiplied = false;
+static jobject nativeDecodeRegion(JNIEnv* env, jobject, jlong brdHandle, jint inputX,
+ jint inputY, jint inputWidth, jint inputHeight, jobject options) {
+ // Set default options.
+ int sampleSize = 1;
+ SkColorType colorType = kN32_SkColorType;
+ bool requireUnpremul = false;
+ jobject javaBitmap = NULL;
+
+ // Update the default options with any options supplied by the client.
if (NULL != options) {
sampleSize = env->GetIntField(options, gOptions_sampleSizeFieldID);
- // initialize these, in case we fail later on
+ jobject jconfig = env->GetObjectField(options, gOptions_configFieldID);
+ colorType = GraphicsJNI::getNativeBitmapColorType(env, jconfig);
+ if (kAlpha_8_SkColorType == colorType) {
+ colorType = kGray_8_SkColorType;
+ }
+ requireUnpremul = !env->GetBooleanField(options, gOptions_premultipliedFieldID);
+ javaBitmap = env->GetObjectField(options, gOptions_bitmapFieldID);
+ // The Java options of ditherMode and preferQualityOverSpeed are deprecated. We will
+ // ignore the values of these fields.
+
+ // Initialize these fields to indicate a failure. If the decode succeeds, we
+ // will update them later on.
env->SetIntField(options, gOptions_widthFieldID, -1);
env->SetIntField(options, gOptions_heightFieldID, -1);
env->SetObjectField(options, gOptions_mimeFieldID, 0);
-
- jobject jconfig = env->GetObjectField(options, gOptions_configFieldID);
- prefColorType = GraphicsJNI::getNativeBitmapColorType(env, jconfig);
- doDither = env->GetBooleanField(options, gOptions_ditherFieldID);
- preferQualityOverSpeed = env->GetBooleanField(options,
- gOptions_preferQualityOverSpeedFieldID);
- // Get the bitmap for re-use if it exists.
- tileBitmap = env->GetObjectField(options, gOptions_bitmapFieldID);
- requireUnpremultiplied = !env->GetBooleanField(options, gOptions_premultipliedFieldID);
}
- decoder->setDitherImage(doDither);
- decoder->setPreferQualityOverSpeed(preferQualityOverSpeed);
- decoder->setRequireUnpremultipliedColors(requireUnpremultiplied);
- AutoDecoderCancel adc(options, decoder);
-
- // To fix the race condition in case "requestCancelDecode"
- // happens earlier than AutoDecoderCancel object is added
- // to the gAutoDecoderCancelMutex linked list.
- if (NULL != options && env->GetBooleanField(options, gOptions_mCancelID)) {
- return nullObjectReturn("gOptions_mCancelID");;
+ // Recycle a bitmap if possible.
+ android::Bitmap* recycledBitmap = nullptr;
+ size_t recycledBytes = 0;
+ if (javaBitmap) {
+ recycledBitmap = GraphicsJNI::getBitmap(env, javaBitmap);
+ if (recycledBitmap->peekAtPixelRef()->isImmutable()) {
+ ALOGW("Warning: Reusing an immutable bitmap as an image decoder target.");
+ }
+ recycledBytes = GraphicsJNI::getBitmapAllocationByteCount(env, javaBitmap);
}
- SkIRect region;
- region.fLeft = start_x;
- region.fTop = start_y;
- region.fRight = start_x + width;
- region.fBottom = start_y + height;
+ // Set up the pixel allocator
+ SkBRDAllocator* allocator = nullptr;
+ RecyclingClippingPixelAllocator recycleAlloc(recycledBitmap, recycledBytes);
+ JavaPixelAllocator javaAlloc(env);
+ if (javaBitmap) {
+ allocator = &recycleAlloc;
+ // We are required to match the color type of the recycled bitmap.
+ colorType = recycledBitmap->info().colorType();
+ } else {
+ allocator = &javaAlloc;
+ }
+
+ // Decode the region.
+ SkIRect subset = SkIRect::MakeXYWH(inputX, inputY, inputWidth, inputHeight);
+ SkBitmapRegionDecoder* brd =
+ reinterpret_cast<SkBitmapRegionDecoder*>(brdHandle);
SkBitmap bitmap;
-
- if (tileBitmap != NULL) {
- // Re-use bitmap.
- GraphicsJNI::getSkBitmap(env, tileBitmap, &bitmap);
+ if (!brd->decodeRegion(&bitmap, allocator, subset, sampleSize, colorType, requireUnpremul)) {
+ return nullObjectReturn("Failed to decode region.");
}
- if (!brd->decodeRegion(&bitmap, region, prefColorType, sampleSize)) {
- return nullObjectReturn("decoder->decodeRegion returned false");
- }
-
- // update options (if any)
+ // If the client provided options, indicate that the decode was successful.
if (NULL != options) {
env->SetIntField(options, gOptions_widthFieldID, bitmap.width());
env->SetIntField(options, gOptions_heightFieldID, bitmap.height());
- // TODO: set the mimeType field with the data from the codec.
- // but how to reuse a set of strings, rather than allocating new one
- // each time?
env->SetObjectField(options, gOptions_mimeFieldID,
- getMimeTypeString(env, decoder->getFormat()));
+ encodedFormatToString(env, brd->getEncodedFormat()));
}
- if (tileBitmap != NULL) {
- bitmap.notifyPixelsChanged();
- return tileBitmap;
+ // If we may have reused a bitmap, we need to indicate that the pixels have changed.
+ if (javaBitmap) {
+ recycleAlloc.copyIfNecessary();
+ return javaBitmap;
}
- JavaPixelAllocator* allocator = (JavaPixelAllocator*) decoder->getAllocator();
-
int bitmapCreateFlags = 0;
- if (!requireUnpremultiplied) bitmapCreateFlags |= GraphicsJNI::kBitmapCreateFlag_Premultiplied;
- return GraphicsJNI::createBitmap(env, allocator->getStorageObjAndReset(),
- bitmapCreateFlags);
+ if (!requireUnpremul) {
+ bitmapCreateFlags |= GraphicsJNI::kBitmapCreateFlag_Premultiplied;
+ }
+ return GraphicsJNI::createBitmap(env, javaAlloc.getStorageObjAndReset(), bitmapCreateFlags);
}
static jint nativeGetHeight(JNIEnv* env, jobject, jlong brdHandle) {
- BitmapRegionDecoder *brd = reinterpret_cast<BitmapRegionDecoder*>(brdHandle);
- return static_cast<jint>(brd->getHeight());
+ SkBitmapRegionDecoder* brd =
+ reinterpret_cast<SkBitmapRegionDecoder*>(brdHandle);
+ return static_cast<jint>(brd->height());
}
static jint nativeGetWidth(JNIEnv* env, jobject, jlong brdHandle) {
- BitmapRegionDecoder *brd = reinterpret_cast<BitmapRegionDecoder*>(brdHandle);
- return static_cast<jint>(brd->getWidth());
+ SkBitmapRegionDecoder* brd =
+ reinterpret_cast<SkBitmapRegionDecoder*>(brdHandle);
+ return static_cast<jint>(brd->width());
}
static void nativeClean(JNIEnv* env, jobject, jlong brdHandle) {
- BitmapRegionDecoder *brd = reinterpret_cast<BitmapRegionDecoder*>(brdHandle);
+ SkBitmapRegionDecoder* brd =
+ reinterpret_cast<SkBitmapRegionDecoder*>(brdHandle);
delete brd;
}
diff --git a/core/jni/android/graphics/Graphics.cpp b/core/jni/android/graphics/Graphics.cpp
index ed44019..3d5091a 100644
--- a/core/jni/android/graphics/Graphics.cpp
+++ b/core/jni/android/graphics/Graphics.cpp
@@ -439,7 +439,7 @@
return env->CallIntMethod(javaBitmap, gBitmap_getAllocationByteCountMethodID);
}
-jobject GraphicsJNI::createBitmapRegionDecoder(JNIEnv* env, BitmapRegionDecoder* bitmap)
+jobject GraphicsJNI::createBitmapRegionDecoder(JNIEnv* env, SkBitmapRegionDecoder* bitmap)
{
SkASSERT(bitmap != NULL);
@@ -677,6 +677,91 @@
////////////////////////////////////////////////////////////////////////////////
+RecyclingClippingPixelAllocator::RecyclingClippingPixelAllocator(
+ android::Bitmap* recycledBitmap, size_t recycledBytes)
+ : mRecycledBitmap(recycledBitmap)
+ , mRecycledBytes(recycledBytes)
+ , mSkiaBitmap(nullptr)
+ , mNeedsCopy(false)
+{}
+
+RecyclingClippingPixelAllocator::~RecyclingClippingPixelAllocator() {}
+
+bool RecyclingClippingPixelAllocator::allocPixelRef(SkBitmap* bitmap, SkColorTable* ctable) {
+ // Ensure that the caller did not pass in a NULL bitmap to the constructor or this
+ // function.
+ LOG_ALWAYS_FATAL_IF(!mRecycledBitmap);
+ LOG_ALWAYS_FATAL_IF(!bitmap);
+ mSkiaBitmap = bitmap;
+
+ // This behaves differently than the RecyclingPixelAllocator. For backwards
+ // compatibility, the original color type of the recycled bitmap must be maintained.
+ if (mRecycledBitmap->info().colorType() != bitmap->colorType()) {
+ return false;
+ }
+
+ // The Skia bitmap specifies the width and height needed by the decoder.
+ // mRecycledBitmap specifies the width and height of the bitmap that we
+ // want to reuse. Neither can be changed. We will try to find a way
+ // to reuse the memory.
+ const int maxWidth = SkTMax(bitmap->width(), mRecycledBitmap->info().width());
+ const int maxHeight = SkTMax(bitmap->height(), mRecycledBitmap->info().height());
+ const SkImageInfo maxInfo = bitmap->info().makeWH(maxWidth, maxHeight);
+ const size_t rowBytes = maxInfo.minRowBytes();
+ const size_t bytesNeeded = maxInfo.getSafeSize(rowBytes);
+ if (bytesNeeded <= mRecycledBytes) {
+ // Here we take advantage of reconfigure() to reset the rowBytes and ctable
+ // of mRecycledBitmap. It is very important that we pass in
+ // mRecycledBitmap->info() for the SkImageInfo. According to the
+ // specification for BitmapRegionDecoder, we are not allowed to change
+ // the SkImageInfo.
+ mRecycledBitmap->reconfigure(mRecycledBitmap->info(), rowBytes, ctable);
+
+ // This call will give the bitmap the same pixelRef as mRecycledBitmap.
+ bitmap->setPixelRef(mRecycledBitmap->refPixelRef())->unref();
+
+ // Make sure that the recycled bitmap has the correct alpha type.
+ mRecycledBitmap->setAlphaType(bitmap->alphaType());
+
+ bitmap->lockPixels();
+ mNeedsCopy = false;
+
+ // TODO: If the dimensions of the SkBitmap are smaller than those of
+ // mRecycledBitmap, should we zero the memory in mRecycledBitmap?
+ return true;
+ }
+
+ // In the event that mRecycledBitmap is not large enough, allocate new memory
+ // on the heap.
+ SkBitmap::HeapAllocator heapAllocator;
+
+ // We will need to copy from heap memory to mRecycledBitmap's memory after the
+ // decode is complete.
+ mNeedsCopy = true;
+
+ return heapAllocator.allocPixelRef(bitmap, ctable);
+}
+
+void RecyclingClippingPixelAllocator::copyIfNecessary() {
+ if (mNeedsCopy) {
+ SkPixelRef* recycledPixels = mRecycledBitmap->refPixelRef();
+ void* dst = recycledPixels->pixels();
+ size_t dstRowBytes = mRecycledBitmap->rowBytes();
+ size_t bytesToCopy = SkTMin(mRecycledBitmap->info().minRowBytes(),
+ mSkiaBitmap->info().minRowBytes());
+ for (int y = 0; y < mRecycledBitmap->info().height(); y++) {
+ memcpy(dst, mSkiaBitmap->getAddr(0, y), bytesToCopy);
+ dst = SkTAddOffset<void>(dst, dstRowBytes);
+ }
+ recycledPixels->notifyPixelsChanged();
+ recycledPixels->unref();
+ }
+ mRecycledBitmap = nullptr;
+ mSkiaBitmap = nullptr;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
AshmemPixelAllocator::AshmemPixelAllocator(JNIEnv *env) {
LOG_ALWAYS_FATAL_IF(env->GetJavaVM(&mJavaVM) != JNI_OK,
"env->GetJavaVM failed");
diff --git a/core/jni/android/graphics/GraphicsJNI.h b/core/jni/android/graphics/GraphicsJNI.h
index 90f8291..e99a3ff 100644
--- a/core/jni/android/graphics/GraphicsJNI.h
+++ b/core/jni/android/graphics/GraphicsJNI.h
@@ -3,6 +3,8 @@
#include "Bitmap.h"
#include "SkBitmap.h"
+#include "SkBRDAllocator.h"
+#include "SkCodec.h"
#include "SkDevice.h"
#include "SkPixelRef.h"
#include "SkMallocPixelRef.h"
@@ -12,7 +14,7 @@
#include <Canvas.h>
#include <jni.h>
-class BitmapRegionDecoder;
+class SkBitmapRegionDecoder;
class SkCanvas;
namespace android {
@@ -90,7 +92,7 @@
static jobject createRegion(JNIEnv* env, SkRegion* region);
- static jobject createBitmapRegionDecoder(JNIEnv* env, BitmapRegionDecoder* bitmap);
+ static jobject createBitmapRegionDecoder(JNIEnv* env, SkBitmapRegionDecoder* bitmap);
static android::Bitmap* allocateJavaPixelRef(JNIEnv* env, SkBitmap* bitmap,
SkColorTable* ctable);
@@ -123,7 +125,7 @@
* ensure that the allocated buffer is properly accounted for with a
* reference in the heap (or a JNI global reference).
*/
-class JavaPixelAllocator : public SkBitmap::Allocator {
+class JavaPixelAllocator : public SkBRDAllocator {
public:
JavaPixelAllocator(JNIEnv* env);
~JavaPixelAllocator();
@@ -139,11 +141,78 @@
return result;
};
+ /**
+ * Indicates that this allocator allocates zero initialized
+ * memory.
+ */
+ SkCodec::ZeroInitialized zeroInit() const override { return SkCodec::kYes_ZeroInitialized; }
+
private:
JavaVM* mJavaVM;
android::Bitmap* mStorage = nullptr;
};
+/**
+ * Allocator to handle reusing bitmaps for BitmapRegionDecoder.
+ *
+ * The BitmapRegionDecoder documentation states that, if it is
+ * provided, the recycled bitmap will always be reused, clipping
+ * the decoded output to fit in the recycled bitmap if necessary.
+ * This allocator implements that behavior.
+ *
+ * Skia's SkBitmapRegionDecoder expects the memory that
+ * is allocated to be large enough to decode the entire region
+ * that is requested. It will decode directly into the memory
+ * that is provided.
+ *
+ * FIXME: BUG:25465958
+ * If the recycled bitmap is not large enough for the decode
+ * requested, meaning that a clip is required, we will allocate
+ * enough memory for Skia to perform the decode, and then copy
+ * from the decoded output into the recycled bitmap.
+ *
+ * If the recycled bitmap is large enough for the decode requested,
+ * we will provide that memory for Skia to decode directly into.
+ *
+ * This allocator should only be used for a single allocation.
+ * After we reuse the recycledBitmap once, it is dangerous to
+ * reuse it again, given that it still may be in use from our
+ * first allocation.
+ */
+class RecyclingClippingPixelAllocator : public SkBRDAllocator {
+public:
+
+ RecyclingClippingPixelAllocator(android::Bitmap* recycledBitmap,
+ size_t recycledBytes);
+
+ ~RecyclingClippingPixelAllocator();
+
+ virtual bool allocPixelRef(SkBitmap* bitmap, SkColorTable* ctable) override;
+
+ /**
+ * Must be called!
+ *
+ * In the event that the recycled bitmap is not large enough for
+ * the allocation requested, we will allocate memory on the heap
+ * instead. As a final step, once we are done using this memory,
+ * we will copy the contents of the heap memory into the recycled
+ * bitmap's memory, clipping as necessary.
+ */
+ void copyIfNecessary();
+
+ /**
+ * Indicates that this allocator does not allocate zero initialized
+ * memory.
+ */
+ SkCodec::ZeroInitialized zeroInit() const override { return SkCodec::kNo_ZeroInitialized; }
+
+private:
+ android::Bitmap* mRecycledBitmap;
+ const size_t mRecycledBytes;
+ SkBitmap* mSkiaBitmap;
+ bool mNeedsCopy;
+};
+
class AshmemPixelAllocator : public SkBitmap::Allocator {
public:
AshmemPixelAllocator(JNIEnv* env);
diff --git a/core/jni/android_util_Binder.cpp b/core/jni/android_util_Binder.cpp
index c139cd7..ae109c6 100644
--- a/core/jni/android_util_Binder.cpp
+++ b/core/jni/android_util_Binder.cpp
@@ -711,6 +711,9 @@
jniThrowException(env, "java/lang/RuntimeException",
"Not allowed to write file descriptors here");
break;
+ case UNEXPECTED_NULL:
+ jniThrowNullPointerException(env, NULL);
+ break;
case -EBADF:
jniThrowException(env, "java/lang/RuntimeException",
"Bad file descriptor");
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 2940f6c..ee493019 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -709,8 +709,8 @@
<!-- Required to be able to access the camera device.
<p>This will automatically enforce the <a
- href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code
- <uses-feature>}</a> manifest element for <em>all</em> camera features.
+ href="{@docRoot}guide/topics/manifest/uses-feature-element.html">
+ <uses-feature>}</a> manifest element for <em>all</em> camera features.
If you do not require all camera features or can properly operate if a camera
is not available, then you must modify your manifest as appropriate in order to
install on devices that don't support all camera features.</p>
@@ -2607,6 +2607,14 @@
<permission android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"
android:protectionLevel="signature" />
+ <!-- Must be required by an {@link
+ android.service.notification.NotificationAssistantService},
+ to ensure that only the system can bind to it.
+ <p>Protection level: signature
+ -->
+ <permission android:name="android.permission.BIND_NOTIFICATION_ASSISTANT_SERVICE"
+ android:protectionLevel="signature" />
+
<!-- Must be required by a {@link
android.service.chooser.ChooserTargetService}, to ensure that
only the system can bind to it.
@@ -2712,6 +2720,13 @@
<permission android:name="android.permission.DISPATCH_NFC_MESSAGE"
android:protectionLevel="signature|privileged" />
+ <!-- @SystemApi Allows changing day / night mode when system is configured with
+ config_lockDayNightMode set to true. If requesting app does not have permission,
+ it will be ignored.
+ @hide -->
+ <permission android:name="android.permission.MODIFY_DAY_NIGHT_MODE"
+ android:protectionLevel="signature|privileged" />
+
<!-- The system process is explicitly the only one allowed to launch the
confirmation UI for full backup/restore -->
<uses-permission android:name="android.permission.CONFIRM_FULL_BACKUP"/>
diff --git a/core/res/res/drawable-mdpi/pointer_alias_large.png b/core/res/res/drawable-mdpi/pointer_alias_large.png
new file mode 100644
index 0000000..283bf7f
--- /dev/null
+++ b/core/res/res/drawable-mdpi/pointer_alias_large.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/pointer_all_scroll_large.png b/core/res/res/drawable-mdpi/pointer_all_scroll_large.png
new file mode 100644
index 0000000..c29db87
--- /dev/null
+++ b/core/res/res/drawable-mdpi/pointer_all_scroll_large.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/pointer_arrow_large.png b/core/res/res/drawable-mdpi/pointer_arrow_large.png
new file mode 100644
index 0000000..9f59c4c
--- /dev/null
+++ b/core/res/res/drawable-mdpi/pointer_arrow_large.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/pointer_cell_large.png b/core/res/res/drawable-mdpi/pointer_cell_large.png
new file mode 100644
index 0000000..3dec5e5
--- /dev/null
+++ b/core/res/res/drawable-mdpi/pointer_cell_large.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/pointer_context_menu_large.png b/core/res/res/drawable-mdpi/pointer_context_menu_large.png
new file mode 100644
index 0000000..7c9e250
--- /dev/null
+++ b/core/res/res/drawable-mdpi/pointer_context_menu_large.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/pointer_copy_large.png b/core/res/res/drawable-mdpi/pointer_copy_large.png
new file mode 100644
index 0000000..18f4696
--- /dev/null
+++ b/core/res/res/drawable-mdpi/pointer_copy_large.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/pointer_crosshair_large.png b/core/res/res/drawable-mdpi/pointer_crosshair_large.png
new file mode 100644
index 0000000..ea1f5fc
--- /dev/null
+++ b/core/res/res/drawable-mdpi/pointer_crosshair_large.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/pointer_grab_large.png b/core/res/res/drawable-mdpi/pointer_grab_large.png
new file mode 100644
index 0000000..2e32766
--- /dev/null
+++ b/core/res/res/drawable-mdpi/pointer_grab_large.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/pointer_grabbing_large.png b/core/res/res/drawable-mdpi/pointer_grabbing_large.png
new file mode 100644
index 0000000..3c54751
--- /dev/null
+++ b/core/res/res/drawable-mdpi/pointer_grabbing_large.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/pointer_hand_large.png b/core/res/res/drawable-mdpi/pointer_hand_large.png
new file mode 100644
index 0000000..785047f
--- /dev/null
+++ b/core/res/res/drawable-mdpi/pointer_hand_large.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/pointer_help_large.png b/core/res/res/drawable-mdpi/pointer_help_large.png
new file mode 100644
index 0000000..6552f9bb
--- /dev/null
+++ b/core/res/res/drawable-mdpi/pointer_help_large.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/pointer_horizontal_double_arrow_large.png b/core/res/res/drawable-mdpi/pointer_horizontal_double_arrow_large.png
new file mode 100644
index 0000000..7086106
--- /dev/null
+++ b/core/res/res/drawable-mdpi/pointer_horizontal_double_arrow_large.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/pointer_nodrop_large.png b/core/res/res/drawable-mdpi/pointer_nodrop_large.png
new file mode 100644
index 0000000..da981df
--- /dev/null
+++ b/core/res/res/drawable-mdpi/pointer_nodrop_large.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/pointer_text_large.png b/core/res/res/drawable-mdpi/pointer_text_large.png
new file mode 100644
index 0000000..2fba190
--- /dev/null
+++ b/core/res/res/drawable-mdpi/pointer_text_large.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/pointer_top_left_diagonal_double_arrow_large.png b/core/res/res/drawable-mdpi/pointer_top_left_diagonal_double_arrow_large.png
new file mode 100644
index 0000000..eecaa89
--- /dev/null
+++ b/core/res/res/drawable-mdpi/pointer_top_left_diagonal_double_arrow_large.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/pointer_top_right_diagonal_double_arrow_large.png b/core/res/res/drawable-mdpi/pointer_top_right_diagonal_double_arrow_large.png
new file mode 100644
index 0000000..9d47ecf
--- /dev/null
+++ b/core/res/res/drawable-mdpi/pointer_top_right_diagonal_double_arrow_large.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/pointer_vertical_double_arrow_large.png b/core/res/res/drawable-mdpi/pointer_vertical_double_arrow_large.png
new file mode 100644
index 0000000..fd777b1
--- /dev/null
+++ b/core/res/res/drawable-mdpi/pointer_vertical_double_arrow_large.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/pointer_vertical_text_large.png b/core/res/res/drawable-mdpi/pointer_vertical_text_large.png
new file mode 100644
index 0000000..1cbe49a
--- /dev/null
+++ b/core/res/res/drawable-mdpi/pointer_vertical_text_large.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/pointer_zoom_in_large.png b/core/res/res/drawable-mdpi/pointer_zoom_in_large.png
new file mode 100644
index 0000000..923ad79
--- /dev/null
+++ b/core/res/res/drawable-mdpi/pointer_zoom_in_large.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/pointer_zoom_out_large.png b/core/res/res/drawable-mdpi/pointer_zoom_out_large.png
new file mode 100644
index 0000000..aa47eb9
--- /dev/null
+++ b/core/res/res/drawable-mdpi/pointer_zoom_out_large.png
Binary files differ
diff --git a/core/res/res/drawable/pointer_alias_large_icon.xml b/core/res/res/drawable/pointer_alias_large_icon.xml
new file mode 100644
index 0000000..149f58c
--- /dev/null
+++ b/core/res/res/drawable/pointer_alias_large_icon.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
+ android:bitmap="@drawable/pointer_alias_large"
+ android:hotSpotX="19dp"
+ android:hotSpotY="11dp" />
diff --git a/core/res/res/drawable/pointer_all_scroll_large_icon.xml b/core/res/res/drawable/pointer_all_scroll_large_icon.xml
new file mode 100644
index 0000000..c580f76
--- /dev/null
+++ b/core/res/res/drawable/pointer_all_scroll_large_icon.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
+ android:bitmap="@drawable/pointer_all_scroll_large"
+ android:hotSpotX="32dp"
+ android:hotSpotY="31dp" />
diff --git a/core/res/res/drawable/pointer_arrow_large_icon.xml b/core/res/res/drawable/pointer_arrow_large_icon.xml
new file mode 100644
index 0000000..22c7bfe
--- /dev/null
+++ b/core/res/res/drawable/pointer_arrow_large_icon.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
+ android:bitmap="@drawable/pointer_arrow_large"
+ android:hotSpotX="10dp"
+ android:hotSpotY="10dp" />
diff --git a/core/res/res/drawable/pointer_cell_large_icon.xml b/core/res/res/drawable/pointer_cell_large_icon.xml
new file mode 100644
index 0000000..f2530b7
--- /dev/null
+++ b/core/res/res/drawable/pointer_cell_large_icon.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
+ android:bitmap="@drawable/pointer_cell_large"
+ android:hotSpotX="30dp"
+ android:hotSpotY="30dp" />
diff --git a/core/res/res/drawable/pointer_context_menu_large_icon.xml b/core/res/res/drawable/pointer_context_menu_large_icon.xml
new file mode 100644
index 0000000..c57e615
--- /dev/null
+++ b/core/res/res/drawable/pointer_context_menu_large_icon.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
+ android:bitmap="@drawable/pointer_context_menu_large"
+ android:hotSpotX="11dp"
+ android:hotSpotY="11dp" />
diff --git a/core/res/res/drawable/pointer_copy_large_icon.xml b/core/res/res/drawable/pointer_copy_large_icon.xml
new file mode 100644
index 0000000..4ee3f18
--- /dev/null
+++ b/core/res/res/drawable/pointer_copy_large_icon.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
+ android:bitmap="@drawable/pointer_copy_large"
+ android:hotSpotX="10dp"
+ android:hotSpotY="10dp" />
diff --git a/core/res/res/drawable/pointer_crosshair_large_icon.xml b/core/res/res/drawable/pointer_crosshair_large_icon.xml
new file mode 100644
index 0000000..6a71b7b
--- /dev/null
+++ b/core/res/res/drawable/pointer_crosshair_large_icon.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
+ android:bitmap="@drawable/pointer_crosshair_large"
+ android:hotSpotX="31dp"
+ android:hotSpotY="30dp" />
diff --git a/core/res/res/drawable/pointer_grab_large_icon.xml b/core/res/res/drawable/pointer_grab_large_icon.xml
new file mode 100644
index 0000000..f2df1cb
--- /dev/null
+++ b/core/res/res/drawable/pointer_grab_large_icon.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
+ android:bitmap="@drawable/pointer_grab_large"
+ android:hotSpotX="21dp"
+ android:hotSpotY="11dp" />
diff --git a/core/res/res/drawable/pointer_grabbing_large_icon.xml b/core/res/res/drawable/pointer_grabbing_large_icon.xml
new file mode 100644
index 0000000..e4042bf
--- /dev/null
+++ b/core/res/res/drawable/pointer_grabbing_large_icon.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
+ android:bitmap="@drawable/pointer_grabbing_large"
+ android:hotSpotX="20dp"
+ android:hotSpotY="12dp" />
diff --git a/core/res/res/drawable/pointer_hand_large_icon.xml b/core/res/res/drawable/pointer_hand_large_icon.xml
new file mode 100644
index 0000000..e34422a
--- /dev/null
+++ b/core/res/res/drawable/pointer_hand_large_icon.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
+ android:bitmap="@drawable/pointer_hand_large"
+ android:hotSpotX="25dp"
+ android:hotSpotY="7dp" />
diff --git a/core/res/res/drawable/pointer_help_large_icon.xml b/core/res/res/drawable/pointer_help_large_icon.xml
new file mode 100644
index 0000000..4c60a55
--- /dev/null
+++ b/core/res/res/drawable/pointer_help_large_icon.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
+ android:bitmap="@drawable/pointer_help_large"
+ android:hotSpotX="10dp"
+ android:hotSpotY="11dp" />
diff --git a/core/res/res/drawable/pointer_horizontal_double_arrow_large_icon.xml b/core/res/res/drawable/pointer_horizontal_double_arrow_large_icon.xml
new file mode 100644
index 0000000..a2039e6
--- /dev/null
+++ b/core/res/res/drawable/pointer_horizontal_double_arrow_large_icon.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
+ android:bitmap="@drawable/pointer_horizontal_double_arrow_large"
+ android:hotSpotX="35dp"
+ android:hotSpotY="29dp" />
diff --git a/core/res/res/drawable/pointer_nodrop_large_icon.xml b/core/res/res/drawable/pointer_nodrop_large_icon.xml
new file mode 100644
index 0000000..cde2e41
--- /dev/null
+++ b/core/res/res/drawable/pointer_nodrop_large_icon.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
+ android:bitmap="@drawable/pointer_nodrop_large"
+ android:hotSpotX="10dp"
+ android:hotSpotY="10dp" />
diff --git a/core/res/res/drawable/pointer_text_large_icon.xml b/core/res/res/drawable/pointer_text_large_icon.xml
new file mode 100644
index 0000000..24d35b0
--- /dev/null
+++ b/core/res/res/drawable/pointer_text_large_icon.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
+ android:bitmap="@drawable/pointer_text_large"
+ android:hotSpotX="30dp"
+ android:hotSpotY="32dp" />
diff --git a/core/res/res/drawable/pointer_top_left_diagonal_double_arrow_large_icon.xml b/core/res/res/drawable/pointer_top_left_diagonal_double_arrow_large_icon.xml
new file mode 100644
index 0000000..270ccc9
--- /dev/null
+++ b/core/res/res/drawable/pointer_top_left_diagonal_double_arrow_large_icon.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
+ android:bitmap="@drawable/pointer_top_left_diagonal_double_arrow_large"
+ android:hotSpotX="32dp"
+ android:hotSpotY="30dp" />
diff --git a/core/res/res/drawable/pointer_top_right_diagonal_double_arrow_large_icon.xml b/core/res/res/drawable/pointer_top_right_diagonal_double_arrow_large_icon.xml
new file mode 100644
index 0000000..e350a438
--- /dev/null
+++ b/core/res/res/drawable/pointer_top_right_diagonal_double_arrow_large_icon.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
+ android:bitmap="@drawable/pointer_top_right_diagonal_double_arrow_large"
+ android:hotSpotX="32dp"
+ android:hotSpotY="31dp" />
diff --git a/core/res/res/drawable/pointer_vertical_double_arrow_large_icon.xml b/core/res/res/drawable/pointer_vertical_double_arrow_large_icon.xml
new file mode 100644
index 0000000..65728ad
--- /dev/null
+++ b/core/res/res/drawable/pointer_vertical_double_arrow_large_icon.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
+ android:bitmap="@drawable/pointer_vertical_double_arrow_large"
+ android:hotSpotX="29dp"
+ android:hotSpotY="32dp" />
diff --git a/core/res/res/drawable/pointer_vertical_text_large_icon.xml b/core/res/res/drawable/pointer_vertical_text_large_icon.xml
new file mode 100644
index 0000000..48211cb
--- /dev/null
+++ b/core/res/res/drawable/pointer_vertical_text_large_icon.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
+ android:bitmap="@drawable/pointer_vertical_text_large"
+ android:hotSpotX="32dp"
+ android:hotSpotY="30dp" />
diff --git a/core/res/res/drawable/pointer_zoom_in_large_icon.xml b/core/res/res/drawable/pointer_zoom_in_large_icon.xml
new file mode 100644
index 0000000..3eb89f56
--- /dev/null
+++ b/core/res/res/drawable/pointer_zoom_in_large_icon.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
+ android:bitmap="@drawable/pointer_zoom_in_large"
+ android:hotSpotX="25dp"
+ android:hotSpotY="26dp" />
diff --git a/core/res/res/drawable/pointer_zoom_out_large_icon.xml b/core/res/res/drawable/pointer_zoom_out_large_icon.xml
new file mode 100644
index 0000000..df6412e
--- /dev/null
+++ b/core/res/res/drawable/pointer_zoom_out_large_icon.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
+ android:bitmap="@drawable/pointer_zoom_out_large"
+ android:hotSpotX="26dp"
+ android:hotSpotY="26dp" />
diff --git a/core/res/res/layout/search_view.xml b/core/res/res/layout/search_view.xml
index b5b5b27..718e4a2 100644
--- a/core/res/res/layout/search_view.xml
+++ b/core/res/res/layout/search_view.xml
@@ -81,7 +81,6 @@
android:layout_height="36dip"
android:layout_width="0dp"
android:layout_weight="1"
- android:minWidth="@dimen/search_view_text_min_width"
android:layout_gravity="bottom"
android:paddingStart="@dimen/dropdownitem_text_padding_left"
android:paddingEnd="@dimen/dropdownitem_text_padding_right"
@@ -113,7 +112,7 @@
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="match_parent">
-
+
<ImageView
android:id="@+id/search_go_btn"
android:layout_width="wrap_content"
diff --git a/core/res/res/values-large/dimens.xml b/core/res/res/values-large/dimens.xml
index 8cd614d..69a1aa1 100644
--- a/core/res/res/values-large/dimens.xml
+++ b/core/res/res/values-large/dimens.xml
@@ -24,9 +24,6 @@
<!-- keyboardHeight = key_height*4 + key_bottom_gap*3 -->
<dimen name="password_keyboard_height">48.0mm</dimen>
- <!-- Minimum width of the search view text entry area. -->
- <dimen name="search_view_text_min_width">192dip</dimen>
-
<item type="dimen" name="dialog_min_width_major">55%</item>
<item type="dimen" name="dialog_min_width_minor">80%</item>
diff --git a/core/res/res/values-mcc302-mnc220/config.xml b/core/res/res/values-mcc302-mnc220/config.xml
index 09a63aa..454e4b6 100644
--- a/core/res/res/values-mcc302-mnc220/config.xml
+++ b/core/res/res/values-mcc302-mnc220/config.xml
@@ -37,7 +37,7 @@
Or string format of ApnSettingV3.
note that empty fields can be ommitted: "name,apn,,,,,,,,,310,260,,DUN" -->
<string-array translatable="false" name="config_tether_apndata">
- <item>[ApnSettingV3]TELUS ISP,isp.telus.com,,,,,,,,,302,220,,DUN,,,true,0,,,,,,,gid,54</item>
+ <item>[ApnSettingV3]TELUS ISP,isp.telus.com,,,,,,,,,302,220,,DUN,IP,IP,true,0,,,,,,,gid,54</item>
<item>[ApnSettingV3]Tethered Mobile Internet,isp.mb.com,,,,,,,,,302,220,,DUN,,,true,0,,,,,,,gid,50</item>
<item>[ApnSettingV3]Tethered Public Mobile,isp.mb.com,,,,,,,,,302,220,,DUN,,,true,0,,,,,,,gid,4D4F</item>
</string-array>
diff --git a/core/res/res/values-w480dp/bools.xml b/core/res/res/values-w480dp/bools.xml
index 3a463a6..c7df562 100644
--- a/core/res/res/values-w480dp/bools.xml
+++ b/core/res/res/values-w480dp/bools.xml
@@ -17,6 +17,5 @@
*/
-->
<resources>
- <bool name="action_bar_embed_tabs_pre_jb">true</bool>
<bool name="split_action_bar_is_narrow">false</bool>
</resources>
diff --git a/core/res/res/values-w480dp/config.xml b/core/res/res/values-w480dp/config.xml
deleted file mode 100644
index 269a9b4..0000000
--- a/core/res/res/values-w480dp/config.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2011, 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.
-*/
--->
-<resources>
- <bool name="config_allowActionMenuItemTextWithIcon">true</bool>
-</resources>
diff --git a/core/res/res/values-xlarge-land/dimens.xml b/core/res/res/values-xlarge-land/dimens.xml
index 0b43a42..3812178 100644
--- a/core/res/res/values-xlarge-land/dimens.xml
+++ b/core/res/res/values-xlarge-land/dimens.xml
@@ -20,6 +20,4 @@
<!-- Default height of a key in the password keyboard for alpha -->
<dimen name="password_keyboard_key_height_alpha">100dip</dimen>
<dimen name="password_keyboard_key_height_numeric">75dip</dimen>
- <!-- Minimum width of the search view text entry area. -->
- <dimen name="search_view_text_min_width">256dip</dimen>
</resources>
diff --git a/core/res/res/values-xlarge/dimens.xml b/core/res/res/values-xlarge/dimens.xml
index 29cea26..b13e74a 100644
--- a/core/res/res/values-xlarge/dimens.xml
+++ b/core/res/res/values-xlarge/dimens.xml
@@ -25,9 +25,6 @@
<!-- keyboardHeight = key_height*4 + key_bottom_gap*3 -->
<dimen name="password_keyboard_height">48.0mm</dimen>
- <!-- Minimum width of the search view text entry area. -->
- <dimen name="search_view_text_min_width">192dip</dimen>
-
<item type="dimen" name="dialog_min_width_major">45%</item>
<item type="dimen" name="dialog_min_width_minor">72%</item>
</resources>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index f9f8162..34a66d0 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -1026,9 +1026,6 @@
<!-- ============== -->
<eat-comment />
- <!-- Reference to the Pointer style -->
- <attr name="pointerStyle" format="reference" />
-
<!-- The drawable for accessibility focused views. -->
<attr name="accessibilityFocusedDrawable" format="reference" />
diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml
index 67933cd..2a11081 100644
--- a/core/res/res/values/attrs_manifest.xml
+++ b/core/res/res/values/attrs_manifest.xml
@@ -634,7 +634,7 @@
specified, it will run in the current preferred orientation
of the screen.
<p>This attribute is supported by the <a
- href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
+ href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
element. -->
<attr name="screenOrientation">
<!-- No preference specified: let the system decide the best
@@ -923,8 +923,8 @@
<enum name="preferExternal" value="2" />
</attr>
- <!-- Extra options for an activity's UI. Applies to either the {@code <activity>} or
- {@code <application>} tag. If specified on the {@code <application>}
+ <!-- Extra options for an activity's UI. Applies to either the {@code <activity>} or
+ {@code <application>} tag. If specified on the {@code <application>}
tag these will be considered defaults for all activities in the
application. -->
<attr name="uiOptions">
diff --git a/core/res/res/values/bools.xml b/core/res/res/values/bools.xml
index 457131a..5c50e73 100644
--- a/core/res/res/values/bools.xml
+++ b/core/res/res/values/bools.xml
@@ -19,7 +19,6 @@
<bool name="kg_center_small_widgets_vertically">false</bool>
<bool name="kg_top_align_page_shrink_on_bouncer_visible">true</bool>
<bool name="action_bar_embed_tabs">true</bool>
- <bool name="action_bar_embed_tabs_pre_jb">false</bool>
<bool name="split_action_bar_is_narrow">true</bool>
<bool name="preferences_prefer_dual_pane">false</bool>
<bool name="show_ongoing_ime_switcher">true</bool>
diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml
index dad68ba..af8ff2e 100644
--- a/core/res/res/values/colors.xml
+++ b/core/res/res/values/colors.xml
@@ -173,4 +173,7 @@
<color name="Red_800">#ffb93221</color>
<color name="chooser_service_row_background_color">#fff5f5f5</color>
+
+ <!-- Status bar color for semi transparent mode. -->
+ <color name="system_bar_background_semi_transparent">#66000000</color> <!-- 40% black -->
</resources>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index d9e0472..decb1ef 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -716,6 +716,13 @@
<bool name="config_carDockEnablesAccelerometer">true</bool>
+ <!-- Control whether to launch Car dock home app when user presses home button or when
+ car dock intent is fired.
+ In mobile device, usually separate home app is expected in car mode, and this should be
+ enabled. But in environments like real car, default home app may be enough, and in that
+ case, this can be disabled (set to false). -->
+ <bool name="config_enableCarDockHomeLaunch">true</bool>
+
<!-- HDMI behavior -->
<!-- The number of degrees to rotate the display when the device has HDMI connected
@@ -733,6 +740,15 @@
Any other values will have surprising consequences. -->
<integer name="config_defaultUiModeType">1</integer>
+ <!-- Control whether to lock UI mode to what is selected from config_defaultUiModeType.
+ Once UI mode is locked, applications cannot change it anymore. -->
+ <bool name="config_lockUiMode">false</bool>
+
+ <!-- Control whether to lock day/night mode change from normal application. When it is
+ true, day / night mode change is only allowed to apps with MODIFY_DAY_NIGHT_MODE
+ permission. -->
+ <bool name="config_lockDayNightMode">false</bool>
+
<!-- Control the default night mode to use when there is no other mode override set.
One of the following values (see UiModeManager.java):
0 - MODE_NIGHT_AUTO
@@ -1521,11 +1537,6 @@
it should be disabled in that locale's resources. -->
<bool name="config_actionMenuItemAllCaps">true</bool>
- <!-- Whether action menu items should obey the "withText" showAsAction
- flag. This may be set to false for situations where space is
- extremely limited. -->
- <bool name="config_allowActionMenuItemTextWithIcon">false</bool>
-
<!-- Remote server that can provide NTP responses. -->
<string translatable="false" name="config_ntpServer">2.android.pool.ntp.org</string>
<!-- Normal polling frequency in milliseconds -->
@@ -1949,6 +1960,7 @@
<item>com.android.server.notification.TopicPriorityExtractor</item>
<item>com.android.server.notification.NotificationIntrusivenessExtractor</item>
<item>com.android.server.notification.TopicVisibilityExtractor</item>
+ <item>com.android.server.notification.TopicImportanceExtractor</item>
</string-array>
<!-- Flag indicating that this device does not rotate and will always remain in its default
@@ -2384,4 +2396,9 @@
The duplication is necessary, because this information is used before the features are
available to the system.-->
<bool name="config_freeformWindowManagement">false</bool>
+
+ <!-- If set, this will force all windows to draw the status bar background, including the apps
+ that have not requested doing so (via the WindowManager.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS
+ flag). -->
+ <bool name="config_forceWindowDrawsStatusBarBackground">true</bool>
</resources>
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index 7b4becc..b167711 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -162,9 +162,6 @@
<!-- The minimum height of the content if there is a picture present with big picture -->
<dimen name="notification_big_picture_content_min_height_with_picture">41dp</dimen>
- <!-- Minimum width of the search view text entry area. -->
- <dimen name="search_view_text_min_width">160dip</dimen>
-
<!-- Preferred width of the search view. -->
<dimen name="search_view_preferred_width">320dip</dimen>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index d6dd842..e5415df 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -3954,6 +3954,22 @@
<!-- [CHAR_LIMIT=NONE] Battery saver: Feature description -->
<string name="battery_saver_description">To help improve battery life, battery saver reduces your device’s performance and limits vibration, location services, and most background data. Email, messaging, and other apps that rely on syncing may not update unless you open them.\n\nBattery saver turns off automatically when your device is charging.</string>
+
+ <!-- [CHAR LIMIT=100] Notification Importance slider: blocked importance level description -->
+ <string name="notification_importance_blocked">Blocked: Never show these notifications</string>
+
+ <!-- [CHAR LIMIT=100] Notification Importance slider: low importance level description -->
+ <string name="notification_importance_low">Low: Silently show at the bottom of the notification list</string>
+
+ <!-- [CHAR LIMIT=100] Notification Importance slider: normal importance level description -->
+ <string name="notification_importance_default">Normal: Silently show these notifications</string>
+
+ <!-- [CHAR LIMIT=100] Notification Importance slider: high importance level description -->
+ <string name="notification_importance_high">High: Show at the top of the notifications list and make sound</string>
+
+ <!-- [CHAR LIMIT=100] Notification Importance slider: max importance level description -->
+ <string name="notification_importance_max">Urgent: Peek onto the screen and make sound</string>
+
<!-- Zen mode condition - summary: time duration in minutes. [CHAR LIMIT=NONE] -->
<plurals name="zen_mode_duration_minutes_summary">
<item quantity="one">For one minute (until <xliff:g id="formattedTime" example="10:00 PM">%2$s</xliff:g>)</item>
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index e6f279d..9a4016b 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -1368,6 +1368,42 @@
<item name="pointerIconGrabbing">@drawable/pointer_grabbing_icon</item>
</style>
+ <style name="LargePointer">
+ <item name="pointerIconArrow">@drawable/pointer_arrow_large_icon</item>
+ <item name="pointerIconSpotHover">@drawable/pointer_spot_hover_icon</item>
+ <item name="pointerIconSpotTouch">@drawable/pointer_spot_touch_icon</item>
+ <item name="pointerIconSpotAnchor">@drawable/pointer_spot_anchor_icon</item>
+ <item name="pointerIconHand">@drawable/pointer_hand_large_icon</item>
+ <item name="pointerIconContextMenu">@drawable/pointer_context_menu_large_icon</item>
+ <item name="pointerIconHelp">@drawable/pointer_help_large_icon</item>
+ <!-- TODO: create large wait icon. -->
+ <item name="pointerIconWait">@drawable/pointer_wait_icon</item>
+ <item name="pointerIconCell">@drawable/pointer_cell_large_icon</item>
+ <item name="pointerIconCrosshair">@drawable/pointer_crosshair_large_icon</item>
+ <item name="pointerIconText">@drawable/pointer_text_large_icon</item>
+ <item name="pointerIconVerticalText">@drawable/pointer_vertical_text_large_icon</item>
+ <item name="pointerIconAlias">@drawable/pointer_alias_large_icon</item>
+ <item name="pointerIconCopy">@drawable/pointer_copy_large_icon</item>
+ <item name="pointerIconAllScroll">@drawable/pointer_all_scroll_large_icon</item>
+ <item name="pointerIconNodrop">@drawable/pointer_nodrop_large_icon</item>
+ <item name="pointerIconHorizontalDoubleArrow">
+ @drawable/pointer_horizontal_double_arrow_large_icon
+ </item>
+ <item name="pointerIconVerticalDoubleArrow">
+ @drawable/pointer_vertical_double_arrow_large_icon
+ </item>
+ <item name="pointerIconTopRightDiagonalDoubleArrow">
+ @drawable/pointer_top_right_diagonal_double_arrow_large_icon
+ </item>
+ <item name="pointerIconTopLeftDiagonalDoubleArrow">
+ @drawable/pointer_top_left_diagonal_double_arrow_large_icon
+ </item>
+ <item name="pointerIconZoomIn">@drawable/pointer_zoom_in_large_icon</item>
+ <item name="pointerIconZoomOut">@drawable/pointer_zoom_out_large_icon</item>
+ <item name="pointerIconGrab">@drawable/pointer_grab_large_icon</item>
+ <item name="pointerIconGrabbing">@drawable/pointer_grabbing_large_icon</item>
+ </style>
+
<!-- Wifi dialog styles -->
<!-- @hide -->
<style name="wifi_item">
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 3860f68..d92adc2 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -227,7 +227,6 @@
<java-symbol type="attr" name="gestureOverlayViewStyle" />
<java-symbol type="attr" name="keyboardViewStyle" />
<java-symbol type="attr" name="numberPickerStyle" />
- <java-symbol type="attr" name="pointerStyle" />
<java-symbol type="attr" name="preferenceFrameLayoutStyle" />
<java-symbol type="attr" name="searchDialogTheme" />
<java-symbol type="attr" name="textAppearanceAutoCorrectionSuggestion" />
@@ -243,10 +242,8 @@
<java-symbol type="attr" name="isLightTheme"/>
<java-symbol type="bool" name="action_bar_embed_tabs" />
- <java-symbol type="bool" name="action_bar_embed_tabs_pre_jb" />
<java-symbol type="bool" name="action_bar_expanded_action_views_exclusive" />
<java-symbol type="bool" name="config_avoidGfxAccel" />
- <java-symbol type="bool" name="config_allowActionMenuItemTextWithIcon" />
<java-symbol type="bool" name="config_bluetooth_address_validation" />
<java-symbol type="bool" name="config_bluetooth_sco_off_call" />
<java-symbol type="bool" name="config_bluetooth_le_peripheral_mode_supported" />
@@ -1424,6 +1421,8 @@
<java-symbol type="style" name="Theme.DeviceDefault.Dialog.NoFrame" />
<java-symbol type="style" name="Theme.IconMenu" />
<java-symbol type="style" name="Theme.DeviceDefault.VoiceInteractionSession" />
+ <java-symbol type="style" name="Pointer" />
+ <java-symbol type="style" name="LargePointer" />
<java-symbol type="attr" name="mediaRouteButtonStyle" />
<java-symbol type="attr" name="externalRouteEnabledDrawable" />
@@ -1476,11 +1475,14 @@
<java-symbol type="bool" name="config_carDockEnablesAccelerometer" />
<java-symbol type="bool" name="config_deskDockEnablesAccelerometer" />
<java-symbol type="bool" name="config_disableMenuKeyInLockScreen" />
+ <java-symbol type="bool" name="config_enableCarDockHomeLaunch" />
<java-symbol type="bool" name="config_enableLockBeforeUnlockScreen" />
<java-symbol type="bool" name="config_enableLockScreenRotation" />
<java-symbol type="bool" name="config_enableLockScreenTranslucentDecor" />
<java-symbol type="bool" name="config_enableTranslucentDecor" />
<java-symbol type="bool" name="config_lidControlsSleep" />
+ <java-symbol type="bool" name="config_lockDayNightMode" />
+ <java-symbol type="bool" name="config_lockUiMode" />
<java-symbol type="bool" name="config_reverseDefaultRotation" />
<java-symbol type="bool" name="config_showNavigationBar" />
<java-symbol type="bool" name="config_supportAutoRotation" />
@@ -2084,6 +2086,11 @@
<java-symbol type="array" name="config_system_condition_providers" />
<java-symbol type="string" name="muted_by" />
<java-symbol type="string" name="zen_mode_alarm" />
+ <java-symbol type="string" name="notification_importance_blocked" />
+ <java-symbol type="string" name="notification_importance_low" />
+ <java-symbol type="string" name="notification_importance_default" />
+ <java-symbol type="string" name="notification_importance_high" />
+ <java-symbol type="string" name="notification_importance_max" />
<java-symbol type="string" name="select_day" />
<java-symbol type="string" name="select_year" />
@@ -2344,6 +2351,8 @@
<java-symbol type="string" name="config_packagedKeyboardName" />
<java-symbol type="string" name="default_notification_topic_label" />
+ <java-symbol type="bool" name="config_forceWindowDrawsStatusBarBackground" />
+ <java-symbol type="color" name="system_bar_background_semi_transparent" />
<!-- EditText suggestion popup. -->
<java-symbol type="id" name="suggestionContainer" />
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index d56674a..bf7718e 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -428,9 +428,6 @@
<item name="fastScrollOverlayPosition">floating</item>
<item name="fastScrollTextColor">@color/primary_text_dark</item>
- <!-- Pointer style -->
- <item name="pointerStyle">@style/Pointer</item>
-
<!-- Accessibility focused drawable -->
<item name="accessibilityFocusedDrawable">@drawable/view_accessibility_focused</item>
diff --git a/core/res/res/values/themes_holo.xml b/core/res/res/values/themes_holo.xml
index d9599b3..4cbaacb 100644
--- a/core/res/res/values/themes_holo.xml
+++ b/core/res/res/values/themes_holo.xml
@@ -46,7 +46,7 @@
with API level 14, the default system theme is supplied by {@link #Theme_DeviceDefault},
which might apply a different style on different devices. If you want to ensure that your
app consistently uses the Holo theme at all times, you must explicitly declare it in your
- manifest. For example, {@code <application android:theme="@android:style/Theme.Holo">}.
+ manifest. For example, {@code <application android:theme="@android:style/Theme.Holo">}.
For more information, read <a
href="http://android-developers.blogspot.com/2012/01/holo-everywhere.html">Holo
Everywhere</a>.</p>
diff --git a/core/res/res/values/themes_material.xml b/core/res/res/values/themes_material.xml
index a5b8476..b011094 100644
--- a/core/res/res/values/themes_material.xml
+++ b/core/res/res/values/themes_material.xml
@@ -33,7 +33,7 @@
<!-- Material theme (dark version).
<p>If you want to ensure that your
app consistently uses the Material theme at all times, you must explicitly declare it in your
- manifest. For example, {@code <application android:theme="@style/Theme.Material">}.
+ manifest. For example, {@code <application android:theme="@style/Theme.Material">}.
<p>Styles used by the Material theme are named using the convention Type.Material.Etc
(for example, {@code Widget.Material.Button} and {@code
diff --git a/core/res/res/xml/sms_short_codes.xml b/core/res/res/xml/sms_short_codes.xml
index 5783a49..5f1f927 100644
--- a/core/res/res/xml/sms_short_codes.xml
+++ b/core/res/res/xml/sms_short_codes.xml
@@ -187,6 +187,6 @@
<!-- USA: 5-6 digits (premium codes from https://www.premiumsmsrefunds.com/ShortCodes.htm),
visual voicemail code for T-Mobile: 122 -->
- <shortcode country="us" pattern="\\d{5,6}" premium="20433|21(?:344|472)|22715|23(?:333|847)|24(?:15|28)0|25209|27(?:449|606|663)|28498|305(?:00|83)|32(?:340|941)|33(?:166|786|849)|34746|35(?:182|564)|37975|38(?:135|146|254)|41(?:366|463)|42335|43(?:355|500)|44(?:578|711|811)|45814|46(?:157|173|327)|46666|47553|48(?:221|277|669)|50(?:844|920)|51(?:062|368)|52944|54(?:723|892)|55928|56483|57370|59(?:182|187|252|342)|60339|61(?:266|982)|62478|64(?:219|898)|65(?:108|500)|69(?:208|388)|70877|71851|72(?:078|087|465)|73(?:288|588|882|909|997)|74(?:034|332|815)|76426|79213|81946|83177|84(?:103|685)|85797|86(?:234|236|666)|89616|90(?:715|842|938)|91(?:362|958)|94719|95297|96(?:040|666|835|969)|97(?:142|294|688)|99(?:689|796|807)" free="122|87902" />
+ <shortcode country="us" pattern="\\d{5,6}" premium="20433|21(?:344|472)|22715|23(?:333|847)|24(?:15|28)0|25209|27(?:449|606|663)|28498|305(?:00|83)|32(?:340|941)|33(?:166|786|849)|34746|35(?:182|564)|37975|38(?:135|146|254)|41(?:366|463)|42335|43(?:355|500)|44(?:578|711|811)|45814|46(?:157|173|327|654)|46666|47553|48(?:221|277|669)|50(?:844|920)|51(?:062|368)|52944|54(?:723|892)|55928|56483|57370|59(?:182|187|252|342)|60339|61(?:266|982)|62478|64(?:219|898)|65(?:108|500)|69(?:208|388)|70877|71851|72(?:078|087|465)|73(?:288|588|882|909|997)|74(?:034|332|815)|76426|79213|81946|83177|84(?:103|685)|85797|86(?:234|236|666)|89616|90(?:715|842|938)|91(?:362|958)|94719|95297|96(?:040|666|835|969)|97(?:142|294|688)|99(?:689|796|807)" free="122|87902" />
</shortcodes>
diff --git a/core/tests/coretests/apks/keyset/permUse/AndroidManifest.xml b/core/tests/coretests/apks/keyset/permUse/AndroidManifest.xml
index b7645b0..c56079f8 100644
--- a/core/tests/coretests/apks/keyset/permUse/AndroidManifest.xml
+++ b/core/tests/coretests/apks/keyset/permUse/AndroidManifest.xml
@@ -21,11 +21,11 @@
<key-sets>
<key-set android:name="A">
<public-key android:name="keyA"
- android:value="MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJoN1Nsgqf0V4C/bbN8wo8O2X/S5D76+5Mb9mlIsHkUTUTbHCNk+LxHIUYLm89YbP9zImrV0bUHLUAZUyoMUCiMCAwEAAQ=="/>
+ android:value="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsMpNthdOxud7roPDZMMomOqXgJJdRfIWpkKEqmC61Mv+Nf6QY3TorEwJeghjSmqj7IbBKrtvfQq4E2XJO1HuspmQO4Ng2gvn+r+6EwNfKc9k55d6s+27SR867jKurBbHNtZMG+tjL1yH4r+tNzcuJCsgyAFqLmxFdcxEwzNvREyRpoYc5RDR0mmTwkMCUhJ6CId1EYEKiCEdNzxv+fWPEb21u+/MWpleGCILs8kglRVb2q/WOzAAvGr4FY5plfaE6N+lr7+UschQ+aMi1+uqewo2o0qPFVmZP5hnwj55K4UMzu/NhhDqQQsX4cSGES1KgHo5MTqRqZjN/I7emw5pFQIDAQAB"/>
</key-set>
<key-set android:name="B">
<public-key android:name="keyB"
- android:value="MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMTfQsY8UuXiXmvw/y7Tpr7HoyfAC0nE/8Qdk3ZtEr9asa5qqP0F6xzCI1PGVFV+WLVRwm6FdB9StENL5EKyQFcCAwEAAQ==" />
+ android:value="MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEtGr5cL2N7ztHiHmphB1/1eq+43lEAmP36iiEJAfX+cVReGSPFXqNnnM8Vptd2boAe332lrFw9rKPmbkZA+jOTA==" />
</key-set>
<upgrade-key-set android:name="A"/>
<upgrade-key-set android:name="B"/>
diff --git a/core/tests/coretests/apks/keyset/uA/AndroidManifest.xml b/core/tests/coretests/apks/keyset/uA/AndroidManifest.xml
index f31b75f..8c440f5 100644
--- a/core/tests/coretests/apks/keyset/uA/AndroidManifest.xml
+++ b/core/tests/coretests/apks/keyset/uA/AndroidManifest.xml
@@ -20,7 +20,7 @@
<key-sets>
<key-set android:name="A" >
<public-key android:name="keyA"
- android:value="MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJoN1Nsgqf0V4C/bbN8wo8O2X/S5D76+5Mb9mlIsHkUTUTbHCNk+LxHIUYLm89YbP9zImrV0bUHLUAZUyoMUCiMCAwEAAQ=="/>
+ android:value="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsMpNthdOxud7roPDZMMomOqXgJJdRfIWpkKEqmC61Mv+Nf6QY3TorEwJeghjSmqj7IbBKrtvfQq4E2XJO1HuspmQO4Ng2gvn+r+6EwNfKc9k55d6s+27SR867jKurBbHNtZMG+tjL1yH4r+tNzcuJCsgyAFqLmxFdcxEwzNvREyRpoYc5RDR0mmTwkMCUhJ6CId1EYEKiCEdNzxv+fWPEb21u+/MWpleGCILs8kglRVb2q/WOzAAvGr4FY5plfaE6N+lr7+UschQ+aMi1+uqewo2o0qPFVmZP5hnwj55K4UMzu/NhhDqQQsX4cSGES1KgHo5MTqRqZjN/I7emw5pFQIDAQAB"/>
</key-set>
<upgrade-key-set android:name="A"/>
</key-sets>
diff --git a/core/tests/coretests/apks/keyset/uAB/AndroidManifest.xml b/core/tests/coretests/apks/keyset/uAB/AndroidManifest.xml
index 8ad3471..015c3ad 100644
--- a/core/tests/coretests/apks/keyset/uAB/AndroidManifest.xml
+++ b/core/tests/coretests/apks/keyset/uAB/AndroidManifest.xml
@@ -20,9 +20,9 @@
<key-sets>
<key-set android:name="AB" >
<public-key android:name="keyA"
- android:value="MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJoN1Nsgqf0V4C/bbN8wo8O2X/S5D76+5Mb9mlIsHkUTUTbHCNk+LxHIUYLm89YbP9zImrV0bUHLUAZUyoMUCiMCAwEAAQ==" />
+ android:value="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsMpNthdOxud7roPDZMMomOqXgJJdRfIWpkKEqmC61Mv+Nf6QY3TorEwJeghjSmqj7IbBKrtvfQq4E2XJO1HuspmQO4Ng2gvn+r+6EwNfKc9k55d6s+27SR867jKurBbHNtZMG+tjL1yH4r+tNzcuJCsgyAFqLmxFdcxEwzNvREyRpoYc5RDR0mmTwkMCUhJ6CId1EYEKiCEdNzxv+fWPEb21u+/MWpleGCILs8kglRVb2q/WOzAAvGr4FY5plfaE6N+lr7+UschQ+aMi1+uqewo2o0qPFVmZP5hnwj55K4UMzu/NhhDqQQsX4cSGES1KgHo5MTqRqZjN/I7emw5pFQIDAQAB" />
<public-key android:name="keyB"
- android:value="MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMTfQsY8UuXiXmvw/y7Tpr7HoyfAC0nE/8Qdk3ZtEr9asa5qqP0F6xzCI1PGVFV+WLVRwm6FdB9StENL5EKyQFcCAwEAAQ==" />
+ android:value="MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEtGr5cL2N7ztHiHmphB1/1eq+43lEAmP36iiEJAfX+cVReGSPFXqNnnM8Vptd2boAe332lrFw9rKPmbkZA+jOTA==" />
</key-set>
<upgrade-key-set android:name="AB"/>
</key-sets>
diff --git a/core/tests/coretests/apks/keyset/uAuB/AndroidManifest.xml b/core/tests/coretests/apks/keyset/uAuB/AndroidManifest.xml
index cdbd639..9491dbea 100644
--- a/core/tests/coretests/apks/keyset/uAuB/AndroidManifest.xml
+++ b/core/tests/coretests/apks/keyset/uAuB/AndroidManifest.xml
@@ -20,11 +20,11 @@
<key-sets>
<key-set android:name="A" >
<public-key android:name="keyA"
- android:value="MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJoN1Nsgqf0V4C/bbN8wo8O2X/S5D76+5Mb9mlIsHkUTUTbHCNk+LxHIUYLm89YbP9zImrV0bUHLUAZUyoMUCiMCAwEAAQ==" />
+ android:value="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsMpNthdOxud7roPDZMMomOqXgJJdRfIWpkKEqmC61Mv+Nf6QY3TorEwJeghjSmqj7IbBKrtvfQq4E2XJO1HuspmQO4Ng2gvn+r+6EwNfKc9k55d6s+27SR867jKurBbHNtZMG+tjL1yH4r+tNzcuJCsgyAFqLmxFdcxEwzNvREyRpoYc5RDR0mmTwkMCUhJ6CId1EYEKiCEdNzxv+fWPEb21u+/MWpleGCILs8kglRVb2q/WOzAAvGr4FY5plfaE6N+lr7+UschQ+aMi1+uqewo2o0qPFVmZP5hnwj55K4UMzu/NhhDqQQsX4cSGES1KgHo5MTqRqZjN/I7emw5pFQIDAQAB" />
</key-set>
<key-set android:name="B" >
<public-key android:name="keyB"
- android:value="MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMTfQsY8UuXiXmvw/y7Tpr7HoyfAC0nE/8Qdk3ZtEr9asa5qqP0F6xzCI1PGVFV+WLVRwm6FdB9StENL5EKyQFcCAwEAAQ==" />
+ android:value="MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEtGr5cL2N7ztHiHmphB1/1eq+43lEAmP36iiEJAfX+cVReGSPFXqNnnM8Vptd2boAe332lrFw9rKPmbkZA+jOTA==" />
</key-set>
<upgrade-key-set android:name="A"/>
<upgrade-key-set android:name="B"/>
diff --git a/core/tests/coretests/apks/keyset/uB/AndroidManifest.xml b/core/tests/coretests/apks/keyset/uB/AndroidManifest.xml
index 61063c3..f491840 100644
--- a/core/tests/coretests/apks/keyset/uB/AndroidManifest.xml
+++ b/core/tests/coretests/apks/keyset/uB/AndroidManifest.xml
@@ -20,7 +20,7 @@
<key-sets>
<key-set android:name="B" >
<public-key android:name="keyB"
- android:value="MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMTfQsY8UuXiXmvw/y7Tpr7HoyfAC0nE/8Qdk3ZtEr9asa5qqP0F6xzCI1PGVFV+WLVRwm6FdB9StENL5EKyQFcCAwEAAQ==" />
+ android:value="MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEtGr5cL2N7ztHiHmphB1/1eq+43lEAmP36iiEJAfX+cVReGSPFXqNnnM8Vptd2boAe332lrFw9rKPmbkZA+jOTA==" />
</key-set>
<upgrade-key-set android:name="B"/>
</key-sets>
diff --git a/core/tests/coretests/certs/keyset_A.pk8 b/core/tests/coretests/certs/keyset_A.pk8
index 3976b94..4076313 100644
--- a/core/tests/coretests/certs/keyset_A.pk8
+++ b/core/tests/coretests/certs/keyset_A.pk8
Binary files differ
diff --git a/core/tests/coretests/certs/keyset_A.x509.pem b/core/tests/coretests/certs/keyset_A.x509.pem
index 0fe334e..548bf13 100644
--- a/core/tests/coretests/certs/keyset_A.x509.pem
+++ b/core/tests/coretests/certs/keyset_A.x509.pem
@@ -1,14 +1,18 @@
-----BEGIN CERTIFICATE-----
-MIICKjCCAdQCCQCpDXPnNpO5UjANBgkqhkiG9w0BAQUFADCBmzELMAkGA1UEBhMC
-VVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcx
-DzANBgNVBAoTBkdvb2dsZTEQMA4GA1UECxMHQW5kcm9pZDEYMBYGA1UEAxMPd3d3
-LmV4YW1wbGUuY29tMSIwIAYJKoZIhvcNAQkBFhNkY2FzaG1hbkBnb29nbGUuY29t
-MB4XDTE0MDQyMTE4MTkwM1oXDTE3MDQyMDE4MTkwM1owgZsxCzAJBgNVBAYTAlVT
-MRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MQ8w
-DQYDVQQKEwZHb29nbGUxEDAOBgNVBAsTB0FuZHJvaWQxGDAWBgNVBAMTD3d3dy5l
-eGFtcGxlLmNvbTEiMCAGCSqGSIb3DQEJARYTZGNhc2htYW5AZ29vZ2xlLmNvbTBc
-MA0GCSqGSIb3DQEBAQUAA0sAMEgCQQCaDdTbIKn9FeAv22zfMKPDtl/0uQ++vuTG
-/ZpSLB5FE1E2xwjZPi8RyFGC5vPWGz/cyJq1dG1By1AGVMqDFAojAgMBAAEwDQYJ
-KoZIhvcNAQEFBQADQQCPTVDKxVZpxFH6Nm7sxpRplLzxbs/xyGELLIjEBVrgB0CM
-HAxFpPRHDSFpTxGG2mBCSrf+lD2Bf+WiIojx+RLY
+MIIC+TCCAeGgAwIBAgIJALuyfpZeCDiwMA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
+BAMMCGtleXNldF9BMB4XDTE1MTIwMjIxMTEzNFoXDTQzMDQxOTIxMTEzNFowEzER
+MA8GA1UEAwwIa2V5c2V0X0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
+AQCwyk22F07G53uug8NkwyiY6peAkl1F8hamQoSqYLrUy/41/pBjdOisTAl6CGNK
+aqPshsEqu299CrgTZck7Ue6ymZA7g2DaC+f6v7oTA18pz2Tnl3qz7btJHzruMq6s
+Fsc21kwb62MvXIfiv603Ny4kKyDIAWoubEV1zETDM29ETJGmhhzlENHSaZPCQwJS
+EnoIh3URgQqIIR03PG/59Y8RvbW778xamV4YIguzySCVFVvar9Y7MAC8avgVjmmV
+9oTo36Wvv5SxyFD5oyLX66p7CjajSo8VWZk/mGfCPnkrhQzO782GEOpBCxfhxIYR
+LUqAejkxOpGpmM38jt6bDmkVAgMBAAGjUDBOMB0GA1UdDgQWBBTVcIVD9u9538W/
+NE2Y36YiPtYmPzAfBgNVHSMEGDAWgBTVcIVD9u9538W/NE2Y36YiPtYmPzAMBgNV
+HRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQCjTN3mgaKep55wR1ULf4ULIc/m
+mjfZK7ZnJcynBEIGyjAqt4mMIfKRV/DllLsf997r7bz12qUSLbhWGFSq4a2ceOIp
+RG0+CGXV8Ez5Hz4o99MAP37Zdd5Lfq8fdlg2Mro2MMr21Tf3i2Y2LOfkXEZrW7rQ
+A5ZRVksoRcPQWaaNA85LGRSCiC2XSjg8TLn1qKwQUXVGQ6fwLKqAeeV2+hynADih
+FUaf7HxE5H3bHLByLmLKtab3Ta/g8VXxxRYuyd/rYsWMAHsjZge6xoVajm6Wvj5Q
+AvIxV99+PK7dkjVpg3O2oN1O4DQlqqvxdhjNP733DI4cihfJYV9Vn+wKj3TA
-----END CERTIFICATE-----
diff --git a/core/tests/coretests/certs/keyset_B.pk8 b/core/tests/coretests/certs/keyset_B.pk8
index a44ebb3..839d96c 100644
--- a/core/tests/coretests/certs/keyset_B.pk8
+++ b/core/tests/coretests/certs/keyset_B.pk8
Binary files differ
diff --git a/core/tests/coretests/certs/keyset_B.x509.pem b/core/tests/coretests/certs/keyset_B.x509.pem
index 2806de5..537e047 100644
--- a/core/tests/coretests/certs/keyset_B.x509.pem
+++ b/core/tests/coretests/certs/keyset_B.x509.pem
@@ -1,14 +1,10 @@
-----BEGIN CERTIFICATE-----
-MIICKjCCAdQCCQC+5GnAgmYS6DANBgkqhkiG9w0BAQUFADCBmzELMAkGA1UEBhMC
-VVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcx
-DzANBgNVBAoTBkdvb2dsZTEQMA4GA1UECxMHQW5kcm9pZDEYMBYGA1UEAxMPd3d3
-LmV4YW1wbGUuY29tMSIwIAYJKoZIhvcNAQkBFhNkY2FzaG1hbkBnb29nbGUuY29t
-MB4XDTE0MDQyMTE4MjczM1oXDTE3MDQyMDE4MjczM1owgZsxCzAJBgNVBAYTAlVT
-MRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MQ8w
-DQYDVQQKEwZHb29nbGUxEDAOBgNVBAsTB0FuZHJvaWQxGDAWBgNVBAMTD3d3dy5l
-eGFtcGxlLmNvbTEiMCAGCSqGSIb3DQEJARYTZGNhc2htYW5AZ29vZ2xlLmNvbTBc
-MA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDE30LGPFLl4l5r8P8u06a+x6MnwAtJxP/E
-HZN2bRK/WrGuaqj9BescwiNTxlRVfli1UcJuhXQfUrRDS+RCskBXAgMBAAEwDQYJ
-KoZIhvcNAQEFBQADQQCYYyur2/sMB88MOhQE8RHNmdO0zEQYAz66z3ctTNqiNsbK
-T9iKj0CT3cjqgfN5ex4onhnoIIPtON7DIHFWke5x
+MIIBbDCCAROgAwIBAgIJALP/7jQfVyFBMAoGCCqGSM49BAMCMBMxETAPBgNVBAMM
+CGtleXNldF9CMB4XDTE1MTIwMzIwNDgwNFoXDTQzMDQyMDIwNDgwNFowEzERMA8G
+A1UEAwwIa2V5c2V0X0IwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAS0avlwvY3v
+O0eIeamEHX/V6r7jeUQCY/fqKIQkB9f5xVF4ZI8Veo2eczxWm13ZugB7ffaWsXD2
+so+ZuRkD6M5Mo1AwTjAdBgNVHQ4EFgQUHrv1BwZU/MchAsa3VL0n458IwVswHwYD
+VR0jBBgwFoAUHrv1BwZU/MchAsa3VL0n458IwVswDAYDVR0TBAUwAwEB/zAKBggq
+hkjOPQQDAgNHADBEAiBp2nTHHhywNIyLpe8mYUsbwozVWM5/2xFidQe9Edua0AIg
+Wt9BCfzrcsBh2Rlje9Im9sq6hIyLSS1pe6ZcI3+lDis=
-----END CERTIFICATE-----
diff --git a/core/tests/coretests/src/android/content/pm/RegisteredServicesCacheTest.java b/core/tests/coretests/src/android/content/pm/RegisteredServicesCacheTest.java
index 32b4557..271c639 100644
--- a/core/tests/coretests/src/android/content/pm/RegisteredServicesCacheTest.java
+++ b/core/tests/coretests/src/android/content/pm/RegisteredServicesCacheTest.java
@@ -188,7 +188,10 @@
private static RegisteredServicesCache.ServiceInfo<TestServiceType> newServiceInfo(
TestServiceType type, int uid) {
- return new RegisteredServicesCache.ServiceInfo<>(type, null, uid);
+ final ComponentInfo info = new ComponentInfo();
+ info.applicationInfo = new ApplicationInfo();
+ info.applicationInfo.uid = uid;
+ return new RegisteredServicesCache.ServiceInfo<>(type, info, null);
}
private void assertNotEmptyFileCreated(TestServicesCache cache, int userId) {
diff --git a/core/tests/coretests/src/android/view/textservice/SpellCheckerSubtypeTest.java b/core/tests/coretests/src/android/view/textservice/SpellCheckerSubtypeTest.java
new file mode 100644
index 0000000..157c815
--- /dev/null
+++ b/core/tests/coretests/src/android/view/textservice/SpellCheckerSubtypeTest.java
@@ -0,0 +1,134 @@
+/*
+ * Copyright (C) 2015 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.view.textservice;
+
+import android.os.Parcel;
+import android.test.InstrumentationTestCase;
+import android.test.suitebuilder.annotation.SmallTest;
+
+import java.util.Arrays;
+import java.util.Locale;
+
+import static android.test.MoreAsserts.assertNotEqual;
+
+/**
+ * TODO: Most of part can be, and probably should be, moved to CTS.
+ */
+public class SpellCheckerSubtypeTest extends InstrumentationTestCase {
+ private static final String SUBTYPE_SUBTYPE_LOCALE_STRING_A = "en_GB";
+ private static final int SUBTYPE_NAME_RES_ID_A = 0x12345;
+ private static final String SUBTYPE_EXTRA_VALUE_A = "Key1=Value1,Key2=Value2";
+ private static final String SUBTYPE_SUBTYPE_LOCALE_STRING_B = "en_IN";
+ private static final int SUBTYPE_NAME_RES_ID_B = 0x54321;
+ private static final String SUBTYPE_EXTRA_VALUE_B = "Key3=Value3,Key4=Value4";
+
+ private static int defaultHashCodeAlgorithm(String locale, String extraValue) {
+ return Arrays.hashCode(new Object[] {locale, extraValue});
+ }
+
+ private static final SpellCheckerSubtype cloneViaParcel(final SpellCheckerSubtype original) {
+ Parcel parcel = null;
+ try {
+ parcel = Parcel.obtain();
+ original.writeToParcel(parcel, 0);
+ parcel.setDataPosition(0);
+ return SpellCheckerSubtype.CREATOR.createFromParcel(parcel);
+ } finally {
+ if (parcel != null) {
+ parcel.recycle();
+ }
+ }
+ }
+
+ @SmallTest
+ public void testSubtype() throws Exception {
+ final SpellCheckerSubtype subtype = new SpellCheckerSubtype(SUBTYPE_NAME_RES_ID_A,
+ SUBTYPE_SUBTYPE_LOCALE_STRING_A, SUBTYPE_EXTRA_VALUE_A);
+
+ assertEquals(SUBTYPE_NAME_RES_ID_A, subtype.getNameResId());
+ assertEquals(SUBTYPE_SUBTYPE_LOCALE_STRING_A, subtype.getLocale());
+ assertEquals("Value1", subtype.getExtraValueOf("Key1"));
+ assertEquals("Value2", subtype.getExtraValueOf("Key2"));
+ // Historically we have used SpellCheckerSubtype#hashCode() to track which subtype is
+ // enabled, and it is supposed to be stored in SecureSettings. Therefore we have to
+ // keep using the same algorithm for compatibility reasons.
+ assertEquals(
+ defaultHashCodeAlgorithm(SUBTYPE_SUBTYPE_LOCALE_STRING_A, SUBTYPE_EXTRA_VALUE_A),
+ subtype.hashCode());
+
+ final SpellCheckerSubtype clonedSubtype = cloneViaParcel(subtype);
+ assertEquals(SUBTYPE_NAME_RES_ID_A, clonedSubtype.getNameResId());
+ assertEquals(SUBTYPE_SUBTYPE_LOCALE_STRING_A, clonedSubtype.getLocale());
+ assertEquals("Value1", clonedSubtype.getExtraValueOf("Key1"));
+ assertEquals("Value2", clonedSubtype.getExtraValueOf("Key2"));
+ assertEquals(
+ defaultHashCodeAlgorithm(SUBTYPE_SUBTYPE_LOCALE_STRING_A, SUBTYPE_EXTRA_VALUE_A),
+ clonedSubtype.hashCode());
+ }
+
+ @SmallTest
+ public void testGetLocaleObject() throws Exception {
+ assertEquals(new Locale("en"), new SpellCheckerSubtype(
+ SUBTYPE_NAME_RES_ID_A, "en", SUBTYPE_EXTRA_VALUE_A).getLocaleObject());
+ assertEquals(new Locale("en", "US"), new SpellCheckerSubtype(
+ SUBTYPE_NAME_RES_ID_A, "en_US", SUBTYPE_EXTRA_VALUE_A).getLocaleObject());
+ assertEquals(new Locale("en", "US", "POSIX"), new SpellCheckerSubtype(
+ SUBTYPE_NAME_RES_ID_A, "en_US_POSIX", SUBTYPE_EXTRA_VALUE_A).getLocaleObject());
+
+ // Special rewrite rule for "tl" for versions of Android earlier than Lollipop that did not
+ // support three letter language codes, and used "tl" (Tagalog) as the language string for
+ // "fil" (Filipino).
+ assertEquals(new Locale("fil"), new SpellCheckerSubtype(
+ SUBTYPE_NAME_RES_ID_A, "tl", SUBTYPE_EXTRA_VALUE_A).getLocaleObject());
+ assertEquals(new Locale("fil", "PH"), new SpellCheckerSubtype(
+ SUBTYPE_NAME_RES_ID_A, "tl_PH", SUBTYPE_EXTRA_VALUE_A).getLocaleObject());
+ assertEquals(new Locale("fil", "PH", "POSIX"), new SpellCheckerSubtype(
+ SUBTYPE_NAME_RES_ID_A, "tl_PH_POSIX", SUBTYPE_EXTRA_VALUE_A).getLocaleObject());
+
+ // So far rejecting invalid/unexpected locale strings is out of the scope.
+ assertEquals(new Locale("a"), new SpellCheckerSubtype(
+ SUBTYPE_NAME_RES_ID_A, "a", SUBTYPE_EXTRA_VALUE_A).getLocaleObject());
+ assertEquals(new Locale("a b c"), new SpellCheckerSubtype(
+ SUBTYPE_NAME_RES_ID_A, "a b c", SUBTYPE_EXTRA_VALUE_A).getLocaleObject());
+ assertEquals(new Locale("en-US"), new SpellCheckerSubtype(
+ SUBTYPE_NAME_RES_ID_A, "en-US", SUBTYPE_EXTRA_VALUE_A).getLocaleObject());
+ }
+
+ @SmallTest
+ public void testEquality() throws Exception {
+ assertEquals(
+ new SpellCheckerSubtype(SUBTYPE_NAME_RES_ID_A, SUBTYPE_SUBTYPE_LOCALE_STRING_A,
+ SUBTYPE_EXTRA_VALUE_A),
+ new SpellCheckerSubtype(SUBTYPE_NAME_RES_ID_A, SUBTYPE_SUBTYPE_LOCALE_STRING_A,
+ SUBTYPE_EXTRA_VALUE_A));
+ assertNotEqual(
+ new SpellCheckerSubtype(SUBTYPE_NAME_RES_ID_A, SUBTYPE_SUBTYPE_LOCALE_STRING_A,
+ SUBTYPE_EXTRA_VALUE_A),
+ new SpellCheckerSubtype(SUBTYPE_NAME_RES_ID_B, SUBTYPE_SUBTYPE_LOCALE_STRING_B,
+ SUBTYPE_EXTRA_VALUE_A));
+ assertNotEqual(
+ new SpellCheckerSubtype(SUBTYPE_NAME_RES_ID_A, SUBTYPE_SUBTYPE_LOCALE_STRING_A,
+ SUBTYPE_EXTRA_VALUE_A),
+ new SpellCheckerSubtype(SUBTYPE_NAME_RES_ID_A, SUBTYPE_SUBTYPE_LOCALE_STRING_B,
+ SUBTYPE_EXTRA_VALUE_A));
+ assertNotEqual(
+ new SpellCheckerSubtype(SUBTYPE_NAME_RES_ID_A, SUBTYPE_SUBTYPE_LOCALE_STRING_A,
+ SUBTYPE_EXTRA_VALUE_A),
+ new SpellCheckerSubtype(SUBTYPE_NAME_RES_ID_A, SUBTYPE_SUBTYPE_LOCALE_STRING_A,
+ SUBTYPE_EXTRA_VALUE_B));
+ }
+}
diff --git a/core/tests/coretests/src/com/android/internal/inputmethod/InputMethodUtilsTest.java b/core/tests/coretests/src/com/android/internal/inputmethod/InputMethodUtilsTest.java
index c279c8f..d133a12 100644
--- a/core/tests/coretests/src/com/android/internal/inputmethod/InputMethodUtilsTest.java
+++ b/core/tests/coretests/src/com/android/internal/inputmethod/InputMethodUtilsTest.java
@@ -1191,4 +1191,25 @@
InputMethodUtils.buildInputMethodsAndSubtypesString(map)));
}
}
+
+ @SmallTest
+ public void testConstructLocaleFromString() throws Exception {
+ assertEquals(new Locale("en"), InputMethodUtils.constructLocaleFromString("en"));
+ assertEquals(new Locale("en", "US"), InputMethodUtils.constructLocaleFromString("en_US"));
+ assertEquals(new Locale("en", "US", "POSIX"),
+ InputMethodUtils.constructLocaleFromString("en_US_POSIX"));
+
+ // Special rewrite rule for "tl" for versions of Android earlier than Lollipop that did not
+ // support three letter language codes, and used "tl" (Tagalog) as the language string for
+ // "fil" (Filipino).
+ assertEquals(new Locale("fil"), InputMethodUtils.constructLocaleFromString("tl"));
+ assertEquals(new Locale("fil", "PH"), InputMethodUtils.constructLocaleFromString("tl_PH"));
+ assertEquals(new Locale("fil", "PH", "POSIX"),
+ InputMethodUtils.constructLocaleFromString("tl_PH_POSIX"));
+
+ // So far rejecting an invalid/unexpected locale string is out of the scope of this method.
+ assertEquals(new Locale("a"), InputMethodUtils.constructLocaleFromString("a"));
+ assertEquals(new Locale("a b c"), InputMethodUtils.constructLocaleFromString("a b c"));
+ assertEquals(new Locale("en-US"), InputMethodUtils.constructLocaleFromString("en-US"));
+ }
}
diff --git a/docs/html-intl/intl/es/distribute/googleplay/quality/tv.jd b/docs/html-intl/intl/es/distribute/googleplay/quality/tv.jd
index 8645858..e291e7c 100644
--- a/docs/html-intl/intl/es/distribute/googleplay/quality/tv.jd
+++ b/docs/html-intl/intl/es/distribute/googleplay/quality/tv.jd
@@ -320,7 +320,7 @@
<td>
<p style="margin-bottom:.5em;">
Si la aplicación utiliza un controlador para juegos como su método de entrada principal, debe declarar el requisito
- correspondiente con la etiqueta del manifiesto <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>.
+ correspondiente con la etiqueta del manifiesto <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>.
(<a href="{@docRoot}training/tv/games/index.html#gamepad">Obtén más información</a>)
</p>
</td>
diff --git a/docs/html-intl/intl/es/google/play/filters.jd b/docs/html-intl/intl/es/google/play/filters.jd
index d4890dc..03565b9 100644
--- a/docs/html-intl/intl/es/google/play/filters.jd
+++ b/docs/html-intl/intl/es/google/play/filters.jd
@@ -329,23 +329,23 @@
<tr><th>Elemento del manifiesto</th><th>Resumen:</th></tr>
<tr>
<td><nobr><a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
-<compatible-screens>}</a></nobr></td>
+<compatible-screens>}</a></nobr></td>
<td>
<p>Google Play filtra la aplicación si el tamaño de pantalla del dispositivo no coincide con
- ninguna de las configuraciones de pantalla (declaradas por un elemento {@code <screen>}) en el elemento {@code
-<compatible-screens>}.</p>
+ ninguna de las configuraciones de pantalla (declaradas por un elemento {@code <screen>}) en el elemento {@code
+<compatible-screens>}.</p>
<p class="caution"><strong>Advertencia:</strong> Normalmente, <strong>no deberías usar este elemento
del manifiesto</strong>. El uso de este elemento puede reducir
notablemente la base de usuarios potenciales para tu aplicación, al excluir todas las combinaciones de tamaño de pantalla
y densidad que no indicaste. En su lugar, debes usar el elemento del manifiesto <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> (descrito anteriormente en la <a href="#table1">tabla
+<supports-screens>}</a> (descrito anteriormente en la <a href="#table1">tabla
1</a>) para habilitar el modo de compatibilidad de pantalla para las configuraciones de pantalla que no abarcaste
con recursos adicionales.</p>
</td>
</tr>
<tr>
<td><nobr><a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code
-<supports-gl-texture>}</a></nobr></td>
+<supports-gl-texture>}</a></nobr></td>
<td>
<p>Google Play filtrará la aplicación a menos que uno o más de los formatos de compresión
de texturas GL compatibles con la aplicación también sean compatibles con el dispositivo. </p>
@@ -408,16 +408,16 @@
<ul>
<li>Formatos de compresión de texturas OpenGL
<p>Mediante el uso del elemento <a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code
-<supports-gl-texture>}</a>.</p>
+<supports-gl-texture>}</a>.</p>
</li>
<li>Tamaño de pantalla (y, opcionalmente, densidad de la pantalla)
<p>Mediante el uso del elemento <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> o <a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
-<compatible-screens>}</a>.</p>
+<supports-screens>}</a> o <a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
+<compatible-screens>}</a>.</p>
</li>
<li>Nivel de API
<p>Mediante el uso del elemento <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code
-<uses-sdk>}</a>.</p>
+<uses-sdk>}</a>.</p>
</li>
<li>Arquitectura de CPU (ABI)
<p>Mediante la inclusión de bibliotecas nativas creadas con el <a href="{@docRoot}tools/sdk/ndk/index.html">NDK de
diff --git a/docs/html-intl/intl/es/preview/api-overview.jd b/docs/html-intl/intl/es/preview/api-overview.jd
index 9f68613..1f3e9bf 100644
--- a/docs/html-intl/intl/es/preview/api-overview.jd
+++ b/docs/html-intl/intl/es/preview/api-overview.jd
@@ -133,8 +133,8 @@
<pre class="no-prettyprint">
adb -e emu finger touch <finger_id>
</pre>
-<p>En Windows, posiblemente tenga que ejecutar {@code telnet 127.0.0.1 <emulator-id>} seguido de
- {@code finger touch <finger_id>}.
+<p>En Windows, posiblemente tenga que ejecutar {@code telnet 127.0.0.1 <emulator-id>} seguido de
+ {@code finger touch <finger_id>}.
</p>
</li>
</ol>
@@ -192,7 +192,7 @@
</pre>
<p>Para cada actividad que desee exponer a {@code ChooserTargetService}, agregue un elemento
-{@code <meta-data>} con el nombre
+{@code <meta-data>} con el nombre
{@code "android.service.chooser.chooser_target_service"} en el manifiesto de su aplicación.
</p>
diff --git a/docs/html-intl/intl/ja/distribute/googleplay/quality/tv.jd b/docs/html-intl/intl/ja/distribute/googleplay/quality/tv.jd
index 4c64184f..4c0e478 100644
--- a/docs/html-intl/intl/ja/distribute/googleplay/quality/tv.jd
+++ b/docs/html-intl/intl/ja/distribute/googleplay/quality/tv.jd
@@ -286,7 +286,7 @@
</td>
<td>
<p style="margin-bottom:.5em;">
- アプリがその主要な入力方式としてゲーム コントローラを使用する場合、<a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> マニフェスト タグで適切な要件を宣言しています。(<a href="{@docRoot}training/tv/games/index.html#gamepad">こちらを参照してください</a>)
+ アプリがその主要な入力方式としてゲーム コントローラを使用する場合、<a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> マニフェスト タグで適切な要件を宣言しています。(<a href="{@docRoot}training/tv/games/index.html#gamepad">こちらを参照してください</a>)
</p>
</td>
</tr>
diff --git a/docs/html-intl/intl/ja/google/play/filters.jd b/docs/html-intl/intl/ja/google/play/filters.jd
index a1b9ec0..5ab6336 100644
--- a/docs/html-intl/intl/ja/google/play/filters.jd
+++ b/docs/html-intl/intl/ja/google/play/filters.jd
@@ -208,14 +208,14 @@
<table>
<tr><th>マニフェスト要素</th><th>概要</th></tr>
<tr>
- <td><nobr><a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code <compatible-screens>}</a></nobr></td>
+ <td><nobr><a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code <compatible-screens>}</a></nobr></td>
<td>
- <p>Google Play はデバイス画面サイズと密度が {@code <compatible-screens>} の要素の画面設定({@code <screen>} 要素で宣言)のいずれにも適合しない場合、アプリをフィルタリングします。</p>
- <p class="caution"><strong>警告:</strong> 通常は、<strong>このマニフェスト要素を使用すべきではありません</strong>。この要素を使用すると、指定していない画面サイズと密度のすべての組み合わせが除外されることになり、アプリの潜在的なユーザー ベースが大幅に減少する可能性があります。代わりに <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code <supports-screens>}</a> マニフェスト要素(<a href="#table1">表 1</a> に記載)を使用して、考慮に入れていない画面設定に対して、代替リソースを使用した画面の互換性モードを有効にすることをお勧めします。</p>
+ <p>Google Play はデバイス画面サイズと密度が {@code <compatible-screens>} の要素の画面設定({@code <screen>} 要素で宣言)のいずれにも適合しない場合、アプリをフィルタリングします。</p>
+ <p class="caution"><strong>警告:</strong> 通常は、<strong>このマニフェスト要素を使用すべきではありません</strong>。この要素を使用すると、指定していない画面サイズと密度のすべての組み合わせが除外されることになり、アプリの潜在的なユーザー ベースが大幅に減少する可能性があります。代わりに <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code <supports-screens>}</a> マニフェスト要素(<a href="#table1">表 1</a> に記載)を使用して、考慮に入れていない画面設定に対して、代替リソースを使用した画面の互換性モードを有効にすることをお勧めします。</p>
</td>
</tr>
<tr>
- <td><nobr><a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code <supports-gl-texture>}</a></nobr></td>
+ <td><nobr><a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code <supports-gl-texture>}</a></nobr></td>
<td>
<p>Google Play はアプリでサポートされる 1 つ以上の GL テクスチャ圧縮フォーマットがデバイスで同様にサポートされない場合、アプリをフィルタリングします。 </p>
</td>
@@ -249,11 +249,11 @@
<p>現時点では、Google Play では各 APK が次の設定に基づいて別々のフィルタを提供する際にのみ、同じアプリの複数の APK を公開できます。</p>
<ul>
- <li>OpenGL テクスチャ圧縮フォーマット <p><a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code <supports-gl-texture>}</a> 要素の使用による。</p>
+ <li>OpenGL テクスチャ圧縮フォーマット <p><a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code <supports-gl-texture>}</a> 要素の使用による。</p>
</li>
- <li>画面サイズ(画面密度も指定可能) <p><a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code <supports-screens>}</a>要素または<a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code <compatible-screens>}</a> 要素の使用による。</p>
+ <li>画面サイズ(画面密度も指定可能) <p><a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code <supports-screens>}</a>要素または<a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code <compatible-screens>}</a> 要素の使用による。</p>
</li>
- <li>API レベル <p><a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a> 要素の使用による。</p>
+ <li>API レベル <p><a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a> 要素の使用による。</p>
</li>
<li>CPU アーキテクチャ(ABI) <p>特定の CPU アーキテクチャ(ARM EABI v7 または x86 など)を対象とする<a href="{@docRoot}tools/sdk/ndk/index.html"> Android NDK</a> で構築されたネイティブ ライブラリの組み込みによる。</p>
</li>
diff --git a/docs/html-intl/intl/ja/guide/topics/fundamentals.jd b/docs/html-intl/intl/ja/guide/topics/fundamentals.jd
index cf9f7dd..d76c92e 100644
--- a/docs/html-intl/intl/ja/guide/topics/fundamentals.jd
+++ b/docs/html-intl/intl/ja/guide/topics/fundamentals.jd
@@ -329,7 +329,7 @@
<p style="margin-left: 2em">{@code FLAG_ACTIVITY_NEW_TASK} <br/>{@code FLAG_ACTIVITY_CLEAR_TOP} <br/>{@code FLAG_ACTIVITY_RESET_TASK_IF_NEEDED} <br/>{@code FLAG_ACTIVITY_SINGLE_TOP}</p>
<p>
-また、主に使用する {@code <activity>} 属性は以下のとおりです:
+また、主に使用する {@code <activity>} 属性は以下のとおりです:
<p style="margin-left: 2em">{@code taskAffinity} <br/>{@code launchMode} <br/>{@code allowTaskReparenting} <br/>{@code clearTaskOnLaunch} <br/>{@code alwaysRetainTaskState} <br/>{@code finishOnTaskLaunch}</p>
@@ -341,7 +341,7 @@
<h3 id="afftask">親和性と新しいタスク</h3>
<p>
-デフォルトでは、アプリケーション内のすべてのアクティビティは相互に親和性があり、すべてのアクティビティができる限り同じタスクに属そうとします。<i></i>ただし、{@code <activity>} 要素の {@code taskAffinity} 属性を使用して、アクティビティごとに個別の親和性を設定することもできます。つまり、別々のアプリケーションで定義されているアクティビティで親和性を共有したり、同じアプリケーションで定義されているアクティビティに別々の親和性を割り当てたりできるということです。親和性が作用する状況は 2 つあります。1 つはアクティビティを起動する Intent オブジェクトに {@code FLAG_ACTIVITY_NEW_TASK} フラグが含まれている場合、もう 1 つはアクティビティの {@code allowTaskReparenting} 属性が "{@code true}" に設定されている場合です。
+デフォルトでは、アプリケーション内のすべてのアクティビティは相互に親和性があり、すべてのアクティビティができる限り同じタスクに属そうとします。<i></i>ただし、{@code <activity>} 要素の {@code taskAffinity} 属性を使用して、アクティビティごとに個別の親和性を設定することもできます。つまり、別々のアプリケーションで定義されているアクティビティで親和性を共有したり、同じアプリケーションで定義されているアクティビティに別々の親和性を割り当てたりできるということです。親和性が作用する状況は 2 つあります。1 つはアクティビティを起動する Intent オブジェクトに {@code FLAG_ACTIVITY_NEW_TASK} フラグが含まれている場合、もう 1 つはアクティビティの {@code allowTaskReparenting} 属性が "{@code true}" に設定されている場合です。
</p>
<dl>
@@ -361,7 +361,7 @@
<h3 id="lmodes">起動モード</h3>
<p>
-<code><a href="{@docRoot}guide/topics/manifest/activity-element.html#lmode">launchMode</a></code> 属性の {@code <activity>} 要素には、以下の 4 種類の起動モードを割り当てることができます:
+<code><a href="{@docRoot}guide/topics/manifest/activity-element.html#lmode">launchMode</a></code> 属性の {@code <activity>} 要素には、以下の 4 種類の起動モードを割り当てることができます:
</p>
<p style="margin-left: 2em">"{@code standard}"(デフォルト モード)<br>"{@code singleTop}"<br>"{@code singleTask}"<br>"{@code singleInstance}"</p>
@@ -470,7 +470,7 @@
</p>
<p>
-ユーザーがアクティビティに戻ることができるようにしない場合は、{@code <activity>} 要素の {@code finishOnTaskLaunch} を "{@code true}" に設定します。詳しくは、<a href="#clearstack">スタックのクリア</a>をご覧ください。
+ユーザーがアクティビティに戻ることができるようにしない場合は、{@code <activity>} 要素の {@code finishOnTaskLaunch} を "{@code true}" に設定します。詳しくは、<a href="#clearstack">スタックのクリア</a>をご覧ください。
</p>
@@ -488,7 +488,7 @@
<h3 id="procs">プロセス</h3>
<p>
-コンポーネントを実行するプロセスは、マニフェスト ファイルで管理します。コンポーネントの各要素({@code <activity>}、{@code <service>}、{@code <receiver>}、および {@code <provider>})には {@code process} 属性があり、そのコンポーネントをどのプロセスで実行すべきかを指定できるようになっています。これらの属性の設定によって、それぞれのコンポーネントを専用のプロセスで実行したり、一部のコンポーネントだけでプロセスを共有したりできます。また、別々のアプリケーションのコンポーネントが、同じプロセスで実行されるように設定することもできます。この場合は、それらのアプリケーションが同じ Linux ユーザー ID を共有し、同じ認証機関によって署名されている必要があります。{@code <application>} 要素にも {@code process} 属性があり、すべてのコンポーネントに適用されるデフォルト値を設定できます。
+コンポーネントを実行するプロセスは、マニフェスト ファイルで管理します。コンポーネントの各要素({@code <activity>}、{@code <service>}、{@code <receiver>}、および {@code <provider>})には {@code process} 属性があり、そのコンポーネントをどのプロセスで実行すべきかを指定できるようになっています。これらの属性の設定によって、それぞれのコンポーネントを専用のプロセスで実行したり、一部のコンポーネントだけでプロセスを共有したりできます。また、別々のアプリケーションのコンポーネントが、同じプロセスで実行されるように設定することもできます。この場合は、それらのアプリケーションが同じ Linux ユーザー ID を共有し、同じ認証機関によって署名されている必要があります。{@code <application>} 要素にも {@code process} 属性があり、すべてのコンポーネントに適用されるデフォルト値を設定できます。
</p>
<p>
diff --git a/docs/html-intl/intl/ja/preview/api-overview.jd b/docs/html-intl/intl/ja/preview/api-overview.jd
index 2c0816b..33cabc3 100644
--- a/docs/html-intl/intl/ja/preview/api-overview.jd
+++ b/docs/html-intl/intl/ja/preview/api-overview.jd
@@ -133,8 +133,8 @@
<pre class="no-prettyprint">
adb -e emu finger touch <finger_id>
</pre>
-<p>Windows では、{@code telnet 127.0.0.1 <emulator-id>}、
-{@code finger touch <finger_id>} の順に実行する必要がある場合があります。
+<p>Windows では、{@code telnet 127.0.0.1 <emulator-id>}、
+{@code finger touch <finger_id>} の順に実行する必要がある場合があります。
</p>
</li>
</ol>
@@ -192,7 +192,7 @@
</pre>
<p>{@code ChooserTargetService} に公開するアクティビティごとに、 {@code "android.service.chooser.chooser_target_service"} という名前の
-{@code <meta-data>} 要素をアプリのマニフェストに追加します。
+{@code <meta-data>} 要素をアプリのマニフェストに追加します。
</p>
diff --git a/docs/html-intl/intl/ja/training/basics/activity-lifecycle/starting.jd b/docs/html-intl/intl/ja/training/basics/activity-lifecycle/starting.jd
index 7c865a9..124c323 100644
--- a/docs/html-intl/intl/ja/training/basics/activity-lifecycle/starting.jd
+++ b/docs/html-intl/intl/ja/training/basics/activity-lifecycle/starting.jd
@@ -150,7 +150,7 @@
<p>アプリのメインのアクティビティは、{@link
android.content.Intent#ACTION_MAIN MAIN} アクションと {@link android.content.Intent#CATEGORY_LAUNCHER LAUNCHER} カテゴリを含む <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
-<intent-filter>}</a> を使用してマニフェストで宣言する必要があります。
+<intent-filter>}</a> を使用してマニフェストで宣言する必要があります。
次に例を示します。</p>
<pre>
diff --git a/docs/html-intl/intl/ja/training/basics/intents/filters.jd b/docs/html-intl/intl/ja/training/basics/intents/filters.jd
index 5f0d69a..1bcb266 100644
--- a/docs/html-intl/intl/ja/training/basics/intents/filters.jd
+++ b/docs/html-intl/intl/ja/training/basics/intents/filters.jd
@@ -31,7 +31,7 @@
</p>
-<p>他のアプリからアクティビティを開始できるようにするには、対応する <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>要素のマニフェスト ファイルに <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a> 要素を追加する必要があります。
+<p>他のアプリからアクティビティを開始できるようにするには、対応する <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>要素のマニフェスト ファイルに <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a> 要素を追加する必要があります。
</p>
<p>アプリが端末にインストールされている場合、システムはインテント フィルタを識別し、インストールされているすべてのアプリでサポートされるインテントの内部カタログに情報を追加します。アプリが暗黙的インテントを使って {@link android.app.Activity#startActivity
@@ -56,13 +56,13 @@
<dt>アクション</dt>
<dd>実行するアクション名を表す文字列。通常、
{@link android.content.Intent#ACTION_SEND} や {@link android.content.Intent#ACTION_VIEW} などのプラットフォームに定義された値のいずれか。
- <p><a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a> 要素を使用してインテント フィルタでこれを指定します。この要素で指定した値は、API 定数ではなく、アクションの完全な文字列名(下記の例を参照)である必要があります。
+ <p><a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a> 要素を使用してインテント フィルタでこれを指定します。この要素で指定した値は、API 定数ではなく、アクションの完全な文字列名(下記の例を参照)である必要があります。
</p></dd>
<dt>データ</dt>
<dd>インテントに関連するデータの詳細。
- <p><a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> 要素を使用して、インテント フィルタでこれを指定します。この要素で 1 つ以上の属性を
+ <p><a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> 要素を使用して、インテント フィルタでこれを指定します。この要素で 1 つ以上の属性を
使用して、MIME タイプのみ、URI 接頭辞のみ、URI スキームのみ、またはこれらと受け入れられるデータ タイプを示すその他の項目の組み合わせを指定することができます。
</p>
@@ -76,11 +76,11 @@
システムでサポートされているいくつかの異なるカテゴリがありますが、大抵のカテゴリはほとんど使用されません。
しかし、すべての暗黙的インテントは、デフォルトでは
{@link android.content.Intent#CATEGORY_DEFAULT} を使用して定義されています。
- <p><a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a>
+ <p><a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a>
要素を使用して、インテント フィルタでこれを指定します。</p></dd>
</dl>
-<p>インテント フィルタでは、それぞれの基準を<a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a> 要素内でネストした対応する XML 要素を使用して宣言することによって、アクティビティが受け入れる基準を宣言することができます。
+<p>インテント フィルタでは、それぞれの基準を<a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a> 要素内でネストした対応する XML 要素を使用して宣言することによって、アクティビティが受け入れる基準を宣言することができます。
</p>
@@ -100,10 +100,10 @@
<p>受信するインテントはそれぞれ 1 つのアクションと 1 つのデータ タイプのみを指定しますが、各
<a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
-<intent-filter>}</a> 内で <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code
-<action>}</a>、<a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
-<category>}</a>、<a href="{@docRoot}guide/topics/manifest/data-element.html">{@code
-<data>}</a> 要素の複数のインスタンスを宣言することもできます。
+<intent-filter>}</a> 内で <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code
+<action>}</a>、<a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
+<category>}</a>、<a href="{@docRoot}guide/topics/manifest/data-element.html">{@code
+<data>}</a> 要素の複数のインスタンスを宣言することもできます。
</p>
<p>アクションとデータのいずれか 2 つのペアが、各自の動作において相互に排他的である場合は、別のインテント フィルタを作成して、どのデータ タイプと組み合わされたときにとのアクションが受け入れられるかを指定する必要があります。
diff --git a/docs/html-intl/intl/ja/training/tv/start/start.jd b/docs/html-intl/intl/ja/training/tv/start/start.jd
index bc99ff9..3678df9 100755
--- a/docs/html-intl/intl/ja/training/tv/start/start.jd
+++ b/docs/html-intl/intl/ja/training/tv/start/start.jd
@@ -156,7 +156,7 @@
<h2 id="tv-libraries">TV サポート ライブラリを追加する</h3>
<p>
- Android SDK には、TV アプリ向けのサポート ライブラリが用意されています。これらのライブラリでは、TV 端末向けに使用できる API とユーザー インターフェース ウィジェットを提供しています。同ライブラリは {@code <sdk>/extras/android/support/} ディレクトリにあります。ライブラリとその全般的な用途の一覧を次に示します。
+ Android SDK には、TV アプリ向けのサポート ライブラリが用意されています。これらのライブラリでは、TV 端末向けに使用できる API とユーザー インターフェース ウィジェットを提供しています。同ライブラリは {@code <sdk>/extras/android/support/} ディレクトリにあります。ライブラリとその全般的な用途の一覧を次に示します。
</p>
<ul>
diff --git a/docs/html-intl/intl/ko/distribute/googleplay/quality/tv.jd b/docs/html-intl/intl/ko/distribute/googleplay/quality/tv.jd
index 83d71e9..721d63a 100644
--- a/docs/html-intl/intl/ko/distribute/googleplay/quality/tv.jd
+++ b/docs/html-intl/intl/ko/distribute/googleplay/quality/tv.jd
@@ -319,7 +319,7 @@
</td>
<td>
<p style="margin-bottom:.5em;">
- 앱이 게임 컨트롤러를 기본 입력 방법으로 사용하는 경우 <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> 매니페스트 태그로 적합한 요구사항을 선언합니다.
+ 앱이 게임 컨트롤러를 기본 입력 방법으로 사용하는 경우 <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> 매니페스트 태그로 적합한 요구사항을 선언합니다.
(<a href="{@docRoot}training/tv/games/index.html#gamepad">방법 알아보기</a>)
</p>
diff --git a/docs/html-intl/intl/ko/google/play/filters.jd b/docs/html-intl/intl/ko/google/play/filters.jd
index c1f73c7..42b1c77 100644
--- a/docs/html-intl/intl/ko/google/play/filters.jd
+++ b/docs/html-intl/intl/ko/google/play/filters.jd
@@ -329,23 +329,23 @@
<tr><th>매니페스트 요소</th><th>요약</th></tr>
<tr>
<td><nobr><a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
-<compatible-screens>}</a></nobr></td>
+<compatible-screens>}</a></nobr></td>
<td>
<p>Google Play가 장치 화면
크기와 밀도가 {@code
-<compatible-screens>} 요소에서 {@code <screen>} 요소가 선언한 화면 구성과 일치하지 않는 경우에 애플리케이션을 필터링합니다.</p>
+<compatible-screens>} 요소에서 {@code <screen>} 요소가 선언한 화면 구성과 일치하지 않는 경우에 애플리케이션을 필터링합니다.</p>
<p class="caution"><strong>주의:</strong> 일반적으로 <strong>이 매니페스트 요소를 사용하면 안 됩니다</strong>.
이 요소를 사용하면 목록에 없는 화면 크기와 밀도의 조합을 모두 제외시켜 애플리케이션의 잠재적 사용자 기반이 현저히 줄어들 수 있습니다.
대신 위의 <a href="#table1">표 1</a>에 나오는 <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> 매니페스트 요소를 사용하여 대체 리소스로 고려하지 않은 화면 구성에 대해 화면 호환성 모드를 활성화해야 합니다.
+<supports-screens>}</a> 매니페스트 요소를 사용하여 대체 리소스로 고려하지 않은 화면 구성에 대해 화면 호환성 모드를 활성화해야 합니다.
</p>
</td>
</tr>
<tr>
<td><nobr><a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code
-<supports-gl-texture>}</a></nobr></td>
+<supports-gl-texture>}</a></nobr></td>
<td>
<p>Google Play는 애플리케이션에서 지원되는 하나 이상의 GL 텍스처 압축 형식이 장치에서도 지원되는 경우를 제외하고 애플리케이션을 필터링합니다.
</p>
@@ -408,16 +408,16 @@
<ul>
<li>OpenGL 텍스처 압축 형식
<p><a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code
-<supports-gl-texture>}</a> 요소를 사용하여 필터링합니다.</p>
+<supports-gl-texture>}</a> 요소를 사용하여 필터링합니다.</p>
</li>
<li>화면 크기(및 선택적 화면 밀도)
<p><a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> 또는 <a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
-<compatible-screens>}</a> 요소를 사용하여 필터링합니다.</p>
+<supports-screens>}</a> 또는 <a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
+<compatible-screens>}</a> 요소를 사용하여 필터링합니다.</p>
</li>
<li>API 레벨
<p><a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code
-<uses-sdk>}</a> 요소를 사용하여 필터링합니다.</p>
+<uses-sdk>}</a> 요소를 사용하여 필터링합니다.</p>
</li>
<li>CPU 아키텍처(ABI)
<p>특정 CPU 아키텍처(예: ARM EABI v7 또는 x86)를 대상으로 하는 <a href="{@docRoot}tools/sdk/ndk/index.html">Android NDK</a>로 작성된 네이티브 라이브러리를 포함하여 필터링합니다.
diff --git a/docs/html-intl/intl/ko/preview/api-overview.jd b/docs/html-intl/intl/ko/preview/api-overview.jd
index aac9a44..f9308b1 100644
--- a/docs/html-intl/intl/ko/preview/api-overview.jd
+++ b/docs/html-intl/intl/ko/preview/api-overview.jd
@@ -133,7 +133,7 @@
<pre class="no-prettyprint">
adb -e emu finger touch <finger_id>
</pre>
-<p>Windows에서는 {@code telnet 127.0.0.1 <emulator-id>}에 뒤이어 {@code finger touch <finger_id>}를 실행해야 할 수도 있습니다.
+<p>Windows에서는 {@code telnet 127.0.0.1 <emulator-id>}에 뒤이어 {@code finger touch <finger_id>}를 실행해야 할 수도 있습니다.
</p>
</li>
@@ -191,7 +191,7 @@
</service>
</pre>
-<p>{@code ChooserTargetService}에 노출하고자 하는 액티비티마다 {@code <meta-data>} 요소를 하나씩 추가하고, 앱 매니페스트에 {@code "android.service.chooser.chooser_target_service"} 이름을 추가합니다.
+<p>{@code ChooserTargetService}에 노출하고자 하는 액티비티마다 {@code <meta-data>} 요소를 하나씩 추가하고, 앱 매니페스트에 {@code "android.service.chooser.chooser_target_service"} 이름을 추가합니다.
</p>
diff --git a/docs/html-intl/intl/ko/training/basics/activity-lifecycle/starting.jd b/docs/html-intl/intl/ko/training/basics/activity-lifecycle/starting.jd
index 71ecf06..ef13487 100644
--- a/docs/html-intl/intl/ko/training/basics/activity-lifecycle/starting.jd
+++ b/docs/html-intl/intl/ko/training/basics/activity-lifecycle/starting.jd
@@ -150,7 +150,7 @@
<p>앱의 메인 액티비티는 {@link
android.content.Intent#ACTION_MAIN MAIN} 작업 및{@link android.content.Intent#CATEGORY_LAUNCHER LAUNCHER} 카테고리를 포함하는 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
-<intent-filter>}</a>와 함께
+<intent-filter>}</a>와 함께
매니페스트 파일에 선언되어야 합니다. 예를 들면 다음과 같습니다.</p>
<pre>
diff --git a/docs/html-intl/intl/ko/training/basics/intents/filters.jd b/docs/html-intl/intl/ko/training/basics/intents/filters.jd
index 265534c..251d262 100644
--- a/docs/html-intl/intl/ko/training/basics/intents/filters.jd
+++ b/docs/html-intl/intl/ko/training/basics/intents/filters.jd
@@ -31,8 +31,8 @@
"공유" 작업을 시작하고 이 작업을 수행하기 위해 여러분 자신의 앱을 시작할 수 있도록
{@link android.content.Intent#ACTION_SEND} 인텐트를 지원하는 것이 좋습니다.</p>
-<p>다른 앱이 자신의 액티비티를 시작할 수 있도록 하기 위해서는 <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
-요소에 상응하는 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a> 요소를 매니페스트 파일에 추가해야 합니다.</p>
+<p>다른 앱이 자신의 액티비티를 시작할 수 있도록 하기 위해서는 <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
+요소에 상응하는 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a> 요소를 매니페스트 파일에 추가해야 합니다.</p>
<p>앱이 기기에 설치되면 시스템이 인텐트
필터를 식별한 후 설치된 모든 앱에서 지원되는 인텐트의 내부 카탈로그에 해당 정보를 추가합니다.
@@ -56,13 +56,13 @@
<dt>작업</dt>
<dd>수행할 작업의 이름을 지정하는 문자열입니다. 일반적으로, 플랫폼에서 정의하는 값 중
하나입니다(예: {@link android.content.Intent#ACTION_SEND} 또는 {@link android.content.Intent#ACTION_VIEW}).
- <p><a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a> 요소를 사용하여 인텐트 필터에 지정합니다.
+ <p><a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a> 요소를 사용하여 인텐트 필터에 지정합니다.
이 요소에 지정하는 값은 API 상수 대신
작업의 전체 문자열 이름이어야 합니다(다음 예제 참조).</p></dd>
<dt>데이터</dt>
<dd>인텐트와 관련된 데이터에 대한 설명입니다.
- <p><a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> 요소를 사용하여 인텐트 필터에 지정합니다. 이 요소에서
+ <p><a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> 요소를 사용하여 인텐트 필터에 지정합니다. 이 요소에서
하나 이상의 특성을 사용하여 MIME 유형, URI 접두사, URI 스키마, 또는
이들의 조합 그리고 수락된 데이터 유형을 나타내는 다른 요소들을 지정할 수
있습니다.</p>
@@ -76,12 +76,12 @@
관련되어 있습니다. 시스템이 지원하는 카테고리는
여러 가지가 있지만 대부분은 거의 사용되지 않습니다. 하지만 모든 암묵적인 인텐트는 기본적으로
{@link android.content.Intent#CATEGORY_DEFAULT}로 정의됩니다.
- <p><a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a> 요소를 사용하여 인텐트 필터에
+ <p><a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a> 요소를 사용하여 인텐트 필터에
지정합니다.</p></dd>
</dl>
<p>인텐트 필터에서 액티비티가 허용하는 기준을 선언할 수 있습니다.
-이는 이러한 기준 각각을 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a> 요소 내에 해당 XML 요소를 중첩하여 선언하면
+이는 이러한 기준 각각을 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a> 요소 내에 해당 XML 요소를 중첩하여 선언하면
가능합니다.</p>
<p>예를 들어, 다음은 데이터 유형이 텍스트 또는 이미지인 경우 {@link
@@ -100,10 +100,10 @@
<p>수신되는 인텐트는 각각 하나의 작업 및 하나의 데이터 유형만 지정합니다. 하지만
<a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
-<intent-filter>}</a> 각각에 <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code
-<action>}</a>, <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
-<category>}</a> 및 <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code
-<data>}</a>에 대한 여러
+<intent-filter>}</a> 각각에 <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code
+<action>}</a>, <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
+<category>}</a> 및 <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code
+<data>}</a>에 대한 여러
인스턴스를 선언해도 문제가 되지는 않습니다.</p>
<p>작업 및 데이터의 두 쌍이 상호 배타적으로
diff --git a/docs/html-intl/intl/pt-br/preview/api-overview.jd b/docs/html-intl/intl/pt-br/preview/api-overview.jd
index 33e8c1f..139fb33 100644
--- a/docs/html-intl/intl/pt-br/preview/api-overview.jd
+++ b/docs/html-intl/intl/pt-br/preview/api-overview.jd
@@ -133,8 +133,8 @@
<pre class="no-prettyprint">
adb -e emu finger touch <finger_id>
</pre>
-<p>No Windows, talvez seja necessário executar {@code telnet 127.0.0.1 <emulator-id>} seguido de
-{@code finger touch <finger_id>}.
+<p>No Windows, talvez seja necessário executar {@code telnet 127.0.0.1 <emulator-id>} seguido de
+{@code finger touch <finger_id>}.
</p>
</li>
</ol>
@@ -192,7 +192,7 @@
</pre>
<p>Para cada atividade que quiser expor ao {@code ChooserTargetService}, adicione um elemento
-{@code <meta-data>} com o nome
+{@code <meta-data>} com o nome
{@code "android.service.chooser.chooser_target_service"} no manifesto do aplicativo.
</p>
diff --git a/docs/html-intl/intl/pt-br/training/basics/activity-lifecycle/starting.jd b/docs/html-intl/intl/pt-br/training/basics/activity-lifecycle/starting.jd
index 1f8f080..efe2bad 100644
--- a/docs/html-intl/intl/pt-br/training/basics/activity-lifecycle/starting.jd
+++ b/docs/html-intl/intl/pt-br/training/basics/activity-lifecycle/starting.jd
@@ -149,7 +149,7 @@
na raiz do diretório do seu projeto.</p>
<p>A principal atividade do aplicativo deve ser declarada no manifesto com um <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
-<intent-filter>}</a> que inclui a ação {@link
+<intent-filter>}</a> que inclui a ação {@link
android.content.Intent#ACTION_MAIN MAIN} e categoria
{@link android.content.Intent#CATEGORY_LAUNCHER LAUNCHER}. Por exemplo:</p>
diff --git a/docs/html-intl/intl/pt-br/training/basics/intents/filters.jd b/docs/html-intl/intl/pt-br/training/basics/intents/filters.jd
index 73f0b84..f3b3b12 100644
--- a/docs/html-intl/intl/pt-br/training/basics/intents/filters.jd
+++ b/docs/html-intl/intl/pt-br/training/basics/intents/filters.jd
@@ -31,8 +31,8 @@
que ele possa responder à intenção {@link android.content.Intent#ACTION_SEND} para que os usuários consigam iniciar uma
ação de “compartilhar” por outro aplicativo e iniciar seu aplicativo para executar a ação.</p>
-<p>Para permitir que outros aplicativos iniciem sua atividade, adicione um elemento <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
-em seu arquivo de manifesto para o elemento <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> correspondente.</p>
+<p>Para permitir que outros aplicativos iniciem sua atividade, adicione um elemento <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
+em seu arquivo de manifesto para o elemento <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> correspondente.</p>
<p>Quando seu aplicativo é instalado em um dispositivo, o sistema identifica seu filtro de
intenções e adiciona a informação a um catálogo interno de intenções suportado por todos os aplicativos instalados.
@@ -56,13 +56,13 @@
<dt>Ação</dt>
<dd>Uma cadeia de caracteres que dá nome a ação a ser executada. Geralmente, um dos valores definidos para a plataforma
como {@link android.content.Intent#ACTION_SEND} ou {@link android.content.Intent#ACTION_VIEW}.
- <p>Especifique-o em seu filtro de intenções com o elemento <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a>.
+ <p>Especifique-o em seu filtro de intenções com o elemento <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a>.
O valor especificado neste elemento deve ser o nome completo da cadeia de caracteres para a ação e não a
API constante (veja exemplos abaixo).</p></dd>
<dt>Dados</dt>
<dd>A descrição dos dados associados à intenção.
- <p>Especifique-a em seu filtro de intenções com o elemento <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a>. Através de um
+ <p>Especifique-a em seu filtro de intenções com o elemento <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a>. Através de um
ou mais atributos neste elemento, você pode especificar apenas o tipo MIME, apenas um prefixo de URI,
apenas um esquema de URI ou uma combinação destes e outros elementos que indicam o tipo de dados
aceito.</p>
@@ -76,12 +76,12 @@
ao gesto do usuário ou localização onde foi iniciada. Há diferentes categorias
compatíveis com o sistema, mas a maioria raramente é utilizada. No entanto, todas as intenções implícitas são definidas com
{@link android.content.Intent#CATEGORY_DEFAULT} por padrão.
- <p>Especifique-a em seu filtro de intenções com o elemento <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a>
+ <p>Especifique-a em seu filtro de intenções com o elemento <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a>
.</p></dd>
</dl>
<p>Em seu filtro de intenções, declare quais critérios serão aceitos por sua atividade
-informando cada um deles com elementos XML correspondentes aninhados no elemento <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
+informando cada um deles com elementos XML correspondentes aninhados no elemento <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
.</p>
<p>Este é um exemplo de atividade com filtro de intenções que responde à intenção {@link
@@ -100,11 +100,11 @@
<p>Cada intenção em entrada especifica apenas uma ação e um tipo de dado, mas pode-se declarar
múltiplas instâncias dos elementos <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code
-<action>}</a>, <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
-<category>}</a> e <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code
-<data>}</a> em cada
+<action>}</a>, <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
+<category>}</a> e <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code
+<data>}</a> em cada
<a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
-<intent-filter>}</a>.</p>
+<intent-filter>}</a>.</p>
<p>Se dois pares de ação e dados fores mutuamente exclusivos em
seus comportamentos, crie filtros de intenções separados para especificar quais ações são aceitáveis
diff --git a/docs/html-intl/intl/ru/distribute/googleplay/quality/tv.jd b/docs/html-intl/intl/ru/distribute/googleplay/quality/tv.jd
index 995f2e5..e478f9a 100644
--- a/docs/html-intl/intl/ru/distribute/googleplay/quality/tv.jd
+++ b/docs/html-intl/intl/ru/distribute/googleplay/quality/tv.jd
@@ -320,7 +320,7 @@
<td>
<p style="margin-bottom:.5em;">
Если приложение использует игровой контроллер в качестве основного устройства ввода,
- это требование должно быть задекларировано в теге манифеста <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>.
+ это требование должно быть задекларировано в теге манифеста <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>.
(<a href="{@docRoot}training/tv/games/index.html#gamepad">См. как это сделать</a>)
</p>
</td>
diff --git a/docs/html-intl/intl/ru/google/play/filters.jd b/docs/html-intl/intl/ru/google/play/filters.jd
index f9af767..0059a1a 100644
--- a/docs/html-intl/intl/ru/google/play/filters.jd
+++ b/docs/html-intl/intl/ru/google/play/filters.jd
@@ -329,23 +329,23 @@
<tr><th>Элемент манифеста</th><th>Сводная информация</th></tr>
<tr>
<td><nobr><a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
-<compatible-screens>}</a></nobr></td>
+<compatible-screens>}</a></nobr></td>
<td>
<p>Google Play отфильтровывает приложение, если размер и разрешение экрана устройства
-не соответствуют какой-либо конфигурации экрана(декларируемые элементом {@code <screen>}) в элементе {@code
-<compatible-screens>}.</p>
+не соответствуют какой-либо конфигурации экрана(декларируемые элементом {@code <screen>}) в элементе {@code
+<compatible-screens>}.</p>
<p class="caution"><strong>Внимание!</strong> В обычной практике <strong>вы не должны использовать
этот элемент манифеста</strong>. Применение этого элемента существенно
сокращает число потенциальных пользователей вашего приложения, исключая все комбинации размеров
и разрешения экрана, которые не указаны в списке. Вместо этого используйте элемент манифеста <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> (описанный выше в <a href="#table1">
+<supports-screens>}</a> (описанный выше в <a href="#table1">
таблице 1</a>), чтобы определить режим совместимости для неучтенных альтернативными ресурсами
конфигураций экранов.</p>
</td>
</tr>
<tr>
<td><nobr><a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code
-<supports-gl-texture>}</a></nobr></td>
+<supports-gl-texture>}</a></nobr></td>
<td>
<p>Google Play будет отфильтровывать приложение, если не окажется ни одного формата
сжатия GL-текстуры, поддерживаемого устройством. </p>
@@ -408,16 +408,16 @@
<ul>
<li>Форматы сжатия текстур OpenGL
<p>Используя элемент <a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code
-<supports-gl-texture>}</a>.</p>
+<supports-gl-texture>}</a>.</p>
</li>
<li>Размер экрана (а в некоторых случаях и разрешение)
<p>Используя элемент <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> или <a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
-<compatible-screens>}</a>.</p>
+<supports-screens>}</a> или <a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
+<compatible-screens>}</a>.</p>
</li>
<li>Уровень API-интерфейса
<p>Используя элемент <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code
-<uses-sdk>}</a>.</p>
+<uses-sdk>}</a>.</p>
</li>
<li>Архитектура процессора (ABI)
<p>Включая специфичные библиотеки, созданные на основе <a href="{@docRoot}tools/sdk/ndk/index.html">Android
diff --git a/docs/html-intl/intl/ru/preview/api-overview.jd b/docs/html-intl/intl/ru/preview/api-overview.jd
index ae30e09..aa4a057 100644
--- a/docs/html-intl/intl/ru/preview/api-overview.jd
+++ b/docs/html-intl/intl/ru/preview/api-overview.jd
@@ -133,8 +133,8 @@
<pre class="no-prettyprint">
adb -e emu finger touch <finger_id>
</pre>
-<p>В Windows, возможно, потребуется выполнить команду {@code telnet 127.0.0.1 <emulator-id>}, а затем
-{@code finger touch <finger_id>}.
+<p>В Windows, возможно, потребуется выполнить команду {@code telnet 127.0.0.1 <emulator-id>}, а затем
+{@code finger touch <finger_id>}.
</p>
</li>
</ol>
@@ -192,7 +192,7 @@
</pre>
<p>Для каждого действия, которое необходимо сделать доступным для {@code ChooserTargetService}, добавьте в манифест вашего приложения элемент
-{@code <meta-data>} с именем
+{@code <meta-data>} с именем
{@code "android.service.chooser.chooser_target_service"}.
</p>
diff --git a/docs/html-intl/intl/ru/training/basics/activity-lifecycle/starting.jd b/docs/html-intl/intl/ru/training/basics/activity-lifecycle/starting.jd
index 3a946e2..ef8be5b 100644
--- a/docs/html-intl/intl/ru/training/basics/activity-lifecycle/starting.jd
+++ b/docs/html-intl/intl/ru/training/basics/activity-lifecycle/starting.jd
@@ -149,7 +149,7 @@
который находится в корневом каталоге вашего проекта.</p>
<p>Основная операция приложения должна декларироваться в манифесте с помощью фильтра <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
-<intent-filter>}</a>, включающего действие {@link
+<intent-filter>}</a>, включающего действие {@link
android.content.Intent#ACTION_MAIN MAIN} и категорию
{@link android.content.Intent#CATEGORY_LAUNCHER LAUNCHER}. Например:</p>
diff --git a/docs/html-intl/intl/ru/training/basics/intents/filters.jd b/docs/html-intl/intl/ru/training/basics/intents/filters.jd
index 0f5bb31..c3cbfc9 100644
--- a/docs/html-intl/intl/ru/training/basics/intents/filters.jd
+++ b/docs/html-intl/intl/ru/training/basics/intents/filters.jd
@@ -31,8 +31,8 @@
будет поддерживать объекты Intent (намерения) {@link android.content.Intent#ACTION_SEND}, чтобы пользователи могли
поделиться контентом из другого приложения и запускать ваше приложение для выполнения требуемого действия.</p>
-<p>Чтобы разрешить другим приложениям запускать ваши операции, вам нужно добавить в ваш файл манифеста элемент <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
- для соответствующего элемента <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>.</p>
+<p>Чтобы разрешить другим приложениям запускать ваши операции, вам нужно добавить в ваш файл манифеста элемент <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
+ для соответствующего элемента <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>.</p>
<p>Если ваше приложение установлено на устройстве, система идентифицирует ваши
фильтры Intent и добавляет информацию во внутренний каталог намерений, поддерживаемый всеми установленными приложениями.
@@ -56,13 +56,13 @@
<dt>Действие</dt>
<dd>Строка, называющая действие, которое необходимо выполнить. Обычно это одно из определяемых платформой значений,
например, {@link android.content.Intent#ACTION_SEND} или {@link android.content.Intent#ACTION_VIEW}.
- <p>Это следует указать в фильтре Intent с элементом <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a>.
+ <p>Это следует указать в фильтре Intent с элементом <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a>.
Указанное в этом элементе значение должно представлять собой полное имя строки действия, а не
постоянное значение API-интерфейса (см. примеры ниже).</p></dd>
<dt>Данные</dt>
<dd>Описание данных, связанных с объектом Intent.
- <p>Указывается в фильтре Intent с элементом <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a>. Используя один
+ <p>Указывается в фильтре Intent с элементом <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a>. Используя один
или несколько атрибутов в этом элементе, вы можете указать только тип MIME, только префикс URI,
только схему URI или из сочетание, а также другие индикаторы типа
принимаемых данных.</p>
@@ -76,12 +76,12 @@
с жестом пользователя или местом запуска. Система поддерживает несколько разных категорий,
но большинство из них используется редко. Однако по умолчанию все неявные объекты Intent определяются с
{@link android.content.Intent#CATEGORY_DEFAULT}.
- <p>Это указывается в фильтре Intent с элементом <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a>
+ <p>Это указывается в фильтре Intent с элементом <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a>
.</p></dd>
</dl>
<p>В своем фильтре Intent вы можете декларировать критерии, принимаемые вашей операцией.
-Для этого нужно декларировать каждый из них с соответствующими элементами XML, вложенными в элемент <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
+Для этого нужно декларировать каждый из них с соответствующими элементами XML, вложенными в элемент <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
.</p>
<p>Рассмотрим в качестве примера операцию с фильтром Intent, обрабатывающим объект {@link
@@ -100,11 +100,11 @@
<p>Каждый входящий объект Intent указывает только одно действие и только один тип данных, однако допускается декларирование нескольких
экземпляров элементов <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code
-<action>}</a>, <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
-<category>}</a> и <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code
-<data>}</a> в каждом
+<action>}</a>, <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
+<category>}</a> и <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code
+<data>}</a> в каждом
<a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
-<intent-filter>}</a>.</p>
+<intent-filter>}</a>.</p>
<p>Если поведение любых двух пар действий и данных является взаимоисключающим,
необходимо создать отдельные фильтры Intent с указанием допустимых действий
diff --git a/docs/html-intl/intl/zh-cn/distribute/googleplay/quality/tv.jd b/docs/html-intl/intl/zh-cn/distribute/googleplay/quality/tv.jd
index 5eea293..6a60945 100644
--- a/docs/html-intl/intl/zh-cn/distribute/googleplay/quality/tv.jd
+++ b/docs/html-intl/intl/zh-cn/distribute/googleplay/quality/tv.jd
@@ -320,7 +320,7 @@
<td>
<p style="margin-bottom:.5em;">
如果应用使用游戏手柄作为主要输入方法,则要通过
-<a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>清单文件标记来声明相应的要求。
+<a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>清单文件标记来声明相应的要求。
(<a href="{@docRoot}training/tv/games/index.html#gamepad">了解方法</a>)
</p>
</td>
diff --git a/docs/html-intl/intl/zh-cn/google/play/filters.jd b/docs/html-intl/intl/zh-cn/google/play/filters.jd
index 70f8d9b..9d68faf 100644
--- a/docs/html-intl/intl/zh-cn/google/play/filters.jd
+++ b/docs/html-intl/intl/zh-cn/google/play/filters.jd
@@ -329,23 +329,23 @@
<tr><th>清单文件元素</th><th>摘要</th></tr>
<tr>
<td><nobr><a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
-<compatible-screens>}</a></nobr></td>
+<compatible-screens>}</a></nobr></td>
<td>
<p>如果设备屏幕尺寸和密度不符合
{@code
-<compatible-screens>} 元素中的任何屏幕配置(由{@code <screen>} 元素声明),则 Google Play 会将该应用筛选掉。</p>
+<compatible-screens>} 元素中的任何屏幕配置(由{@code <screen>} 元素声明),则 Google Play 会将该应用筛选掉。</p>
<p class="caution"><strong>注意:</strong>正常情况下,<strong>不能使用此清单文件元素</strong>。
使用此元素可能会显著减少应用的潜在用户群,因为排除了您未列出的所有屏幕尺寸和密度组合。
应当改用 <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> 清单文件元素(上面<a href="#table1">表
+<supports-screens>}</a> 清单文件元素(上面<a href="#table1">表
1</a> 所述),通过替代资源为您没有考虑的屏幕配置启用屏幕兼容模式。
</p>
</td>
</tr>
<tr>
<td><nobr><a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code
-<supports-gl-texture>}</a></nobr></td>
+<supports-gl-texture>}</a></nobr></td>
<td>
<p>除非应用所支持的一种或多种 GL 纹理压缩格式也受到设备支持,否则 Google Play 将应用筛选掉。
</p>
@@ -408,16 +408,16 @@
<ul>
<li>OpenGL 纹理压缩格式
<p>使用 <a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code
-<supports-gl-texture>}</a> 元素。</p>
+<supports-gl-texture>}</a> 元素。</p>
</li>
<li>屏幕尺寸(以及可选的屏幕密度)
<p>使用 <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> 或 <a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
-<compatible-screens>}</a> 元素。</p>
+<supports-screens>}</a> 或 <a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
+<compatible-screens>}</a> 元素。</p>
</li>
<li>API 级别
<p>使用 <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code
-<uses-sdk>}</a> 元素。</p>
+<uses-sdk>}</a> 元素。</p>
</li>
<li>CPU 架构 (ABI)
<p>包括针对特定 CPU 架构(例如 ARM EABI v7 或 x86)的、通过 <a href="{@docRoot}tools/sdk/ndk/index.html">Android
diff --git a/docs/html-intl/intl/zh-cn/preview/api-overview.jd b/docs/html-intl/intl/zh-cn/preview/api-overview.jd
index c64a38e..f7764cd 100644
--- a/docs/html-intl/intl/zh-cn/preview/api-overview.jd
+++ b/docs/html-intl/intl/zh-cn/preview/api-overview.jd
@@ -134,7 +134,7 @@
adb -e emu finger touch <finger_id>
</pre>
<p>在 Windows 上,您可能需要运行带有
-{@code finger touch <finger_id>} 参数的 {@code telnet 127.0.0.1 <emulator-id>} 命令。
+{@code finger touch <finger_id>} 参数的 {@code telnet 127.0.0.1 <emulator-id>} 命令。
</p>
</li>
</ol>
@@ -193,7 +193,7 @@
<p>对于您想要向 {@code ChooserTargetService} 公开的每个活动,请在您的应用清单文件中为其添加一个名为
{@code "android.service.chooser.chooser_target_service"} 的
-{@code <meta-data>} 元素。
+{@code <meta-data>} 元素。
</p>
<pre>
diff --git a/docs/html-intl/intl/zh-cn/training/basics/activity-lifecycle/starting.jd b/docs/html-intl/intl/zh-cn/training/basics/activity-lifecycle/starting.jd
index 05f9728..cebd748 100644
--- a/docs/html-intl/intl/zh-cn/training/basics/activity-lifecycle/starting.jd
+++ b/docs/html-intl/intl/zh-cn/training/basics/activity-lifecycle/starting.jd
@@ -149,7 +149,7 @@
</p>
<p>您的应用的主Activity必须使用 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
-<intent-filter>}</a>(包括 {@link
+<intent-filter>}</a>(包括 {@link
android.content.Intent#ACTION_MAIN MAIN} 操作和
{@link android.content.Intent#CATEGORY_LAUNCHER LAUNCHER} 类别)在宣示说明中声明。例如:</p>
diff --git a/docs/html-intl/intl/zh-cn/training/basics/intents/filters.jd b/docs/html-intl/intl/zh-cn/training/basics/intents/filters.jd
index 4bcbdf9..ff5c792 100644
--- a/docs/html-intl/intl/zh-cn/training/basics/intents/filters.jd
+++ b/docs/html-intl/intl/zh-cn/training/basics/intents/filters.jd
@@ -31,8 +31,8 @@
</p>
-<p>要允许其他应用开始您的Activity,您需要 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
-在相应元素的宣示说明文件中添加一个 <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> 元素。</p>
+<p>要允许其他应用开始您的Activity,您需要 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
+在相应元素的宣示说明文件中添加一个 <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> 元素。</p>
<p>当您的应用安装在设备上时,系统会识别您的意向过滤器并添加信息至所有已安装应用支持的意向内部目录。当应用通过隐含意向调用 {@link android.app.Activity#startActivity
startActivity()} 或 {@link android.app.Activity#startActivityForResult startActivityForResult()} 时,系统会找到可以响应该意向的Activity。
@@ -56,13 +56,13 @@
<dt>操作</dt>
<dd>对要执行的操作命名的字符串。通常是平台定义的值之一,比如
{@link android.content.Intent#ACTION_SEND} 或 {@link android.content.Intent#ACTION_VIEW}。
- <p>使用 <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a> 元素在您的意向过滤器中指定此值。您在此元素中指定的值必须是操作的完整字符串名称,而不是 API 常数(请参阅以下示例)。
+ <p>使用 <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a> 元素在您的意向过滤器中指定此值。您在此元素中指定的值必须是操作的完整字符串名称,而不是 API 常数(请参阅以下示例)。
</p></dd>
<dt>数据</dt>
<dd>与意向关联的数据描述。
- <p>用 <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> 元素在您的意向过滤器中指定此内容。使用此元素中的一个或多个属性,您可以只指定 MIME 类型、URI 前缀、URI 架构或这些的组合以及其他指示所接受数据类型的项。
+ <p>用 <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> 元素在您的意向过滤器中指定此内容。使用此元素中的一个或多个属性,您可以只指定 MIME 类型、URI 前缀、URI 架构或这些的组合以及其他指示所接受数据类型的项。
</p>
@@ -76,11 +76,11 @@
系统支持多种不同的类别,但大多数都很少使用。
但是,所有隐含意向默认使用
{@link android.content.Intent#CATEGORY_DEFAULT} 进行定义。
- <p>用 <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a>
+ <p>用 <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a>
元素在您的意向过滤器中指定此内容。</p></dd>
</dl>
-<p>在您的意向过滤器中,您可以通过声明嵌套在 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
+<p>在您的意向过滤器中,您可以通过声明嵌套在 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
元素中的具有相应 XML 元素的各项,来声明您的Activity接受的条件。
</p>
@@ -100,11 +100,11 @@
<p>每个入站意向仅指定一项操作和一个数据类型,但可以在每个
<a href="{@docRoot}guide/topics/manifest/intent-filter-element.html"> {@code
-<intent-filter>}</a> 中声明
+<intent-filter>}</a> 中声明
<a href="{@docRoot}guide/topics/manifest/action-element.html">{@code
-<action>}</a>、<a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
-<category>}</a> 和 <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code
-<data>}</a> 元素的多个实例。</p>
+<action>}</a>、<a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
+<category>}</a> 和 <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code
+<data>}</a> 元素的多个实例。</p>
<p>如果任何两对操作和数据的行为相斥,您应创建单独的意向过滤器指定与哪种数据类型配对时哪些操作可接受。
diff --git a/docs/html-intl/intl/zh-tw/distribute/googleplay/quality/tv.jd b/docs/html-intl/intl/zh-tw/distribute/googleplay/quality/tv.jd
index 9329606..996df61 100644
--- a/docs/html-intl/intl/zh-tw/distribute/googleplay/quality/tv.jd
+++ b/docs/html-intl/intl/zh-tw/distribute/googleplay/quality/tv.jd
@@ -285,7 +285,7 @@
</td>
<td>
<p style="margin-bottom:.5em;">
- 若應用程式將遊戲手把用作主要輸入方式,會使用 <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> 宣示說明標籤宣告相應的需求。(<a href="{@docRoot}training/tv/games/index.html#gamepad">進行了解</a>)
+ 若應用程式將遊戲手把用作主要輸入方式,會使用 <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> 宣示說明標籤宣告相應的需求。(<a href="{@docRoot}training/tv/games/index.html#gamepad">進行了解</a>)
</p>
</td>
</tr>
diff --git a/docs/html-intl/intl/zh-tw/google/play/filters.jd b/docs/html-intl/intl/zh-tw/google/play/filters.jd
index 8cfd59a..e96b9dd 100644
--- a/docs/html-intl/intl/zh-tw/google/play/filters.jd
+++ b/docs/html-intl/intl/zh-tw/google/play/filters.jd
@@ -208,14 +208,14 @@
<table>
<tr><th>宣示說明元素</th><th>摘要</th></tr>
<tr>
- <td><nobr><a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code <compatible-screens>}</a></nobr></td>
+ <td><nobr><a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code <compatible-screens>}</a></nobr></td>
<td>
- <p>若裝置螢幕大小與密度不符合元素中的{@code <compatible-screens>}任何螢幕組態 (由 {@code <screen>} 元素宣告),Google Play 會對應用程式進行篩選。</p>
- <p class="caution"><strong>注意:</strong>通常,<strong>您不應使用此宣示說明元素</strong>。若使用此元素,會將您未列出的螢幕大小與密度的所有組合排除在外,從而大幅減少您應用程式可能擁有的使用者。您應改為針對未使用替代資源說明的螢幕組態,使用 <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code <supports-screens>}</a> 宣示說明元素 (如<a href="#table1">表 1</a> 所述) 啟用螢幕相容性模式。</p>
+ <p>若裝置螢幕大小與密度不符合元素中的{@code <compatible-screens>}任何螢幕組態 (由 {@code <screen>} 元素宣告),Google Play 會對應用程式進行篩選。</p>
+ <p class="caution"><strong>注意:</strong>通常,<strong>您不應使用此宣示說明元素</strong>。若使用此元素,會將您未列出的螢幕大小與密度的所有組合排除在外,從而大幅減少您應用程式可能擁有的使用者。您應改為針對未使用替代資源說明的螢幕組態,使用 <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code <supports-screens>}</a> 宣示說明元素 (如<a href="#table1">表 1</a> 所述) 啟用螢幕相容性模式。</p>
</td>
</tr>
<tr>
- <td><nobr><a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code <supports-gl-texture>}</a></nobr></td>
+ <td><nobr><a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code <supports-gl-texture>}</a></nobr></td>
<td>
<p>除非裝置支援應用程式所支援的一或多個 GL 材質壓縮格式,否則 Google Play 會對應用程式進行篩選。 </p>
</td>
@@ -249,11 +249,11 @@
<p>目前,只有在每個 APK 根據以下組態提供不同的篩選器時,Google Play 才允許您針對同一應用程式發行多個 APK:</p>
<ul>
- <li>OpenGL 材質壓縮格式 <p>透過使用 <a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code <supports-gl-texture>}</a>元素。</p>
+ <li>OpenGL 材質壓縮格式 <p>透過使用 <a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code <supports-gl-texture>}</a>元素。</p>
</li>
- <li>螢幕大小 (以及可選的螢幕密度) <p>透過使用 <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code <supports-screens>}</a>或<a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code <compatible-screens>}</a> 元素。</p>
+ <li>螢幕大小 (以及可選的螢幕密度) <p>透過使用 <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code <supports-screens>}</a>或<a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code <compatible-screens>}</a> 元素。</p>
</li>
- <li>API 層級 <p>透過使用 <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a>元素。</p>
+ <li>API 層級 <p>透過使用 <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a>元素。</p>
</li>
<li>CPU 架構 (ABI) <p>透過納入使用 <a href="{@docRoot}tools/sdk/ndk/index.html">Android NDK</a> (針對諸如 ARM EABI v7 或 x86 等特定 CPU 架構) 而建置的原生資源庫。</p>
</li>
diff --git a/docs/html-intl/intl/zh-tw/preview/api-overview.jd b/docs/html-intl/intl/zh-tw/preview/api-overview.jd
index f6c5696..a68f0cd 100644
--- a/docs/html-intl/intl/zh-tw/preview/api-overview.jd
+++ b/docs/html-intl/intl/zh-tw/preview/api-overview.jd
@@ -133,8 +133,8 @@
<pre class="no-prettyprint">
adb -e emu finger touch <finger_id>
</pre>
-<p>在 Windows 上,您可能必須執行 {@code telnet 127.0.0.1 <emulator-id>},後面接著
-{@code finger touch <finger_id>}。
+<p>在 Windows 上,您可能必須執行 {@code telnet 127.0.0.1 <emulator-id>},後面接著
+{@code finger touch <finger_id>}。
</p>
</li>
</ol>
@@ -193,7 +193,7 @@
<p>針對您要向 {@code ChooserTargetService} 公開的每個活動,在您的應用程式宣示說明中,新增名稱為
{@code "android.service.chooser.chooser_target_service"} 的
-{@code <meta-data>} 元素。
+{@code <meta-data>} 元素。
</p>
<pre>
diff --git a/docs/html-intl/intl/zh-tw/training/basics/activity-lifecycle/starting.jd b/docs/html-intl/intl/zh-tw/training/basics/activity-lifecycle/starting.jd
index 3453ac5..fae2fa3 100644
--- a/docs/html-intl/intl/zh-tw/training/basics/activity-lifecycle/starting.jd
+++ b/docs/html-intl/intl/zh-tw/training/basics/activity-lifecycle/starting.jd
@@ -149,7 +149,7 @@
</p>
<p>必須在宣示說明中使用 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
-<intent-filter>}</a> (包括 {@link
+<intent-filter>}</a> (包括 {@link
android.content.Intent#ACTION_MAIN MAIN} 行為與 {@link android.content.Intent#CATEGORY_LAUNCHER LAUNCHER} 類別) 宣告您應用程式的主要應用行為顯示。
例如:</p>
diff --git a/docs/html-intl/intl/zh-tw/training/basics/intents/filters.jd b/docs/html-intl/intl/zh-tw/training/basics/intents/filters.jd
index 2088b27..6b4eebf 100644
--- a/docs/html-intl/intl/zh-tw/training/basics/intents/filters.jd
+++ b/docs/html-intl/intl/zh-tw/training/basics/intents/filters.jd
@@ -31,7 +31,7 @@
</p>
-<p>若要允許其他應用程式啟動您的應用行為顯示,需要在您的宣示說明檔案中針對對應的 <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> 元素新增 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a> 元素。
+<p>若要允許其他應用程式啟動您的應用行為顯示,需要在您的宣示說明檔案中針對對應的 <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> 元素新增 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a> 元素。
</p>
<p>若您的應用程式安裝在裝置上,系統會識別您的意圖篩選器,並將資訊新增至安裝的所有應用程式都支援的意圖內部目錄中。在應用程式使用隱含意圖呼叫 {@link android.app.Activity#startActivity
@@ -56,13 +56,13 @@
<dt>行為</dt>
<dd>對要執行的行為進行命名的字串。通常是平台所定義值 (例如 {@link android.content.Intent#ACTION_SEND} 或 {@link android.content.Intent#ACTION_VIEW}) 的其中之一。
- <p>請在您的意圖篩選器中使用 <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a> 元素指定此項目。在此元素中指定的值必須是行為的完整字串名稱,而非 API 常數 (請參閱以下範例)。
+ <p>請在您的意圖篩選器中使用 <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a> 元素指定此項目。在此元素中指定的值必須是行為的完整字串名稱,而非 API 常數 (請參閱以下範例)。
</p></dd>
<dt>資料</dt>
<dd>對意圖所關聯資料的描述。
- <p>請在意圖篩選器中使用 <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> 元素指定此項目。在此元素中使用一或多個屬性,您可以僅指定 MIME 類型、URI 首碼、URI 配置,或指定這些項目的組合,以及表示所接受資料類型的其他項目。
+ <p>請在意圖篩選器中使用 <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> 元素指定此項目。在此元素中使用一或多個屬性,您可以僅指定 MIME 類型、URI 首碼、URI 配置,或指定這些項目的組合,以及表示所接受資料類型的其他項目。
</p>
@@ -76,11 +76,11 @@
系統支援多種不同的類別,但大多數類別很少使用。
然而依預設,所有隱含意圖都與 {@link android.content.Intent#CATEGORY_DEFAULT} 一併定義。
- <p>請在意圖篩選器中使用 <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a> 元素指定此項目。
+ <p>請在意圖篩選器中使用 <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a> 元素指定此項目。
</p></dd>
</dl>
-<p>在意圖篩選器中,您可以宣告每個條件以及 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a> 元素中巢套的對應 XML 元素,以宣告應用行為顯示所接受的條件。
+<p>在意圖篩選器中,您可以宣告每個條件以及 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a> 元素中巢套的對應 XML 元素,以宣告應用行為顯示所接受的條件。
</p>
@@ -99,10 +99,10 @@
</pre>
<p>傳入的每項意圖只會指定一項行為與一種資料類型,但是在每個 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
-<intent-filter>}</a> 中,可以宣告 <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code
-<action>}</a>、<a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
-<category>}</a> 與 <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code
-<data>}</a> 元素的多個執行個體。
+<intent-filter>}</a> 中,可以宣告 <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code
+<action>}</a>、<a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
+<category>}</a> 與 <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code
+<data>}</a> 元素的多個執行個體。
</p>
diff --git a/docs/html/about/dashboards/index.jd b/docs/html/about/dashboards/index.jd
index e04940b..ff6b681 100644
--- a/docs/html/about/dashboards/index.jd
+++ b/docs/html/about/dashboards/index.jd
@@ -112,10 +112,10 @@
<p>To declare which version of OpenGL ES your application requires, you should use the {@code
android:glEsVersion} attribute of the <a
-href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
+href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
element. You can also use the <a
href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code
-<supports-gl-texture>}</a> element to declare the GL compression formats that your application
+<supports-gl-texture>}</a> element to declare the GL compression formats that your application
uses.</p>
diff --git a/docs/html/about/versions/android-1.6.jd b/docs/html/about/versions/android-1.6.jd
index 8e97ff6..e727f55 100644
--- a/docs/html/about/versions/android-1.6.jd
+++ b/docs/html/about/versions/android-1.6.jd
@@ -296,7 +296,7 @@
<ul>
<li>New <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
- <supports-screens>}</a> element lets you specify the device screen sizes that your
+ <supports-screens>}</a> element lets you specify the device screen sizes that your
application is designed and tested to support, where "size" is a combination
of resolution and density. If your application is run on a device whose screen
size is not specified in the <code><supports-screen></code> element, the system
@@ -331,7 +331,7 @@
</p>
</li>
- <li>New <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
+ <li>New <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
element lets an application specify hardware (or other)
features that it requires to function normally. When an application
specifies such features, the system allows the application to be installed only
@@ -345,7 +345,7 @@
</ul>
</li>
<li>New attributes for the
- <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a> element:
+ <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a> element:
<ul>
<li><code>targetSdkVersion</code>: Indicates the API Level that the application is targeting.
It is able to run on older versions (down to minSdkVersion), but was explicitly tested to
diff --git a/docs/html/about/versions/android-2.0-highlights.jd b/docs/html/about/versions/android-2.0-highlights.jd
index 3b23e4d..c16088a 100644
--- a/docs/html/about/versions/android-2.0-highlights.jd
+++ b/docs/html/about/versions/android-2.0-highlights.jd
@@ -159,7 +159,7 @@
<li>Database API support, for client-side databases using SQL.</li>
<li>Application cache support, for offline applications.</li>
<li>Geolocation API support, to provide location information about the device.</li>
- <li>{@code <video>} tag support in fullscreen mode.</li>
+ <li>{@code <video>} tag support in fullscreen mode.</li>
</ul>
</li>
</ul>
diff --git a/docs/html/about/versions/android-2.3.jd b/docs/html/about/versions/android-2.3.jd
index 4b8ef91..34fdb52 100644
--- a/docs/html/about/versions/android-2.3.jd
+++ b/docs/html/about/versions/android-2.3.jd
@@ -589,7 +589,7 @@
<ul>
<li>New <code>xlargeScreens</code> attribute for <a
href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a>
+<supports-screens>}</a>
element, to indicate whether the application supports
extra large screen form-factors. For details, see <a
href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple
diff --git a/docs/html/about/versions/android-3.0.jd b/docs/html/about/versions/android-3.0.jd
index f319fed..5184743 100644
--- a/docs/html/about/versions/android-3.0.jd
+++ b/docs/html/about/versions/android-3.0.jd
@@ -257,7 +257,7 @@
such as from a content provider.</p>
<p>The {@link android.appwidget.AppWidgetProviderInfo} class (defined in XML with an {@code
-<appwidget-provider>} element) also supports two new fields: {@link
+<appwidget-provider>} element) also supports two new fields: {@link
android.appwidget.AppWidgetProviderInfo#autoAdvanceViewId} and {@link
android.appwidget.AppWidgetProviderInfo#previewImage}. The {@link
android.appwidget.AppWidgetProviderInfo#autoAdvanceViewId} field lets you specify the view ID of the
@@ -535,9 +535,9 @@
<p>You can now enable the OpenGL renderer for your application by setting {@code
android:hardwareAccelerated="true"} in your manifest element's <a
-href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
+href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
element or for individual <a
-href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
+href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
elements.</p>
<p>This flag helps applications by making them draw faster. This results in smoother animations,
@@ -683,7 +683,7 @@
href="{@docRoot}guide/topics/ui/menus.html#options-menu">Options Menu</a>, you can register keyboard
shortcuts by setting either the {@code android:alphabeticShortcut} or {@code
android:numericShortcut} attribute for each <a
-href="{@docRoot}guide/topics/resources/menu-resource.html#item-element">{@code <item>}</a>
+href="{@docRoot}guide/topics/resources/menu-resource.html#item-element">{@code <item>}</a>
element (or with {@link android.view.MenuItem#setShortcut setShortcut()}).</li>
<li>Android 3.0 includes a new "virtual keyboard" device with the id {@link
@@ -715,9 +715,9 @@
<li>The {@link android.R.attr#splitMotionEvents android:splitMotionEvents} attribute for view groups
allows you to disable split touch events that occur between child views in a layout. For example:
<pre>
-<LinearLayout android:splitMotionEvents="false" ... >
+<LinearLayout android:splitMotionEvents="false" ... >
...
-</LinearLayout>
+</LinearLayout>
</pre>
<p>This way, child views in the linear layout cannot split touch events—only one view can
receive touch events at a time.</p>
@@ -727,14 +727,14 @@
allows you to disable split touch events across windows, by applying it to a theme for the activity
or entire application. For example:
<pre>
-<style name="NoSplitMotionEvents" parent="android:Theme.Holo">
- <item name="android:windowEnableSplitTouch">false</item>
+<style name="NoSplitMotionEvents" parent="android:Theme.Holo">
+ <item name="android:windowEnableSplitTouch">false</item>
...
-</style>
+</style>
</pre>
<p>When this theme is applied to an <a
-href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> or <a
-href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>,
+href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> or <a
+href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>,
only touch events within the current activity window are accepted. For example, by disabling split
touch events across windows, the system bar cannot receive touch events at the same time as the
activity. This does <em>not</em> affect whether views inside the activity can split touch
@@ -794,7 +794,7 @@
capabilities of the device. For example, the following HTML provides an input for the user to
capture a photo to upload:</p>
<pre>
-<input type="file" accept="image/*;capture=camera" />
+<input type="file" accept="image/*;capture=camera" />
</pre>
<p>Or by excluding the {@code capture=camera} parameter, the user can choose to either capture a
new image with the camera or select one from the device (such as from the Gallery application).</p>
@@ -850,7 +850,7 @@
<h3>New feature constants</h3>
<p>The <a
-href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
+href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
manfest element should be used to inform external entities (such as Google Play) of the set of
hardware and software features on which your application depends. In this release, Android adds the
following new constants that applications can declare with this element:</p>
@@ -868,14 +868,14 @@
<em>not</em> want your application filtered from devices with an emulated touchscreen, you
should declare {@link
android.content.pm.PackageManager#FEATURE_FAKETOUCH "android.hardware.faketouch"} with a <a
-href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
+href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
element. This way, your application will be available to the greatest number of device types,
including those that provide only an emulated touchscreen input.</p>
<p>All devices that include a touchscreen also support {@link
android.content.pm.PackageManager#FEATURE_FAKETOUCH "android.hardware.faketouch"}, because
touchscreen capabilities are a superset of faketouch capabilities. Thus, unless you actually require
a touchscreen, you should add a <a
-href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
+href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
element for faketouch.</p>
</li>
</ul>
@@ -889,14 +889,14 @@
<li>{@link android.Manifest.permission#BIND_REMOTEVIEWS
"android.permission.BIND_REMOTEVIEWS"}
<p>This must be declared as a required permission in the <a
-href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>}</a> manifest
+href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>}</a> manifest
element for an implementation of {@link android.widget.RemoteViewsService}. For example, when
creating an App Widget that uses {@link android.widget.RemoteViewsService} to populate a
collection view, the manifest entry may look like this:</p>
<pre>
<service android:name=".widget.WidgetService"
android:exported="false"
- android:permission="android.permission.BIND_REMOTEVIEWS" />
+ android:permission="android.permission.BIND_REMOTEVIEWS" />
</pre>
</ul>
diff --git a/docs/html/about/versions/android-3.1.jd b/docs/html/about/versions/android-3.1.jd
index c22dfaa..cdcf51e 100644
--- a/docs/html/about/versions/android-3.1.jd
+++ b/docs/html/about/versions/android-3.1.jd
@@ -388,8 +388,8 @@
android:previewImage="@drawable/preview"
android:initialLayout="@layout/example_appwidget"
android:configure="com.example.android.ExampleAppWidgetConfigure"
- android:resizeMode="horizontal|vertical" >
-</appwidget-provider></pre>
+ android:resizeMode="horizontal|vertical" >
+</appwidget-provider></pre>
<p>For more information about Home screen widgets, see the <a
href="{@docRoot}guide/topics/appwidgets/index.html">App Widgets</a>
@@ -809,7 +809,7 @@
in this version of the platform. Developers declare these and other feature
constants in <a
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code
-<uses-feature>}</a> manifest elements.
+<uses-feature>}</a> manifest elements.
<ul>
<li>{@link android.content.pm.PackageManager#FEATURE_USB_ACCESSORY
@@ -824,7 +824,7 @@
<p>Google Play filters applications based on features declared in <a
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code
-<uses-feature>}</a> manifest elements. For more information about
+<uses-feature>}</a> manifest elements. For more information about
declaring features in an application manifest, read <a
href="{@docRoot}google/play/filters.html">Google Play
Filters</a>.</p>
diff --git a/docs/html/about/versions/android-3.2.jd b/docs/html/about/versions/android-3.2.jd
index ef95337..887755c 100644
--- a/docs/html/about/versions/android-3.2.jd
+++ b/docs/html/about/versions/android-3.2.jd
@@ -481,7 +481,7 @@
Play of required hardware and software capabilities. You declare these
and other feature constants in <a
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code
-<uses-feature>}</a> manifest elements.
+<uses-feature>}</a> manifest elements.
<p>Google Play filters applications based on their <code><uses-feature></code> attributes, to ensure that they are available only to devices on which their requirements are met. </p>
diff --git a/docs/html/about/versions/android-4.0.3.jd b/docs/html/about/versions/android-4.0.3.jd
index 4c2ccb9..fef9ce1 100644
--- a/docs/html/about/versions/android-4.0.3.jd
+++ b/docs/html/about/versions/android-4.0.3.jd
@@ -297,7 +297,7 @@
application against an Android platform that supports API level {@sdkPlatformApiLevel} or
higher. Depending on your needs, you might also need to add an
<code>android:minSdkVersion="{@sdkPlatformApiLevel}"</code> attribute to the
-<a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a>
+<a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a>
element.</p>
<p>For more information, see the <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API Levels</a>
diff --git a/docs/html/about/versions/android-4.0.jd b/docs/html/about/versions/android-4.0.jd
index cc1d1c7..1b103b7 100644
--- a/docs/html/about/versions/android-4.0.jd
+++ b/docs/html/about/versions/android-4.0.jd
@@ -909,9 +909,9 @@
<p>Applications with a spell checker service must declare the {@link
android.Manifest.permission#BIND_TEXT_SERVICE} permission as required by the service.
-The service must also declare an intent filter with {@code <action
+The service must also declare an intent filter with {@code <action
android:name="android.service.textservice.SpellCheckerService" />} as the intent’s action and should
-include a {@code <meta-data>} element that declares configuration information for the spell
+include a {@code <meta-data>} element that declares configuration information for the spell
checker. </p>
<p>See the sample <a href="{@docRoot}resources/samples/SpellChecker/SampleSpellCheckerService/index.html">
@@ -997,12 +997,12 @@
action. For example:</p>
<pre>
-<activity android:name="DataPreferences" android:label="@string/title_preferences">
- <intent-filter>
- <action android:name="android.intent.action.MANAGE_NETWORK_USAGE" />
- <category android:name="android.intent.category.DEFAULT" />
- </intent-filter>
-</activity>
+<activity android:name="DataPreferences" android:label="@string/title_preferences">
+ <intent-filter>
+ <action android:name="android.intent.action.MANAGE_NETWORK_USAGE" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+</activity>
</pre>
<p>This intent filter indicates to the system that this is the activity that controls your
@@ -1054,7 +1054,7 @@
<p>Applications that manage the device restrictions can now disable the camera using {@link
android.app.admin.DevicePolicyManager#setCameraDisabled setCameraDisabled()} and the {@link
android.app.admin.DeviceAdminInfo#USES_POLICY_DISABLE_CAMERA} property (applied with a {@code
-<disable-camera />} element in the policy configuration file).</p>
+<disable-camera />} element in the policy configuration file).</p>
<h4>Certificate management</h4>
@@ -1120,10 +1120,10 @@
allows you to enable “split action bar" so that more action items can appear on the screen in a
separate bar at the bottom of the screen. To enable split action bar, add {@link
android.R.attr#uiOptions android:uiOptions} with {@code "splitActionBarWhenNarrow"} to either your
-<a href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
+<a href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
tag or
individual <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code
-<activity>}</a> tags
+<activity>}</a> tags
in your manifest file. When enabled, the system will add an additional bar at the bottom of the
screen for all action items when the screen is narrow (no action items will appear in the primary
action bar).</p>
@@ -1166,7 +1166,7 @@
<p>To declare an action provider for an action item, include the {@code android:actionProviderClass}
attribute in the <a href="{@docRoot}guide/topics/resources/menu-resource.html#item-element">{@code
-<item>}</a> element for your activity’s options menu, with the class name of the action
+<item>}</a> element for your activity’s options menu, with the class name of the action
provider as the value. For example:</p>
<pre>
@@ -1208,7 +1208,7 @@
<p>To declare that an action item that contains an action view be collapsible, include the {@code
“collapseActionView"} flag in the {@code android:showAsAction} attribute for the <a
href="{@docRoot}guide/topics/resources/menu-resource.html#item-element">{@code
-<item>}</a> element in the menu’s XML file.</p>
+<item>}</a> element in the menu’s XML file.</p>
<p>To receive callbacks when an action view switches between expanded and collapsed, register an
instance of {@link android.view.MenuItem.OnActionExpandListener} with the respective {@link
@@ -1560,8 +1560,8 @@
<p>If necessary, you can manually disable hardware acceleration with the <a
href="{@docRoot}guide/topics/manifest/activity-element.html#hwaccel">{@code hardwareAccelerated}</a>
attribute for individual <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code
-<activity>}</a> elements or the <a
-href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
+<activity>}</a> elements or the <a
+href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
element. You can alternatively disable hardware acceleration for individual views by calling {@link
android.view.View#setLayerType setLayerType(LAYER_TYPE_SOFTWARE)}.</p>
@@ -1759,7 +1759,7 @@
href="http://android-developers.blogspot.com/2011/07/new-tools-for-managing-screen-sizes.html">
New Tools for Managing Screen Sizes</a>.</li>
<li>New constants for <a
-href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> to
+href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> to
declare landscape or portrait screen orientation requirements.</li>
<li>The device "screen size" configuration now changes during a screen orientation
change. If your app targets API level 13 or higher, you must handle the {@code "screenSize"}
@@ -1787,7 +1787,7 @@
application against an Android platform that supports API level {@sdkPlatformApiLevel} or
higher. Depending on your needs, you might also need to add an
<code>android:minSdkVersion="{@sdkPlatformApiLevel}"</code> attribute to the
-<a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a>
+<a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a>
element.</p>
<p>For more information, read <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">What is API
diff --git a/docs/html/about/versions/android-4.1.jd b/docs/html/about/versions/android-4.1.jd
index f8770fa..4131c36 100644
--- a/docs/html/about/versions/android-4.1.jd
+++ b/docs/html/about/versions/android-4.1.jd
@@ -149,7 +149,7 @@
<h3 id="Isolated">Isolated services</h3>
<p>By specifying <a href="{@docRoot}guide/topics/manifest/service-element.html#isolated">{@code android:isolatedProcess="true"}</a> in the
-<a href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>}</a> tag, your {@link android.app.Service} will run under
+<a href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>}</a> tag, your {@link android.app.Service} will run under
its own isolated user ID process that has no permissions of its own.</p>
@@ -196,7 +196,7 @@
All you need to do is add the <a
href="{@docRoot}guide/topics/manifest/activity-element.html#parent">{@code
android:parentActivityName}</a> to each <a
-href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element in
+href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element in
your manifest file. The system uses this information to open the appropriate activity when the user
presses the Up button in the action bar (while also finishing the current activity). So if you
declare the <a href="{@docRoot}guide/topics/manifest/activity-element.html#parent">{@code
@@ -287,7 +287,7 @@
adding <a
href="{@docRoot}guide/topics/manifest/activity-element.html#parent">{@code
android:parentActivityName}</a> to each <a
-href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element.</p>
+href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element.</p>
@@ -889,13 +889,13 @@
<p>Android 4.1 includes a new feature declaration for devices that are dedicated
to displaying the user interface on a television screen: {@link
android.content.pm.PackageManager#FEATURE_TELEVISION}. To declare that your app requires
-a television interface, declare this feature in your manifest file with the <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> element:</p>
+a television interface, declare this feature in your manifest file with the <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> element:</p>
<pre>
-<manifest ... >
+<manifest ... >
<uses-feature android:name="android.hardware.type.television"
- android:required="true" />
+ android:required="true" />
...
-</manifest>
+</manifest>
</pre>
<p>This feature defines "television" to be a typical living room television experience:
diff --git a/docs/html/about/versions/android-4.2.jd b/docs/html/about/versions/android-4.2.jd
index 76acb8a..f903156 100644
--- a/docs/html/about/versions/android-4.2.jd
+++ b/docs/html/about/versions/android-4.2.jd
@@ -166,18 +166,18 @@
<p>To make your daydream available to the system, declare your {@link
android.service.dreams.DreamService} with a <a
-href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>}</a> element
+href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>}</a> element
in your manifest file. You must then include an intent filter with the action {@code
"android.service.dreams.DreamService"}. For example:</p>
<pre>
<service android:name=".MyDream" android:exported="true"
- android:icon="@drawable/dream_icon" android:label="@string/dream_label" >
- <intent-filter>
- <action android:name="android.service.dreams.DreamService" />
- <category android:name="android.intent.category.DEFAULT" />
- </intent-filter>
-</service>
+ android:icon="@drawable/dream_icon" android:label="@string/dream_label" >
+ <intent-filter>
+ <action android:name="android.service.dreams.DreamService" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+</service>
</pre>
<p>There are some other useful methods in {@link android.service.dreams.DreamService}
@@ -255,7 +255,7 @@
secondary screens, you can apply
a different theme by specifying the {@link
android.R.attr#presentationTheme android:presentationTheme} attribute in the <a
-href="{@docRoot}guide/topics/resources/style-resource.html">{@code <style>}</a> that you’ve
+href="{@docRoot}guide/topics/resources/style-resource.html">{@code <style>}</a> that you’ve
applied to your application or activity.</p>
<p>Keep in mind that screens connected to the user’s device often have a larger screen size and
@@ -294,8 +294,8 @@
<pre>
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
...
- android:widgetCategory="keyguard|home_screen">
-</appwidget-provider>
+ android:widgetCategory="keyguard|home_screen">
+</appwidget-provider>
</pre>
<p>You should also specify an initial layout for your app widget when on the lock screen with
@@ -399,7 +399,7 @@
direction, such as Arabic and Hebrew.</p>
<p>To begin supporting RTL layouts in your app, set the {@link android.R.attr#supportsRtl
-android:supportsRtl} attribute to the {@code <application>} element in your manifest file
+android:supportsRtl} attribute to the {@code <application>} element in your manifest file
and set it {@code “true"}. Once you enable this, the system will enable various RTL APIs to
display your app with RTL layouts. For instance, the action bar will show the icon and title
on the right side and action buttons on the left, and any layouts you’ve created with the
@@ -483,7 +483,7 @@
fragment designs on Android 1.6 and higher.</p>
<p><strong>Note:</strong> You cannot inflate a layout into a fragment when that layout
-includes a {@code <fragment>}. Nested fragments are only supported when added to a
+includes a {@code <fragment>}. Nested fragments are only supported when added to a
fragment dynamically.</p>
diff --git a/docs/html/about/versions/android-4.3.jd b/docs/html/about/versions/android-4.3.jd
index 2496854..547b2f8 100644
--- a/docs/html/about/versions/android-4.3.jd
+++ b/docs/html/about/versions/android-4.3.jd
@@ -204,7 +204,7 @@
app depends on account information that's sensitive, specify the <a
href="{@docRoot}guide/topics/manifest/application-element.html#requiredAccountType">{@code
android:requiredAccountType}</a> attribute in your manifest's <a
-href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
+href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
element.</p>
<p>If you’d like to allow restricted profiles to continue using your app even though they can’t
@@ -298,10 +298,10 @@
<li><strong>Allow access to the owner’s accounts from a restricted profile.</strong>
<p>To get access to an account from a restricted profile, you must add the <a href="{@docRoot}guide/topics/manifest/application-element.html#restrictedAccountType">{@code android:restrictedAccountType}</a> attribute to the <a
-href="{@docRoot}guide/topics/manifest/application-element.html"><application></a> tag:</p>
+href="{@docRoot}guide/topics/manifest/application-element.html"><application></a> tag:</p>
<pre>
<application ...
- android:restrictedAccountType="com.example.account.type" >
+ android:restrictedAccountType="com.example.account.type" >
</pre>
<p class="caution"><strong>Caution:</strong> Enabling this attribute provides your
@@ -341,10 +341,10 @@
currently cannot add new accounts), add
the <a href="{@docRoot}guide/topics/manifest/application-element.html#requiredAccountType">{@code
android:requiredAccountType}</a> attribute to the <a
-href="{@docRoot}guide/topics/manifest/application-element.html"><application></a> tag:</p>
+href="{@docRoot}guide/topics/manifest/application-element.html"><application></a> tag:</p>
<pre>
<application ...
- android:requiredAccountType="com.example.account.type" >
+ android:requiredAccountType="com.example.account.type" >
</pre>
<p>For example, the Gmail app uses this attribute to disable itself for restricted profiles,
because the owner's personal email should not be available to restricted profiles.</p>
@@ -363,10 +363,10 @@
<p>Because Bluetooth LE is a hardware feature that is not available on all
Android-powered devices, you must declare in your manifest file a <a
-href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
+href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
element for {@code "android.hardware.bluetooth_le"}:</p>
<pre>
-<uses-feature android:name="android.hardware.bluetooth_le" android:required="true" />
+<uses-feature android:name="android.hardware.bluetooth_le" android:required="true" />
</pre>
<p>If you're already familiar with Android's Classic Bluetooth APIs, notice that using the
@@ -592,13 +592,13 @@
<p>The Java interface for OpenGL ES 3.0 on Android is provided with {@link android.opengl.GLES30}.
When using OpenGL ES 3.0, be sure that you declare it in your manifest file with the
-<a href="{@docRoot}guide/topics/manifest/uses-feature-element.html"><uses-feature></a>
+<a href="{@docRoot}guide/topics/manifest/uses-feature-element.html"><uses-feature></a>
tag and the {@code android:glEsVersion} attribute. For example:</p>
<pre>
-<manifest>
- <uses-feature android:glEsVersion="0x00030000" />
+<manifest>
+ <uses-feature android:glEsVersion="0x00030000" />
...
-</manifest>
+</manifest>
</pre>
<p>And remember to specify the OpenGL ES context by calling {@link
@@ -740,7 +740,7 @@
<p style="clear:left">To align the views based on their optical bounds, set the {@code android:layoutMode} attribute to {@code "opticalBounds"} in one of the parent layouts. For example:</p>
<pre>
-<LinearLayout android:layoutMode="opticalBounds" ... >
+<LinearLayout android:layoutMode="opticalBounds" ... >
</pre>
@@ -818,7 +818,7 @@
<h3 id="Orientation">Screen orientation</h3>
<p>The <a
-href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
+href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
tag's <a
href="{@docRoot}guide/topics/manifest/activity-element.html#screen">{@code screenOrientation}</a>
attribute now supports additional values to honor the user's preference for auto-rotation:</p>
@@ -1110,7 +1110,7 @@
<h3 id="ManifestFeatures">Declarable required features</h3>
<p>The following values are now supported in the <a
-href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
+href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
element so you can ensure that your app is installed only on devices that provide the features
your app needs.</p>
@@ -1120,7 +1120,7 @@
include a Home screen or similar location where users can embed app widgets.
Example:
<pre>
-<uses-feature android:name="android.software.app_widgets" android:required="true" />
+<uses-feature android:name="android.software.app_widgets" android:required="true" />
</pre>
</dd>
@@ -1129,7 +1129,7 @@
devices that support third-party Home screen apps.
Example:
<pre>
-<uses-feature android:name="android.software.home_screen" android:required="true" />
+<uses-feature android:name="android.software.home_screen" android:required="true" />
</pre>
</dd>
@@ -1139,7 +1139,7 @@
support third-party input methods.
Example:
<pre>
-<uses-feature android:name="android.software.input_methods" android:required="true" />
+<uses-feature android:name="android.software.input_methods" android:required="true" />
</pre>
</dd>
@@ -1148,7 +1148,7 @@
that are capable of communicating with other devices via Bluetooth Low Energy.
Example:
<pre>
-<uses-feature android:name="android.software.bluetooth_le" android:required="true" />
+<uses-feature android:name="android.software.bluetooth_le" android:required="true" />
</pre>
</dd>
</dl>
@@ -1156,7 +1156,7 @@
<h3 id="ManifestPermissions">User permissions</h3>
<p>The following values are now supported in the <a
-href="{@docRoot}guide/topics/manifest/uses-permission-element.html">{@code <uses-permission>}</a>
+href="{@docRoot}guide/topics/manifest/uses-permission-element.html">{@code <uses-permission>}</a>
to declare the
permissions your app requires in order to access certain APIs.</p>
diff --git a/docs/html/about/versions/android-4.4.jd b/docs/html/about/versions/android-4.4.jd
index 3de2acc..0d58a1d 100644
--- a/docs/html/about/versions/android-4.4.jd
+++ b/docs/html/about/versions/android-4.4.jd
@@ -257,7 +257,7 @@
<p>When running on a device that includes an infrared (IR) transmitter, you can now transmit IR signals using the {@link android.hardware.ConsumerIrManager} APIs. To get an instance of {@link android.hardware.ConsumerIrManager}, call {@link android.content.Context#getSystemService getSystemService()} with {@link android.content.Context#CONSUMER_IR_SERVICE} as the argument. You can then query the device's supported IR frequencies with {@link android.hardware.ConsumerIrManager#getCarrierFrequencies()} and transmit signals by passing your desired frequency and signal pattern with {@link android.hardware.ConsumerIrManager#transmit transmit()}.</p>
-<p>You should always first check whether a device includes an IR transmitter by calling {@link android.hardware.ConsumerIrManager#hasIrEmitter()}, but if your app is compatible only with devices that do have one, you should include a <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> element in your manifest for {@code "android.hardware.consumerir"} ({@link android.content.pm.PackageManager#FEATURE_CONSUMER_IR}).</p>
+<p>You should always first check whether a device includes an IR transmitter by calling {@link android.hardware.ConsumerIrManager#hasIrEmitter()}, but if your app is compatible only with devices that do have one, you should include a <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> element in your manifest for {@code "android.hardware.consumerir"} ({@link android.content.pm.PackageManager#FEATURE_CONSUMER_IR}).</p>
@@ -372,7 +372,7 @@
<p>Alternatively, you don't need to create a {@link android.transition.Scene} object at all, but can instead call {@link android.transition.TransitionManager#beginDelayedTransition beginDelayedTransition()}, specifying a {@link android.view.ViewGroup} that contains the views you want to change. Then add, remove, or reconfigure the target views. After the system lays out the changes as necessary, a transition starts to animate all the affected views.</p>
-<p>For additional control, you can define sets of transitions that should occur between pre-defined scenes, using an XML file in your project {@code res/transition/} directory. Inside a {@code <transitionManager>} element, specify one or more {@code <transition>} tags that each specify a scene (a reference to a layout file) and the transition to apply when entering and/or exiting that scene. Then inflate this set of transitions using {@link android.transition.TransitionInflater#inflateTransitionManager inflateTransitionManager()}. Use the returned {@link android.transition.TransitionManager} to execute each transition with {@link android.transition.TransitionManager#transitionTo transitionTo()}, passing a {@link android.transition.Scene} that is represented by one of the {@code <transition>} tags. You can also define sets of transitions programmatically with the {@link android.transition.TransitionManager} APIs.</p>
+<p>For additional control, you can define sets of transitions that should occur between pre-defined scenes, using an XML file in your project {@code res/transition/} directory. Inside a {@code <transitionManager>} element, specify one or more {@code <transition>} tags that each specify a scene (a reference to a layout file) and the transition to apply when entering and/or exiting that scene. Then inflate this set of transitions using {@link android.transition.TransitionInflater#inflateTransitionManager inflateTransitionManager()}. Use the returned {@link android.transition.TransitionManager} to execute each transition with {@link android.transition.TransitionManager#transitionTo transitionTo()}, passing a {@link android.transition.Scene} that is represented by one of the {@code <transition>} tags. You can also define sets of transitions programmatically with the {@link android.transition.TransitionManager} APIs.</p>
<p>When specifying a transition, you can use several predefined types defined by subclasses of {@link android.transition.Transition}, such as {@link android.transition.Fade} and {@link android.transition.ChangeBounds}. If you don't specify a transition type, the system uses {@link android.transition.AutoTransition} by default, which automatically fades, moves, and resizes views as necessary. Additionally, you can create custom transitions by extending any of these classes to perform the animations however you'd like. A custom transition can track any property changes you'd like, and create any animation you want to based on those changes. For example, you could provide a subclass of {@link android.transition.Transition} that listens for changes to the "rotation" property of a view then animate any changes.</p>
@@ -531,7 +531,7 @@
<h2 id="Permissions">App Permissions</h2>
-<p>The following are new permissions that your app must request with the <a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">{@code <uses-permission>}</a> tag to use certain new APIs:</p>
+<p>The following are new permissions that your app must request with the <a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">{@code <uses-permission>}</a> tag to use certain new APIs:</p>
<dl>
<dt>{@link android.Manifest.permission#INSTALL_SHORTCUT}</dt>
@@ -550,7 +550,7 @@
<h2 id="DeviceFeatures">Device Features</h2>
-<p>The following are new device features that you can declare with the <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> tag to declare your app requirements and enable filtering on Google Play or check for at runtime:</p>
+<p>The following are new device features that you can declare with the <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> tag to declare your app requirements and enable filtering on Google Play or check for at runtime:</p>
<dl>
<dt>{@link android.content.pm.PackageManager#FEATURE_CONSUMER_IR}</dt>
diff --git a/docs/html/about/versions/android-5.0.jd b/docs/html/about/versions/android-5.0.jd
index 8956076..1bdd2d6 100644
--- a/docs/html/about/versions/android-5.0.jd
+++ b/docs/html/about/versions/android-5.0.jd
@@ -351,7 +351,7 @@
<p>The Java interface for OpenGL ES 3.1 on Android is provided with
{@link android.opengl.GLES31}. When using OpenGL ES 3.1, be sure that you
declare it in your manifest file with the
- <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> tag and the {@code android:glEsVersion} attribute. For example:</p>
+ <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> tag and the {@code android:glEsVersion} attribute. For example:</p>
<pre>
<manifest>
@@ -942,7 +942,7 @@
<h3 id="ManifestFeatures">Declarable required features</h3>
<p>The following values are now supported in the
-<a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
+<a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
element, so you can ensure that your app is installed only on devices that
provide the features your app needs.</p>
@@ -968,7 +968,7 @@
<h3 id="Permissions">User permissions</h3>
<p>The following permission is now supported in the
-<a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">{@code <uses-permission>}</a>
+<a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">{@code <uses-permission>}</a>
element to declare the permissions your app requires to access certain APIs.</p>
<ul>
diff --git a/docs/html/distribute/essentials/quality/tv.jd b/docs/html/distribute/essentials/quality/tv.jd
index c7f6fcb..18c7a32 100644
--- a/docs/html/distribute/essentials/quality/tv.jd
+++ b/docs/html/distribute/essentials/quality/tv.jd
@@ -321,7 +321,7 @@
<p style="margin-bottom:.5em;">
If the app uses a game controller as it's primary input method, it declares the appropriate
requirement with the <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html"
- >{@code <uses-feature>}</a> manifest tag.
+ >{@code <uses-feature>}</a> manifest tag.
(<a href="{@docRoot}training/tv/games/index.html#gamepad">Learn how</a>)
</p>
</td>
diff --git a/docs/html/google/play/billing/billing_integrate.jd b/docs/html/google/play/billing/billing_integrate.jd
index eb58af4..52973a8 100644
--- a/docs/html/google/play/billing/billing_integrate.jd
+++ b/docs/html/google/play/billing/billing_integrate.jd
@@ -70,7 +70,7 @@
<li>Select <strong>Google Play Billing Library</strong>.</li>
<li>Click <strong>Install packages</strong> to complete the download.</li>
</ol>
-<p>The {@code IInAppBillingService.aidl} file will be installed to {@code <sdk>/extras/google/play_billing/}.</p>
+<p>The {@code IInAppBillingService.aidl} file will be installed to {@code <sdk>/extras/google/play_billing/}.</p>
<p>To add the AIDL to your project:</p>
<ol>
@@ -85,7 +85,7 @@
Application</strong> wizard to create a new project in your workspace.</li>
<li>In the {@code /src} directory, click <strong>File</strong> >
<strong>New</strong> > <strong>Package</strong>, then create a package named {@code com.android.vending.billing}.</li>
- <li>Copy the {@code IInAppBillingService.aidl} file from {@code <sdk>/extras/google/play_billing/} and paste it into the {@code src/com.android.vending.billing/}
+ <li>Copy the {@code IInAppBillingService.aidl} file from {@code <sdk>/extras/google/play_billing/} and paste it into the {@code src/com.android.vending.billing/}
folder in your workspace.</li>
</ol>
</li>
diff --git a/docs/html/google/play/expansion-files.jd b/docs/html/google/play/expansion-files.jd
index 601ea48..0c514b2 100644
--- a/docs/html/google/play/expansion-files.jd
+++ b/docs/html/google/play/expansion-files.jd
@@ -131,7 +131,7 @@
<dt>{@code main} or {@code patch}</dt>
<dd>Specifies whether the file is the main or patch expansion file. There can be
only one main file and one patch file for each APK.</dd>
- <dt>{@code <expansion-version>}</dt>
+ <dt>{@code <expansion-version>}</dt>
<dd>This is an integer that matches the version code of the APK with which the expansion is
<em>first</em> associated (it matches the application's <a
href="{@docRoot}guide/topics/manifest/manifest-element.html#vcode">{@code android:versionCode}</a>
@@ -139,7 +139,7 @@
<p>"First" is emphasized because although the Developer Console allows you to
re-use an uploaded expansion file with a new APK, the expansion file's name does not change—it
retains the version applied to it when you first uploaded the file.</p></dd>
- <dt>{@code <package-name>}</dt>
+ <dt>{@code <package-name>}</dt>
<dd>Your application's Java-style package name.</dd>
</dl>
@@ -162,9 +162,9 @@
</pre>
<ul>
- <li>{@code <shared-storage>} is the path to the shared storage space, available from
+ <li>{@code <shared-storage>} is the path to the shared storage space, available from
{@link android.os.Environment#getExternalStorageDirectory()}.</li>
- <li>{@code <package-name>} is your application's Java-style package name, available
+ <li>{@code <package-name>} is your application's Java-style package name, available
from {@link android.content.Context#getPackageName()}.</li>
</ul>
@@ -464,7 +464,7 @@
<ol>
<li>Begin a new Android project.</li>
<li>Select <strong>Create project from existing
-source</strong> and choose the library from the {@code <sdk>/extras/google/} directory
+source</strong> and choose the library from the {@code <sdk>/extras/google/} directory
({@code market_licensing/} for the License Verification Library or {@code
market_apk_expansion/downloader_library/} for the Downloader Library).</li>
<li>Specify a <em>Project Name</em> such as "Google Play License Library" and "Google Play
@@ -717,7 +717,7 @@
</li>
<li>Start the download by calling the static method {@code
DownloaderClientMarshaller.startDownloadServiceIfRequired(Context c, PendingIntent
-notificationClient, Class<?> serviceClass)}.
+notificationClient, Class<?> serviceClass)}.
<p>The method takes the following parameters:</p>
<ul>
<li><code>context</code>: Your application's {@link android.content.Context}.</li>
@@ -781,7 +781,7 @@
</li>
<li>When the {@code startDownloadServiceIfRequired()} method returns anything <em>other
than</em> {@code NO_DOWNLOAD_REQUIRED}, create an instance of {@code IStub} by
-calling {@code DownloaderClientMarshaller.CreateStub(IDownloaderClient client, Class<?>
+calling {@code DownloaderClientMarshaller.CreateStub(IDownloaderClient client, Class<?>
downloaderService)}. The {@code IStub} provides a binding between your activity to the downloader
service such that your activity receives callbacks about the download progress.
<p>In order to instantiate your {@code IStub} by calling {@code CreateStub()}, you must pass it
@@ -957,7 +957,7 @@
depends on the type of file you've used. As discussed in the <a href="#Overview">overview</a>, your
expansion files can be any kind of file you
want, but are renamed using a particular <a href="#Filename">file name format</a> and are saved to
-{@code <shared-storage>/Android/obb/<package-name>/}.</p>
+{@code <shared-storage>/Android/obb/<package-name>/}.</p>
<p>Regardless of how you read your files, you should always first check that the external
storage is available for reading. There's a chance that the user has the storage mounted to a
@@ -1060,7 +1060,7 @@
<p>The Google Market Apk Expansion package includes a library called the APK
Expansion Zip Library (located in {@code
-<sdk>/extras/google/google_market_apk_expansion/zip_file/}). This is an optional library that
+<sdk>/extras/google/google_market_apk_expansion/zip_file/}). This is an optional library that
helps you read your expansion
files when they're saved as ZIP files. Using this library allows you to easily read resources from
your ZIP expansion files as a virtual file system.</p>
diff --git a/docs/html/google/play/filters.jd b/docs/html/google/play/filters.jd
index 1ec68c6..50cc807 100644
--- a/docs/html/google/play/filters.jd
+++ b/docs/html/google/play/filters.jd
@@ -338,24 +338,24 @@
<tr><th>Manifest Element</th><th>Summary</th></tr>
<tr>
<td><nobr><a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
-<compatible-screens>}</a></nobr></td>
+<compatible-screens>}</a></nobr></td>
<td>
<p>Google Play filters the application if the device screen size and density does not match
-any of the screen configurations (declared by a {@code <screen>} element) in the {@code
-<compatible-screens>} element.</p>
+any of the screen configurations (declared by a {@code <screen>} element) in the {@code
+<compatible-screens>} element.</p>
<p class="caution"><strong>Caution:</strong> Normally, <strong>you should not use
this manifest element</strong>. Using this element can dramatically
reduce the potential user base for your application, by excluding all combinations of screen size
and density that you have not listed. You should instead use the <a
href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> manifest element (described above in <a href="#table1">table
+<supports-screens>}</a> manifest element (described above in <a href="#table1">table
1</a>) to enable screen compatibility mode for screen configurations you have not accounted for
with alternative resources.</p>
</td>
</tr>
<tr>
<td><nobr><a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code
-<supports-gl-texture>}</a></nobr></td>
+<supports-gl-texture>}</a></nobr></td>
<td>
<p>Google Play filters the application unless one or more of the GL texture compression
formats supported by the application are also supported by the device. </p>
@@ -419,17 +419,17 @@
<li>OpenGL texture compression formats
<p>By using the <a
href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code
-<supports-gl-texture>}</a> element.</p>
+<supports-gl-texture>}</a> element.</p>
</li>
<li>Screen size (and, optionally, screen density)
<p>By using the <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> or <a
+<supports-screens>}</a> or <a
href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
-<compatible-screens>}</a> element.</p>
+<compatible-screens>}</a> element.</p>
</li>
<li>API level
<p>By using the <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code
-<uses-sdk>}</a> element.</p>
+<uses-sdk>}</a> element.</p>
</li>
<li>CPU Architecture (ABI)
<p>By including native libraries built with the <a href="{@docRoot}tools/sdk/ndk/index.html">Android
diff --git a/docs/html/google/play/licensing/setting-up.jd b/docs/html/google/play/licensing/setting-up.jd
index f43e4aba..1822337 100644
--- a/docs/html/google/play/licensing/setting-up.jd
+++ b/docs/html/google/play/licensing/setting-up.jd
@@ -180,12 +180,12 @@
<ol>
<li>Launch the Android SDK Manager (available under the Eclipse <strong>Window</strong>
-menu or by executing {@code <sdk>/tools/android sdk}).</li>
+menu or by executing {@code <sdk>/tools/android sdk}).</li>
<li>Select and download <strong>Google APIs</strong> for the Android version you'd like to target
(must be Android 2.2 or higher).</li>
<li>When the download is complete, open the AVD Manager (available under the Eclipse
<strong>Window</strong>
-menu or by executing {@code <sdk>/tools/android avd}).</li>
+menu or by executing {@code <sdk>/tools/android avd}).</li>
<li>Click
<strong>New</strong> and set the configuration details for the new AVD. </li>
<li>In the dialog that appears, assign a descriptive name to the AVD and then
diff --git a/docs/html/google/play/publishing/multiple-apks.jd b/docs/html/google/play/publishing/multiple-apks.jd
index ab08e6f..71a7ae5 100644
--- a/docs/html/google/play/publishing/multiple-apks.jd
+++ b/docs/html/google/play/publishing/multiple-apks.jd
@@ -204,7 +204,7 @@
<li><strong>OpenGL texture compression formats</strong>
<p>This is based on your manifest file's <a
href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code
-<supports-gl-texture>}</a> element(s).</p>
+<supports-gl-texture>}</a> element(s).</p>
<p>For example, when developing a game that uses OpenGL ES, you can provide one APK for
devices that support ATI texture compression and a separate APK for devices
that support PowerVR compression (among many others).</p>
@@ -214,11 +214,11 @@
<li><strong>Screen size (and, optionally, screen density)</strong>
<p>This is based on your manifest file's <a
href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> <em>or</em> <a
+<supports-screens>}</a> <em>or</em> <a
href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
-<compatible-screens>}</a> element. You should never use both elements and you should use only
+<compatible-screens>}</a> element. You should never use both elements and you should use only
<a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> when possible.</p>
+<supports-screens>}</a> when possible.</p>
<p>For example, you can provide one APK that supports small and normal size screens and another
APK that supports large and xlarge screens.</p>
@@ -230,7 +230,7 @@
with a single APK.</p>
<p class="caution"><strong>Caution:</strong> By default, all screen size attributes in the <a
href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> element are "true" if you do not declare them otherwise. However,
+<supports-screens>}</a> element are "true" if you do not declare them otherwise. However,
because the {@code android:xlargeScreens} attribute was added in Android 2.3 (API level
9), Google Play will assume that it is "false" if your application does not set either <a
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code
@@ -239,9 +239,9 @@
android:targetSdkVersion}</a> to "9" or higher.</p>
<p class="caution"><strong>Caution:</strong> You should not combine both <a
href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> and <a
+<supports-screens>}</a> and <a
href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
-<compatible-screens>}</a> elements in your manifest file. Using both increases the chances
+<compatible-screens>}</a> elements in your manifest file. Using both increases the chances
that you'll introduce an error due to conflicts between them. For help deciding which to use, read
<a href="{@docRoot}guide/practices/screens-distribution.html">Distributing to Specific Screens</a>.
If you can't avoid using both, be aware that for any conflicts in agreement between a given size,
@@ -251,7 +251,7 @@
<li><strong>Device feature sets</strong>
<p>This is based on your manifest file's <a
-href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
+href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
element(s).</p>
<p>For example, you can provide one APK for devices that support multitouch and another
APK for devices that do not support multitouch. See
@@ -262,7 +262,7 @@
<li><strong>API level</strong>
<p>This is based on your manifest file's <a
-href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a> element.
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a> element.
You
can use both the <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code
android:minSdkVersion}</a> and <a
@@ -312,7 +312,7 @@
based on other characteristics in the manifest or APK). For
example, you cannot provide different APKs that differ purely on the <a
href="{@docRoot}guide/topics/manifest/uses-configuration-element.html">{@code
-<uses-configuration>}</a> characteristics.</p>
+<uses-configuration>}</a> characteristics.</p>
diff --git a/docs/html/guide/components/activities.jd b/docs/html/guide/components/activities.jd
index 5e6917b..7eeaeeb 100644
--- a/docs/html/guide/components/activities.jd
+++ b/docs/html/guide/components/activities.jd
@@ -141,9 +141,9 @@
<p>You must declare your activity in the manifest file in order for it to
be accessible to the system. To declare your activity, open your manifest file and add an <a
-href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element
+href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element
as a child of the <a
-href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
+href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
element. For example:</p>
<pre>
@@ -166,16 +166,16 @@
That Cannot Change</a>).</p>
<p>See the <a
-href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element
+href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element
reference for more information about declaring your activity in the manifest.</p>
<h4>Using intent filters</h4>
<p>An <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code
-<activity>}</a> element can also specify various intent filters—using the <a
+<activity>}</a> element can also specify various intent filters—using the <a
href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
-<intent-filter>}</a> element—in order to declare how other application components may
+<intent-filter>}</a> element—in order to declare how other application components may
activate it.</p>
<p>When you create a new application using the Android SDK tools, the stub activity
@@ -193,9 +193,9 @@
</pre>
<p>The <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code
-<action>}</a> element specifies that this is the "main" entry point to the application. The <a
+<action>}</a> element specifies that this is the "main" entry point to the application. The <a
href="{@docRoot}guide/topics/manifest/category-element.html">{@code
-<category>}</a> element specifies that this activity should be listed in the
+<category>}</a> element specifies that this activity should be listed in the
system's application launcher (to allow users to launch this activity).</p>
<p>If you intend for your application to be self-contained and not allow other applications to
@@ -208,13 +208,13 @@
other applications (and your own), then you must define additional intent filters for your
activity. For each type of intent to which you want to respond, you must include an <a
href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
-<intent-filter>}</a> that includes an
+<intent-filter>}</a> that includes an
<a href="{@docRoot}guide/topics/manifest/action-element.html">{@code
-<action>}</a> element and, optionally, a <a
+<action>}</a> element and, optionally, a <a
href="{@docRoot}guide/topics/manifest/category-element.html">{@code
-<category>}</a> element and/or a <a
+<category>}</a> element and/or a <a
href="{@docRoot}guide/topics/manifest/data-element.html">{@code
-<data>}</a> element. These elements specify the type of intent to which your activity can
+<data>}</a> element. These elements specify the type of intent to which your activity can
respond.</p>
<p>For more information about how your activities can respond to intents, see the <a
diff --git a/docs/html/guide/components/aidl.jd b/docs/html/guide/components/aidl.jd
index 0be6e6f..e15e53f1 100644
--- a/docs/html/guide/components/aidl.jd
+++ b/docs/html/guide/components/aidl.jd
@@ -140,7 +140,7 @@
<p>All elements in the {@link java.util.Map} must be one of the supported data types in this
list or one of the other AIDL-generated interfaces or parcelables you've declared. Generic maps,
(such as those of the form
-{@code Map<String,Integer>} are not supported. The actual concrete class that the other side
+{@code Map<String,Integer>} are not supported. The actual concrete class that the other side
receives is always a {@link java.util.HashMap}, although the method is generated to
use the {@link java.util.Map} interface.</p>
</li>
diff --git a/docs/html/guide/components/fragments.jd b/docs/html/guide/components/fragments.jd
index 0065397..3b7da87 100644
--- a/docs/html/guide/components/fragments.jd
+++ b/docs/html/guide/components/fragments.jd
@@ -68,7 +68,7 @@
android.view.ViewGroup} inside the activity's view hierarchy and the fragment defines its own view
layout.
You can insert a fragment into your activity layout by declaring the fragment in the activity's
-layout file, as a {@code <fragment>} element, or from your application code by adding it to an
+layout file, as a {@code <fragment>} element, or from your application code by adding it to an
existing {@link android.view.ViewGroup}. However, a fragment is not required to be a part of the
activity layout; you may also use a fragment without its own UI as an invisible worker for the
activity.</p>
@@ -290,13 +290,13 @@
android:layout_height="match_parent" />
</LinearLayout>
</pre>
- <p>The {@code android:name} attribute in the {@code <fragment>} specifies the {@link
+ <p>The {@code android:name} attribute in the {@code <fragment>} specifies the {@link
android.app.Fragment} class to instantiate in the layout.</p>
<p>When the system creates this activity layout, it instantiates each fragment specified in the
layout and calls the {@link android.app.Fragment#onCreateView onCreateView()} method for each one,
to retrieve each fragment's layout. The system inserts the {@link android.view.View} returned by the
-fragment directly in place of the {@code <fragment>} element.</p>
+fragment directly in place of the {@code <fragment>} element.</p>
<div class="note">
<p><strong>Note:</strong> Each fragment requires a unique identifier that
diff --git a/docs/html/guide/components/fundamentals.jd b/docs/html/guide/components/fundamentals.jd
index fd1a7a8..1d45106 100644
--- a/docs/html/guide/components/fundamentals.jd
+++ b/docs/html/guide/components/fundamentals.jd
@@ -348,7 +348,7 @@
intent filters that declare the capabilities of the activity so it can respond to intents
from other apps. You can declare an intent filter for your component by
adding an <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
-<intent-filter>}</a> element as a child of the component's declaration element.</p>
+<intent-filter>}</a> element as a child of the component's declaration element.</p>
<p>For example, if you've built an email app with an activity for composing a new email, you can
declare an intent filter to respond to "send" intents (in order to send a new email) like this:</p>
diff --git a/docs/html/guide/components/intents-common.jd b/docs/html/guide/components/intents-common.jd
index 8aa5fa9..078ff53 100644
--- a/docs/html/guide/components/intents-common.jd
+++ b/docs/html/guide/components/intents-common.jd
@@ -881,7 +881,7 @@
<dd>{@link android.content.Intent#ACTION_VIEW}</dd>
<dt><b>Data URI Scheme</b></dt>
-<dd>{@code content:<URI>}</dd>
+<dd>{@code content:<URI>}</dd>
<dt><b>MIME Type</b></dt>
<dd>None. The type is inferred from contact URI.
@@ -922,7 +922,7 @@
<dd>{@link android.content.Intent#ACTION_EDIT}</dd>
<dt><b>Data URI Scheme</b></dt>
-<dd>{@code content:<URI>}</dd>
+<dd>{@code content:<URI>}</dd>
<dt><b>MIME Type</b></dt>
<dd>The type is inferred from contact URI.
@@ -1497,9 +1497,9 @@
<dt><b>Data URI Scheme</b></dt>
<dd>
<dl>
- <dt>{@code file:<em><URI></em>}
- <dt>{@code content:<em><URI></em>}
- <dt>{@code http:<em><URL></em>}
+ <dt><code>file:<em><URI></em></code>
+ <dt><code>content:<em><URI></em></code>
+ <dt><code>http:<em><URL></em></code>
</dl>
</dd>
@@ -1830,8 +1830,8 @@
<dt><b>Data URI Scheme</b></dt>
<dd>
<ul>
- <li>{@code tel:<phone-number>}</li>
- <li>{@code voicemail:<phone-number>}</li>
+ <li>{@code tel:<phone-number>}</li>
+ <li>{@code voicemail:<phone-number>}</li>
</ul>
</dd>
@@ -2042,10 +2042,10 @@
<dt><b>Data URI Scheme</b></dt>
<dd>
<dl>
- <dt>{@code sms:<em><phone_number></em>}
- <dt>{@code smsto:<em><phone_number></em>}
- <dt>{@code mms:<em><phone_number></em>}
- <dt>{@code mmsto:<em><phone_number></em>}
+ <dt><code>sms:<em><phone_number></em></code>
+ <dt><code>smsto:<em><phone_number></em></code>
+ <dt><code>mms:<em><phone_number></em></code>
+ <dt><code>mmsto:<em><phone_number></em></code>
</dl>
<p>Each of these schemes are handled the same.
</dd>
@@ -2158,8 +2158,8 @@
<dd>{@link android.content.Intent#ACTION_VIEW}<dd>
<dt><b>Data URI Scheme</b></dt>
- <dd>{@code http:<em><URL></em>}<br/>
- {@code https:<em><URL></em>}</dd>
+ <dd><code>http:<em><URL></em></code><br/>
+ <code>https:<em><URL></em></code></dd>
<dt><b>MIME Type</b></dt>
<dd>
diff --git a/docs/html/guide/components/intents-filters.jd b/docs/html/guide/components/intents-filters.jd
index 0759088..abc67f2 100644
--- a/docs/html/guide/components/intents-filters.jd
+++ b/docs/html/guide/components/intents-filters.jd
@@ -455,7 +455,7 @@
<p>To advertise which implicit intents your app can receive, declare one or more intent filters for
each of your app components with an <a href=
-"{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
+"{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
element in your <a href="{@docRoot}guide/topics/manifest/manifest-intro.html">manifest file</a>.
Each intent filter specifies the type of intents it accepts based on the intent's action,
data, and category. The system will deliver an implicit intent to your app component only if the
@@ -471,23 +471,23 @@
in the {@link android.content.Intent} (such as to show the editor controls or not).</p>
<p>Each intent filter is defined by an <a
-href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
+href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
element in the app's manifest file, nested in the corresponding app component (such
-as an <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
+as an <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
element). Inside the <a
-href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>,
+href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>,
you can specify the type of intents to accept using one or more
of these three elements:</p>
<dl>
-<dt><a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a></dt>
+<dt><a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a></dt>
<dd>Declares the intent action accepted, in the {@code name} attribute. The value
must be the literal string value of an action, not the class constant.</dd>
-<dt><a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a></dt>
+<dt><a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a></dt>
<dd>Declares the type of data accepted, using one or more attributes that specify various
aspects of the data URI (<code>scheme</code>, <code>host</code>, <code>port</code>,
<code>path</code>, etc.) and MIME type.</dd>
-<dt><a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a></dt>
+<dt><a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a></dt>
<dd>Declares the intent category accepted, in the {@code name} attribute. The value
must be the literal string value of an action, not the class constant.
@@ -516,9 +516,9 @@
</pre>
<p>It's okay to create a filter that includes more than one instance of
-<a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a>,
-<a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a>, or
-<a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a>.
+<a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a>,
+<a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a>, or
+<a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a>.
If you do, you simply need to be certain that the component can handle any and all combinations
of those filter elements.</p>
@@ -607,9 +607,9 @@
indicates this is the main entry point and does not expect any intent data.</li>
<li>The {@link android.content.Intent#CATEGORY_LAUNCHER} category indicates that this activity's
icon should be placed in the system's app launcher. If the <a
- href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element
+ href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element
does not specify an icon with {@code icon}, then the system uses the icon from the <a
- href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
+ href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
element.</li>
</ul>
<p>These two must be paired together in order for the activity to appear in the app launcher.</p>
@@ -715,7 +715,7 @@
<p>To specify accepted intent actions, an intent filter can declare zero or more
<a href="{@docRoot}guide/topics/manifest/action-element.html">{@code
-<action>}</a> elements. For example:</p>
+<action>}</a> elements. For example:</p>
<pre>
<intent-filter>
@@ -739,7 +739,7 @@
<p>To specify accepted intent categories, an intent filter can declare zero or more
<a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
-<category>}</a> elements. For example:</p>
+<category>}</a> elements. For example:</p>
<pre>
<intent-filter>
@@ -762,7 +762,7 @@
android.app.Activity#startActivityForResult startActivityForResult()}.
So if you want your activity to receive implicit intents, it must
include a category for {@code "android.intent.category.DEFAULT"} in its intent filters (as
-shown in the previous {@code <intent-filter>} example.</p>
+shown in the previous {@code <intent-filter>} example.</p>
@@ -770,7 +770,7 @@
<p>To specify accepted intent data, an intent filter can declare zero or more
<a href="{@docRoot}guide/topics/manifest/data-element.html">{@code
-<data>}</a> elements. For example:</p>
+<data>}</a> elements. For example:</p>
<pre>
<intent-filter>
@@ -786,7 +786,7 @@
and {@code path} — for each part of the URI:
</p>
-<p style="margin-left: 2em">{@code <scheme>://<host>:<port>/<path>}</p>
+<p style="margin-left: 2em">{@code <scheme>://<host>:<port>/<path>}</p>
<p>
For example:
@@ -799,7 +799,7 @@
</p>
<p>Each of these attributes is optional in a <a
-href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> element,
+href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> element,
but there are linear dependencies:</p>
<ul>
<li>If a scheme is not specified, the host is ignored.</li>
@@ -851,7 +851,7 @@
Therefore, their filters can list just a data type and do not need to explicitly
name the {@code content:} and {@code file:} schemes.
This is a typical case. A <a
-href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> element
+href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> element
like the following, for example, tells Android that the component can get image data from a content
provider and display it:
</p>
@@ -870,7 +870,7 @@
<p>
Another common configuration is filters with a scheme and a data type. For
example, a <a
-href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a>
+href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a>
element like the following tells Android that
the component can retrieve video data from the network in order to perform the action:
</p>
diff --git a/docs/html/guide/components/processes-and-threads.jd b/docs/html/guide/components/processes-and-threads.jd
index 10a6410..7bb3c65 100644
--- a/docs/html/guide/components/processes-and-threads.jd
+++ b/docs/html/guide/components/processes-and-threads.jd
@@ -45,10 +45,10 @@
<p>The manifest entry for each type of component element—<a
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code
-<activity>}</a>, <a href="{@docRoot}guide/topics/manifest/service-element.html">{@code
-<service>}</a>, <a href="{@docRoot}guide/topics/manifest/receiver-element.html">{@code
-<receiver>}</a>, and <a href="{@docRoot}guide/topics/manifest/provider-element.html">{@code
-<provider>}</a>—supports an {@code android:process} attribute that can specify a
+<activity>}</a>, <a href="{@docRoot}guide/topics/manifest/service-element.html">{@code
+<service>}</a>, <a href="{@docRoot}guide/topics/manifest/receiver-element.html">{@code
+<receiver>}</a>, and <a href="{@docRoot}guide/topics/manifest/provider-element.html">{@code
+<provider>}</a>—supports an {@code android:process} attribute that can specify a
process in which that component should run. You can set this attribute so that each component runs
in its own process or so that some components share a process while others do not. You can also set
{@code android:process} so that components of different applications run in the same
@@ -56,7 +56,7 @@
same certificates.</p>
<p>The <a href="{@docRoot}guide/topics/manifest/application-element.html">{@code
-<application>}</a> element also supports an {@code android:process} attribute, to set a
+<application>}</a> element also supports an {@code android:process} attribute, to set a
default value that applies to all components.</p>
<p>Android might decide to shut down a process at some point, when memory is low and required by
diff --git a/docs/html/guide/components/services.jd b/docs/html/guide/components/services.jd
index b8c105d..8da1694 100644
--- a/docs/html/guide/components/services.jd
+++ b/docs/html/guide/components/services.jd
@@ -189,9 +189,9 @@
manifest file.</p>
<p>To declare your service, add a <a
-href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>}</a> element
+href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>}</a> element
as a child of the <a
-href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
+href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
element. For example:</p>
<pre>
@@ -205,11 +205,11 @@
</pre>
<p>See the <a
-href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>}</a> element
+href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>}</a> element
reference for more information about declaring your service in the manifest.</p>
<p>There are other attributes you can include in the <a
-href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>}</a> element to
+href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>}</a> element to
define properties such as permissions required to start the service and the process in
which the service should run. The <a
href="{@docRoot}guide/topics/manifest/service-element.html#nm">{@code android:name}</a>
diff --git a/docs/html/guide/components/tasks-and-back-stack.jd b/docs/html/guide/components/tasks-and-back-stack.jd
index aaef10e..c77b545 100644
--- a/docs/html/guide/components/tasks-and-back-stack.jd
+++ b/docs/html/guide/components/tasks-and-back-stack.jd
@@ -30,7 +30,7 @@
<li><a href="{@docRoot}design/patterns/navigation.html">Android Design:
Navigation</a></li>
<li><a
-href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>} manifest
+href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>} manifest
element</a></li>
<li><a href="{@docRoot}guide/components/recents.html">Overview Screen</a></li>
</ol>
@@ -221,12 +221,12 @@
activities except for the root activity when the user leaves the task.</p>
<p>You can do these things and more, with attributes in the
-<a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
+<a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
manifest element and with flags in the intent that you pass to
{@link android.app.Activity#startActivity startActivity()}.</p>
<p>In this regard, the principal <a href="{@docRoot}guide/topics/manifest/activity-element.html">
-{@code <activity>}</a> attributes you can use are:</p>
+{@code <activity>}</a> attributes you can use are:</p>
<ul class="nolist">
<li><a href="{@docRoot}guide/topics/manifest/activity-element.html#aff">
@@ -295,7 +295,7 @@
<p>When declaring an activity in your manifest file, you can specify how the activity should
associate with a task using the <a
-href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
+href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
element's <a href="{@docRoot}guide/topics/manifest/activity-element.html#lmode">{@code
launchMode}</a> attribute.</p>
@@ -351,7 +351,7 @@
<p>As another example, the Android Browser application declares that the web browser activity should
always open in its own task—by specifying the {@code singleTask} launch mode in the <a
-href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element.
+href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element.
This means that if your application issues an
intent to open the Android Browser, its activity is <em>not</em> placed in the same
task as your application. Instead, either a new task starts for the Browser or, if the Browser
@@ -440,14 +440,14 @@
<p>You can modify the affinity for any given activity with the <a
href="{@docRoot}guide/topics/manifest/activity-element.html#aff">{@code taskAffinity}</a> attribute
-of the <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
+of the <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
element.</p>
<p>The <a
href="{@docRoot}guide/topics/manifest/activity-element.html#aff">{@code taskAffinity}</a>
attribute takes a string value, which must be unique from the default package name
declared in the <a href="{@docRoot}guide/topics/manifest/manifest-element.html">
-{@code <manifest>}
+{@code <manifest>}
</a> element, because the system uses that name to identify the default task
affinity for the application.</p>
diff --git a/docs/html/guide/practices/compatibility.jd b/docs/html/guide/practices/compatibility.jd
index db1642e..1bfc99d3 100644
--- a/docs/html/guide/practices/compatibility.jd
+++ b/docs/html/guide/practices/compatibility.jd
@@ -119,7 +119,7 @@
<p>If necessary, you can prevent users from installing your app when their devices don't provide a
given feature by declaring it with a <a href=
-"{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
+"{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
element in your app's <a href="{@docRoot}guide/topics/manifest/manifest-intro.html">manifest
file</a>.</p>
@@ -169,7 +169,7 @@
on this feature and make your app available to devices without Bluetooth by setting the <a href=
"{@docRoot}guide/topics/manifest/uses-feature-element.html#required">{@code required}</a> attribute
to {@code "false"} in the <a href=
-"{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> tag.
+"{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> tag.
For more information about implicitly required device features, read <a href=
"{@docRoot}guide/topics/manifest/uses-feature-element.html#permissions">Permissions that Imply
Feature Requirements</a>.</p>
@@ -191,7 +191,7 @@
<p>The API level allows you to declare the minimum version with which your app is
compatible, using the <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code
-<uses-sdk>}</a> manifest tag and its <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code minSdkVersion}</a> attribute.</p>
+<uses-sdk>}</a> manifest tag and its <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code minSdkVersion}</a> attribute.</p>
<p>For example, the <a href="{@docRoot}guide/topics/providers/calendar-provider.html">Calendar
Provider</a> APIs were added in Android 4.0 (API level 14). If your app cannot function without
diff --git a/docs/html/guide/practices/optimizing-for-3.0.jd b/docs/html/guide/practices/optimizing-for-3.0.jd
index fea54af..4f3d0f2 100644
--- a/docs/html/guide/practices/optimizing-for-3.0.jd
+++ b/docs/html/guide/practices/optimizing-for-3.0.jd
@@ -188,7 +188,7 @@
<li><b>Apply the new "holographic" theme to your application</b>
<ol>
<li>Open your manifest file and update the <a
-href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a> element to
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a> element to
set <a
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
android:targetSdkVersion}</a> to {@code "11"}. For example:
@@ -383,9 +383,9 @@
<p>Android 3.0 adds a hardware-accelerated OpenGL renderer that gives a performance boost to most 2D
graphics operations. You can enable hardware-accelerated rendering in your application by setting
{@code android:hardwareAccelerated="true"} in your manifest's <a
-href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
+href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
element or for individual <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code
-<activity>}</a> elements. Hardware acceleration results in smoother animations, smoother
+<activity>}</a> elements. Hardware acceleration results in smoother animations, smoother
scrolling, and overall better performance and response to user interaction. When enabled, be sure
that you thoroughly test your application on a device that supports hardware acceleration.</p>
@@ -500,7 +500,7 @@
not fit a smaller screen or you've explicitly designed your application only for tablets and other
large devices. In this case, you can manage the availability of your application to smaller screens
by using the <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> manifest element.</p>
+<supports-screens>}</a> manifest element.</p>
<p>For example, if you want your application to be available only to extra large
screens, you can declare the element in your manifest like this:</p>
@@ -523,7 +523,7 @@
<p class="note"><strong>Note:</strong> If you use the <a
href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> element for the reverse scenario (when your application is not compatible
+<supports-screens>}</a> element for the reverse scenario (when your application is not compatible
with <em>larger</em> screens) and set the larger screen size attributes to {@code "false"}, then
external services such as Google Play <strong>do not</strong> apply filtering. Your application
will still be available to larger screens, but when it runs, it will not fill the screen—the
@@ -540,22 +540,22 @@
that each deliver different features for different screen configurations, so you don't want
larger devices to download the version designed for smaller screens. In such a case, you can
use the <a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
-<compatible-screens>}</a> element to manage the distribution of your application based on the
+<compatible-screens>}</a> element to manage the distribution of your application based on the
combination of screen size and density. External services such as
Google Play uses this information to apply filtering to your application, so that only devices
that have a screen configuration with which you declare compatibility can download your
application.</p>
<p>The <a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
-<compatible-screens>}</a> element must contain one or more {@code <screen>} elements,
+<compatible-screens>}</a> element must contain one or more {@code <screen>} elements,
which each specify a screen configuration with which your application is compatible, using both
the {@code android:screenSize} and {@code android:screenDensity} attributes. Each {@code
-<screen>} element <strong>must include both attributes</strong> to specify an individual
+<screen>} element <strong>must include both attributes</strong> to specify an individual
screen configuration—if either attribute is missing, then the element is invalid
(external services such as Google Play will ignore it).</p>
<p>For example, if your application is compatible with only small and normal screens, regardless
-of screen density, then you must specify eight different {@code <screen>} elements,
+of screen density, then you must specify eight different {@code <screen>} elements,
because each screen size has four density configurations. You must declare each one of
these; any combination of size and density that you do <em>not</em> specify is considered a screen
configuration with which your application is <em>not</em> compatible. Here's what the manifest
@@ -584,17 +584,17 @@
<p class="note"><strong>Note:</strong> Although you can also use the <a
href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
-<compatible-screens>}</a> element for the reverse scenario (when your application is not
+<compatible-screens>}</a> element for the reverse scenario (when your application is not
compatible with smaller screens), it's easier if you instead use the <a
href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> as discussed in the previous section, because it doesn't require you
+<supports-screens>}</a> as discussed in the previous section, because it doesn't require you
to specify each screen density your application supports.</p>
<p>Remember, you should strive to make your application available to as many devices as possible by
applying all necessary techniques for <a
href="{@docRoot}guide/practices/screens_support.html">supporting multiple screens</a>. You should
then use the <a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
-<compatible-screens>}</a> element to filter your application from certain devices only when you
+<compatible-screens>}</a> element to filter your application from certain devices only when you
cannot offer compatibility on all screen configurations or you have decided to provide
multiple versions of your application, each for a different set of screen configurations.</p>
@@ -650,7 +650,7 @@
<p>In the worst-case scenario, however, you can avoid orientation changes by using the <a
href="{@docRoot}guide/topics/manifest/activity-element.html#screen">{@code
android:screenOrientation}</a> attribute in the <a
-href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
+href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
element. Instead of locking the orientation in landscape or portrait, however, you should
specify a value of {@code "nosensor"}. This way, your activity uses whatever orientation the
device specifies as its natural orientation and the screen will not rotate. You should still
@@ -676,7 +676,7 @@
traditional phone calls or handle SMS. Some devices might also omit
other hardware features, such as Bluetooth. If your application uses these features, then your
manifest file probably already includes (or should include) a declaration of the feature with the <a
-href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
+href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
element. Doing so prevents devices that do not declare support for the feature from downloading
your applications. For example:</p>
diff --git a/docs/html/guide/practices/screen-compat-mode.jd b/docs/html/guide/practices/screen-compat-mode.jd
index e3160c39..34580ba 100644
--- a/docs/html/guide/practices/screen-compat-mode.jd
+++ b/docs/html/guide/practices/screen-compat-mode.jd
@@ -18,7 +18,7 @@
<ol>
<li><a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple Screens</a></li>
<li><a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a></li>
+<supports-screens>}</a></li>
</ol>
</div>
</div>
@@ -123,7 +123,7 @@
android:targetSdkVersion}</a> to {@code "10"} or lower and <strong>does not explicitly
declare support</strong> for large screens using the <a
href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> element.</li>
+<supports-screens>}</a> element.</li>
<li>Your application has set either <a
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code android:minSdkVersion}</a>
@@ -131,7 +131,7 @@
android:targetSdkVersion}</a> to {@code "11"} or higher and <strong>explicitly declares that it does
not support</strong> large screens, using the <a
href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> element.</li>
+<supports-screens>}</a> element.</li>
</ul>
<p>To completely disable the user option for screen compatibility mode and remove the icon in the
@@ -141,7 +141,7 @@
<li><strong>Easiest:</strong>
<p>In your manifest file, add the <a
href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> element and specify the <a
+<supports-screens>}</a> element and specify the <a
href="{@docRoot}guide/topics/manifest/supports-screens-element.html#xlarge">{@code
android:xlargeScreens}</a> attribute to {@code "true"}:</p>
<pre>
@@ -150,13 +150,13 @@
<p>That's it. This declares that your application supports all larger screen sizes, so the
system will always resize your layout to fit the screen. This works regardless of what values
you've set in the <a
-href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a>
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a>
attributes.</p>
</li>
<li><strong>Easy but has other effects:</strong>
<p>In your manifest's <a
-href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a>
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a>
element, set <a
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
android:targetSdkVersion}</a> to {@code "11"} or higher:</p>
@@ -171,10 +171,10 @@
Options Menu button in the system bar.</p>
<p>If screen compatibility mode is still enabled after you change this, check your manifest's <a
href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> and be sure that there are no attributes set {@code "false"}. The best
+<supports-screens>}</a> and be sure that there are no attributes set {@code "false"}. The best
practice is to always explicitly declare your support for different screen sizes using the <a
href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> element, so you should use this element anyway.</p>
+<supports-screens>}</a> element, so you should use this element anyway.</p>
<p>For more information about updating your application to target Android 3.0 devices, read <a
href="{@docRoot}guide/practices/optimizing-for-3.0.html">Optimizing Apps for Android
3.0</a>.</p>
@@ -183,7 +183,7 @@
<li><strong>Most control</strong> (but you must compile against Android 3.2 or higher):
<p>In your manifest file, add the <a
href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> element and specify the {@code android:compatibleWidthLimitDp}
+<supports-screens>}</a> element and specify the {@code android:compatibleWidthLimitDp}
attribute to any value <em>higher than</em> {@code "320"}:</p>
<pre>
<supports-screens android:compatibleWidthLimitDp="720" />
@@ -206,7 +206,7 @@
<p>When your application is targeting Android 3.2 (API level 13) or higher, you can affect
whether compatibility mode is enabled for certain screens by using the <a
href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> element.</p>
+<supports-screens>}</a> element.</p>
<p class="note"><strong>Note:</strong> Screen compatibility mode is <strong>not</strong> a mode in
which you should want your application to run—it causes pixelation and blurring in your UI,
@@ -227,7 +227,7 @@
<ul>
<li>In your manifest file, add the <a
href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> element and specify the <a
+<supports-screens>}</a> element and specify the <a
href="{@docRoot}guide/topics/manifest/supports-screens-element.html#compatibleWidth">{@code
android:compatibleWidthLimitDp}</a> attribute to {@code "320"}:</p>
<pre>
diff --git a/docs/html/guide/practices/screens-distribution.jd b/docs/html/guide/practices/screens-distribution.jd
index 99eb04e..92416e0 100644
--- a/docs/html/guide/practices/screens-distribution.jd
+++ b/docs/html/guide/practices/screens-distribution.jd
@@ -58,21 +58,21 @@
might discover that your application can't scale up well or perhaps you've decided to publish two
versions of your application for different screen configurations. In such a case, you can use the <a
href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
-<compatible-screens>}</a> element to manage the distribution of your application based on
+<compatible-screens>}</a> element to manage the distribution of your application based on
combinations of screen size and density. External services such as Google Play use this
information to apply filtering to your application, so that only devices that have a screen
configuration with which you declare compatibility can download your application.</p>
<p>The <a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
-<compatible-screens>}</a> element must contain one or more {@code <screen>} elements. Each
-{@code <screen>} element specifies a screen configuration with which your application is
+<compatible-screens>}</a> element must contain one or more {@code <screen>} elements. Each
+{@code <screen>} element specifies a screen configuration with which your application is
compatible, using both the {@code android:screenSize} and {@code android:screenDensity} attributes.
-Each {@code <screen>} element <strong>must include both attributes</strong> to specify an
+Each {@code <screen>} element <strong>must include both attributes</strong> to specify an
individual screen configuration—if either attribute is missing, then the element is invalid
(external services such as Google Play will ignore it).</p>
<p>For example, if your application is compatible with only small and normal size screens,
-regardless of screen density, you must specify eight different {@code <screen>} elements,
+regardless of screen density, you must specify eight different {@code <screen>} elements,
because each screen size has four density configurations. You must declare each one of
these; any combination of size and density that you do <em>not</em> specify is considered a screen
configuration with which your application is <em>not</em> compatible. Here's what the manifest
@@ -101,10 +101,10 @@
<p class="note"><strong>Note:</strong> Although you can also use the <a
href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
-<compatible-screens>}</a> element for the reverse scenario (when your application is not
+<compatible-screens>}</a> element for the reverse scenario (when your application is not
compatible with smaller screens), it's easier if you instead use the <a
href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> as discussed in the next section, because it doesn't require you
+<supports-screens>}</a> as discussed in the next section, because it doesn't require you
to specify each screen density your application supports.</p>
@@ -116,7 +116,7 @@
large screen) or you need time to optimize it for smaller screens, you can prevent small-screen
devices from downloading your app by using the <a
href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> manifest element.</p>
+<supports-screens>}</a> manifest element.</p>
<p>For example, if you want your application to be available only to tablet devices, you can declare
the element in your manifest like this:</p>
@@ -172,7 +172,7 @@
<p class="caution"><strong>Caution:</strong> If you use the <a
href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> element for the reverse scenario (when your application is not compatible
+<supports-screens>}</a> element for the reverse scenario (when your application is not compatible
with <em>larger</em> screens) and set the larger screen size attributes to {@code "false"}, then
external services such as Google Play <strong>do not</strong> apply filtering. Your application
will still be available to larger screens, but when it runs, it will not resize to fit the screen.
@@ -181,16 +181,16 @@
information). If you want
to prevent your application from being downloaded on larger screens, use <a
href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
-<compatible-screens>}</a>, as discussed in the previous section about <a
+<compatible-screens>}</a>, as discussed in the previous section about <a
href="#FilteringHandsetApps">Declaring an App is Only for Handsets</a>.</p>
<p>Remember, you should strive to make your application available to as many devices as possible by
applying all necessary techniques for <a
href="{@docRoot}guide/practices/screens_support.html">supporting multiple screens</a>. You should
use <a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
-<compatible-screens>}</a> or <a
+<compatible-screens>}</a> or <a
href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> only when you cannot provide compatibility on all screen configurations
+<supports-screens>}</a> only when you cannot provide compatibility on all screen configurations
or you have decided to provide different versions of your application for different sets of screen
configurations.</p>
diff --git a/docs/html/guide/practices/screens-support-1.5.jd b/docs/html/guide/practices/screens-support-1.5.jd
index ad680d9..1676674 100644
--- a/docs/html/guide/practices/screens-support-1.5.jd
+++ b/docs/html/guide/practices/screens-support-1.5.jd
@@ -38,7 +38,7 @@
screens, using alternative resources for different screen configurations.</p>
<p>If your manifest file includes the <a
-href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a> element,
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a> element,
with the <a
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code android:minSdkVersion}</a>
attribute set to {@code "3"} or lower, and does <em>not</em> include the <a
@@ -87,7 +87,7 @@
<li>Extend compatibility for Android 1.6 (and higher) devices by adding <a
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
android:targetSdkVersion}</a> to the <a
-href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a> element.
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a> element.
Set the value of <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
android:targetSdkVersion}</a> to <code>"4"</code>. This allows your application to "inherit" the
platform's multiple screens support, even though it is technically using an earlier version of the
diff --git a/docs/html/guide/practices/screens_support.jd b/docs/html/guide/practices/screens_support.jd
index b6f1c49..1335790 100644
--- a/docs/html/guide/practices/screens_support.jd
+++ b/docs/html/guide/practices/screens_support.jd
@@ -315,7 +315,7 @@
href="{@docRoot}guide/practices/screen-compat-mode.html">screen compatibility mode</a>.</p>
<p>To declare the screen sizes your application supports, you should include the
<a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> element in your manifest file.</p>
+<supports-screens>}</a> element in your manifest file.</p>
</li>
<li><strong>Provide different layouts for different screen sizes</strong>
@@ -328,7 +328,7 @@
<code>small</code>, <code>normal</code>, <code>large</code>, and <code>xlarge</code>. For
example, layouts for an extra-large screen should go in {@code layout-xlarge/}.</p>
<p>Beginning with Android 3.2 (API level 13), the above size groups are deprecated and you
-should instead use the {@code sw<N>dp} configuration qualifier to define the smallest
+should instead use the {@code sw<N>dp} configuration qualifier to define the smallest
available width required by your layout resources. For example, if your multi-pane tablet layout
requires at least 600dp of screen width, you should place it in {@code layout-sw600dp/}. Using the
new techniques for declaring layout resources is discussed further in the section about <a
@@ -429,15 +429,15 @@
<p>To use a configuration qualifier:</p>
<ol>
<li>Create a new directory in your project's {@code res/} directory and name it using the
-format: <nobr>{@code <resources_name>-<qualifier>}</nobr>
+format: <nobr>{@code <resources_name>-<qualifier>}</nobr>
<ul>
- <li>{@code <resources_name>} is the standard resource name (such as {@code drawable} or
+ <li>{@code <resources_name>} is the standard resource name (such as {@code drawable} or
{@code layout}).</li>
- <li>{@code <qualifier>} is a configuration qualifier from table 1, below, specifying the
+ <li>{@code <qualifier>} is a configuration qualifier from table 1, below, specifying the
screen configuration for which these resources are to be used (such as {@code hdpi} or {@code
xlarge}).</li>
</ul>
- <p>You can use more than one {@code <qualifier>} at a time—simply separate each
+ <p>You can use more than one {@code <qualifier>} at a time—simply separate each
qualifier with a dash.</p>
</li>
<li>Save the appropriate configuration-specific resources in this new directory. The resource
@@ -759,7 +759,7 @@
screen area. Specifically, the device's smallestWidth is the shortest of the screen's available
height and width (you may also think of it as the "smallest possible width" for the screen). You can
use this qualifier to ensure that, regardless of the screen's current orientation, your
-application's has at least {@code <N>} dps of width available for its UI.</p>
+application's has at least {@code <N>} dps of width available for its UI.</p>
<p>For example, if your layout requires that its smallest dimension of screen area be at
least 600 dp at all times, then you can use this qualifier to create the layout resources, {@code
res/layout-sw600dp/}. The system will use these resources only when the smallest dimension of
@@ -868,8 +868,8 @@
</pre>
<p>Notice that the previous two sets of example resources use the "smallest width" qualifier, {@code
-sw<N>dp}, which specifies the smallest of the screen's two sides, regardless of the
-device's current orientation. Thus, using {@code sw<N>dp} is a simple way to specify the
+sw<N>dp}, which specifies the smallest of the screen's two sides, regardless of the
+device's current orientation. Thus, using {@code sw<N>dp} is a simple way to specify the
overall screen size available for your layout by ignoring the screen's orientation.</p>
<p>However, in some cases, what might be
@@ -883,13 +883,13 @@
res/layout-w600dp/main_activity.xml # Multi-pane (any screen with 600dp available width or more)
</pre>
-<p>Notice that the second set is using the "available width" qualifier, {@code w<N>dp}. This
+<p>Notice that the second set is using the "available width" qualifier, {@code w<N>dp}. This
way, one device may actually use both layouts, depending on the orientation of the screen (if
the available width is at least 600dp in one orientation and less than 600dp in the other
orientation).</p>
<p>If the available height is a concern for you, then you can do the same using the {@code
-h<N>dp} qualifier. Or, even combine the {@code w<N>dp} and {@code h<N>dp}
+h<N>dp} qualifier. Or, even combine the {@code w<N>dp} and {@code h<N>dp}
qualifiers if you need to be really specific.</p>
@@ -1287,7 +1287,7 @@
<p>To launch the Android SDK Manager, execute the {@code
SDK Manager.exe} from your Android SDK directory (on Windows only) or execute {@code android} from
-the {@code <sdk>/tools/} directory (on all platforms). Figure 6 shows the AVD
+the {@code <sdk>/tools/} directory (on all platforms). Figure 6 shows the AVD
Manager with a selection of AVDs, for testing various screen configurations.</p>
<p>Table 3 shows the various emulator skins that are available in the Android SDK, which you can use
diff --git a/docs/html/guide/practices/tablets-and-handsets.jd b/docs/html/guide/practices/tablets-and-handsets.jd
index a63a368..85327b6 100644
--- a/docs/html/guide/practices/tablets-and-handsets.jd
+++ b/docs/html/guide/practices/tablets-and-handsets.jd
@@ -424,8 +424,8 @@
at the top.</p>
<p>To enable split action bar, simply add {@code uiOptions="splitActionBarWhenNarrow"} to your
-<a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> or
-<a href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
+<a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> or
+<a href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
manifest element.</p>
diff --git a/docs/html/guide/topics/connectivity/bluetooth-le.jd b/docs/html/guide/topics/connectivity/bluetooth-le.jd
index 5c32e56..3d60686 100644
--- a/docs/html/guide/topics/connectivity/bluetooth-le.jd
+++ b/docs/html/guide/topics/connectivity/bluetooth-le.jd
@@ -186,7 +186,7 @@
<p>Before your application can communicate over BLE, you need
to verify that BLE is supported on the device, and if so, ensure that it is enabled.
-Note that this check is only necessary if {@code <uses-feature.../>}
+Note that this check is only necessary if {@code <uses-feature.../>}
is set to false.</p>
<p>If BLE is not supported, then you should gracefully disable any
diff --git a/docs/html/guide/topics/connectivity/nfc/hce.jd b/docs/html/guide/topics/connectivity/nfc/hce.jd
index 9ec1a8d..900d8ac 100644
--- a/docs/html/guide/topics/connectivity/nfc/hce.jd
+++ b/docs/html/guide/topics/connectivity/nfc/hce.jd
@@ -184,7 +184,7 @@
<p>Your application can check whether a device supports HCE by checking for the
{@link android.content.pm.PackageManager#FEATURE_NFC_HOST_CARD_EMULATION} feature. You should use the
-<a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> tag in the manifest of your application to declare that your app
+<a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> tag in the manifest of your application to declare that your app
uses the HCE feature, and whether it is required for the app to function or not.</p>
<h3 id="ServiceImplementation">Service implementation</h3>
diff --git a/docs/html/guide/topics/data/backup.jd b/docs/html/guide/topics/data/backup.jd
index 5710a47..9554835 100644
--- a/docs/html/guide/topics/data/backup.jd
+++ b/docs/html/guide/topics/data/backup.jd
@@ -160,7 +160,7 @@
href="{@docRoot}guide/topics/manifest/application-element.html#agent">{@code
android:backupAgent}</a> attribute in the <a
href="{@docRoot}guide/topics/manifest/application-element.html">{@code
-<application>}</a> tag.</p>
+<application>}</a> tag.</p>
<p>For example:</p>
@@ -205,8 +205,8 @@
<p>To get your Backup Service Key, <a
href="http://code.google.com/android/backup/signup.html">register for Android Backup Service</a>.
When you register, you will be provided a Backup Service Key and the appropriate {@code
-<meta-data>} XML code for your Android manifest file, which you must include as a child of the
-{@code <application>} element. For example:</p>
+<meta-data>} XML code for your Android manifest file, which you must include as a child of the
+{@code <application>} element. For example:</p>
<pre>
<application android:label="MyApplication"
@@ -231,7 +231,7 @@
your application to know what transport is used on the device. However, if you implement backup for
your application, you should always include a Backup Service Key for Android Backup Service so
your application can perform backup when the device uses the Android Backup Service transport. If
-the device does not use Android Backup Service, then the {@code <meta-data>} element with the
+the device does not use Android Backup Service, then the {@code <meta-data>} element with the
Backup Service Key is ignored.</p>
diff --git a/docs/html/guide/topics/data/data-storage.jd b/docs/html/guide/topics/data/data-storage.jd
index 24e7f54..46db371 100644
--- a/docs/html/guide/topics/data/data-storage.jd
+++ b/docs/html/guide/topics/data/data-storage.jd
@@ -190,8 +190,8 @@
<p class="note"><strong>Tip:</strong> If you want to save a static file in your application at
compile time, save the file in your project <code>res/raw/</code> directory. You can open it with
-{@link android.content.res.Resources#openRawResource(int) openRawResource()}, passing the {@code
-R.raw.<em><filename></em>} resource ID. This method returns an {@link java.io.InputStream}
+{@link android.content.res.Resources#openRawResource(int) openRawResource()}, passing the
+<code>R.raw.<em><filename></em></code> resource ID. This method returns an {@link java.io.InputStream}
that you can use to read the file (but you cannot write to the original file).
</p>
diff --git a/docs/html/guide/topics/graphics/opengl.jd b/docs/html/guide/topics/graphics/opengl.jd
index 3e3d569..80b3c2b 100644
--- a/docs/html/guide/topics/graphics/opengl.jd
+++ b/docs/html/guide/topics/graphics/opengl.jd
@@ -242,7 +242,7 @@
<li><strong>Texture compression requirements</strong> - If your application uses texture
compression formats, you must declare the formats your application supports in your manifest file
using <a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code
-<supports-gl-texture>}</a>. For more information about available texture compression
+<supports-gl-texture>}</a>. For more information about available texture compression
formats, see <a href="#textures">Texture compression support</a>.
<p>Declaring texture compression requirements in your manifest hides your application from users
@@ -250,7 +250,7 @@
information on how Google Play filtering works for texture compressions, see the <a
href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html#market-texture-filtering">
Google Play and texture compression filtering</a> section of the {@code
-<supports-gl-texture>} documentation.</p>
+<supports-gl-texture>} documentation.</p>
</li>
</ul>
@@ -503,9 +503,9 @@
reducing memory requirements and making more efficient use of memory bandwidth. The Android
framework provides support for the ETC1 compression format as a standard feature, including a {@link
android.opengl.ETC1Util} utility class and the {@code etc1tool} compression tool (located in the
-Android SDK at {@code <sdk>/tools/}). For an example of an Android application that uses
+Android SDK at {@code <sdk>/tools/}). For an example of an Android application that uses
texture compression, see the {@code CompressedTextureActivity} code sample in Android SDK
-({@code <sdk>/samples/<version>/ApiDemos/src/com/example/android/apis/graphics/}).</p>
+({@code <sdk>/samples/<version>/ApiDemos/src/com/example/android/apis/graphics/}).</p>
<p class="caution"><strong>Caution:</strong> The ETC1 format is supported by most Android devices,
but it not guaranteed to be available. To check if the ETC1 format is supported on a device, call
diff --git a/docs/html/guide/topics/manifest/action-element.jd b/docs/html/guide/topics/manifest/action-element.jd
index 54ee6ae..fc6ce44 100644
--- a/docs/html/guide/topics/manifest/action-element.jd
+++ b/docs/html/guide/topics/manifest/action-element.jd
@@ -14,7 +14,7 @@
<dt>description:</dt>
<dd itemprop="description">Adds an action to an intent filter.
An <code><a href="{@docRoot}guide/topics/manifest/intent-filter-element.html"><intent-filter></a></code> element must contain
-one or more {@code <action>} elements. If it doesn't contain any, no
+one or more {@code <action>} elements. If it doesn't contain any, no
Intent objects will get through the filter. See
<a href="{@docRoot}guide/components/intents-filters.html">Intents and
Intent Filters</a> for details on intent filters and the role of action
@@ -26,9 +26,9 @@
<dt><a name="nm"></a>{@code android:name}</dt>
<dd>The name of the action. Some standard actions are defined in the
{@link android.content.Intent#ACTION_CHOOSER Intent} class as
-{@code ACTION_<i>string</i>} constants. To assign one of these actions to
+<code>ACTION_<i>string</i></code> constants. To assign one of these actions to
this attribute, prepend "{@code android.intent.action.}" to the
-{@code <i>string</i>} that follows {@code ACTION_}.
+<code><i>string</i></code> that follows {@code ACTION_}.
For example, for {@code ACTION_MAIN}, use "{@code android.intent.action.MAIN}"
and for {@code ACTION_WEB_SEARCH}, use "{@code android.intent.action.WEB_SEARCH}".
diff --git a/docs/html/guide/topics/manifest/activity-alias-element.jd b/docs/html/guide/topics/manifest/activity-alias-element.jd
index 343b02e..1427b55 100644
--- a/docs/html/guide/topics/manifest/activity-alias-element.jd
+++ b/docs/html/guide/topics/manifest/activity-alias-element.jd
@@ -42,7 +42,7 @@
</p>
<p>
-With the exception of {@code targetActivity}, {@code <activity-alias>}
+With the exception of {@code targetActivity}, {@code <activity-alias>}
attributes are a subset of <code><a href="{@docRoot}guide/topics/manifest/activity-element.html"><activity></a></code> attributes.
For attributes in the subset, none of the values set for the target carry over
to the alias. However, for attributes not in the subset, the values set for
@@ -60,7 +60,7 @@
The <code><a href="{@docRoot}guide/topics/manifest/application-element.html"><application></a></code> element has its own
<code><a href="{@docRoot}guide/topics/manifest/application-element.html#enabled">enabled</a></code> attribute that applies to all
application components, including activity aliases. The
-<code><a href="{@docRoot}guide/topics/manifest/application-element.html"><application></a></code> and {@code <activity-alias>}
+<code><a href="{@docRoot}guide/topics/manifest/application-element.html"><application></a></code> and {@code <activity-alias>}
attributes must both be "{@code true}" for the system to be able to instantiate
the target activity through the alias. If either is "{@code false}", the alias
does not work.
diff --git a/docs/html/guide/topics/manifest/activity-element.jd b/docs/html/guide/topics/manifest/activity-element.jd
index 99e64d9..fd1729c 100644
--- a/docs/html/guide/topics/manifest/activity-element.jd
+++ b/docs/html/guide/topics/manifest/activity-element.jd
@@ -64,7 +64,7 @@
<dt>description:</dt>
<dd itemprop="description">Declares an activity (an {@link android.app.Activity} subclass) that
implements part of the application's visual user interface. All activities
-must be represented by {@code <activity>}
+must be represented by {@code <activity>}
elements in the manifest file. Any that are not declared there will not be seen
by the system and will never be run.
@@ -158,7 +158,7 @@
<dt><a name="banner"></a>{@code android:banner}</dt>
<dd>A <a href="{@docRoot}guide/topics/resources/drawable-resource.html">drawable resource</a>
providing an extended graphical banner for its associated item. Use with the
-{@code <activity>} tag to supply a default banner for a specific activity, or with the
+{@code <activity>} tag to supply a default banner for a specific activity, or with the
<a href="{@docRoot}guide/topics/manifest/application-element.html"><code><application></code></a>
tag to supply a banner for all application activities.
@@ -168,7 +168,7 @@
{@link android.content.Intent#CATEGORY_LEANBACK_LAUNCHER} intent.</p>
<p>This attribute must be set as a reference to a drawable resource containing
-the image (for example {@code "@drawable/banner"}). There is no default banner.
+the image (for example {@code "@drawable/banner"}). There is no default banner.
</p>
<p>
@@ -373,7 +373,7 @@
<a href="{@docRoot}guide/topics/manifest/application-element.html#enabled">enabled</a></code>
attribute that applies to all application components, including activities. The
<code><a href="{@docRoot}guide/topics/manifest/application-element.html"><application></a></code>
-and {@code <activity>} attributes must both be "{@code true}" (as they both
+and {@code <activity>} attributes must both be "{@code true}" (as they both
are by default) for the system to be able to instantiate the activity. If either
is "{@code false}", it cannot be instantiated.
</p></dd>
@@ -700,7 +700,7 @@
<!-- api level 16 -->
<dt><a name="parent"></a>{@code android:parentActivityName}</dt>
<dd>The class name of the logical parent of the activity. The name here must match the class
- name given to the corresponding {@code <activity>} element's
+ name given to the corresponding {@code <activity>} element's
<a href="#nm"><code>android:name</code></a> attribute.
<p>The system reads this attribute to determine which activity should be started when
@@ -708,7 +708,7 @@
synthesize a back stack of activities with {@link android.app.TaskStackBuilder}.</p>
<p>To support API levels 4 - 16, you can also declare the parent activity with a {@code
-<meta-data>} element that specifies a value for {@code "android.support.PARENT_ACTIVITY"}.
+<meta-data>} element that specifies a value for {@code "android.support.PARENT_ACTIVITY"}.
For example:</p>
<pre>
<activity
@@ -888,7 +888,7 @@
{@code "sensorLandscape"}, then your application will be available only to devices that support
landscape orientation. However, you should also explicitly declare that
your application requires either portrait or landscape orientation with the <a
-href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
+href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
element. For example, <code><uses-feature
android:name="android.hardware.screen.portrait"/></code>. This is purely a filtering behavior
provided by Google Play (and other services that support it) and the platform itself does not
diff --git a/docs/html/guide/topics/manifest/application-element.jd b/docs/html/guide/topics/manifest/application-element.jd
index e63ba71..5600b5c 100644
--- a/docs/html/guide/topics/manifest/application-element.jd
+++ b/docs/html/guide/topics/manifest/application-element.jd
@@ -109,7 +109,7 @@
<dt><a name="banner"></a>{@code android:banner}</dt>
<dd>A <a href="{@docRoot}guide/topics/resources/drawable-resource.html">drawable resource</a>
providing an extended graphical banner for its associated item. Use with the
-{@code <application>} tag to supply a default banner for all application activities, or with the
+{@code <application>} tag to supply a default banner for all application activities, or with the
<a href="{@docRoot}guide/topics/manifest/activity-element.html"><code><activity></code></a>
tag to supply a banner for a specific activity.
@@ -119,7 +119,7 @@
{@link android.content.Intent#CATEGORY_LEANBACK_LAUNCHER} intent.</p>
<p>This attribute must be set as a reference to a drawable resource containing
-the image (for example {@code "@drawable/banner"}). There is no default banner.
+the image (for example <code>"@drawable/banner"</code>). There is no default banner.
</p>
<p>
@@ -197,7 +197,7 @@
<p>
This attribute must be set as a reference to a drawable resource containing
-the image (for example {@code "@drawable/icon"}). There is no default icon.
+the image (for example <code>"@drawable/icon"</code>). There is no default icon.
</p></dd>
<dt><a name="isGame"></a>{@code android:isGame}</dt>
@@ -252,7 +252,7 @@
<dt><a name="logo"></a>{@code android:logo}</dt>
<dd>A logo for the application as whole, and the default logo for activities.
<p>This attribute must be set as a reference to a drawable resource containing
-the image (for example {@code "@drawable/logo"}). There is no default logo.</p></dd>
+the image (for example <code>"@drawable/logo"</code>). There is no default logo.</p></dd>
<dt><a name="space"></a>{@code android:manageSpaceActivity}</dt>
<dd>The fully qualified name of an Activity subclass that the system
diff --git a/docs/html/guide/topics/manifest/category-element.jd b/docs/html/guide/topics/manifest/category-element.jd
index 563ed10..0034119 100644
--- a/docs/html/guide/topics/manifest/category-element.jd
+++ b/docs/html/guide/topics/manifest/category-element.jd
@@ -20,10 +20,10 @@
<dd><dl class="attr">
<dt><a name="nm"></a>{@code android:name}</dt>
<dd>The name of the category. Standard categories are defined in the
-{@link android.content.Intent} class as {@code CATEGORY_<i>name</i>}
+{@link android.content.Intent} class as <code>CATEGORY_<i>name</i></code>
constants. The name assigned here can be derived from those constants
by prefixing "{@code android.intent.category.}" to the
-{@code <i>name</i>} that follows {@code CATEGORY_}. For example,
+<code><i>name</i></code> that follows {@code CATEGORY_}. For example,
the string value for {@code CATEGORY_LAUNCHER} is
"{@code android.intent.category.LAUNCHER}".
diff --git a/docs/html/guide/topics/manifest/compatible-screens-element.jd b/docs/html/guide/topics/manifest/compatible-screens-element.jd
index de921d2..9c7f036 100644
--- a/docs/html/guide/topics/manifest/compatible-screens-element.jd
+++ b/docs/html/guide/topics/manifest/compatible-screens-element.jd
@@ -21,11 +21,11 @@
<dt>description:</dt>
<dd itemprop="description">Specifies each screen configuration with which the application is compatible. Only one instance
-of the {@code <compatible-screens>} element is allowed in the manifest, but it can
+of the <code><compatible-screens></code> element is allowed in the manifest, but it can
contain multiple <code><screen></code> elements. Each <code><screen></code> element
specifies a specific screen size-density combination with which the application is compatible.
- <p>The Android system <em>does not</em> read the {@code <compatible-screens>} manifest
+ <p>The Android system <em>does not</em> read the {@code <compatible-screens>} manifest
element (neither at install-time nor at runtime). This element is informational only and may be used
by external services (such as Google Play) to better understand the application's compatibility
with specific screen configurations and enable filtering for users. Any screen configuration that is
@@ -45,14 +45,14 @@
<p>If you want to set only a minimum screen <em>size</em> for your your application, then you
should use the <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> element. For example, if you want your application to be available
+<supports-screens>}</a> element. For example, if you want your application to be available
only for <em>large</em> and <em>xlarge</em> screen devices, the <a
href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> element allows you to declare that your application does not
+<supports-screens>}</a> element allows you to declare that your application does not
support <em>small</em> and <em>normal</em> screen sizes. External services (such as Google
Play) will filter your application accordingly. You can also use the <a
href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
-<supports-screens>}</a> element to declare whether the system should resize your
+<supports-screens>}</a> element to declare whether the system should resize your
application for different screen sizes.</p>
<p>Also see the <a href="{@docRoot}google/play/filters.html">Filters on Google Play</a>
@@ -65,10 +65,10 @@
<dd>
<dl class="tag-list">
- <dt id="screen">{@code <screen>}</dt>
+ <dt id="screen">{@code <screen>}</dt>
<dd>Specifies a single screen configuration with which the application is compatible.
<p>At least one instance of this element must be placed inside the {@code
-<compatible-screens>} element. This element <em>must include both</em> the {@code
+<compatible-screens>} element. This element <em>must include both</em> the {@code
android:screenSize} and {@code android:screenDensity} attributes (if you do not declare both
attributes, then the element is ignored).</p>
@@ -108,7 +108,7 @@
<dt>example</dt>
<dd>
<p>If your application is compatible with only small and normal screens, regardless
-of screen density, then you must specify twelve different {@code <screen>} elements,
+of screen density, then you must specify twelve different {@code <screen>} elements,
because each screen size has six different density configurations. You must declare each one of
these; any combination of size and density that you do <em>not</em> specify is considered a screen
configuration with which your application is <em>not</em> compatible. Here's what the manifest
diff --git a/docs/html/guide/topics/manifest/data-element.jd b/docs/html/guide/topics/manifest/data-element.jd
index 77f16dd..30020ad 100644
--- a/docs/html/guide/topics/manifest/data-element.jd
+++ b/docs/html/guide/topics/manifest/data-element.jd
@@ -24,7 +24,7 @@
attributes for each of its parts:
<p style="margin-left: 2em">
-{@code <scheme>://<host>:<port>[<path>|<pathPrefix>|<pathPattern>]}</p>
+{@code <scheme>://<host>:<port>[<path>|<pathPrefix>|<pathPattern>]}</p>
<p>
These attributes that specify the URL format are optional, but also mutually dependent:
@@ -36,7 +36,7 @@
</ul>
<p>
-All the {@code <data>} elements contained within the same
+All the {@code <data>} elements contained within the same
<code><a href="{@docRoot}guide/topics/manifest/intent-filter-element.html"><intent-filter></a></code> element contribute to
the same filter. So, for example, the following filter specification,
</p>
@@ -55,7 +55,7 @@
</intent-filter></pre>
<p>
-You can place any number of {@code <data>} elements inside an
+You can place any number of {@code <data>} elements inside an
<code><a href="{@docRoot}guide/topics/manifest/intent-filter-element.html"><intent-filter></a></code> to give it multiple data
options. None of its attributes have default values.
</p>
@@ -157,7 +157,7 @@
The subtype can be the asterisk wildcard ({@code *}) to indicate that any
subtype matches.
-<p>It's common for an intent filter to declare a {@code <data>} that includes
+<p>It's common for an intent filter to declare a {@code <data>} that includes
only the {@code android:mimeType} attribute.</p>
diff --git a/docs/html/guide/topics/manifest/grant-uri-permission-element.jd b/docs/html/guide/topics/manifest/grant-uri-permission-element.jd
index 2179359..b2d9bb7 100644
--- a/docs/html/guide/topics/manifest/grant-uri-permission-element.jd
+++ b/docs/html/guide/topics/manifest/grant-uri-permission-element.jd
@@ -26,7 +26,7 @@
attribute is "{@code true}", permission can be granted for any the data under
the provider's purview. However, if that attribute is "{@code false}", permission
can be granted only to data subsets that are specified by this element.
-A provider can contain any number of {@code <grant-uri-permission>} elements.
+A provider can contain any number of {@code <grant-uri-permission>} elements.
Each one can specify only one path (only one of the three possible attributes).
</p>
diff --git a/docs/html/guide/topics/manifest/manifest-intro.jd b/docs/html/guide/topics/manifest/manifest-intro.jd
index d2a9308..c8d68f5 100644
--- a/docs/html/guide/topics/manifest/manifest-intro.jd
+++ b/docs/html/guide/topics/manifest/manifest-intro.jd
@@ -279,7 +279,7 @@
should be localized and therefore set from a resource or theme. Resource
values are expressed in the following format,</p>
-<p style="margin-left: 2em">{@code @[<i>package</i>:]<i>type</i>:<i>name</i>}</p>
+<p style="margin-left: 2em"><code>@[<i>package</i>:]<i>type</i>:<i>name</i></code></p>
<p>
where the <i>package</i> name can be omitted if the resource is in the same package
@@ -295,7 +295,7 @@
rather than '{@code @}':
</p>
-<p style="margin-left: 2em">{@code ?[<i>package</i>:]<i>type</i>:<i>name</i>}
+<p style="margin-left: 2em"><code>?[<i>package</i>:]<i>type</i>:<i>name</i></code>
</p></dd>
<dt><b>String values</b></dt>
diff --git a/docs/html/guide/topics/manifest/meta-data-element.jd b/docs/html/guide/topics/manifest/meta-data-element.jd
index 241153b..d3b41c3 100644
--- a/docs/html/guide/topics/manifest/meta-data-element.jd
+++ b/docs/html/guide/topics/manifest/meta-data-element.jd
@@ -20,7 +20,7 @@
<dt>description:</dt>
<dd itemprop="description">A name-value pair for an item of additional, arbitrary data that can
be supplied to the parent component. A component element can contain any
-number of {@code <meta-data>} subelements. The values from all of
+number of {@code <meta-data>} subelements. The values from all of
them are collected in a single {@link android.os.Bundle} object and made
available to the component as the
{@link android.content.pm.PackageItemInfo#metaData
@@ -45,7 +45,7 @@
<p>
It is highly recommended that you avoid supplying related data as
-multiple separate {@code <meta-data>} entries. Instead, if you
+multiple separate {@code <meta-data>} entries. Instead, if you
have complex data to associate with a component, store it as a resource and
use the {@code resource} attribute to inform the component of its ID.
</p></dd>
diff --git a/docs/html/guide/topics/manifest/provider-element.jd b/docs/html/guide/topics/manifest/provider-element.jd
index f3ffd58..4b5c0c3 100644
--- a/docs/html/guide/topics/manifest/provider-element.jd
+++ b/docs/html/guide/topics/manifest/provider-element.jd
@@ -40,7 +40,7 @@
Declares a content provider component. A content provider is a subclass of
{@link android.content.ContentProvider} that supplies structured access to data managed by the
application. All content providers in your application must be defined in a
- {@code <provider>} element in the manifest file; otherwise, the system is unaware of them
+ {@code <provider>} element in the manifest file; otherwise, the system is unaware of them
and doesn't run them.
<p>
You only declare content providers that are part of your application. Content providers in
@@ -100,7 +100,7 @@
The <code><a href="{@docRoot}guide/topics/manifest/application-element.html"><application></a></code> element has its own
<code><a href="{@docRoot}guide/topics/manifest/application-element.html#enabled">enabled</a></code> attribute that applies to all
application components, including content providers. The
-<code><a href="{@docRoot}guide/topics/manifest/application-element.html"><application></a></code> and {@code <provider>}
+<code><a href="{@docRoot}guide/topics/manifest/application-element.html"><application></a></code> and {@code <provider>}
attributes must both be "{@code true}" (as they both
are by default) for the content provider to be enabled. If either is
"{@code false}", the provider is disabled; it cannot be instantiated.
diff --git a/docs/html/guide/topics/manifest/receiver-element.jd b/docs/html/guide/topics/manifest/receiver-element.jd
index df2437e..081a191 100644
--- a/docs/html/guide/topics/manifest/receiver-element.jd
+++ b/docs/html/guide/topics/manifest/receiver-element.jd
@@ -49,7 +49,7 @@
<code><a href="{@docRoot}guide/topics/manifest/application-element.html#enabled">enabled</a></code> attribute that applies to all
application components, including broadcast receivers. The
<code><a href="{@docRoot}guide/topics/manifest/application-element.html"><application></a></code> and
-{@code <receiver>} attributes must both be "{@code true}" for
+{@code <receiver>} attributes must both be "{@code true}" for
the broadcast receiver to be enabled. If either is "{@code false}", it is
disabled; it cannot be instantiated.
</p></dd>
diff --git a/docs/html/guide/topics/manifest/service-element.jd b/docs/html/guide/topics/manifest/service-element.jd
index e26f263..fca85f5 100644
--- a/docs/html/guide/topics/manifest/service-element.jd
+++ b/docs/html/guide/topics/manifest/service-element.jd
@@ -31,7 +31,7 @@
applications.
<p>
-All services must be represented by {@code <service>} elements in
+All services must be represented by {@code <service>} elements in
the manifest file. Any that are not declared there will not be seen
by the system and will never be run.
</p></dd>
@@ -47,7 +47,7 @@
The <code><a href="{@docRoot}guide/topics/manifest/application-element.html"><application></a></code> element has its own
<code><a href="{@docRoot}guide/topics/manifest/application-element.html#enabled">enabled</a></code> attribute that applies to all
application components, including services. The
-<code><a href="{@docRoot}guide/topics/manifest/application-element.html"><application></a></code> and {@code <service>}
+<code><a href="{@docRoot}guide/topics/manifest/application-element.html"><application></a></code> and {@code <service>}
attributes must both be "{@code true}" (as they both
are by default) for the service to be enabled. If either is
"{@code false}", the service is disabled; it cannot be instantiated.
diff --git a/docs/html/guide/topics/manifest/supports-screens-element.jd b/docs/html/guide/topics/manifest/supports-screens-element.jd
index bbeceb7..a4546fa 100644
--- a/docs/html/guide/topics/manifest/supports-screens-element.jd
+++ b/docs/html/guide/topics/manifest/supports-screens-element.jd
@@ -38,7 +38,7 @@
when it is on a tablet compared to when running on a handset device.</p>
<p>However, if your application does not work well when resized to fit different screen sizes, you
-can use the attributes of the {@code <supports-screens>} element to control whether your
+can use the attributes of the {@code <supports-screens>} element to control whether your
application should be distributed to smaller screens or have its UI scaled up ("zoomed") to fit
larger screens using the system's <a
href="{@docRoot}guide/practices/screen-compat-mode.html">screen compatibility mode</a>. When you
@@ -152,7 +152,7 @@
not need to use this attribute. Otherwise, you should use a value for this attribute that
matches the smallest value used by your application for the <a
href="{@docRoot}guide/topics/resources/providing-resources.html#SmallestScreenWidthQualifier">
-smallest screen width qualifier</a> ({@code sw<N>dp}).</p>
+smallest screen width qualifier</a> ({@code sw<N>dp}).</p>
<p class="caution"><strong>Caution:</strong> The Android system does not pay attention to this
attribute, so it does not affect how your application behaves at runtime. Instead, it is used
diff --git a/docs/html/guide/topics/manifest/uses-configuration-element.jd b/docs/html/guide/topics/manifest/uses-configuration-element.jd
index 15fd49c1..f551672 100644
--- a/docs/html/guide/topics/manifest/uses-configuration-element.jd
+++ b/docs/html/guide/topics/manifest/uses-configuration-element.jd
@@ -38,7 +38,7 @@
information about how to support d-pad input in your app, read <a href=
"{@docRoot}guide/topics/ui/accessibility/apps.html#focus-nav">Enabling Focus Navigation</a>. If
your app absolutely cannot function without a touchscreen, then instead use the <a href=
-"{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> tag to
+"{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> tag to
declare the required touchscreen type, ranging from {@code "android.hardware.faketouch"} for basic
touch-style events to more advanced touch types such as {@code
"android.hardware.touchscreen.multitouch.jazzhand"} for distinct input from multiple fingers.</p>
@@ -160,7 +160,7 @@
<p class="note"><strong>Note:</strong> If some type of touch input is required for your app,
you should instead use the
<a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code
- <uses-feature>}</a> tag to declare the required touchscreen
+ <uses-feature>}</a> tag to declare the required touchscreen
type, beginning with {@code "android.hardware.faketouch"} for basic touch-style events.</p>
</td>
</tr>
diff --git a/docs/html/guide/topics/manifest/uses-feature-element.jd b/docs/html/guide/topics/manifest/uses-feature-element.jd
index 21e3057..e746a67 100644
--- a/docs/html/guide/topics/manifest/uses-feature-element.jd
+++ b/docs/html/guide/topics/manifest/uses-feature-element.jd
@@ -719,10 +719,10 @@
android:screenOrientation}</a> with either {@code "landscape"}, {@code "reverseLandscape"}, or
{@code "sensorLandscape"}, then your application will be available only to devices that support
landscape orientation. As a best practice, you should still declare your requirement for this
-orientation using a {@code <uses-feature>} element. If you declare an orientation for your
+orientation using a {@code <uses-feature>} element. If you declare an orientation for your
activity using <a href="{@docRoot}guide/topics/manifest/activity-element.html#screen">{@code
android:screenOrientation}</a>, but don't actually <em>require</em> it, you can disable the
-requirement by declaring the orientation with a {@code <uses-feature>} element and include
+requirement by declaring the orientation with a {@code <uses-feature>} element and include
{@code android:required="false"}.</p>
<p>For backwards compatibility, any device running a platform version that supports only API
level 12 or lower is assumed to support both landscape and portrait.</p>
@@ -780,9 +780,9 @@
<p class="note"><strong>Note:</strong> Because applications require the {@code
android.hardware.touchscreen} feature by default, if you want your application to be available to
devices that provide a fake touch interface, you must also explicitly declare that a touch screen is
-<em>not</em> required by declaring {@code <uses-feature
+<em>not</em> required by declaring <code><uses-feature
android:name="android.hardware.touchscreen" <strong>android:required="false"</strong>
-/>}</p></td>
+/></code></p></td>
</tr>
<tr>
diff --git a/docs/html/guide/topics/media/mediarouter.jd b/docs/html/guide/topics/media/mediarouter.jd
index e0bf889..54d52a6 100644
--- a/docs/html/guide/topics/media/mediarouter.jd
+++ b/docs/html/guide/topics/media/mediarouter.jd
@@ -95,7 +95,7 @@
{@link android.support.v7.media.MediaRouteProvider} and distributing it as an application.
For more information on implementing a media route provider, see the {@link
android.support.v7.media.MediaRouteProvider} reference documentation and the v7-mediarouter
- support library sample {@code <sdk>/extras/android/compatibility/v7/mediarouter}.
+ support library sample {@code <sdk>/extras/android/compatibility/v7/mediarouter}.
</p>
@@ -540,7 +540,7 @@
multiple media items for playback and management of the media queue. For a comprehensive sample
implementation of these features, see {@code SampleMediaRouterActivity} and its associated
classes in the v7 mediarouter support library sample
- {@code <sdk>/extras/android/compatibility/v7/mediarouter}.
+ {@code <sdk>/extras/android/compatibility/v7/mediarouter}.
</p>
<p>
diff --git a/docs/html/guide/topics/providers/document-provider.jd b/docs/html/guide/topics/providers/document-provider.jd
index 8ea08bd..9d03616 100644
--- a/docs/html/guide/topics/providers/document-provider.jd
+++ b/docs/html/guide/topics/providers/document-provider.jd
@@ -282,7 +282,7 @@
<li>Adding the category {@link android.content.Intent#CATEGORY_OPENABLE} to the
intent filters the results to display only documents that can be opened, such as image files.</li>
-<li>The statement {@code intent.setType("image/*")} further filters to
+<li>The statement <code>intent.setType("image/*")</code> further filters to
display only documents that have the image MIME data type.</li>
</ul>
@@ -580,7 +580,7 @@
<li>The {@code android:enabled} attribute set to a boolean value defined in a resource
file. The purpose of this attribute is to disable the provider on devices running Android 4.3 or lower.
-For example, {@code android:enabled="@bool/atLeastKitKat"}. In
+For example, <code>android:enabled="@bool/atLeastKitKat"</code>. In
addition to including this attribute in the manifest, you need to do the following:
<ul>
<li>In your {@code bool.xml} resources file under {@code res/values/}, add
diff --git a/docs/html/guide/topics/resources/accessing-resources.jd b/docs/html/guide/topics/resources/accessing-resources.jd
index 8f99653..b971238 100644
--- a/docs/html/guide/topics/resources/accessing-resources.jd
+++ b/docs/html/guide/topics/resources/accessing-resources.jd
@@ -9,8 +9,8 @@
<ul>
<li>Resources can be referenced from code using integers from {@code R.java}, such as
{@code R.drawable.myimage}</li>
- <li>Resources can be referenced from resources using a special XML syntax, such as {@code
-@drawable/myimage}</li>
+ <li>Resources can be referenced from resources using a special XML syntax, such as
+<code>@drawable/myimage</code></li>
<li>You can also access your app resources with methods in
{@link android.content.res.Resources}</li>
</ul>
@@ -129,10 +129,10 @@
</pre>
<ul>
- <li><em>{@code <package_name>}</em> is the name of the package in which the resource is located (not
+ <li><em>{@code <package_name>}</em> is the name of the package in which the resource is located (not
required when referencing resources from your own package).</li>
- <li><em>{@code <resource_type>}</em> is the {@code R} subclass for the resource type.</li>
- <li><em>{@code <resource_name>}</em> is either the resource filename
+ <li><em>{@code <resource_type>}</em> is the {@code R} subclass for the resource type.</li>
+ <li><em>{@code <resource_name>}</em> is either the resource filename
without the extension or the {@code android:name} attribute value in the XML element (for simple
values).</li>
</ul>
@@ -210,11 +210,11 @@
</pre>
<ul>
- <li>{@code <package_name>} is the name of the package in which the resource is located (not
+ <li>{@code <package_name>} is the name of the package in which the resource is located (not
required when referencing resources from the same package)</li>
- <li>{@code <resource_type>} is the
+ <li>{@code <resource_type>} is the
{@code R} subclass for the resource type</li>
- <li>{@code <resource_name>} is either the resource filename
+ <li>{@code <resource_name>} is either the resource filename
without the extension or the {@code android:name} attribute value in the XML element (for simple
values).</li>
</ul>
@@ -295,7 +295,7 @@
essentially says, "use the style that is defined by this attribute, in the current theme."</p>
<p>To reference a style attribute, the name syntax is almost identical to the normal resource
-format, but instead of the at-symbol ({@code @}), use a question-mark ({@code ?}), and the
+format, but instead of the at-symbol (<code>@</code>), use a question-mark ({@code ?}), and the
resource type portion is optional. For instance:</p>
<pre class="classic">
diff --git a/docs/html/guide/topics/resources/color-list-resource.jd b/docs/html/guide/topics/resources/color-list-resource.jd
index b20915c..61f6665 100644
--- a/docs/html/guide/topics/resources/color-list-resource.jd
+++ b/docs/html/guide/topics/resources/color-list-resource.jd
@@ -20,7 +20,7 @@
or niether) and, using a color state list, you can provide a different color during each state.</p>
<p>You can describe the state list in an XML file. Each color is defined in an {@code
-<item>} element inside a single {@code <selector>} element. Each {@code <item>}
+<item>} element inside a single {@code <selector>} element. Each {@code <item>}
uses various attributes to describe the state in which it should be used.</p>
<p>During each state change, the state list is traversed top to bottom and the first item that
@@ -69,7 +69,7 @@
<dt id="selector-element"><code><selector></code></dt>
<dd><strong>Required.</strong> This must be the root element. Contains one or more {@code
-<item>} elements.
+<item>} elements.
<p class="caps">attributes:</p>
<dl class="atn-list">
<dt><code>xmlns:android</code></dt>
diff --git a/docs/html/guide/topics/resources/drawable-resource.jd b/docs/html/guide/topics/resources/drawable-resource.jd
index 06bd2d0..dd2c4c2 100644
--- a/docs/html/guide/topics/resources/drawable-resource.jd
+++ b/docs/html/guide/topics/resources/drawable-resource.jd
@@ -139,11 +139,11 @@
<p>An XML bitmap is a resource defined in XML that points to a bitmap file. The effect is an alias for a
raw bitmap file. The XML can specify additional properties for the bitmap such as dithering and tiling.</p>
-<p class="note"><strong>Note:</strong> You can use a {@code <bitmap>} element as a child of
-an {@code <item>} element. For
+<p class="note"><strong>Note:</strong> You can use a {@code <bitmap>} element as a child of
+an {@code <item>} element. For
example, when creating a <a href="#StateList">state list</a> or <a href="#LayerList">layer list</a>,
you can exclude the {@code android:drawable}
-attribute from an {@code <item>} element and nest a {@code <bitmap>} inside it
+attribute from an {@code <item>} element and nest a {@code <bitmap>} inside it
that defines the drawable item.</p>
<dl class="xml">
@@ -448,8 +448,8 @@
that manages an array of other drawables. Each drawable in the list is drawn in the order of the
list—the last drawable in the list is drawn on top.</p>
-<p>Each drawable is represented by an {@code <item>} element inside a single {@code
-<layer-list>} element.</p>
+<p>Each drawable is represented by an {@code <item>} element inside a single {@code
+<layer-list>} element.</p>
<dl class="xml">
@@ -492,7 +492,7 @@
<dt id="layerlist-element"><code><layer-list></code></dt>
<dd><strong>Required.</strong> This must be the root element. Contains one or more {@code
-<item>} elements.
+<item>} elements.
<p class="caps">attributes:</p>
<dl class="atn-list">
<dt><code>xmlns:android</code></dt>
@@ -502,7 +502,7 @@
</dd>
<dt id="layerlist-item-element"><code><item></code></dt>
<dd>Defines a drawable to place in the layer drawable, in a position defined by its attributes.
-Must be a child of a <code><selector></code> element. Accepts child {@code <bitmap>}
+Must be a child of a <code><selector></code> element. Accepts child {@code <bitmap>}
elements.
<p class="caps">attributes:</p>
<dl class="atn-list">
@@ -528,15 +528,15 @@
<p>All drawable items are scaled to fit the size of the containing View, by default. Thus,
placing your images in a layer list at different positions might increase the size of the View and
some images scale as appropriate. To avoid
-scaling items in the list, use a {@code <bitmap>} element inside the {@code
-<item>} element to specify the drawable and define the gravity to something that does not
-scale, such as {@code "center"}. For example, the following {@code <item>} defines an item
+scaling items in the list, use a {@code <bitmap>} element inside the {@code
+<item>} element to specify the drawable and define the gravity to something that does not
+scale, such as {@code "center"}. For example, the following {@code <item>} defines an item
that scales to fit its container View:</p>
<pre>
<item android:drawable="@drawable/image" />
</pre>
-<p>To avoid scaling, the following example uses a {@code <bitmap>} element with centered
+<p>To avoid scaling, the following example uses a {@code <bitmap>} element with centered
gravity:</p>
<pre>
<item>
@@ -569,7 +569,7 @@
</item>
</layer-list>
</pre>
-<p>Notice that this example uses a nested {@code <bitmap>} element to define the drawable
+<p>Notice that this example uses a nested {@code <bitmap>} element to define the drawable
resource for each item with a "center" gravity. This ensures that none of the images are scaled to
fit the size of the container, due to resizing caused by the offset images.</p>
@@ -611,7 +611,7 @@
state.</p>
<p>You can describe the state list in an XML file. Each graphic is represented by an {@code
-<item>} element inside a single {@code <selector>} element. Each {@code <item>}
+<item>} element inside a single {@code <selector>} element. Each {@code <item>}
uses various attributes to describe the state in which it should be used as the graphic for the
drawable.</p>
@@ -666,7 +666,7 @@
<dt id="selector-element"><code><selector></code></dt>
<dd><strong>Required.</strong> This must be the root element. Contains one or more {@code
-<item>} elements.
+<item>} elements.
<p class="caps">attributes:</p>
<dl class="atn-list">
<dt><code>xmlns:android</code></dt>
@@ -828,7 +828,7 @@
<dl class="tag-list">
<dt id="levellist-element"><code><level-list></code></dt>
- <dd>This must be the root element. Contains one or more {@code <item>} elements.
+ <dd>This must be the root element. Contains one or more {@code <item>} elements.
<p class="caps">attributes:</p>
<dl class="atn-list">
<dt><code>xmlns:android</code></dt>
@@ -895,8 +895,8 @@
<p>A {@link android.graphics.drawable.TransitionDrawable} is a drawable object
that can cross-fade between the two drawable resources.</p>
-<p>Each drawable is represented by an {@code <item>} element inside a single {@code
-<transition>} element. No more than two items are supported. To transition forward, call
+<p>Each drawable is represented by an {@code <item>} element inside a single {@code
+<transition>} element. No more than two items are supported. To transition forward, call
{@link android.graphics.drawable.TransitionDrawable#startTransition(int) startTransition()}. To
transition backward, call {@link android.graphics.drawable.TransitionDrawable#reverseTransition(int)
reverseTransition()}.</p>
@@ -942,7 +942,7 @@
<dt id="transition-element"><code><transition></code></dt>
<dd><strong>Required.</strong> This must be the root element. Contains one or more {@code
-<item>} elements.
+<item>} elements.
<p class="caps">attributes:</p>
<dl class="atn-list">
<dt><code>xmlns:android</code></dt>
@@ -952,7 +952,7 @@
</dd>
<dt id="transition-item-element"><code><item></code></dt>
<dd>Defines a drawable to use as part of the drawable transition.
-Must be a child of a <code><transition></code> element. Accepts child {@code <bitmap>}
+Must be a child of a <code><transition></code> element. Accepts child {@code <bitmap>}
elements.
<p class="caps">attributes:</p>
<dl class="atn-list">
@@ -1516,7 +1516,7 @@
<td>An oval shape that fits the dimensions of the containing View.</td></tr>
<tr><td>{@code "line"}</td>
<td>A horizontal line that spans the width of the containing View. This
- shape requires the {@code <stroke>} element to define the width of the
+ shape requires the {@code <stroke>} element to define the width of the
line.</td></tr>
<tr><td>{@code "ring"}</td>
<td>A ring shape.</td></tr>
diff --git a/docs/html/guide/topics/resources/layout-resource.jd b/docs/html/guide/topics/resources/layout-resource.jd
index 366ddc8..8c5708a 100644
--- a/docs/html/guide/topics/resources/layout-resource.jd
+++ b/docs/html/guide/topics/resources/layout-resource.jd
@@ -54,7 +54,7 @@
</pre>
<p class="note"><strong>Note:</strong> The root element can be either a
{@link android.view.ViewGroup}, a {@link android.view.View}, or a <a
-href="#merge-element">{@code <merge>}</a> element, but there must be only
+href="#merge-element">{@code <merge>}</a> element, but there must be only
one root element and it must contain the {@code xmlns:android} attribute with the {@code android}
namespace as shown.</p>
</dd>
diff --git a/docs/html/guide/topics/resources/more-resources.jd b/docs/html/guide/topics/resources/more-resources.jd
index b5f449a..1afbf70 100644
--- a/docs/html/guide/topics/resources/more-resources.jd
+++ b/docs/html/guide/topics/resources/more-resources.jd
@@ -34,13 +34,13 @@
<p class="note"><strong>Note:</strong> A bool is a simple resource that is referenced
using the value provided in the {@code name} attribute (not the name of the XML file). As
such, you can combine bool resources with other simple resources in the one XML file,
-under one {@code <resources>} element.</p>
+under one {@code <resources>} element.</p>
<dl class="xml">
<dt>file location:</dt>
<dd><code>res/values/<em>filename</em>.xml</code><br/>
-The filename is arbitrary. The {@code <bool>} element's {@code name} will be used as the resource
+The filename is arbitrary. The {@code <bool>} element's {@code name} will be used as the resource
ID.</dd>
<dt>resource reference:</dt>
@@ -130,13 +130,13 @@
<p class="note"><strong>Note:</strong> A color is a simple resource that is referenced
using the value provided in the {@code name} attribute (not the name of the XML file). As
such, you can combine color resources with other simple resources in the one XML file,
-under one {@code <resources>} element.</p>
+under one {@code <resources>} element.</p>
<dl class="xml">
<dt>file location:</dt>
<dd><code>res/values/colors.xml</code><br/>
-The filename is arbitrary. The {@code <color>} element's {@code name} will be used as the
+The filename is arbitrary. The {@code <color>} element's {@code name} will be used as the
resource ID.</dd>
<dt>resource reference:</dt>
@@ -244,13 +244,13 @@
<p class="note"><strong>Note:</strong> A dimension is a simple resource that is referenced
using the value provided in the {@code name} attribute (not the name of the XML file). As
such, you can combine dimension resources with other simple resources in the one XML file,
-under one {@code <resources>} element.</p>
+under one {@code <resources>} element.</p>
<dl class="xml">
<dt>file location:</dt>
<dd><code>res/values/<em>filename</em>.xml</code><br/>
-The filename is arbitrary. The {@code <dimen>} element's {@code name} will be used as the
+The filename is arbitrary. The {@code <dimen>} element's {@code name} will be used as the
resource ID.</dd>
<dt>resource reference:</dt>
@@ -329,7 +329,7 @@
<h2 id="Id">ID</h2>
-<p>A unique resource ID defined in XML. Using the name you provide in the {@code <item>}
+<p>A unique resource ID defined in XML. Using the name you provide in the {@code <item>}
element, the Android developer tools create a unique integer in your project's {@code
R.java} class, which you can use as an
identifier for an application resources (for example, a {@link android.view.View} in your UI layout)
@@ -339,7 +339,7 @@
<p class="note"><strong>Note:</strong> An ID is a simple resource that is referenced
using the value provided in the {@code name} attribute (not the name of the XML file). As
such, you can combine ID resources with other simple resources in the one XML file,
-under one {@code <resources>} element. Also, remember that an ID resources does not reference
+under one {@code <resources>} element. Also, remember that an ID resources does not reference
an actual resource item; it is simply a unique ID that you can attach to other resources or use
as a unique integer in your application.</p>
@@ -446,13 +446,13 @@
<p class="note"><strong>Note:</strong> An integer is a simple resource that is referenced
using the value provided in the {@code name} attribute (not the name of the XML file). As
such, you can combine integer resources with other simple resources in the one XML file,
-under one {@code <resources>} element.</p>
+under one {@code <resources>} element.</p>
<dl class="xml">
<dt>file location:</dt>
<dd><code>res/values/<em>filename.xml</em></code><br/>
-The filename is arbitrary. The {@code <integer>} element's {@code name} will be used as the
+The filename is arbitrary. The {@code <integer>} element's {@code name} will be used as the
resource ID.</dd>
<dt>resource reference:</dt>
@@ -525,14 +525,14 @@
<p class="note"><strong>Note:</strong> An integer array is a simple resource that is referenced
using the value provided in the {@code name} attribute (not the name of the XML file). As
such, you can combine integer array resources with other simple resources in the one XML file,
-under one {@code <resources>} element.</p>
+under one {@code <resources>} element.</p>
<dl class="xml">
<dt>file location:</dt>
<dd><code>res/values/<em>filename</em>.xml</code><br/>
-The filename is arbitrary. The {@code <integer-array>} element's {@code name} will be used as the
+The filename is arbitrary. The {@code <integer-array>} element's {@code name} will be used as the
resource ID.</dd>
<dt>compiled resource datatype:</dt>
@@ -566,7 +566,7 @@
<p>No attributes.</p>
</dd>
<dt id="integer-array-element"><code><integer-array></code></dt>
- <dd>Defines an array of integers. Contains one or more child {@code <item>} elements.
+ <dd>Defines an array of integers. Contains one or more child {@code <item>} elements.
<p class="caps">attributes:</p>
<dl class="atn-list">
<dt><code>android:name</code></dt>
@@ -576,7 +576,7 @@
</dd>
<dt id="integer-array-item-element"><code><item></code></dt>
<dd>An integer. The value can be a reference to another
-integer resource. Must be a child of a {@code <integer-array>} element.
+integer resource. Must be a child of a {@code <integer-array>} element.
<p>No attributes.</p>
</dd>
</dl>
@@ -620,14 +620,14 @@
<p class="note"><strong>Note:</strong> A typed array is a simple resource that is referenced
using the value provided in the {@code name} attribute (not the name of the XML file). As
such, you can combine typed array resources with other simple resources in the one XML file,
-under one {@code <resources>} element.</p>
+under one {@code <resources>} element.</p>
<dl class="xml">
<dt>file location:</dt>
<dd><code>res/values/<em>filename</em>.xml</code><br/>
-The filename is arbitrary. The {@code <array>} element's {@code name} will be used as the
+The filename is arbitrary. The {@code <array>} element's {@code name} will be used as the
resource ID.</dd>
<dt>compiled resource datatype:</dt>
@@ -660,7 +660,7 @@
<p>No attributes.</p>
</dd>
<dt id="array-element"><code><array></code></dt>
- <dd>Defines an array. Contains one or more child {@code <item>} elements.
+ <dd>Defines an array. Contains one or more child {@code <item>} elements.
<p class="caps">attributes:</p>
<dl class="atn-list">
<dt><code>android:name</code></dt>
@@ -670,7 +670,7 @@
</dd>
<dt id="array-item-element"><code><item></code></dt>
<dd>A generic resource. The value can be a reference to a resource or a simple data type.
-Must be a child of an {@code <array>} element.
+Must be a child of an {@code <array>} element.
<p>No attributes.</p>
</dd>
</dl>
diff --git a/docs/html/guide/topics/resources/providing-resources.jd b/docs/html/guide/topics/resources/providing-resources.jd
index c179a2e..c919ed5 100644
--- a/docs/html/guide/topics/resources/providing-resources.jd
+++ b/docs/html/guide/topics/resources/providing-resources.jd
@@ -148,7 +148,7 @@
<td><code>raw/</code></td>
<td><p>Arbitrary files to save in their raw form. To open these resources with a raw
{@link java.io.InputStream}, call {@link android.content.res.Resources#openRawResource(int)
-Resources.openRawResource()} with the resource ID, which is {@code R.raw.<em>filename</em>}.</p>
+Resources.openRawResource()} with the resource ID, which is <code>R.raw.<em>filename</em></code>.</p>
<p>However, if you need access to original file names and file hierarchy, you might consider
saving some resources in the {@code
assets/} directory (instead of {@code res/raw/}). Files in {@code assets/} are not given a
@@ -160,9 +160,9 @@
<td><p>XML files that contain simple values, such as strings, integers, and colors.</p>
<p>Whereas XML resource files in other {@code res/} subdirectories define a single resource
based on the XML filename, files in the {@code values/} directory describe multiple resources.
-For a file in this directory, each child of the {@code <resources>} element defines a single
-resource. For example, a {@code <string>} element creates an
-{@code R.string} resource and a {@code <color>} element creates an {@code R.color}
+For a file in this directory, each child of the {@code <resources>} element defines a single
+resource. For example, a {@code <string>} element creates an
+{@code R.string} resource and a {@code <color>} element creates an {@code R.color}
resource.</p>
<p>Because each resource is defined with its own XML element, you can name the file
whatever you want and place different resource types in one file. However, for clarity, you might
@@ -229,15 +229,15 @@
<p>To specify configuration-specific alternatives for a set of resources:</p>
<ol>
- <li>Create a new directory in {@code res/} named in the form {@code
-<em><resources_name></em>-<em><config_qualifier></em>}.
+ <li>Create a new directory in {@code res/} named in the form
+ <code><em><resources_name></em>-<em><config_qualifier></em></code>.
<ul>
- <li><em>{@code <resources_name>}</em> is the directory name of the corresponding default
+ <li><em>{@code <resources_name>}</em> is the directory name of the corresponding default
resources (defined in table 1).</li>
- <li><em>{@code <qualifier>}</em> is a name that specifies an individual configuration
+ <li><em>{@code <qualifier>}</em> is a name that specifies an individual configuration
for which these resources are to be used (defined in table 2).</li>
</ul>
- <p>You can append more than one <em>{@code <qualifier>}</em>. Separate each
+ <p>You can append more than one <em>{@code <qualifier>}</em>. Separate each
one with a dash.</p>
<p class="caution"><strong>Caution:</strong> When appending multiple qualifiers, you must
place them in the same order in which they are listed in table 2. If the qualifiers are ordered
@@ -384,7 +384,7 @@
screen area. Specifically, the device's smallestWidth is the shortest of the screen's available
height and width (you may also think of it as the "smallest possible width" for the screen). You can
use this qualifier to ensure that, regardless of the screen's current orientation, your
-application has at least {@code <N>} dps of width available for its UI.</p>
+application has at least {@code <N>} dps of width available for its UI.</p>
<p>For example, if your layout requires that its smallest dimension of screen area be at
least 600 dp at all times, then you can use this qualifer to create the layout resources, {@code
res/layout-sw600dp/}. The system will use these resources only when the smallest dimension of
@@ -899,13 +899,13 @@
name other than {@code icon.png}) and put
it in the default {@code res/drawable/} directory. Then create an {@code icon.xml} file in {@code
res/drawable-en-rCA/} and {@code res/drawable-fr-rCA/} that refers to the {@code icon_ca.png}
-resource using the {@code <bitmap>} element. This allows you to store just one version of the
+resource using the {@code <bitmap>} element. This allows you to store just one version of the
PNG file and two small XML files that point to it. (An example XML file is shown below.)</p>
<h4>Drawable</h4>
-<p>To create an alias to an existing drawable, use the {@code <bitmap>} element.
+<p>To create an alias to an existing drawable, use the {@code <bitmap>} element.
For example:</p>
<pre>
@@ -922,8 +922,8 @@
<h4>Layout</h4>
-<p>To create an alias to an existing layout, use the {@code <include>}
-element, wrapped in a {@code <merge>}. For example:</p>
+<p>To create an alias to an existing layout, use the {@code <include>}
+element, wrapped in a {@code <merge>}. For example:</p>
<pre>
<?xml version="1.0" encoding="utf-8"?>
diff --git a/docs/html/guide/topics/resources/runtime-changes.jd b/docs/html/guide/topics/resources/runtime-changes.jd
index 0e03fe0..8781d20 100644
--- a/docs/html/guide/topics/resources/runtime-changes.jd
+++ b/docs/html/guide/topics/resources/runtime-changes.jd
@@ -190,7 +190,7 @@
configuration change and is not recommended for most applications.</p>
<p>To declare that your activity handles a configuration change, edit the appropriate <a
-href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element in
+href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element in
your manifest file to include the <a
href="{@docRoot}guide/topics/manifest/activity-element.html#config">{@code
android:configChanges}</a> attribute with a value that represents the configuration you want to
diff --git a/docs/html/guide/topics/resources/string-resource.jd b/docs/html/guide/topics/resources/string-resource.jd
index 743e692..9adf6de 100644
--- a/docs/html/guide/topics/resources/string-resource.jd
+++ b/docs/html/guide/topics/resources/string-resource.jd
@@ -28,13 +28,13 @@
<p class="note"><strong>Note:</strong> A string is a simple resource that is referenced
using the value provided in the {@code name} attribute (not the name of the XML file). So, you can
combine string resources with other simple resources in the one XML file,
-under one {@code <resources>} element.</p>
+under one {@code <resources>} element.</p>
<dl class="xml">
<dt>file location:</dt>
<dd><code>res/values/<em>filename</em>.xml</code><br/>
-The filename is arbitrary. The {@code <string>} element's {@code name} will be used as the
+The filename is arbitrary. The {@code <string>} element's {@code name} will be used as the
resource ID.</dd>
<dt>compiled resource datatype:</dt>
@@ -125,13 +125,13 @@
<p class="note"><strong>Note:</strong> A string array is a simple resource that is referenced
using the value provided in the {@code name} attribute (not the name of the XML file). As
such, you can combine string array resources with other simple resources in the one XML file,
-under one {@code <resources>} element.</p>
+under one {@code <resources>} element.</p>
<dl class="xml">
<dt>file location:</dt>
<dd><code>res/values/<em>filename</em>.xml</code><br/>
-The filename is arbitrary. The {@code <string-array>} element's {@code name} will be used as the
+The filename is arbitrary. The {@code <string-array>} element's {@code name} will be used as the
resource ID.</dd>
<dt>compiled resource datatype:</dt>
@@ -164,7 +164,7 @@
<p>No attributes.</p>
</dd>
<dt id="string-array-element"><code><string-array></code></dt>
- <dd>Defines an array of strings. Contains one or more {@code <item>} elements.
+ <dd>Defines an array of strings. Contains one or more {@code <item>} elements.
<p class="caps">attributes:</p>
<dl class="atn-list">
<dt><code>name</code></dt>
@@ -175,7 +175,7 @@
</dd>
<dt id="string-array-item-element"><code><item></code></dt>
<dd>A string, which can include styling tags. The value can be a reference to another
-string resource. Must be a child of a {@code <string-array>} element. Beware that you
+string resource. Must be a child of a {@code <string-array>} element. Beware that you
must escape apostrophes and
quotation marks. See <a href="#FormattingAndStyling">Formatting and Styling</a>, below, for
information about to properly style and format your strings.
@@ -252,13 +252,13 @@
<p class="note"><strong>Note:</strong> A plurals collection is a simple resource that is
referenced using the value provided in the {@code name} attribute (not the name of the XML
file). As such, you can combine plurals resources with other simple resources in the one
-XML file, under one {@code <resources>} element.</p>
+XML file, under one {@code <resources>} element.</p>
<dl class="xml">
<dt>file location:</dt>
<dd><code>res/values/<em>filename</em>.xml</code><br/>
-The filename is arbitrary. The {@code <plurals>} element's {@code name} will be used as the
+The filename is arbitrary. The {@code <plurals>} element's {@code name} will be used as the
resource ID.</dd>
<dt>resource reference:</dt>
@@ -291,7 +291,7 @@
</dd>
<dt id="plurals-element"><code><plurals></code></dt>
<dd>A collection of strings, of which, one string is provided depending on the amount of
-something. Contains one or more {@code <item>} elements.
+something. Contains one or more {@code <item>} elements.
<p class="caps">attributes:</p>
<dl class="atn-list">
<dt><code>name</code></dt>
@@ -302,7 +302,7 @@
</dd>
<dt id="plurals-item-element"><code><item></code></dt>
<dd>A plural or singular string. The value can be a reference to another
-string resource. Must be a child of a {@code <plurals>} element. Beware that you must
+string resource. Must be a child of a {@code <plurals>} element. Beware that you must
escape apostrophes and quotation marks. See <a href="#FormattingAndStyling">Formatting and
Styling</a>, below, for information about to properly style and format your strings.
<p class="caps">attributes:</p>
@@ -465,9 +465,9 @@
</pre>
<p>Supported HTML elements include:</p>
<ul>
- <li>{@code <b>} for <b>bold</b> text.</li>
- <li>{@code <i>} for <i>italic</i> text.</li>
- <li>{@code <u>} for <u>underline</u> text.</li>
+ <li>{@code <b>} for <b>bold</b> text.</li>
+ <li>{@code <i>} for <i>italic</i> text.</li>
+ <li>{@code <u>} for <u>underline</u> text.</li>
</ul>
<p>Sometimes you may want to create a styled text resource that is also used as a format
@@ -486,8 +486,8 @@
<string name="welcome_messages">Hello, %1$s! You have &lt;b>%2$d new messages&lt;/b>.</string>
</resources>
</pre>
-<p>In this formatted string, a {@code <b>} element is added. Notice that the opening bracket is
-HTML-escaped, using the {@code &lt;} notation.</p>
+<p>In this formatted string, a {@code <b>} element is added. Notice that the opening bracket is
+HTML-escaped, using the {@code <} notation.</p>
</li>
<li>Then format the string as usual, but also call {@link android.text.Html#fromHtml} to
convert the HTML text into styled text:
diff --git a/docs/html/guide/topics/resources/style-resource.jd b/docs/html/guide/topics/resources/style-resource.jd
index f6252dba..dc3d23f 100644
--- a/docs/html/guide/topics/resources/style-resource.jd
+++ b/docs/html/guide/topics/resources/style-resource.jd
@@ -23,7 +23,7 @@
<p class="note"><strong>Note:</strong> A style is a simple resource that is referenced
using the value provided in the {@code name} attribute (not the name of the XML file). As
such, you can combine style resources with other simple resources in the one XML file,
-under one {@code <resources>} element.</p>
+under one {@code <resources>} element.</p>
<dl class="xml">
@@ -61,7 +61,7 @@
<p>No attributes.</p>
</dd>
<dt id="style-element"><code><style></code></dt>
- <dd>Defines a single style. Contains {@code <item>} elements.
+ <dd>Defines a single style. Contains {@code <item>} elements.
<p class="caps">attributes:</p>
<dl class="atn-list">
<dt><code>name</code></dt>
diff --git a/docs/html/guide/topics/search/adding-custom-suggestions.jd b/docs/html/guide/topics/search/adding-custom-suggestions.jd
index 6ebef08..a251ce1 100644
--- a/docs/html/guide/topics/search/adding-custom-suggestions.jd
+++ b/docs/html/guide/topics/search/adding-custom-suggestions.jd
@@ -128,7 +128,7 @@
<h2 id="CustomSearchableConfiguration">Modifying the searchable configuration</h2>
<p>To add support for custom suggestions, add the {@code android:searchSuggestAuthority} attribute
-to the {@code <searchable>} element in your searchable configuration file. For example:</p>
+to the {@code <searchable>} element in your searchable configuration file. For example:</p>
<pre>
<?xml version="1.0" encoding="utf-8"?>
@@ -608,7 +608,7 @@
<p>The only scenario in which additional work is necessary is when your content provider demands a
read permission. In which case, you need to add a special
-{@code <path-permission>} element for the provider to grant Quick Search Box read access to
+{@code <path-permission>} element for the provider to grant Quick Search Box read access to
your content provider. For example:</p>
<pre>
@@ -622,7 +622,7 @@
</pre>
<p>In this example, the provider restricts read and write access to the content. The
-{@code <path-permission>} element amends the restriction by granting read access to content
+{@code <path-permission>} element amends the restriction by granting read access to content
inside the {@code "/search_suggest_query"} path prefix when the {@code
"android.permission.GLOBAL_SEARCH"} permission exists. This grants access to Quick Search Box
so that it may query your content provider for suggestions.</p>
diff --git a/docs/html/guide/topics/search/adding-recent-query-suggestions.jd b/docs/html/guide/topics/search/adding-recent-query-suggestions.jd
index e1020dd..8bd180e 100644
--- a/docs/html/guide/topics/search/adding-recent-query-suggestions.jd
+++ b/docs/html/guide/topics/search/adding-recent-query-suggestions.jd
@@ -154,7 +154,7 @@
<p>To configure the system to use your suggestions provider, you need to add
the {@code android:searchSuggestAuthority} and {@code android:searchSuggestSelection} attributes to
-the {@code <searchable>} element in your searchable configuration file. For example:</p>
+the {@code <searchable>} element in your searchable configuration file. For example:</p>
<pre>
<?xml version="1.0" encoding="utf-8"?>
diff --git a/docs/html/guide/topics/search/search-dialog.jd b/docs/html/guide/topics/search/search-dialog.jd
index fcaaed36..1af3e5d 100644
--- a/docs/html/guide/topics/search/search-dialog.jd
+++ b/docs/html/guide/topics/search/search-dialog.jd
@@ -158,7 +158,7 @@
<p>The searchable configuration file must include the <a
href="{@docRoot}guide/topics/search/searchable-config.html#searchable-element">{@code
-<searchable>}</a> element as the root node and specify one
+<searchable>}</a> element as the root node and specify one
or more attributes. For example:</p>
<pre>
@@ -186,7 +186,7 @@
<p>The <a
href="{@docRoot}guide/topics/search/searchable-config.html#searchable-element">{@code
-<searchable>}</a> element accepts several other attributes. However, you don't need
+<searchable>}</a> element accepts several other attributes. However, you don't need
most attributes until you add features such as <a href="#SearchSuggestions">search suggestions</a>
and <a href="#VoiceSearch">voice search</a>. For detailed information about the searchable
configuration file, see the <a
@@ -216,15 +216,15 @@
<p>If you don't have one already, create an {@link android.app.Activity} that will perform
searches and present results. You don't need to implement the search functionality yet—just
create an activity that you can declare in the manifest. Inside the manifest's <a
-href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
+href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
element:</p>
<ol>
<li>Declare the activity to accept the {@link android.content.Intent#ACTION_SEARCH} intent, in an
<a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
-<intent-filter>}</a>
+<intent-filter>}</a>
element.</li>
<li>Specify the searchable configuration to use, in a <a
-href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code <meta-data>}</a>
+href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code <meta-data>}</a>
element.</li>
</ol>
@@ -243,17 +243,17 @@
</application>
</pre>
-<p>The {@code <meta-data>} element must include the {@code android:name} attribute with a
+<p>The {@code <meta-data>} element must include the {@code android:name} attribute with a
value of {@code "android.app.searchable"} and the {@code android:resource} attribute with a
reference to the searchable configuration file (in this example, it
refers to the {@code res/xml/searchable.xml} file).</p>
<p class="note"><strong>Note:</strong> The <a
href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
-<intent-filter>}</a> does not need a <a
-href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a> with the
+<intent-filter>}</a> does not need a <a
+href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a> with the
{@code DEFAULT} value (which you usually see in <a
-href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> elements),
+href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> elements),
because the system delivers the {@link android.content.Intent#ACTION_SEARCH} intent explicitly to
your searchable activity, using its component name.</p>
@@ -416,10 +416,10 @@
searchable activity to use for the search dialog in {@code OtherActivity}.</p>
<p>To declare the searchable activity for an activity's search dialog,
-add a <a href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code <meta-data>}</a>
+add a <a href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code <meta-data>}</a>
element inside the respective activity's <a
-href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element.
-The <a href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code <meta-data>}</a>
+href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element.
+The <a href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code <meta-data>}</a>
element must include the {@code android:value} attribute that specifies the searchable activity's
class name and the {@code android:name} attribute with a value of {@code
"android.app.default_searchable"}.</p>
@@ -452,7 +452,7 @@
</pre>
<p>Because the {@code OtherActivity} now includes a <a
-href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code <meta-data>}</a>
+href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code <meta-data>}</a>
element to declare which searchable activity to use for searches, the activity has enabled the
search dialog.
While the user is in this activity, the {@link
@@ -464,15 +464,15 @@
by default, so you don't need to add this declaration to {@code SearchableActivity}.</p>
<p>If you want every activity in your application to provide the search dialog, insert the above <a
-href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code <meta-data>}</a>
+href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code <meta-data>}</a>
element as a child of the <a
-href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
+href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
element, instead of each <a
-href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>. This
+href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>. This
way, every activity inherits the value, provides the search dialog, and delivers searches to
the same searchable activity. (If you have multiple searchable activities, you can override the
default searchable activity by placing a different <a
-href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code <meta-data>}</a>
+href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code <meta-data>}</a>
declaration inside individual activities.)</p>
<p>With the search dialog now enabled for your activities, your application is ready to perform
diff --git a/docs/html/guide/topics/search/searchable-config.jd b/docs/html/guide/topics/search/searchable-config.jd
index 4874bb4..e6c1a0d 100644
--- a/docs/html/guide/topics/search/searchable-config.jd
+++ b/docs/html/guide/topics/search/searchable-config.jd
@@ -72,9 +72,9 @@
<dt><a name="label"></a><code>android:label</code></dt>
<dd><em>String resource</em>. (Required.) The name of your application.
It should be the same as the name applied to the {@code android:label} attribute of your <a
-href="{@docRoot}guide/topics/manifest/activity-element.html#label">{@code <activity>}</a> or
+href="{@docRoot}guide/topics/manifest/activity-element.html#label">{@code <activity>}</a> or
<a href="{@docRoot}guide/topics/manifest/application-element.html#label">{@code
-<application>}</a> manifest element. This label is only visible to the user when you set
+<application>}</a> manifest element. This label is only visible to the user when you set
<code>android:includeInGlobalSearch</code> to "true", in which case, this label is used to identify
your application as a searchable item in the system's search settings.</dd>
@@ -136,13 +136,13 @@
<p>If you have defined a content provider to generate search suggestions, you need to
define additional attributes that configure communications with the content
provider. When providing search suggestions, you need some of the following
- {@code <searchable>} attributes:</p><br/>
+ {@code <searchable>} attributes:</p><br/>
<dl class="atn-list">
<dt><a name="searchSuggestAuthority"></a><code>android:searchSuggestAuthority</code></dt>
<dd><em>String</em>. (Required to provide search suggestions.)
This value must match the authority string provided in the {@code android:authorities}
-attribute of the Android manifest {@code <provider>} element.</dd>
+attribute of the Android manifest {@code <provider>} element.</dd>
<dt><a name="searchSuggestPath"></a><code>android:searchSuggestPath</code></dt>
<dd><em>String</em>. This path is used as a portion of the suggestions
@@ -189,7 +189,7 @@
<h4>Quick Search Box attributes</h4>
<p>To make your custom search suggestions available to Quick Search Box, you need some of the
- following {@code <searchable>} attributes:</p><br/>
+ following {@code <searchable>} attributes:</p><br/>
<dl class="atn-list">
<dt><a name="includeInGlobalSearch"></a><code>android:includeInGlobalSearch</code></dt>
@@ -219,7 +219,7 @@
<h4>Voice search attributes</h4>
<p>To enable voice search, you'll need some of the
- following {@code <searchable>} attributes:</p><br/>
+ following {@code <searchable>} attributes:</p><br/>
<dl class="atn-list">
<dt><a name="voiceSearchMode"></a><code>android:voiceSearchMode</code></dt>
diff --git a/docs/html/guide/topics/security/permissions.jd b/docs/html/guide/topics/security/permissions.jd
index cfab3c9..6158e40 100644
--- a/docs/html/guide/topics/security/permissions.jd
+++ b/docs/html/guide/topics/security/permissions.jd
@@ -452,7 +452,7 @@
<dd>Information about how requesting some permissions will implicitly restrict your app
to devices that include the corresponding hardware or software feature.</dd>
<dt><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">{@code
- <uses-permission>}</a></dt>
+ <uses-permission>}</a></dt>
<dd>API reference for the manifest tag that declare's your app's required system permissions.
</dd>
<dt>{@link android.Manifest.permission}</dt>
diff --git a/docs/html/guide/topics/ui/accessibility/apps.jd b/docs/html/guide/topics/ui/accessibility/apps.jd
index da24d03..567dc5b 100644
--- a/docs/html/guide/topics/ui/accessibility/apps.jd
+++ b/docs/html/guide/topics/ui/accessibility/apps.jd
@@ -357,7 +357,7 @@
ViewCompat.setAccessibilityDelegate()} method to implement the accessibility methods
above. For an example of this approach, see the Android Support Library (revision 5 or higher)
sample {@code AccessibilityDelegateSupportActivity} in
-({@code <sdk>/extras/android/support/v4/samples/Support4Demos/})
+({@code <sdk>/extras/android/support/v4/samples/Support4Demos/})
</li>
</ul>
@@ -536,7 +536,7 @@
directly in your custom view class. For another example of this approach, see the Android
<a href="{@docRoot}tools/support-library/index.html">Support Library</a> (revision 5 or higher)
sample {@code AccessibilityDelegateSupportActivity} in
-({@code <sdk>/extras/android/support/v4/samples/Support4Demos/}).</p>
+({@code <sdk>/extras/android/support/v4/samples/Support4Demos/}).</p>
<p class="note"><strong>Note:</strong> You may find information on implementing accessibility for
custom views written prior to Android 4.0 that describes the use of the
diff --git a/docs/html/guide/topics/ui/accessibility/services.jd b/docs/html/guide/topics/ui/accessibility/services.jd
index d69af9f..3ccdbc4 100644
--- a/docs/html/guide/topics/ui/accessibility/services.jd
+++ b/docs/html/guide/topics/ui/accessibility/services.jd
@@ -111,7 +111,7 @@
android.accessibilityservice.AccessibilityService#setServiceInfo setServiceInfo()} at runtime.
However, not all configuration options are available using this method.</p>
-<p>Beginning with Android 4.0, you can include a {@code <meta-data>} element in your manifest
+<p>Beginning with Android 4.0, you can include a {@code <meta-data>} element in your manifest
with a reference to a configuration file, which allows you to set the full range of options for
your accessibility service, as shown in the following example:</p>
@@ -125,7 +125,7 @@
</pre>
<p>This meta-data element refers to an XML file that you create in your application’s resource
-directory ({@code <project_dir>/res/xml/accessibility_service_config.xml}). The following code
+directory ({@code <project_dir>/res/xml/accessibility_service_config.xml}). The following code
shows example contents for the service configuration file:</p>
<pre>
@@ -445,7 +445,7 @@
<p>The API Demo project contains two samples which can be used as a starting point for generating
accessibility services
-({@code <sdk>/samples/<platform>/ApiDemos/src/com/example/android/apis/accessibility}):
+({@code <sdk>/samples/<platform>/ApiDemos/src/com/example/android/apis/accessibility}):
</p>
<ul>
diff --git a/docs/html/guide/topics/ui/actionbar.jd b/docs/html/guide/topics/ui/actionbar.jd
index b2f98ad..c21671f 100644
--- a/docs/html/guide/topics/ui/actionbar.jd
+++ b/docs/html/guide/topics/ui/actionbar.jd
@@ -184,9 +184,9 @@
<p>By default, the system uses your application icon in the action bar, as specified by the <a
href="{@docRoot}guide/topics/manifest/application-element.html#icon">{@code icon}</a>
attribute in the <a href="{@docRoot}guide/topics/manifest/application-element.html">{@code
-<application>}</a> or <a
+<application>}</a> or <a
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code
-<activity>}</a> element. However, if you also specify the <a
+<activity>}</a> element. However, if you also specify the <a
href="{@docRoot}guide/topics/manifest/application-element.html#logo">{@code logo}</a>
attribute, then the action bar uses the logo image instead of the icon.</p>
@@ -249,7 +249,7 @@
<p>To request that an item appear directly in the action bar
as an action button, include {@code
-showAsAction="ifRoom"} in the {@code <item>} tag. For example:</p>
+showAsAction="ifRoom"} in the {@code <item>} tag. For example:</p>
<pre>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
@@ -269,7 +269,7 @@
<div class="note" id="XmlAttributes">
<p><strong>Using XML attributes from the support library</strong></p>
Notice that the {@code showAsAction} attribute above uses a custom namespace defined in the
-{@code <menu>} tag. This is necessary when using any XML attributes defined by the support
+{@code <menu>} tag. This is necessary when using any XML attributes defined by the support
library, because these attributes do not exist in the Android framework on older devices.
So you must use your own namespace as a prefix for all attributes defined by the support library.
</p>
@@ -319,7 +319,7 @@
<p>When the user presses an action, the system calls your activity's {@link
android.app.Activity#onOptionsItemSelected(MenuItem) onOptionsItemSelected()} method. Using the
{@link android.view.MenuItem} passed to this method, you can identify the action by calling {@link
-android.view.MenuItem#getItemId()}. This returns the unique ID provided by the {@code <item>}
+android.view.MenuItem#getItemId()}. This returns the unique ID provided by the {@code <item>}
tag's {@code id} attribute so you can perform the appropriate action. For example:</p>
<pre>
@@ -373,15 +373,15 @@
<p>To enable split action bar when using the support library, you must do two things:</p>
<ol>
<li>Add {@code uiOptions="splitActionBarWhenNarrow"} to each
-<a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
+<a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
element or to the
-<a href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
+<a href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
element. This attribute is understood only by API level 14 and higher (it is ignored
by older versions).</li>
<li>To support older versions, add a <a
- href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code <meta-data>}</a>
+ href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code <meta-data>}</a>
element as a child of each
- <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
+ <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
element that declares the same value for {@code "android.support.UI_OPTIONS"}.</li>
</ol>
@@ -460,10 +460,10 @@
<p>Beginning in Android 4.1 (API level 16), you can declare the parent with the <a href=
"{@docRoot}guide/topics/manifest/activity-element.html#parent">{@code parentActivityName}</a>
attribute in the <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code
-<activity>}</a> element.</p>
+<activity>}</a> element.</p>
<p>To support older devices with the support library, also
include a <a href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code
-<meta-data>}</a> element that specifies
+<meta-data>}</a> element that specifies
the parent activity as the value for {@code android.support.PARENT_ACTIVITY}. For example:</p>
<pre>
<application ... >
@@ -681,7 +681,7 @@
and an action provider can display a submenu when pressed.</p>
<p>To declare an action provider, supply the {@code actionViewClass} attribute in the
-menu {@code <item>} tag with a fully-qualified class name for an
+menu {@code <item>} tag with a fully-qualified class name for an
{@link android.support.v4.view.ActionProvider}.</p>
<p>You can build your own action provider by extending the {@link
@@ -709,7 +709,7 @@
<h3 id="ShareActionProvider">Using the ShareActionProvider</h3>
<p>To add a "share" action with {@link android.support.v7.widget.ShareActionProvider},
-define the {@code actionProviderClass} for an {@code <item>} tag with
+define the {@code actionProviderClass} for an {@code <item>} tag with
the {@link android.support.v7.widget.ShareActionProvider} class. For example:</p>
<pre>
@@ -1489,7 +1489,7 @@
<p class="caution"><strong>Caution:</strong> Be certain that each theme and style declares a parent
-theme in the {@code <style>} tag, from which it inherits all styles not explicitly declared
+theme in the {@code <style>} tag, from which it inherits all styles not explicitly declared
by your theme. When modifying the action bar, using a parent theme is important so that you can
simply override the action bar styles you want to change without re-implementing the styles you
want to leave alone (such as text size or padding in action items).</p>
diff --git a/docs/html/guide/topics/ui/controls/button.jd b/docs/html/guide/topics/ui/controls/button.jd
index b52c3e9..295044f 100644
--- a/docs/html/guide/topics/ui/controls/button.jd
+++ b/docs/html/guide/topics/ui/controls/button.jd
@@ -73,7 +73,7 @@
an on-click event.</p>
<p>To define the click event handler for a button, add the {@link
-android.R.attr#onClick android:onClick} attribute to the {@code <Button>} element in your XML
+android.R.attr#onClick android:onClick} attribute to the {@code <Button>} element in your XML
layout. The value for this attribute must be the name of the method you want to call in response
to a click event. The {@link android.app.Activity} hosting the layout must then implement the
corresponding method.</p>
@@ -140,7 +140,7 @@
<p>You can control exactly how your controls are styled using a theme that you apply to your
entire application. For instance, to ensure that all devices running Android 4.0 and higher use
the Holo theme in your app, declare {@code android:theme="@android:style/Theme.Holo"} in your
-manifest's {@code <application>} element. Also read the blog post, <a
+manifest's {@code <application>} element. Also read the blog post, <a
href="http://android-developers.blogspot.com/2012/01/holo-everywhere.html">Holo Everywhere</a>
for information about using the Holo theme while supporting older devices.</p>
diff --git a/docs/html/guide/topics/ui/controls/spinner.jd b/docs/html/guide/topics/ui/controls/spinner.jd
index d2db7a4..3b8aaad 100644
--- a/docs/html/guide/topics/ui/controls/spinner.jd
+++ b/docs/html/guide/topics/ui/controls/spinner.jd
@@ -27,7 +27,7 @@
<img src="{@docRoot}images/ui/spinner.png" alt="" />
<p>You can add a spinner to your layout with the {@link android.widget.Spinner} object. You
-should usually do so in your XML layout with a {@code <Spinner>} element. For example:</p>
+should usually do so in your XML layout with a {@code <Spinner>} element. For example:</p>
<pre>
<Spinner
diff --git a/docs/html/guide/topics/ui/controls/text.jd b/docs/html/guide/topics/ui/controls/text.jd
index c11dc32..f4d72b2a 100644
--- a/docs/html/guide/topics/ui/controls/text.jd
+++ b/docs/html/guide/topics/ui/controls/text.jd
@@ -36,7 +36,7 @@
(cut, copy, paste) and data look-up via auto-completion.</p>
<p>You can add a text field to you layout with the {@link android.widget.EditText} object. You
-should usually do so in your XML layout with a {@code <EditText>} element.</p>
+should usually do so in your XML layout with a {@code <EditText>} element.</p>
<img src="{@docRoot}images/ui/edittext-noextract.png" alt="" />
diff --git a/docs/html/guide/topics/ui/dialogs.jd b/docs/html/guide/topics/ui/dialogs.jd
index 0c6ec84..e4469ea 100644
--- a/docs/html/guide/topics/ui/dialogs.jd
+++ b/docs/html/guide/topics/ui/dialogs.jd
@@ -484,7 +484,7 @@
instead of using the {@link android.app.Dialog} APIs. Simply create an activity and set its theme to
{@link android.R.style#Theme_Holo_Dialog Theme.Holo.Dialog}
in the <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code
-<activity>}</a> manifest element:</p>
+<activity>}</a> manifest element:</p>
<pre>
<activity android:theme="@android:style/Theme.Holo.Dialog" >
@@ -754,7 +754,7 @@
<p>To show an activity as a dialog only when on large screens,
apply the {@link android.R.style#Theme_Holo_DialogWhenLarge Theme.Holo.DialogWhenLarge}
theme to the <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code
-<activity>}</a> manifest element:</p>
+<activity>}</a> manifest element:</p>
<pre>
<activity android:theme="@android:style/Theme.Holo.DialogWhenLarge" >
diff --git a/docs/html/guide/topics/ui/menus.jd b/docs/html/guide/topics/ui/menus.jd
index dfcea52..2c6d0b21 100644
--- a/docs/html/guide/topics/ui/menus.jd
+++ b/docs/html/guide/topics/ui/menus.jd
@@ -141,7 +141,7 @@
element may contain a nested <code><menu></code> element in order to create a submenu.</dd>
<dt><code><group></code></dt>
- <dd>An optional, invisible container for {@code <item>} elements. It allows you to
+ <dd>An optional, invisible container for {@code <item>} elements. It allows you to
categorize menu items so they share properties such as active state and visibility. For more
information, see the section about <a href="#groups">Creating Menu Groups</a>.</dd>
</dl>
@@ -181,8 +181,8 @@
For information about all the supported attributes, see the <a
href="{@docRoot}guide/topics/resources/menu-resource.html">Menu Resource</a> document.</p>
-<p>You can add a submenu to an item in any menu (except a submenu) by adding a {@code <menu>}
-element as the child of an {@code <item>}. Submenus are useful when your application has a lot
+<p>You can add a submenu to an item in any menu (except a submenu) by adding a {@code <menu>}
+element as the child of an {@code <item>}. Submenus are useful when your application has a lot
of functions that can be organized into topics, like items in a PC application's menu bar (File,
Edit, View, etc.). For example:</p>
@@ -239,7 +239,7 @@
the right side of the action bar (or by pressing the device <em>Menu</em> button, if available). To
enable
quick access to important actions, you can promote a few items to appear in the action bar by adding
-{@code android:showAsAction="ifRoom"} to the corresponding {@code <item>} elements (see figure
+{@code android:showAsAction="ifRoom"} to the corresponding {@code <item>} elements (see figure
2). <p>For more information about action items and other action bar behaviors, see the <a
href="{@docRoot}guide/topics/ui/actionbar.html">Action Bar</a> guide. </p>
<p class="note"><strong>Note:</strong> Even if you're <em>not</em> developing for Android 3.0 or
@@ -260,7 +260,7 @@
declare items for the options menu, they are combined in the UI. The activity's items appear
first, followed by those of each fragment in the order in which each fragment is added to the
activity. If necessary, you can re-order the menu items with the {@code android:orderInCategory}
-attribute in each {@code <item>} you need to move.</p>
+attribute in each {@code <item>} you need to move.</p>
<p>To specify the options menu for an activity, override {@link
android.app.Activity#onCreateOptionsMenu(Menu) onCreateOptionsMenu()} (fragments provide their
@@ -833,7 +833,7 @@
android.view.Menu#setGroupCheckable(int,boolean,boolean) setGroupCheckable()}</li>
</ul>
-<p>You can create a group by nesting {@code <item>} elements inside a {@code <group>}
+<p>You can create a group by nesting {@code <item>} elements inside a {@code <group>}
element in your menu resource or by specifying a group ID with the {@link
android.view.Menu#add(int,int,int,int) add()} method.</p>
@@ -882,8 +882,8 @@
each time the state changes.</p>
<p>You can define the checkable behavior for individual menu items using the {@code
-android:checkable} attribute in the {@code <item>} element, or for an entire group with
-the {@code android:checkableBehavior} attribute in the {@code <group>} element. For
+android:checkable} attribute in the {@code <item>} element, or for an entire group with
+the {@code android:checkableBehavior} attribute in the {@code <group>} element. For
example, all items in this menu group are checkable with a radio button:</p>
<pre>
@@ -909,7 +909,7 @@
</dl>
<p>You can apply a default checked state to an item using the {@code android:checked} attribute in
-the {@code <item>} element and change it in code with the {@link
+the {@code <item>} element and change it in code with the {@link
android.view.MenuItem#setChecked(boolean) setChecked()} method.</p>
<p>When a checkable item is selected, the system calls your respective item-selected callback method
diff --git a/docs/html/guide/topics/ui/settings.jd b/docs/html/guide/topics/ui/settings.jd
index 02f1255..89960bb 100644
--- a/docs/html/guide/topics/ui/settings.jd
+++ b/docs/html/guide/topics/ui/settings.jd
@@ -186,7 +186,7 @@
generally pre-determined, although you can still modify the collection at runtime.</p>
<p>Each {@link android.preference.Preference} subclass can be declared with an XML element that
-matches the class name, such as {@code <CheckBoxPreference>}.</p>
+matches the class name, such as {@code <CheckBoxPreference>}.</p>
<p>You must save the XML file in the {@code res/xml/} directory. Although you can name the file
anything you want, it's traditionally named {@code preferences.xml}. You usually need only one file,
@@ -197,7 +197,7 @@
settings, then you need separate XML files for each fragment.</p>
<p>The root node for the XML file must be a {@link android.preference.PreferenceScreen
-<PreferenceScreen>} element. Within this element is where you add each {@link
+<PreferenceScreen>} element. Within this element is where you add each {@link
android.preference.Preference}. Each child you add within the
{@link android.preference.PreferenceScreen <PreferenceScreen>} element appears as a single
item in the list of settings.</p>
@@ -234,7 +234,7 @@
<p>The only instances in which this attribute is <em>not required</em> is when the preference is a
{@link android.preference.PreferenceCategory} or {@link android.preference.PreferenceScreen}, or the
preference specifies an {@link android.content.Intent} to invoke (with an <a
-href="#Intents">{@code <intent>}</a> element) or a {@link android.app.Fragment} to display (with an <a
+href="#Intents">{@code <intent>}</a> element) or a {@link android.app.Fragment} to display (with an <a
href="{@docRoot}reference/android/preference/Preference.html#attr_android:fragment">{@code
android:fragment}</a> attribute).</p>
</dd>
@@ -323,7 +323,7 @@
<img src="{@docRoot}images/ui/settings/settings-subscreen.png" alt="" />
<p class="img-caption"><strong>Figure 3.</strong> Setting subscreens. The {@code
-<PreferenceScreen>} element
+<PreferenceScreen>} element
creates an item that, when selected, opens a separate list to display the nested settings.</p>
<p>For example:</p>
@@ -360,8 +360,8 @@
<p>In some cases, you might want a preference item to open a different activity instead of a
settings screen, such as a web browser to view a web page. To invoke an {@link
-android.content.Intent} when the user selects a preference item, add an {@code <intent>}
-element as a child of the corresponding {@code <Preference>} element.</p>
+android.content.Intent} when the user selects a preference item, add an {@code <intent>}
+element as a child of the corresponding {@code <Preference>} element.</p>
<p>For example, here's how you can use a preference item to open a web page:</p>
@@ -577,7 +577,7 @@
<img src="{@docRoot}images/ui/settings/settings-headers-tablet.png" alt="" />
<p class="img-caption"><strong>Figure 4.</strong> Two-pane layout with headers. <br/><b>1.</b> The
headers are defined with an XML headers file. <br/><b>2.</b> Each group of settings is defined by a
-{@link android.preference.PreferenceFragment} that's specified by a {@code <header>} element in
+{@link android.preference.PreferenceFragment} that's specified by a {@code <header>} element in
the headers file.</p>
<img src="{@docRoot}images/ui/settings/settings-headers-handset.png" alt="" />
@@ -588,8 +588,8 @@
<h3 id="CreateHeaders" style="clear:left">Creating the headers file</h3>
-<p>Each group of settings in your list of headers is specified by a single {@code <header>}
-element inside a root {@code <preference-headers>} element. For example:</p>
+<p>Each group of settings in your list of headers is specified by a single {@code <header>}
+element inside a root {@code <preference-headers>} element. For example:</p>
<pre>
<?xml version="1.0" encoding="utf-8"?>
@@ -611,7 +611,7 @@
<p>With the {@code android:fragment} attribute, each header declares an instance of {@link
android.preference.PreferenceFragment} that should open when the user selects the header.</p>
-<p>The {@code <extras>} element allows you to pass key-value pairs to the fragment in a {@link
+<p>The {@code <extras>} element allows you to pass key-value pairs to the fragment in a {@link
android.os.Bundle}. The fragment can retrieve the arguments by calling {@link
android.app.Fragment#getArguments()}. You might pass arguments to the fragment for a variety of
reasons, but one good reason is to reuse the same subclass of {@link
@@ -619,7 +619,7 @@
preferences XML file the fragment should load.</p>
<p>For example, here's a fragment that can be reused for multiple settings groups, when each
-header defines an {@code <extra>} argument with the {@code "settings"} key:</p>
+header defines an {@code <extra>} argument with the {@code "settings"} key:</p>
<pre>
public static class SettingsFragment extends PreferenceFragment {
@@ -717,7 +717,7 @@
</PreferenceScreen>
</pre>
-<p>Because support for {@code <preference-headers>} was added in Android 3.0, the system calls
+<p>Because support for {@code <preference-headers>} was added in Android 3.0, the system calls
{@link android.preference.PreferenceActivity#onBuildHeaders onBuildHeaders()} in your {@link
android.preference.PreferenceActivity} only when running on Androd 3.0 or higher. In order to load
the "legacy" headers file ({@code preference_headers_legacy.xml}), you must check the Android
@@ -747,7 +747,7 @@
<p>The only thing left to do is handle the {@link android.content.Intent} that's passed into the
activity to identify which preference file to load. So retrieve the intent's action and compare it
-to known action strings that you've used in the preference XML's {@code <intent>} tags:</p>
+to known action strings that you've used in the preference XML's {@code <intent>} tags:</p>
<pre>
final static String ACTION_PREFS_ONE = "com.example.prefs.PREFS_ONE";
diff --git a/docs/html/guide/topics/ui/themes.jd b/docs/html/guide/topics/ui/themes.jd
index bc1c4f0..f932dbd 100644
--- a/docs/html/guide/topics/ui/themes.jd
+++ b/docs/html/guide/topics/ui/themes.jd
@@ -77,13 +77,13 @@
directory of your project. The name of the XML file is arbitrary, but it must use the
{@code .xml} extension and be saved in the {@code res/values/} folder.</p>
-<p>The root node of the XML file must be {@code <resources>}.</p>
+<p>The root node of the XML file must be {@code <resources>}.</p>
-<p>For each style you want to create, add a {@code <style>} element to the file
+<p>For each style you want to create, add a {@code <style>} element to the file
with a {@code name} that uniquely identifies the style (this attribute is required).
-Then add an {@code <item>} element for each property of that style, with a
+Then add an {@code <item>} element for each property of that style, with a
{@code name} that declares the style property and a value to go with it (this attribute
-is required). The value for the {@code <item>} can
+is required). The value for the {@code <item>} can
be a keyword string, a hex color, a reference to another resource type, or other value
depending on the style property.
Here's an example file with a single style:</p>
@@ -100,12 +100,12 @@
</resources>
</pre>
-<p>Each child of the {@code <resources>} element is converted into an application resource
-object at compile-time, which can be referenced by the value in the {@code <style>} element's
+<p>Each child of the {@code <resources>} element is converted into an application resource
+object at compile-time, which can be referenced by the value in the {@code <style>} element's
{@code name} attribute. This example style can be referenced from an XML layout as
{@code @style/CodeFont} (as demonstrated in the introduction above).</p>
-<p>The <code>parent</code> attribute in the {@code <style>} element is optional and
+<p>The <code>parent</code> attribute in the {@code <style>} element is optional and
specifies the resource ID of another style from which this style should inherit
properties. You can then override the inherited style properties if you want to.</p>
@@ -117,7 +117,7 @@
<h3 id="Inheritance">Inheritance</h3>
-<p>The {@code parent} attribute in the {@code <style>} element lets you specify a style
+<p>The {@code parent} attribute in the {@code <style>} element lets you specify a style
from which your style should inherit properties.
You can use this to inherit properties from an existing style and
then define only the properties that you want to change or add. You can
@@ -144,7 +144,7 @@
</style>
</pre>
-<p>Notice that there is no {@code parent} attribute in the {@code <style>} tag, but because
+<p>Notice that there is no {@code parent} attribute in the {@code <style>} tag, but because
the {@code name} attribute begins with the {@code CodeFont} style name (which
is a style that you have created), this style inherits all style properties from that style. This
style then overrides the {@code android:textColor} property to make the text red. You can
@@ -170,7 +170,7 @@
<h3 id="Properties">Style Properties</h3>
<p>Now that you understand how a style is defined, you need to learn what kind
-of style properties—defined by the {@code <item>} element—are available.
+of style properties—defined by the {@code <item>} element—are available.
You're probably familiar with some already, such as {@link android.R.attr#layout_width} and
{@link android.R.attr#textColor}. Of course, there are many more style properties you can use.</p>
@@ -184,7 +184,7 @@
android:inputType}</a>, so where you might normally place the <a
href="{@docRoot}reference/android/widget/TextView.html#attr_android:inputType">{@code
android:inputType}</a>
-attribute in an {@code <EditText>} element, like this:</p>
+attribute in an {@code <EditText>} element, like this:</p>
<pre>
<EditText
android:inputType="number"
@@ -226,8 +226,8 @@
style as a theme.</p>
<p class="note"><strong>Note:</strong> Don't forget to prefix the property names in each
-{@code <item>} element with the <code>android:</code> namespace. For example:
-{@code <item name="android:inputType">}.</p>
+{@code <item>} element with the <code>android:</code> namespace. For example:
+{@code <item name="android:inputType">}.</p>
diff --git a/docs/html/guide/webapps/best-practices.jd b/docs/html/guide/webapps/best-practices.jd
index a13c69da..9e070c6 100644
--- a/docs/html/guide/webapps/best-practices.jd
+++ b/docs/html/guide/webapps/best-practices.jd
@@ -72,7 +72,7 @@
<li>Use viewport meta data to properly resize your web page
- <p>In your document {@code <head>}, you should provide meta data that specifies how you
+ <p>In your document {@code <head>}, you should provide meta data that specifies how you
want the browser's viewport to render your web page. For example, your viewport meta data can
specify the height and width for the browser's viewport, the initial web page scale and even the
target screen density.</p>
@@ -89,7 +89,7 @@
<p>Because mobile devices typically have a connection speed far slower than a desktop
computer, you should make your web pages load as fast as possible. One way to speed it up is to
avoid loading extra files such as stylesheets and script files in the {@code
-<head>}. Instead, provide your CSS and JavaScript directly in the <head> (or
+<head>}. Instead, provide your CSS and JavaScript directly in the <head> (or
at the end of the <body>, for scripts that you don't need until the page is loaded).
Alternatively, you should optimize the size and speed of your files by compressing them with tools
like <a href="http://code.google.com/p/minify/">Minify</a>.</p>
diff --git a/docs/html/guide/webapps/targeting.jd b/docs/html/guide/webapps/targeting.jd
index 7e02340..4a2ea17 100644
--- a/docs/html/guide/webapps/targeting.jd
+++ b/docs/html/guide/webapps/targeting.jd
@@ -78,8 +78,8 @@
with {@link android.webkit.WebSettings#setUseWideViewPort setUseWideViewPort()}.</p>
<p>You can define properties of the viewport for your web page, such as the width and initial zoom
-level, using the {@code <meta name="viewport" ...>} tag in your document
-{@code <head>}.</p>
+level, using the {@code <meta name="viewport" ...>} tag in your document
+{@code <head>}.</p>
<p>The following syntax shows all of the
supported viewport properties and the types of values accepted by each one:</p>
@@ -96,7 +96,7 @@
" />
</pre>
-<p>For example, the following {@code <meta>} tag specifies that the viewport width
+<p>For example, the following {@code <meta>} tag specifies that the viewport width
should exactly match the device screen's width and that the ability to zoom should be disabled:</p>
<pre>
diff --git a/docs/html/guide/webapps/webview.jd b/docs/html/guide/webapps/webview.jd
index 9b46b5b..f133b57 100644
--- a/docs/html/guide/webapps/webview.jd
+++ b/docs/html/guide/webapps/webview.jd
@@ -68,7 +68,7 @@
<h2 id="AddingWebView">Adding a WebView to Your Application</h2>
<p>To add a {@link android.webkit.WebView} to your Application, simply include the {@code
-<WebView>} element in your activity layout. For example, here's a layout file in which the
+<WebView>} element in your activity layout. For example, here's a layout file in which the
{@link android.webkit.WebView} fills the screen:</p>
<pre>
@@ -171,7 +171,7 @@
<p class="caution"><strong>Caution:</strong> If you've set your <a
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code targetSdkVersion}</a>
to 17 or higher, <strong>you
-must add the {@code @JavascriptInterface} annotation</strong> to any method that you want
+must add the <code>@JavascriptInterface</code> annotation</strong> to any method that you want
available to your JavaScript (the method must also be public). If you do not provide the
annotation, the method is not accessible by your web page when running on Android 4.2 or
higher.</p>
diff --git a/docs/html/ndk/downloads/revision_history.jd b/docs/html/ndk/downloads/revision_history.jd
index a32b814..95bfe7c 100644
--- a/docs/html/ndk/downloads/revision_history.jd
+++ b/docs/html/ndk/downloads/revision_history.jd
@@ -1218,7 +1218,7 @@
(<a href="https://android-review.googlesource.com/#/c/46821">Change 46821</a>)</li>
<li>Modified {@code wchar.h} to not redefine {@code WCHAR_MAX} and
{@code WCHAR_MIN}</li>
- <li>Fixed {@code <inttypes.h>} declaration for pointer-related {@code PRI} and
+ <li>Fixed {@code <inttypes.h>} declaration for pointer-related {@code PRI} and
{@code SCN} macros. (<a href="http://b.android.com/57218">Issue 57218</a>)</li>
<li>Changed the {@code sys/cdefs.h} header so that {@code __WCHAR_TYPE__} is 32-bit
for API levels less than 9, which means that {@code wchat_t} is 32-bit for all
@@ -1367,7 +1367,7 @@
(<a href="http://b.android.com/52909">Issue 52909</a>)</li>
<li>Fixed a GCC 4.7 segfault.
(<a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55245">GCC Issue</a>)</li>
- <li>Fixed {@code <chrono>} clock resolution and enabled {@code steady_clock}.
+ <li>Fixed {@code <chrono>} clock resolution and enabled {@code steady_clock}.
(<a href="http://b.android.com/39680">Issue 39680</a>)</li>
<li>Fixed toolchain to enable {@code _GLIBCXX_HAS_GTHREADS} for GCC 4.7 libstdc++.
(<a href="http://b.android.com/41770">Issue 41770</a>,
@@ -1387,7 +1387,7 @@
(<a href="https://android-review.googlesource.com/#/c/52134">Change 52134</a>)</li>
<li>Fixed Clang 3.1 internal compiler error when using Eigen library.
(<a href="http://b.android.com/41246">Issue 41246</a>)</li>
- <li>Fixed Clang 3.1 internal compiler error including {@code <chrono>} in C++11
+ <li>Fixed Clang 3.1 internal compiler error including {@code <chrono>} in C++11
mode.
(<a href="http://b.android.com/39600">Issue 39600</a>)</li>
<li>Fixed Clang 3.1 internal compiler error when generating object code for a method
@@ -1484,7 +1484,7 @@
(<a href="http://b.android.com/52805">Issue 52805</a>)</li>
<li>Enabled {@code FUTEX} system call in GNU libstdc++.</li>
<li>Updated {@code ndk-build} so that it no longer copies prebuilt static library to
- a project's {@code obj/local/<abi>/} directory.
+ a project's {@code obj/local/<abi>/} directory.
(<a href="http://b.android.com/40302">Issue 40302</a>)</li>
<li>Removed {@code __ARM_ARCH_5*__} from ARM {@code toolchains/*/setup.mk} script.
(<a href="http://b.android.com/21132">Issue 21132</a>)</li>
@@ -1723,8 +1723,8 @@
add this environment variable setting to {@code Application.mk}.</li>
<li>For standalone builds, add {@code --llvm-version=3.1} to
{@code make-standalone-toolchain.sh} and replace {@code CC} and {@code CXX} in your
- makefile with {@code <tool-path>/bin/clang} and
- {@code <tool-path>/bin/clang++}. See {@code STANDALONE-TOOLCHAIN.html} for
+ makefile with {@code <tool-path>/bin/clang} and
+ {@code <tool-path>/bin/clang++}. See {@code STANDALONE-TOOLCHAIN.html} for
details.</li>
</ul>
<p class="note"><strong>Note:</strong> This feature is experimental. Please try it and
@@ -1915,12 +1915,12 @@
<li>Removed unimplemented functions in {@code malloc.h}.</li>
<li>Fixed {@code stdint.h} defintion of {@code uint64_t} for ANSI compilers.
(<a href="http://b.android.com/1952">Issue 1952</a>)</li>
- <li>Fixed preprocessor macros in {@code <arch>/include/machine/*}.</li>
+ <li>Fixed preprocessor macros in {@code <arch>/include/machine/*}.</li>
<li>Replaced {@code link.h} for MIPS with new version supporting all platforms.</li>
<li>Removed {@code linux-unistd.h}</li>
<li>Move GLibc-specific macros {@code LONG_LONG_MIN}, {@code LONG_LONG_MAX} and
- {@code ULONG_LONG_MAX} from {@code <pthread.h>} to {@code
-<limits.h>}.</li>
+ {@code ULONG_LONG_MAX} from {@code <pthread.h>} to {@code
+<limits.h>}.</li>
</ul>
</li>
<li>Fixed a buffer overflow in {@code ndk-stack-parser}.</li>
@@ -2177,8 +2177,8 @@
<li>Changed locations of binaries:
<ul>
<li>Moved {@code gdbserver} from
-{@code toolchain/<arch-os-ver>/prebuilt/gdbserver} to
-{@code prebuilt/android-<arch>/gdbserver/gdbserver}.</li>
+{@code toolchain/<arch-os-ver>/prebuilt/gdbserver} to
+{@code prebuilt/android-<arch>/gdbserver/gdbserver}.</li>
<li>Renamed x86 toolchain prefix from {@code i686-android-linux-} to
{@code i686-linux-android-}.</li>
<li>Moved {@code sources/cxx-stl/gnu-libstdc++/include} and {@code lib} to
@@ -2262,7 +2262,7 @@
<dd>
<ul>
<li>Fixed a typo in GAbi++ implementation where the result of {@code
- dynamic_cast<D>(b)} of base class object {@code b} to derived class {@code D} is
+ dynamic_cast<D>(b)} of base class object {@code b} to derived class {@code D} is
incorrectly adjusted in the opposite direction from the base class.
(<a href="http://b.android.com/28721">Issue 28721</a>)
</li>
diff --git a/docs/html/ndk/guides/abis.jd b/docs/html/ndk/guides/abis.jd
index f4819b2..7b1a7ad 100644
--- a/docs/html/ndk/guides/abis.jd
+++ b/docs/html/ndk/guides/abis.jd
@@ -418,8 +418,8 @@
/lib/<abi>/lib<name>.so
</pre>
-<p>Here, {@code <abi>} is one of the ABI names listed under <a href="#sa">Supported ABIs</a>,
-and {@code <name>} is the name of the library as you defined it for the {@code LOCAL_MODULE}
+<p>Here, {@code <abi>} is one of the ABI names listed under <a href="#sa">Supported ABIs</a>,
+and {@code <name>} is the name of the library as you defined it for the {@code LOCAL_MODULE}
variable in the <a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a> file. Since
APK files are just zip files, it is trivial to open them and confirm that the shared native
libraries are where they belong.</p>
@@ -488,7 +488,7 @@
<p>When it finds the libraries that it's looking for, the package manager
copies them to <code>/lib/lib<name>.so</code>, under the application's
-{@code data} directory ({@code data/data/<package_name>/lib/}).</p>
+{@code data} directory ({@code data/data/<package_name>/lib/}).</p>
<p>If there is no shared-object file at all, the application builds and installs, but crashes at
runtime.</p>
diff --git a/docs/html/ndk/guides/android_mk.jd b/docs/html/ndk/guides/android_mk.jd
index 47fefc3..1416d13 100644
--- a/docs/html/ndk/guides/android_mk.jd
+++ b/docs/html/ndk/guides/android_mk.jd
@@ -774,7 +774,7 @@
<h3 id="npfm">NDK-provided function macros</h2>
<p>This section explains GNU Make function macros that the NDK provides. Use
-{@code $(call <function>)} to evaluate them; they return textual information.</p>
+{@code $(call <function>)} to evaluate them; they return textual information.</p>
<h4>my-dir</h4>
@@ -870,6 +870,6 @@
$(call import-module,<name>)
</pre>
-<p>In this example, the build system looks for the module tagged {@code <name>} in the list of
+<p>In this example, the build system looks for the module tagged {@code <name>} in the list of
directories referenced that your {@code NDK_MODULE_PATH} environment variable references, and
includes its {@code Android.mk} file automatically for you.</p>
\ No newline at end of file
diff --git a/docs/html/ndk/guides/application_mk.jd b/docs/html/ndk/guides/application_mk.jd
index 1294687..e669f3f 100644
--- a/docs/html/ndk/guides/application_mk.jd
+++ b/docs/html/ndk/guides/application_mk.jd
@@ -30,7 +30,7 @@
$NDK/apps/<myapp>/Application.mk
</pre>
-<p>Here, {@code <myapp>} is a short name used to describe your app to the NDK build system. It
+<p>Here, {@code <myapp>} is a short name used to describe your app to the NDK build system. It
doesn't actually go into your generated shared libraries or your final packages.</p>
<h2 id="var">Variables</h2>
@@ -39,7 +39,7 @@
uses this information to place stripped-down versions of the generated JNI shared libraries
into a specific location known to the APK-generating tools.</p>
-<p>If you place your {@code Application.mk} file under {@code $NDK/apps/<myapp>/}, you must
+<p>If you place your {@code Application.mk} file under {@code $NDK/apps/<myapp>/}, you must
define this variable. If you place it under {@code $PROJECT/jni/}, it is optional.
<h4>APP_OPTIM</h4>
@@ -54,7 +54,7 @@
preventing you from inspecting them. Also, code re-ordering can make it more difficult to step
through the code; stack traces may not be reliable.</p>
-<p>Declaring {@code android:debuggable} in your application manifest's {@code <application>}
+<p>Declaring {@code android:debuggable} in your application manifest's {@code <application>}
tag will cause this variable to default to {@code debug} instead of {@code release}. Override this
default value by setting {@code APP_OPTIM} to {@code release}.</p>
diff --git a/docs/html/ndk/guides/concepts.jd b/docs/html/ndk/guides/concepts.jd
index 0601f21..9f2b22a 100644
--- a/docs/html/ndk/guides/concepts.jd
+++ b/docs/html/ndk/guides/concepts.jd
@@ -222,10 +222,10 @@
callbacks from blocking your main thread.</li>
</ul>
-<p>The {@code <ndk_root>/sources/android/native_app_glue/android_native_app_glue.c} source is
+<p>The {@code <ndk_root>/sources/android/native_app_glue/android_native_app_glue.c} source is
also available, allowing you to modify the implementation.</p>
<p>For more information on how to use this static library, examine the native-activity sample
-application and its documentation. Further reading is also available in the comments in the {@code <ndk_root>/sources/android/native_app_glue/android_native_app_glue.h} file.</p>
+application and its documentation. Further reading is also available in the comments in the {@code <ndk_root>/sources/android/native_app_glue/android_native_app_glue.h} file.</p>
<h3 id="na">Using the native_activity.h interface</h3>
@@ -277,13 +277,13 @@
<a href="{@docRoot}ndk/reference/struct_a_native_activity.html">{@code ANativeActivity}</a>
structure, which contains function pointers to the various callback implementations that you need
to write.
-Set the applicable callback function pointers in {@code ANativeActivity->callbacks} to the
+Set the applicable callback function pointers in {@code ANativeActivity->callbacks} to the
implementations of your callbacks.</li>
-<li>Set the {@code ANativeActivity->instance} field to the address of any instance of specific
+<li>Set the {@code ANativeActivity->instance} field to the address of any instance of specific
data that you want to use.</li>
<li>Implement anything else that you want your activity to do upon starting.</li>
-<li>Implement the rest of the callbacks that you set in {@code ANativeActivity->callbacks}. For
+<li>Implement the rest of the callbacks that you set in {@code ANativeActivity->callbacks}. For
more information on when the callbacks are called, see
<a href="{@docRoot}training/basics/activity-lifecycle/index.html">Managing the Activity
Lifecycle</a>.
diff --git a/docs/html/ndk/guides/cpp-support.jd b/docs/html/ndk/guides/cpp-support.jd
index 0074b80..21df6af 100644
--- a/docs/html/ndk/guides/cpp-support.jd
+++ b/docs/html/ndk/guides/cpp-support.jd
@@ -188,7 +188,7 @@
<h4>atomic support</h4>
-<p>If you include {@code <atomic>}, it's likely that you also need {@code libatomic}.
+<p>If you include {@code <atomic>}, it's likely that you also need {@code libatomic}.
If you are using {@code ndk-build}, add the following line:</p>
<pre>
diff --git a/docs/html/ndk/guides/cpu-features.jd b/docs/html/ndk/guides/cpu-features.jd
index b031909..3323efd 100644
--- a/docs/html/ndk/guides/cpu-features.jd
+++ b/docs/html/ndk/guides/cpu-features.jd
@@ -29,7 +29,7 @@
</pre>
</li>
-<li>In your source code, include the {@code <cpu-features.h>} header file.</li>
+<li>In your source code, include the {@code <cpu-features.h>} header file.</li>
<li>At the end of your <a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a> file,
insert an instruction to import the {@code android/cpufeatures} module. For example:
diff --git a/docs/html/ndk/guides/ndk-build.jd b/docs/html/ndk/guides/ndk-build.jd
index 18ca2d8..e8f6fc5 100644
--- a/docs/html/ndk/guides/ndk-build.jd
+++ b/docs/html/ndk/guides/ndk-build.jd
@@ -77,11 +77,11 @@
<dt>{@code NDK_HOST_32BIT=1}</dt>
<dd>Always use the toolchain in 32-bit mode (see <a href="#6432">64-bit and 32-bit
Toolchains</a>).</dd>
- <dt>{@code NDK_APPLICATION_MK=<file>}</dt>
+ <dt>{@code NDK_APPLICATION_MK=<file>}</dt>
<dd>Build, using a specific <code>Application.mk</code> file pointed to by the
{@code NDK_APPLICATION_MK} variable.</dd>
- <dt>{@code -C <project>}</dt>
- <dd>Build the native code for the project path located at {@code <project>}. Useful if you
+ <dt>{@code -C <project>}</dt>
+ <dd>Build the native code for the project path located at {@code <project>}. Useful if you
don't want to {@code cd} to it in your terminal.</dd>
</dl>
@@ -159,8 +159,8 @@
<h2 id="6432">64-Bit and 32-Bit Toolchains</h2>
<p>Some toolchains come with both 64-bit and 32-bit versions. For example,
-directories {@code <ndk>/toolchain/<name>/prebuilt/} and
-{@code <ndk>/prebuilt/} may contain both {@code linux-x86} and
+directories {@code <ndk>/toolchain/<name>/prebuilt/} and
+{@code <ndk>/prebuilt/} may contain both {@code linux-x86} and
{@code linux-x86_64} folders for Linux tools in 32-bit and 64-bit modes,
respectively. The ndk-build script automatically chooses a 64-bit version of
the toolchain if the host OS supports it. You can force the use of a 32-bit
@@ -182,7 +182,7 @@
$ ndk-build
</pre>
-<p>You can override other host prebuilt tools in {@code $NDK/prebuilt/<OS>/bin/}
+<p>You can override other host prebuilt tools in {@code $NDK/prebuilt/<OS>/bin/}
with the following environment variables: </p>
<pre class="no-pretty-print">
diff --git a/docs/html/ndk/guides/ndk-gdb.jd b/docs/html/ndk/guides/ndk-gdb.jd
index b15e67e..5e2b751 100644
--- a/docs/html/ndk/guides/ndk-gdb.jd
+++ b/docs/html/ndk/guides/ndk-gdb.jd
@@ -22,9 +22,9 @@
<ul>
<li>Build your app using the {@code ndk-build} script. The {@code ndk-gdb} script
-does not support using the legacy {@code make APP=<name>} method to build.</p></li>
+does not support using the legacy {@code make APP=<name>} method to build.</p></li>
<li>Enable app debugging in your {@code AndroidManifest.xml} file by including an
-{@code <application>} element that sets the {@code android:debuggable} attribute to {@code
+{@code <application>} element that sets the {@code android:debuggable} attribute to {@code
true}.</li>
<li>Build your app to run on Android 2.2 (Android API level 8) or higher.</li>
<li>Debug on a device or emulator running Android 2.2 or higher. For debugging purposes, the target
@@ -59,7 +59,7 @@
<p>Next, {@code ndk-gdb} displays a normal GDB prompt.</p>
<p>You interact with {@code ndk-gdb} in the same way as you would with GNU GDB. For example, you can
-use {@code b <location>} to set breakpoints, and {@code c} (for "continue") to
+use {@code b <location>} to set breakpoints, and {@code c} (for "continue") to
resume execution. For a comprehensive list of commands, see the
<a href="http://www.gnu.org/software/gdb/">GDB manual.</a></p>
@@ -78,7 +78,7 @@
<p>By default, {@code ndk-gdb} searches for an already-running application process, and displays an
error if it doesn't find one. You can, however, use the {@code --start} or
-{@code --launch=<name>} option to automatically start your activity before the debugging
+{@code --launch=<name>} option to automatically start your activity before the debugging
session. For more information, see <a href="#opt">Options</a>.</p>
@@ -117,13 +117,13 @@
explicitly launch the application on the target device before the debugging session.</p></td>
<p>Starting {@code ndk-gdb} with this option specified launches the first launchable activity listed
-in your application manifest. Use {@code --launch=<name>} to start the next launchable
+in your application manifest. Use {@code --launch=<name>} to start the next launchable
activity. To dump the list of launchable activities, run {@code --launch-list} from the command
line.</p>
</tr>
<tr>
-<td>{@code --launch=<name>}</td>
+<td>{@code --launch=<name>}</td>
<td><p>This option is similar to {@code --start}, except that it allows you to start a specific
activity from your application. This feature is only useful if your manifest defines multiple
launchable activities.</p></td>
@@ -136,20 +136,20 @@
</tr>
<tr>
-<td>{@code --project=<path>}</td>
+<td>{@code --project=<path>}</td>
<td>This option specifies the app project directory. It is useful if you want to launch the
script without first having to change to the project directory.</p></td>
</tr>
<tr>
-<td>{@code --port=<port>}</td>
+<td>{@code --port=<port>}</td>
<td> <p>By default, {@code ndk-gdb} uses local TCP port 5039 to communicate with the app it
is debugging on the target device. Using a different port allows you to natively debug programs
running on different devices or emulators connected to the same host machine.</p></td>
</tr>
<tr>
-<td>{@code --adb=<file>}</td>
+<td>{@code --adb=<file>}</td>
<td><p>This option specifies the <a href="{@docRoot}tools/help/adb.html">adb</a>
tool executable. It is only necessary if you have not set your path to include that executable.</p>
</td>
@@ -159,7 +159,7 @@
<td>
<li>{@code -d}</li>
<li>{@code -e}</li>
-<li>{@code -s <serial>}</li></td>
+<li>{@code -s <serial>}</li></td>
<td><p>These flags are similar to the adb commands with the same names. Set these flags if you have
several devices or emulators connected to your host machine. Their meanings are as follows:</p>
<dl>
@@ -167,8 +167,8 @@
<dd>Connect to a single physical device.</dd>
<dt>{@code -e}</dt>
<dd>Connect to a single emulator device.</dd>
- <dt>{@code -s <serial>}</dt>
- <dd>Connect to a specific device or emulator. Here, {@code <serial>} is the device's name
+ <dt>{@code -s <serial>}</dt>
+ <dd>Connect to a specific device or emulator. Here, {@code <serial>} is the device's name
as listed by the {@code adb devices} command.</dd>
</dl>
@@ -178,11 +178,11 @@
<tr>
<td>
-<li>{@code --exec=<file>}</li>
-<li>{@code -x <file>}</li>
+<li>{@code --exec=<file>}</li>
+<li>{@code -x <file>}</li>
</td>
<td><p>This option tells {@code ndk-gdb} to run the GDB initialization commands found in
-{@code <file>} after connecting to the process it is debugging. This is a useful feature if
+{@code <file>} after connecting to the process it is debugging. This is a useful feature if
you want to do something repeatedly, such as setting up a list of breakpoints, and then resuming
execution automatically.</p></td>
</tr>
@@ -200,7 +200,7 @@
</tr>
<tr>
-<td>{@code --gnumake-flag=<flag>}</td>
+<td>{@code --gnumake-flag=<flag>}</td>
<td><p>This option is an extra flag (or flags) to pass to the
{@code ndk-build} system when
querying it for project information. You can use multiple instances of this option in the
diff --git a/docs/html/ndk/guides/ndk-stack.jd b/docs/html/ndk/guides/ndk-stack.jd
index 46146cb..45d433c 100644
--- a/docs/html/ndk/guides/ndk-stack.jd
+++ b/docs/html/ndk/guides/ndk-stack.jd
@@ -14,7 +14,7 @@
<p>The {@code ndk-stack} tool allows you to filter stack traces as they appear in the
output of <a href="{@docRoot}tools/help/logcat.html">{@code adb logcat}</a>. It also replaces any
address inside a shared library with the corresponding
-{@code <source-file>:<line-number>} values from your source code, making issues easier
+{@code <source-file>:<line-number>} values from your source code, making issues easier
to pinpoint.</p>
<p>For example, it translates something like:</p>
@@ -57,7 +57,7 @@
<h2>Usage</h2>
<p>To use {@code ndk-stack}, you first need a directory containing symbolic versions of your app's
shared libraries. If you use the NDK build system ({@code ndk-build}), these shared-library
-files reside under {@code $PROJECT_PATH/obj/local/<abi>}, where {@code <abi>} represents
+files reside under {@code $PROJECT_PATH/obj/local/<abi>}, where {@code <abi>} represents
your device's ABI. By default, the system uses the {@code armeabi} ABI.</p>
<p>There are two ways to use the tool. You can feed the logcat text as direct input to the program.
diff --git a/docs/html/ndk/guides/prebuilts.jd b/docs/html/ndk/guides/prebuilts.jd
index 52eb437..4cb1819 100644
--- a/docs/html/ndk/guides/prebuilts.jd
+++ b/docs/html/ndk/guides/prebuilts.jd
@@ -58,7 +58,7 @@
<p>In this example, the name of the module is the same as that of the prebuilt library.</p>
<p>The build system places a copy of your prebuilt shared library into {@code $PROJECT/obj/local},
-and another copy, stripped of debug information, into {@code $PROJECT/libs/<abi>}. Here,
+and another copy, stripped of debug information, into {@code $PROJECT/libs/<abi>}. Here,
{@code $PROJECT} is the root directory of your project.</p>
<h2 id="rp">Referencing the Prebuilt Library from Other Modules</h2>
@@ -111,7 +111,7 @@
<h2 id="dp">Debugging Prebuilt Libraries</h2>
<p>We recommend that you provide prebuilt shared libraries containing debug symbols. The NDK build
system always strips the symbols from the version of the library that it installs into
-{@code $PROJECT/libs/<abi>/}, but you can use the debug version for debugging with
+{@code $PROJECT/libs/<abi>/}, but you can use the debug version for debugging with
{@code ndk-gdb}.</p>
<h2 id="sa">Selecting ABIs for Prebuilt Libraries</h2>
diff --git a/docs/html/ndk/guides/setup.jd b/docs/html/ndk/guides/setup.jd
index 81a33c0..8d4334e 100644
--- a/docs/html/ndk/guides/setup.jd
+++ b/docs/html/ndk/guides/setup.jd
@@ -61,7 +61,7 @@
<p>To confirm that you have installed the NDK, set it up correctly, and properly configured Eclipse,
follow these steps:</p>
<ol type="1">
-<li>Import the hello-jni sample from {@code <ndk>/samples/}, as you would any other Android
+<li>Import the hello-jni sample from {@code <ndk>/samples/}, as you would any other Android
project.</li>
<li>In the <i>Project Explorer</i> pane, right-click the project name (<i>HelloJni</i>). A
context menu appears.</li>
diff --git a/docs/html/ndk/guides/stable_apis.jd b/docs/html/ndk/guides/stable_apis.jd
index cad02ac..c38e684 100644
--- a/docs/html/ndk/guides/stable_apis.jd
+++ b/docs/html/ndk/guides/stable_apis.jd
@@ -54,7 +54,7 @@
the C and C++ libraries, see <a href="#a3">Android API level 3</a>.</p>
<p>The NDK often provides new headers and libraries for new Android releases. These files reside
-under {@code $NDK/platforms/android-<level>/<abi>/usr/include}. When the NDK does not
+under {@code $NDK/platforms/android-<level>/<abi>/usr/include}. When the NDK does not
have a specific new group of headers and libraries for an Android API level, it means that
an app targeting that level should use the most recently released NDK assets. For example,
there was no new release of NDK headers or libraries for Android API levels 6 and 7. Therefore,
@@ -154,7 +154,7 @@
<h4>Android-specific log support</h4>
-<p>{@code <android/log.h>} contains various definitions that an app can use to send log
+<p>{@code <android/log.h>} contains various definitions that an app can use to send log
messages to the kernel from native code. For more information about these definitions, see the
comments in {@code $NDK/platforms/android-3/arch-arm/usr/include/android/log.h}, where {@code $NDK}
is the root of your NDK installation.</p>
@@ -214,7 +214,7 @@
<p>Additionally, you must put a
<a href="http://developer.android.com/guide/topics/manifest/uses-feature-element.html">{@code
-<uses-feature>}</a> tag in your manifest file to indicate the version of
+<uses-feature>}</a> tag in your manifest file to indicate the version of
<a href="http://developer.android.com/guide/topics/graphics/opengl.html#manifest">OpenGL ES</a>
that your application requires.</p>
@@ -234,7 +234,7 @@
images and above.</p>
<h4>OpenGL ES 2.0 library:</h4>
-<p>The standard OpenGL ES 2.0 headers {@code <GLES2/gl2.h>} and {@code <GLES2/gl2ext.h>}
+<p>The standard OpenGL ES 2.0 headers {@code <GLES2/gl2.h>} and {@code <GLES2/gl2ext.h>}
contain the declarations needed for performing OpenGL ES 2.0 rendering calls from native code.
These rendering calls provide the ability to use the GLSL language to define and use vertex and
fragment shaders.</p>
@@ -255,9 +255,9 @@
<p>Additionally, you must put a
<a href="http://developer.android.com/guide/topics/manifest/uses-feature-element.html">{@code
-<uses-feature>}</a> tag in your manifest file to indicate which version of OpenGL ES your
+<uses-feature>}</a> tag in your manifest file to indicate which version of OpenGL ES your
application requires. For more information about the OpenGL ES settings for
-{@code <uses-feature>}, see
+{@code <uses-feature>}, see
<a href="http://developer.android.com/guide/topics/graphics/opengl.html#manifest">OpenGL ES</a>.</p>
<p>The hello-gl2 sample application provies a basic example of how to use OpenGL ES 2.0 with the
@@ -296,7 +296,7 @@
<li>Call {@code AndroidBitmap_unlockPixels()} to unlock the buffer.</li>
</ol>
-<p>To use {@code jnigraphics}, include the {@code <bitmap.h>} header in your source code, and
+<p>To use {@code jnigraphics}, include the {@code <bitmap.h>} header in your source code, and
link against {@code jnigraphics} by including the following line in your
<a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a> file:</p>
@@ -368,19 +368,19 @@
<p>This release provides the following native headers:</p>
<ul>
-<li>{@code <native_activity.h>}</li>
-<li>{@code <looper.h>}</li>
-<li>{@code <input.h>}</li>
-<li>{@code <keycodes.h>}</li>
-<li>{@code <sensor.h>}</li>
-<li>{@code <rect.h>}</li>
-<li>{@code <window.h>}</li>
-<li>{@code <native_window.h>}</li>
-<li>{@code <native_window_jni.h>}</li>
-<li>{@code <configuration.h>}</li>
-<li>{@code <asset_manager.h>}</li>
-<li>{@code <storage_manager.h>}</li>
-<li>{@code <obb.h>}</li>
+<li>{@code <native_activity.h>}</li>
+<li>{@code <looper.h>}</li>
+<li>{@code <input.h>}</li>
+<li>{@code <keycodes.h>}</li>
+<li>{@code <sensor.h>}</li>
+<li>{@code <rect.h>}</li>
+<li>{@code <window.h>}</li>
+<li>{@code <native_window.h>}</li>
+<li>{@code <native_window_jni.h>}</li>
+<li>{@code <configuration.h>}</li>
+<li>{@code <asset_manager.h>}</li>
+<li>{@code <storage_manager.h>}</li>
+<li>{@code <obb.h>}</li>
</ul>
<p>For more information about these headers, see the
@@ -403,8 +403,8 @@
<h4>OpenMAX AL</h4>
<p>Android native multimedia handling is based on Khronos Group OpenMAX AL 1.0.1 API.</p>
-<p>The standard OpenMAX AL headers {@code <OMXAL/OpenMAXAL.h>} and
-{@code <OMXAL/OpenMAXAL_Platform.h>} contain the declarations necessary for performing
+<p>The standard OpenMAX AL headers {@code <OMXAL/OpenMAXAL.h>} and
+{@code <OMXAL/OpenMAXAL_Platform.h>} contain the declarations necessary for performing
multimedia output from the native side of Android.</p>
<p>The NDK distribution of OpenMAX AL also provides Android-specific extensions. For information
@@ -448,9 +448,9 @@
<p>Additionally, you must put a
<a href="http://developer.android.com/guide/topics/manifest/uses-feature-element.html">{@code
-<uses-feature>}</a> tag in your manifest file to indicate which version of OpenGL ES your
+<uses-feature>}</a> tag in your manifest file to indicate which version of OpenGL ES your
application requires. For more information about the OpenGL ES settings for
-{@code <uses-feature>}, see
+{@code <uses-feature>}, see
<a href="http://developer.android.com/guide/topics/graphics/opengl.html#manifest">OpenGL ES</a>.</p>
<p>The gles3jni sample application provides a basic example of how to use OpenGL ES 3.0 with the
@@ -487,9 +487,9 @@
<p>Additionally, you must put a
<a href="http://developer.android.com/guide/topics/manifest/uses-feature-element.html">{@code
-<uses-feature>}</a> tag in your manifest file to indicate which version of OpenGL ES your
+<uses-feature>}</a> tag in your manifest file to indicate which version of OpenGL ES your
application requires. For more information about the OpenGL ES settings for
-{@code <uses-feature>}, see
+{@code <uses-feature>}, see
<a href="http://developer.android.com/guide/topics/graphics/opengl.html#manifest">OpenGL ES</a>.</p>
<p>The gles3jni sample application provides a basic example of how to use OpenGL ES 3.1 with the
diff --git a/docs/html/ndk/guides/standalone_toolchain.jd b/docs/html/ndk/guides/standalone_toolchain.jd
index 3b6f7f1..aec7073 100644
--- a/docs/html/ndk/guides/standalone_toolchain.jd
+++ b/docs/html/ndk/guides/standalone_toolchain.jd
@@ -43,27 +43,27 @@
</tr>
<tr>
<td>ARM-based</td>
- <td>{@code arm-linux-androideabi-<gcc-version>}</td>
+ <td>{@code arm-linux-androideabi-<gcc-version>}</td>
</tr>
<tr>
<td>x86-based</td>
- <td>{@code x86-<gcc-version>}</td>
+ <td>{@code x86-<gcc-version>}</td>
</tr>
<tr>
<td>MIPS-based</td>
- <td>{@code mipsel-linux-android-<gcc-version>}</td>
+ <td>{@code mipsel-linux-android-<gcc-version>}</td>
</tr>
<tr>
<td>ARM64-based</td>
- <td>{@code aarch64-linux-android-<gcc-version>}</td>
+ <td>{@code aarch64-linux-android-<gcc-version>}</td>
</tr>
<tr>
<td>X86-64-based</td>
- <td>{@code x86_64-<gcc-version>}</td>
+ <td>{@code x86_64-<gcc-version>}</td>
</tr>
<tr>
<td>MIPS64-based</td>
- <td>{@code mips64el-linux-android--<gcc-version>}</td>
+ <td>{@code mips64el-linux-android--<gcc-version>}</td>
</tr>
</table>
@@ -184,7 +184,7 @@
you can install them in any location, or even move them if you need to.</p>
<p>By default, the build system uses the 32-bit, ARM-based GCC 4.8 toolchain. You can specify a
-different value, however, by specifying {@code --arch=<toolchain>} as an option.
+different value, however, by specifying {@code --arch=<toolchain>} as an option.
Table 3 shows the values to use for other toolchains:
<p class="table-caption" id="table3">
@@ -216,8 +216,8 @@
</tr>
</table>
-<p>Alternatively, you can use the {@code --toolchain=<toolchain>} option. Table 4 shows the
-values you can specify for {@code <toolchain>}:</p>
+<p>Alternatively, you can use the {@code --toolchain=<toolchain>} option. Table 4 shows the
+values you can specify for {@code <toolchain>}:</p>
<p class="table-caption" id="table4">
<strong>Table 4.</strong> Toolchains and corresponding values, using {@code --toolchain}.</p>
@@ -296,7 +296,7 @@
line.</p>
<p class="note"><strong>Note: </strong>Instead of specifying a specific version, you can also
-use {@code <version>}, which defaults
+use {@code <version>}, which defaults
to the highest available version of Clang.</p>
<p>By default, the build system builds for a 32-bit host toolchain. You can specify a 64-bit
@@ -344,7 +344,7 @@
</pre>
<p>Note that if you omit the {@code -install-dir} option, the {@code make-standalone-toolchain.sh}
-shell script creates a tarball in {@code tmp/ndk/<toolchain-name>.tar.bz2}. This tarball makes
+shell script creates a tarball in {@code tmp/ndk/<toolchain-name>.tar.bz2}. This tarball makes
it easy to archive, as well as to redistribute the binaries.</p>
<p>This standalone toolchain provides an additional benefit, as well, in that it contains a working
@@ -354,7 +354,7 @@
<h2 id="wwc">Working with Clang</h2>
<p>You can install Clang binaries in the standalone installation by using the
-{@code --llvm-version=<version>} option. {@code <version>} is a LLVM/Clang version
+{@code --llvm-version=<version>} option. {@code <version>} is a LLVM/Clang version
number, such as {@code 3.5} or {@code 3.6}. For example:
<pre class="no-pretty-print">
@@ -368,7 +368,7 @@
assembler, linker, headers, libraries, and C++ STL implementation.</p>
<p>This operation also installs two scripts, named {@code clang} and {@code clang++}, under
-{@code <install-dir>/bin/@}. These scripts invoke the real {@code clang} binary with default
+{@code <install-dir>/bin/@}. These scripts invoke the real {@code clang} binary with default
target architecture flags. In other words, they should work without any modification, and you should
be able to use them in your own builds by just setting the {@code CC} and {@code CXX} environment
variables to point to them.</p>
@@ -534,7 +534,7 @@
<h3>C++ STL support</h3>
<p>The standalone toolchain includes a copy of a C++ Standard Template Library implementation. This
implementation is either for GNU libstdc++, STLport, or libc++, depending on what you specify for the
-{@code --stl=<name>} option described previously. To use this implementation of STL, you need
+{@code --stl=<name>} option described previously. To use this implementation of STL, you need
to link your project with the proper library:</p>
<ul>
diff --git a/docs/html/ndk/samples/sample_na.jd b/docs/html/ndk/samples/sample_na.jd
index a706be5..0966dd8 100644
--- a/docs/html/ndk/samples/sample_na.jd
+++ b/docs/html/ndk/samples/sample_na.jd
@@ -92,7 +92,7 @@
{@code .so} extension. For example, the actual file name for the
{@code log} library is {@code liblog.so}.</li>
<li>The library resides in the following directory, NDK root:
-{@code <ndk>/platforms/android-<sdk_version>/arch-<abi>/usr/lib/}.</li>
+{@code <ndk>/platforms/android-<sdk_version>/arch-<abi>/usr/lib/}.</li>
</ul>
<pre class="no-pretty-print">
diff --git a/docs/html/preview/api-overview.jd b/docs/html/preview/api-overview.jd
index 55829d3..599dc1e 100644
--- a/docs/html/preview/api-overview.jd
+++ b/docs/html/preview/api-overview.jd
@@ -149,8 +149,8 @@
<pre class="no-prettyprint">
adb -e emu finger touch <finger_id>
</pre>
-<p>On Windows, you may have to run {@code telnet 127.0.0.1 <emulator-id>} followed by
- {@code finger touch <finger_id>}.
+<p>On Windows, you may have to run {@code telnet 127.0.0.1 <emulator-id>} followed by
+ {@code finger touch <finger_id>}.
</p>
</li>
</ol>
@@ -210,7 +210,7 @@
<p>For each activity that you want to expose to
{@link android.service.chooser.ChooserTargetService}, add a
-{@code <meta-data>} element with the name
+{@code <meta-data>} element with the name
{@code "android.service.chooser.chooser_target_service"} in your app manifest.
</p>
diff --git a/docs/html/tools/adk/adk2.jd b/docs/html/tools/adk/adk2.jd
index d69125a..052ec48 100644
--- a/docs/html/tools/adk/adk2.jd
+++ b/docs/html/tools/adk/adk2.jd
@@ -303,7 +303,7 @@
<li>Start the ADK 2012 IDE and choose <strong>File > Preferences</strong>.</li>
<li>In the <strong>Preferences</strong> dialog, make a note of the <strong>Sketchbook
location</strong> directory.</li>
- <li>Copy the {@code <adk-source-download>/adk2012/board/library/ADK2} directory and its
+ <li>Copy the {@code <adk-source-download>/adk2012/board/library/ADK2} directory and its
contents into your {@code sketchbook/libraries/} directory, so that you create a {@code
sketchbook/libraries/ADK2} directory.</li>
<li>Stop and restart the <strong>ADK 2012 IDE</strong>.</li>
@@ -339,7 +339,7 @@
<ol>
<li><a href="#src-download">Download</a> the ADK 2012 source code files.</li>
<li>In a terminal window, navigate to {@code
-<adk-source-download>/adk2012/board/MakefileBasedBuild}.</li>
+<adk-source-download>/adk2012/board/MakefileBasedBuild}.</li>
<li>Execute the following command and follow the instructions:
<pre>$> ./setup</pre>
</li>
diff --git a/docs/html/tools/devices/emulator.jd b/docs/html/tools/devices/emulator.jd
index 5bdd4e2..1e70562 100644
--- a/docs/html/tools/devices/emulator.jd
+++ b/docs/html/tools/devices/emulator.jd
@@ -393,7 +393,7 @@
<li>Start the Android SDK Manager, select <strong>Extras</strong> and then select <strong>Intel
Hardware Accelerated Execution Manager</strong>.</li>
<li>After the download completes, execute {@code
-<sdk>/extras/intel/Hardware_Accelerated_Execution_Manager/IntelHAXM.exe}.</li>
+<sdk>/extras/intel/Hardware_Accelerated_Execution_Manager/IntelHAXM.exe}.</li>
<li>Follow the on-screen instructions to complete installation.</li>
<li>After installation completes, confirm that the virtualization driver is operating correctly by
opening a command prompt window and running the following command:
@@ -449,7 +449,7 @@
<li>Start the Android SDK Manager, select <strong>Extras</strong> and then select <strong>Intel
Hardware Accelerated Execution Manager</strong>.
<li>After the download completes, execute
- {@code <sdk>/extras/intel/Hardware_Accelerated_Execution_Manager/IntelHAXM.dmg}.</li>
+ {@code <sdk>/extras/intel/Hardware_Accelerated_Execution_Manager/IntelHAXM.dmg}.</li>
<li>Double click the <strong>IntelHAXM.mpkg</strong> icon to begin installation.</li>
<li>Follow the on-screen instructions to complete installation.</li>
<li>After installation completes, confirm that the new kernel extension is operating correctly by
diff --git a/docs/html/tools/devices/managing-avds.jd b/docs/html/tools/devices/managing-avds.jd
index 4ca8588..fb680aa 100644
--- a/docs/html/tools/devices/managing-avds.jd
+++ b/docs/html/tools/devices/managing-avds.jd
@@ -56,7 +56,7 @@
you have designed your app to support. For instance, you should create an AVD for each
API level equal to and higher than the minimum version you've specified in your manifest
<a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html" style="white-space: nowrap;"
- >{@code <uses-sdk>}</a> tag.</p>
+ >{@code <uses-sdk>}</a> tag.</p>
<p>To create an AVD based on an existing device definition:</p>
diff --git a/docs/html/tools/extras/oem-usb.jd b/docs/html/tools/extras/oem-usb.jd
index 6d449ee..eed8a5e 100644
--- a/docs/html/tools/extras/oem-usb.jd
+++ b/docs/html/tools/extras/oem-usb.jd
@@ -86,7 +86,7 @@
<li>Select <strong>Browse my computer for driver software</strong> and click
<strong>Next</strong>.</li>
<li>Click <strong>Browse</strong> and locate the USB driver folder. (The Google USB
-Driver is located in {@code <sdk>\extras\google\usb_driver\}.)</li>
+Driver is located in {@code <sdk>\extras\google\usb_driver\}.)</li>
<li>Click <strong>Next</strong> to install the driver.</li>
</ol>
@@ -109,7 +109,7 @@
<strong>Search removable media</strong>; and check <strong>Include this location in the
search</strong>.</li>
<li>Click <strong>Browse</strong> and locate the USB driver folder. (The Google USB
-Driver is located in {@code <sdk>\extras\google\usb_driver\}.)</li>
+Driver is located in {@code <sdk>\extras\google\usb_driver\}.)</li>
<li>Click <strong>Next</strong> to upgrade the driver.</li>
</ol>
@@ -127,7 +127,7 @@
<li>Select <strong>I don't have the disk. Show me other options</strong>.</li>
<li>Select <strong>Browse my computer for driver software</strong>.</li>
<li>Click <strong>Browse</strong> and locate the USB driver folder. (The Google USB
-Driver is located in {@code <sdk>\extras\google\usb_driver\}.) As long as you specified the
+Driver is located in {@code <sdk>\extras\google\usb_driver\}.) As long as you specified the
exact location of the
installation package, you may leave <strong>Include subfolders</strong> checked or
unchecked—it doesn't matter.</li>
@@ -152,7 +152,7 @@
search for the driver
software. Select <strong>Browse my computer for driver software</strong>.</li>
<li>Click <strong>Browse</strong> and locate the USB driver folder. (The Google USB
-Driver is located in {@code <sdk>\extras\google\usb_driver\}.) As long as you specified the
+Driver is located in {@code <sdk>\extras\google\usb_driver\}.) As long as you specified the
exact location of the
installation package, you may leave <strong>Include subfolders</strong> checked or
unchecked—it doesn't matter.</li>
diff --git a/docs/html/tools/help/adb.jd b/docs/html/tools/help/adb.jd
index 2faff4f..bcd949a 100644
--- a/docs/html/tools/help/adb.jd
+++ b/docs/html/tools/help/adb.jd
@@ -36,7 +36,7 @@
<li>A daemon, which runs as a background process on each emulator or device instance. </li>
</ul>
-<p>You can find the {@code adb} tool in {@code <sdk>/platform-tools/}.</p>
+<p>You can find the {@code adb} tool in {@code <sdk>/platform-tools/}.</p>
<p>When you start an adb client, the client first checks whether there is an adb server
process already running. If there isn't, it starts the server process. When the server starts,
diff --git a/docs/html/tools/help/desktop-head-unit.jd b/docs/html/tools/help/desktop-head-unit.jd
index 981979c..a2b71e6 100644
--- a/docs/html/tools/help/desktop-head-unit.jd
+++ b/docs/html/tools/help/desktop-head-unit.jd
@@ -400,7 +400,7 @@
<ol>
<li>Install the Android Media Browser simulator
-({@code <sdk>/extras/google/simulators/media-browser-simulator.apk}) on
+({@code <sdk>/extras/google/simulators/media-browser-simulator.apk}) on
the test device. You can do this using
the <a href="{@docRoot}tools/help/adb.html#move">adb</a> command line tool.</li>
<li>Enable <a href="{@docRoot}tools/device.html#developer-device-options">
@@ -417,7 +417,7 @@
<ol>
<li>Install the Android Messaging simulator
- ({@code <sdk>/extras/google/simulators/messaging-simulator.apk})
+ ({@code <sdk>/extras/google/simulators/messaging-simulator.apk})
on the test device. You can do this using the
<a href="{@docRoot}tools/help/adb.html#move">adb</a> command line tool.</li>
<li>Enable the simulator to read notifications posted on the system:
diff --git a/docs/html/tools/help/emulator.jd b/docs/html/tools/help/emulator.jd
index fa101e1..366b3bd 100644
--- a/docs/html/tools/help/emulator.jd
+++ b/docs/html/tools/help/emulator.jd
@@ -166,7 +166,7 @@
</td></tr>
<tr>
<td><code>-data <filepath></code></td>
- <td>Use {@code <filepath>} as the working user-data disk image. </td>
+ <td>Use {@code <filepath>} as the working user-data disk image. </td>
<td>Optionally, you can specify a path relative to the current working directory.
If <code>-data</code> is not used, the emulator looks for a file named {@code userdata-qemu.img}
in the storage area of the AVD being used (see <code>-avd</code>).
@@ -426,7 +426,7 @@
<td>Enable KVM acceleration of the emulator virtual machine.</td>
<td>This option is only effective when your system is set up to use
<a href="{@docRoot}tools/devices/emulator.html#vm-linux">KVM-based VM acceleration</a>.
- You can optionally specify a memory size ({@code -m <size>}) for the VM, which should match
+ You can optionally specify a memory size ({@code -m <size>}) for the VM, which should match
your emulator's memory size:</p>
{@code -qemu -m 512 -enable-kvm}<br>
{@code -qemu -m 1024 -enable-kvm}
diff --git a/docs/html/tools/help/jobb.jd b/docs/html/tools/help/jobb.jd
index 97f0942..ae60223 100644
--- a/docs/html/tools/help/jobb.jd
+++ b/docs/html/tools/help/jobb.jd
@@ -44,31 +44,31 @@
<th>Description</th>
</tr>
<tr>
- <td>{@code -d <directory>}</td>
+ <td>{@code -d <directory>}</td>
<td>Set the input directory for creating an OBB file, or the output directory when extracting
({@code -dump}) an existing file. When creating an OBB file, the contents of the specified
directory and all its sub-directories are included in the OBB file system.
</td>
</tr>
<tr>
- <td>{@code -o <filename>}</td>
+ <td>{@code -o <filename>}</td>
<td>Specify the filename for the OBB file. This parameter is required when
creating an OBB and extracting (dumping) its contents.</td>
</tr>
<tr>
- <td>{@code -pn <package>}</td>
+ <td>{@code -pn <package>}</td>
<td>Specify the package name for the application that mounts the OBB file, which corresponds
to the {@code package} value specified in your application's manifest. This parameter is
required when creating an OBB file.</td>
</tr>
<tr>
- <td>{@code -pv <version>}</td>
+ <td>{@code -pv <version>}</td>
<td>Set the minimum version for the application that can mount the OBB file, which corresponds
to the {@code android:versionCode} value in your application's manifest. This parameter is
required when creating an OBB file.</td>
</tr>
<tr>
- <td>{@code -k <key>}</td>
+ <td>{@code -k <key>}</td>
<td>Specify a password for encrypting a new OBB file or decrypting an existing, encypted
OBB file.</td>
</tr>
@@ -80,13 +80,13 @@
overlay OBB file replace files that have the same path.</td>
</tr>
<tr>
- <td style="white-space: nowrap">{@code -dump <filename>}</td>
+ <td style="white-space: nowrap">{@code -dump <filename>}</td>
<td><p>Extract the contents of the specified OBB file. When using this option, you must also
- specify the output directory for the contents using the {@code -d <directory>}
+ specify the output directory for the contents using the {@code -d <directory>}
parameter.</p>
<p class="note"><strong>Note:</strong> When dumping an existing OBB file, you can omit the
- {@code -d <directory>} parameter to get a listing of the directories inside the file,
+ {@code -d <directory>} parameter to get a listing of the directories inside the file,
without extracting the contents.</p>
</td>
</tr>
diff --git a/docs/html/tools/help/lint.jd b/docs/html/tools/help/lint.jd
index 0f52689..98a5652 100644
--- a/docs/html/tools/help/lint.jd
+++ b/docs/html/tools/help/lint.jd
@@ -154,7 +154,7 @@
<td rowspan="4">Help</td>
<td><nobr><code>--help</code></nobr></td>
<td>List the command-line arguments supported by the {@code lint} tool.</td>
-<td>Use {@code --help <topic>} to see help information for a specific topic, such as "suppress".</td>
+<td>Use {@code --help <topic>} to see help information for a specific topic, such as "suppress".</td>
</tr>
<tr>
@@ -166,7 +166,7 @@
<tr>
<td><nobr><code>--show</code></nobr></td>
<td>List the ID and verbose description for issues that can be checked by {@code lint}</td>
-<td>Use {@code --show <ids>} to see descriptions for a specific list of {@code lint} issue IDs.</td>
+<td>Use {@code --show <ids>} to see descriptions for a specific list of {@code lint} issue IDs.</td>
</tr>
<tr>
diff --git a/docs/html/tools/help/shell.jd b/docs/html/tools/help/shell.jd
index 417c871..41bef22 100644
--- a/docs/html/tools/help/shell.jd
+++ b/docs/html/tools/help/shell.jd
@@ -72,20 +72,20 @@
<td><code>
start [options] <INTENT>
</code></td>
-<td>Start an {@link android.app.Activity} specified by {@code <INTENT>}. <p>See the
+<td>Start an {@link android.app.Activity} specified by {@code <INTENT>}. <p>See the
<a href="#IntentSpec">Specification for <INTENT> arguments</a>.
<p>Options are:
<ul>
<li>{@code -D}: Enable debugging.
<li>{@code -W}: Wait for launch to complete.
- <li>{@code --start-profiler <FILE>}: Start profiler and send results to {@code <FILE>}.
- <li>{@code -P <FILE>}: Like <code>--start-profiler</code>,
+ <li>{@code --start-profiler <FILE>}: Start profiler and send results to {@code <FILE>}.
+ <li>{@code -P <FILE>}: Like <code>--start-profiler</code>,
but profiling stops when the app goes idle.
- <li>{@code -R}: Repeat the activity launch {@code <COUNT>} times. Prior to each repeat,
+ <li>{@code -R}: Repeat the activity launch {@code <COUNT>} times. Prior to each repeat,
the top activity will be finished.
<li>{@code -S}: Force stop the target app before starting the activity.
<li>{@code --opengl-trace}: Enable tracing of OpenGL functions.
- <li>{@code --user <USER_ID> | current}: Specify which user to run as; if not
+ <li>{@code --user <USER_ID> | current}: Specify which user to run as; if not
specified, then run as the current user.
</ul>
</td>
@@ -95,11 +95,11 @@
<td><code>
startservice [options] <INTENT>
</code></td>
-<td>Start the {@link android.app.Service} specified by {@code <INTENT>}. <p>See the
+<td>Start the {@link android.app.Service} specified by {@code <INTENT>}. <p>See the
<a href="#IntentSpec">Specification for <INTENT> arguments</a>.
<p>Options are:
<ul>
- <li>{@code --user <USER_ID> | current}: Specify which user to run as; if not
+ <li>{@code --user <USER_ID> | current}: Specify which user to run as; if not
specified, then run as the current user.
</ul>
</td>
@@ -109,7 +109,7 @@
<td><code>
force-stop <PACKAGE>
</code></td>
-<td>Force stop everything associated with {@code <PACKAGE>} (the app's package name).
+<td>Force stop everything associated with {@code <PACKAGE>} (the app's package name).
</td>
</tr>
@@ -117,13 +117,13 @@
<td><code>
kill [options] <PACKAGE>
</code></td>
-<td> Kill all processes associated with {@code <PACKAGE>}
+<td> Kill all processes associated with {@code <PACKAGE>}
(the app's package name). This command kills only
processes that are safe to kill and that will not impact the user
experience.
<p>Options are:
<ul>
- <li>{@code --user <USER_ID> | all | current}: Specify user whose processes to kill;
+ <li>{@code --user <USER_ID> | all | current}: Specify user whose processes to kill;
all users if not specified.
</ul>
</td>
@@ -145,7 +145,7 @@
<a href="#IntentSpec">Specification for <INTENT> arguments</a>.
<p>Options are:
<ul>
- <li>{@code [--user <USER_ID> | all | current]}: Specify which user to send to; if not
+ <li>{@code [--user <USER_ID> | all | current]}: Specify which user to send to; if not
specified then send to all users.
</ul>
</td>
@@ -156,24 +156,24 @@
instrument [options] <COMPONENT>
</code></td>
<td>Start monitoring with an {@link android.app.Instrumentation} instance.
- Typically the target {@code <COMPONENT>}
- is the form {@code <TEST_PACKAGE>/<RUNNER_CLASS>}. <p>Options are:
+ Typically the target {@code <COMPONENT>}
+ is the form {@code <TEST_PACKAGE>/<RUNNER_CLASS>}. <p>Options are:
<ul>
<li>{@code -r}: Print raw results (otherwise decode
- {@code <REPORT_KEY_STREAMRESULT>}). Use with
+ {@code <REPORT_KEY_STREAMRESULT>}). Use with
{@code [-e perf true]} to generate raw output for performance measurements.
- <li>{@code -e <NAME> <VALUE>}: Set argument {@code <NAME>} to {@code <VALUE>}.
+ <li>{@code -e <NAME> <VALUE>}: Set argument {@code <NAME>} to {@code <VALUE>}.
For test runners a common form is {@code
- -e <testrunner_flag> <value>[,<value>...]}.
+ -e <testrunner_flag> <value>[,<value>...]}.
- <li>{@code -p <FILE>}: Write profiling data to {@code <FILE>}.
+ <li>{@code -p <FILE>}: Write profiling data to {@code <FILE>}.
<li>{@code -w}: Wait for instrumentation to finish before returning. Required for
test runners.
<li>{@code --no-window-animation}: Turn off window animations while running.
- <li>{@code --user <USER_ID> | current}: Specify which user instrumentation runs in;
+ <li>{@code --user <USER_ID> | current}: Specify which user instrumentation runs in;
current user if not specified.
</ul>
@@ -184,7 +184,7 @@
<td><code>
profile start <PROCESS> <FILE>
</code></td>
-<td>Start profiler on {@code <PROCESS>}, write results to {@code <FILE>}.
+<td>Start profiler on {@code <PROCESS>}, write results to {@code <FILE>}.
</td>
</tr>
@@ -192,7 +192,7 @@
<td><code>
profile stop <PROCESS>
</code></td>
-<td>Stop profiler on {@code <PROCESS>}.
+<td>Stop profiler on {@code <PROCESS>}.
</td>
</tr>
@@ -200,9 +200,9 @@
<td style="white-space:nowrap"><code>
dumpheap [options] <PROCESS> <FILE>
</code></td>
-<td>Dump the heap of {@code <PROCESS>}, write to {@code <FILE>}. <p>Options are:
+<td>Dump the heap of {@code <PROCESS>}, write to {@code <FILE>}. <p>Options are:
<ul>
- <li>{@code --user [<USER_ID>|current]}: When supplying a process name,
+ <li>{@code --user [<USER_ID>|current]}: When supplying a process name,
specify user of process to dump; uses current user if not specified.
<li>{@code -n}: Dump native heap instead of managed heap.
</ul>
@@ -213,7 +213,7 @@
<td><code>
set-debug-app [options] <PACKAGE>
</code></td>
-<td>Set application {@code <PACKAGE>} to debug. <p>Options are:
+<td>Set application {@code <PACKAGE>} to debug. <p>Options are:
<ul>
<li>{@code -w}: Wait for debugger when application starts.
<li>{@code --persistent}: Retain this value.
@@ -245,7 +245,7 @@
screen-compat [on|off] <PACKAGE>
</code></td>
<td>Control <a href="{@docRoot}guide/practices/screen-compat-mode.html">screen
-compatibility</a> mode of {@code <PACKAGE>}.</p>
+compatibility</a> mode of {@code <PACKAGE>}.</p>
</td>
</tr>
@@ -300,65 +300,65 @@
<div class="intents" style="display:none">
-<p>For activity manager commands that take a {@code <INTENT>} argument, you can
+<p>For activity manager commands that take a {@code <INTENT>} argument, you can
specify the intent with the following options:</p>
<dl>
- <dt>{@code -a <ACTION>}</dt>
+ <dt>{@code -a <ACTION>}</dt>
<dd>Specify the intent action, such as "android.intent.action.VIEW".
You can declare this only once.
- <dt>{@code -d <DATA_URI>}</dt>
+ <dt>{@code -d <DATA_URI>}</dt>
<dd>Specify the intent data URI, such as "content://contacts/people/1".
You can declare this only once.
- <dt>{@code -t <MIME_TYPE>}</dt>
+ <dt>{@code -t <MIME_TYPE>}</dt>
<dd>Specify the intent MIME type, such as "image/png".
You can declare this only once.
- <dt>{@code -c <CATEGORY>}</dt>
+ <dt>{@code -c <CATEGORY>}</dt>
<dd>Specify an intent category, such as "android.intent.category.APP_CONTACTS".
- <dt>{@code -n <COMPONENT>}</dt>
+ <dt>{@code -n <COMPONENT>}</dt>
<dd>Specify the component name with package name prefix to create an explicit intent, such
as "com.example.app/.ExampleActivity".
- <dt>{@code -f <FLAGS>}</dt>
+ <dt>{@code -f <FLAGS>}</dt>
<dd>Add flags to the intent, as supported by {@link
android.content.Intent#setFlags setFlags()}.
- <dt>{@code --esn <EXTRA_KEY>}</dt>
+ <dt>{@code --esn <EXTRA_KEY>}</dt>
<dd>Add a null extra. This option is not supported for URI intents.
- <dt>{@code -e|--es <EXTRA_KEY> <EXTRA_STRING_VALUE>}</dt>
+ <dt>{@code -e|--es <EXTRA_KEY> <EXTRA_STRING_VALUE>}</dt>
<dd>Add string data as a key-value pair.
- <dt>{@code --ez <EXTRA_KEY> <EXTRA_BOOLEAN_VALUE>}</dt>
+ <dt>{@code --ez <EXTRA_KEY> <EXTRA_BOOLEAN_VALUE>}</dt>
<dd>Add boolean data as a key-value pair.
- <dt>{@code --ei <EXTRA_KEY> <EXTRA_INT_VALUE>}</dt>
+ <dt>{@code --ei <EXTRA_KEY> <EXTRA_INT_VALUE>}</dt>
<dd>Add integer data as a key-value pair.
- <dt>{@code --el <EXTRA_KEY> <EXTRA_LONG_VALUE>}</dt>
+ <dt>{@code --el <EXTRA_KEY> <EXTRA_LONG_VALUE>}</dt>
<dd>Add long data as a key-value pair.
- <dt>{@code --ef <EXTRA_KEY> <EXTRA_FLOAT_VALUE>}</dt>
+ <dt>{@code --ef <EXTRA_KEY> <EXTRA_FLOAT_VALUE>}</dt>
<dd>Add float data as a key-value pair.
- <dt>{@code --eu <EXTRA_KEY> <EXTRA_URI_VALUE>}</dt>
+ <dt>{@code --eu <EXTRA_KEY> <EXTRA_URI_VALUE>}</dt>
<dd>Add URI data as a key-value pair.
- <dt>{@code --ecn <EXTRA_KEY> <EXTRA_COMPONENT_NAME_VALUE>}</dt>
+ <dt>{@code --ecn <EXTRA_KEY> <EXTRA_COMPONENT_NAME_VALUE>}</dt>
<dd>Add a component name, which is converted and passed as
a {@link android.content.ComponentName} object.
- <dt>{@code --eia <EXTRA_KEY> <EXTRA_INT_VALUE>[,<EXTRA_INT_VALUE...]}</dt>
+ <dt>{@code --eia <EXTRA_KEY> <EXTRA_INT_VALUE>[,<EXTRA_INT_VALUE...]}</dt>
<dd>Add an array of integers.
- <dt>{@code --ela <EXTRA_KEY> <EXTRA_LONG_VALUE>[,<EXTRA_LONG_VALUE...]}</dt>
+ <dt>{@code --ela <EXTRA_KEY> <EXTRA_LONG_VALUE>[,<EXTRA_LONG_VALUE...]}</dt>
<dd>Add an array of longs.
- <dt>{@code --efa <EXTRA_KEY> <EXTRA_FLOAT_VALUE>[,<EXTRA_FLOAT_VALUE...]}</dt>
+ <dt>{@code --efa <EXTRA_KEY> <EXTRA_FLOAT_VALUE>[,<EXTRA_FLOAT_VALUE...]}</dt>
<dd>Add an array of floats.
<dt>{@code --grant-read-uri-permission}</dt>
@@ -430,7 +430,7 @@
<dt>{@code --selector}</dt>
<dd>Requires the use of {@code -d} and {@code -t} options to set the intent data and type.
- <dt>{@code <URI> <COMPONENT> <PACKAGE>}</dt>
+ <dt>{@code <URI> <COMPONENT> <PACKAGE>}</dt>
<dd>You can directly specify a URI, package name, and component name when not qualified
by one of the above options. When an argument is unqualified, the tool assumes the argument
is a URI if it contains a ":" (colon); it assumes the argument is a component name if it
@@ -475,7 +475,7 @@
list packages [options] <FILTER>
</code></td>
<td>Prints all packages, optionally only
- those whose package name contains the text in {@code <FILTER>}. <p>Options:
+ those whose package name contains the text in {@code <FILTER>}. <p>Options:
<ul>
<li>{@code -f}: See their associated file.
<li>{@code -d}: Filter to only show disabled packages.
@@ -484,7 +484,7 @@
<li>{@code -3}: Filter to only show third party packages.
<li>{@code -i}: See the installer for the packages.
<li>{@code -u}: Also include uninstalled packages.
- <li>{@code --user <USER_ID>}: The user space to query.
+ <li>{@code --user <USER_ID>}: The user space to query.
</ul>
</td>
</tr>
@@ -502,7 +502,7 @@
list permissions [options] <GROUP>
</code></td>
<td>Prints all known permissions, optionally only
- those in {@code <GROUP>}. <p>Options:
+ those in {@code <GROUP>}. <p>Options:
<ul>
<li>{@code -g}: Organize by group.
<li>{@code -f}: Print all information.
@@ -520,7 +520,7 @@
<td>List all test packages. <p>Options:
<ul>
<li>{@code -f}: List the APK file for the test package.
- <li>{@code <TARGET_PACKAGE>}: List test packages for only this app.
+ <li>{@code <TARGET_PACKAGE>}: List test packages for only this app.
</ul>
</td>
</tr>
@@ -553,7 +553,7 @@
<td><code>
path <PACKAGE>
</code></td>
-<td>Print the path to the APK of the given {@code <PACKAGE>}.
+<td>Print the path to the APK of the given {@code <PACKAGE>}.
</td>
</tr>
@@ -561,12 +561,12 @@
<td><code>
install [options] <PATH>
</code></td>
-<td>Installs a package (specified by {@code <PATH>}) to the system. <p>Options:
+<td>Installs a package (specified by {@code <PATH>}) to the system. <p>Options:
<ul>
<li>{@code -l}: Install the package with forward lock.
<li>{@code -r}: Reinstall an exisiting app, keeping its data.
<li>{@code -t}: Allow test APKs to be installed.
- <li>{@code -i <INSTALLER_PACKAGE_NAME>}: Specify the installer package name.
+ <li>{@code -i <INSTALLER_PACKAGE_NAME>}: Specify the installer package name.
<li>{@code -s}: Install package on the shared mass storage (such as sdcard).
<li>{@code -f}: Install package on the internal system memory.
<li>{@code -d}: Allow version code downgrade.
@@ -615,7 +615,7 @@
</code></td>
<td><p>Options:
<ul>
- <li>{@code --user <USER_ID>}: The user to disable.
+ <li>{@code --user <USER_ID>}: The user to disable.
</ul>
</td>
</tr>
@@ -688,7 +688,7 @@
<td><code>
create-user <USER_NAME>
</code></td>
-<td>Create a new user with the given {@code <USER_NAME>},
+<td>Create a new user with the given {@code <USER_NAME>},
printing the new user identifier of the user.
</td>
</tr>
@@ -697,7 +697,7 @@
<td><code>
remove-user <USER_ID>
</code></td>
-<td>Remove the user with the given {@code <USER_IDENTIFIER>},
+<td>Remove the user with the given {@code <USER_IDENTIFIER>},
deleting all data associated with that user
</td>
</tr>
diff --git a/docs/html/tools/help/uiautomator/index.jd b/docs/html/tools/help/uiautomator/index.jd
index 4b3c255..5eda4a3 100644
--- a/docs/html/tools/help/uiautomator/index.jd
+++ b/docs/html/tools/help/uiautomator/index.jd
@@ -46,14 +46,14 @@
<tr>
<td rowspan="7"><code>runtest</code></td>
-<td><nobr>{@code <JARS>}</nobr></td>
-<td><strong>Required</strong>. The {@code <JARS>} argument is the name of one or more JAR files that you deployed to the target device which contain your uiautomator testcases. You can list more than one JAR file by using a space as a separator.</td>
+<td><nobr>{@code <JARS>}</nobr></td>
+<td><strong>Required</strong>. The {@code <JARS>} argument is the name of one or more JAR files that you deployed to the target device which contain your uiautomator testcases. You can list more than one JAR file by using a space as a separator.</td>
</tr>
<tr>
<td><nobr><code>-c <CLASSES> </code></nobr></td>
-<td><strong>Required (API 17 or lower)</strong>.The {@code <CLASSES>}
-argument is a list of test classes or test methods in {@code <JARS>} to run.
+<td><strong>Required (API 17 or lower)</strong>.The {@code <CLASSES>}
+argument is a list of test classes or test methods in {@code <JARS>} to run.
<p>Each class or method must be fully
qualified with the package name, in one of these formats:
<ul>
@@ -62,7 +62,7 @@
</ul>
You can list multiple classes or methods by using a space as a separator.</p>
<p class="note"><strong>Note:</strong>This argument is not required for API 18
-and higher. If not specified, all test cases in {@code <JARS>} will be run.
+and higher. If not specified, all test cases in {@code <JARS>} will be run.
</p>
</td>
</tr>
@@ -100,7 +100,7 @@
</table>
<h2 id="api">uiautomator API</h2>
-<p>The {@code uiautomator} API is bundled in the {@code uiautomator.jar} file under the {@code <android-sdk>/platforms/} directory. The API includes these key classes, interfaces, and exceptions that allow you to capture and manipulate UI components on the target app:</p>
+<p>The {@code uiautomator} API is bundled in the {@code uiautomator.jar} file under the {@code <android-sdk>/platforms/} directory. The API includes these key classes, interfaces, and exceptions that allow you to capture and manipulate UI components on the target app:</p>
<h3 id="classes">Classes</h3>
<table>
diff --git a/docs/html/tools/help/zipalign.jd b/docs/html/tools/help/zipalign.jd
index 184cdcb..a32a3658 100644
--- a/docs/html/tools/help/zipalign.jd
+++ b/docs/html/tools/help/zipalign.jd
@@ -51,7 +51,7 @@
<pre>zipalign -c -v <alignment> existing.apk</pre>
-<p>The {@code <alignment>} is an integer that defines the byte-alignment boundaries.
+<p>The {@code <alignment>} is an integer that defines the byte-alignment boundaries.
This must always be 4 (which provides 32-bit alignment) or else it effectively
does nothing.</p>
diff --git a/docs/html/tools/sdk/eclipse-adt.jd b/docs/html/tools/sdk/eclipse-adt.jd
index 3c12a64..5a9d9d0 100644
--- a/docs/html/tools/sdk/eclipse-adt.jd
+++ b/docs/html/tools/sdk/eclipse-adt.jd
@@ -748,7 +748,7 @@
> Rename</strong>.</li>
<li>Updated XML Editor to improve double click handling.</li>
<li>Added code completion improvements for custom views, theme references and class
- references. For example, code completion in a {@code <fragment android:name="" >} tag
+ references. For example, code completion in a {@code <fragment android:name="" >} tag
now suggests completion with a list of fragment classes. Similarly, code completion in the
manifest now offers implementations suitable for the given tag.</li>
<li>Updated the <strong>Project Import</strong> dialog so that it shows a table for all
@@ -1771,9 +1771,9 @@
opened files as well as on device size and orientation changes to
ensure that large layouts are always fully visible unless you
manually zoom in.</li>
- <li>You can drop in an {@code <include>} element from the palette, which will pop up
+ <li>You can drop in an {@code <include>} element from the palette, which will pop up
a layout chooser. When you select the layout to include, it is added with an {@code
-<include>}. Similarly, dropping images or image buttons will pop up image
+<include>}. Similarly, dropping images or image buttons will pop up image
resource choosers (<a
href="http://tools.android.com/recent/includetagdropsupport">more info</a>).</li>
<li>The configuration chooser now applies the "Render Target" and
@@ -1796,7 +1796,7 @@
<dd>
<ul>
<li>Code completion has been significantly improved. It now works
- with {@code <style>} elements, completes dimensional units,
+ with {@code <style>} elements, completes dimensional units,
sorts resource paths in values based on the attribute name, and more. There are also many fixes to
handle text replacement (<a
href="http://tools.android.com/recent/xmlcodecompletionimprovements">more info</a>).</li>
diff --git a/docs/html/tools/sdk/tools-notes.jd b/docs/html/tools/sdk/tools-notes.jd
index da8d62cb..a43c969 100644
--- a/docs/html/tools/sdk/tools-notes.jd
+++ b/docs/html/tools/sdk/tools-notes.jd
@@ -791,7 +791,7 @@
<li>Updated build tools to allow use of RenderScript on older versions of Android
using new features in the
<a href="{@docRoot}tools/support-library/features.html#v8">Support Library</a>.</li>
- <li>Moved the Systrace tool to the {@code >sdk</platform-tools/} directory. </li>
+ <li>Moved the Systrace tool to the {@code <sdk>/platform-tools/} directory. </li>
<li>Modified <a href="{@docRoot}tools/help/gltracer.html">Tracer for OpenGL ES</a> to
support OpenGL ES 3.0.</li>
<li>Lint
diff --git a/docs/html/tools/support-library/features.jd b/docs/html/tools/support-library/features.jd
index 19f93e9..f03de77 100644
--- a/docs/html/tools/support-library/features.jd
+++ b/docs/html/tools/support-library/features.jd
@@ -140,7 +140,7 @@
</p>
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/v4/} directory. The library does not contain user
+{@code <sdk>/extras/android/support/v4/} directory. The library does not contain user
interface resources. To include it in your application project, follow the instructions for
<a href="{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without
resources</a>.</p>
@@ -167,7 +167,7 @@
<p>
After you download the Android Support Libraries, this library is located in the
- {@code <sdk>/extras/android/support/multidex/} directory. The library does not contain
+ {@code <sdk>/extras/android/support/multidex/} directory. The library does not contain
user interface resources. To include it in your application project, follow the instructions
for
<a href= "{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without
@@ -228,7 +228,7 @@
</ul>
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/v7/appcompat/} directory. The library contains user
+{@code <sdk>/extras/android/support/v7/appcompat/} directory. The library contains user
interface resources. To include it in your application project, follow the instructions for
<a href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries with
resources</a>.</p>
@@ -249,7 +249,7 @@
implementations, and are used extensively in layouts for TV apps.</p>
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/v7/cardview/} directory. The library contains user interface
+{@code <sdk>/extras/android/support/v7/cardview/} directory. The library contains user interface
resources. To include it in your application project, follow the instructions
for <a href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding
libraries with resources</a>.</p>
@@ -270,7 +270,7 @@
For detailed information about the v7 gridlayout library APIs, see the
{@link android.support.v7.widget android.support.v7.widget} package in the API reference.</p>
-<p>This library is located in the {@code <sdk>/extras/android/support/v7/gridlayout/}
+<p>This library is located in the {@code <sdk>/extras/android/support/v7/gridlayout/}
directory . The library contains user
interface resources. To include it in your application project, follow the instructions for
<a href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries with
@@ -333,7 +333,7 @@
title card.</p>
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/v7/palette/} directory. The library does not contain
+{@code <sdk>/extras/android/support/v7/palette/} directory. The library does not contain
user interface resources. To include it in your application project, follow the instructions for
<a href="{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without
resources</a>.</p>
@@ -355,7 +355,7 @@
limited window of data items.</p>
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/v7/recyclerview/} directory. The library contains
+{@code <sdk>/extras/android/support/v7/recyclerview/} directory. The library contains
user interface resources. To include it in your application project, follow the instructions
for <a href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding
libraries with resources</a>.</p>
@@ -384,7 +384,7 @@
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/v7/preference} directory. For more information
+{@code <sdk>/extras/android/support/v7/preference} directory. For more information
on how to set up your project, follow the instructions in <a
href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries
with resources</a>. </p>
@@ -448,7 +448,7 @@
</p>
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/v13/} directory. The library does not contain user
+{@code <sdk>/extras/android/support/v13/} directory. The library does not contain user
interface resources. To include it in your application project, follow the instructions for
<a href="{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without
resources</a>.</p>
@@ -480,7 +480,7 @@
</p>
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/v14/} directory. The library does not contain user
+{@code <sdk>/extras/android/support/v14/} directory. The library does not contain user
interface resources. To include it in your application project, follow the instructions for
<a href="{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without
resources</a>.</p>
@@ -509,7 +509,7 @@
</p>
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/v17/} directory. The library does not contain user
+{@code <sdk>/extras/android/support/v17/} directory. The library does not contain user
interface resources. To include it in your application project, follow the instructions for
<a href="{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without
resources</a>.</p>
@@ -551,7 +551,7 @@
</ul>
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/v17/leanback} directory. For more information
+{@code <sdk>/extras/android/support/v17/leanback} directory. For more information
on how to set up your project, follow the instructions in <a
href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries
with resources</a>. </p>
@@ -572,7 +572,7 @@
<p></p>
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/annotations} directory. For more information
+{@code <sdk>/extras/android/support/annotations} directory. For more information
on how to set up your project, follow the instructions in <a
href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries
with resources</a>. </p>
@@ -597,7 +597,7 @@
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/design} directory. For more information
+{@code <sdk>/extras/android/support/design} directory. For more information
on how to set up your project, follow the instructions in <a
href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries
with resources</a>. </p>
@@ -625,7 +625,7 @@
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/customtabs} directory. For more information
+{@code <sdk>/extras/android/support/customtabs} directory. For more information
on how to set up your project, follow the instructions in <a
href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries
with resources</a>. </p>
@@ -656,7 +656,7 @@
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/customtabs} directory. For more information
+{@code <sdk>/extras/android/support/customtabs} directory. For more information
on how to set up your project, follow the instructions in <a
href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries
with resources</a>. </p>
@@ -686,7 +686,7 @@
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/customtabs} directory. For more information
+{@code <sdk>/extras/android/support/customtabs} directory. For more information
on how to set up your project, follow the instructions in <a
href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries
with resources</a>. </p>
diff --git a/docs/html/tools/support-library/index.jd b/docs/html/tools/support-library/index.jd
index 22ad0c9..60620e7 100644
--- a/docs/html/tools/support-library/index.jd
+++ b/docs/html/tools/support-library/index.jd
@@ -1323,7 +1323,7 @@
<a href="{@docRoot}design/index.html">Android Design</a> guidelines for navigation. These
additions include a way to implement the action bar's <em>Up</em> button across versions.
For an example implementation of this pattern, see the AppNavigation sample in
-({@code <em><sdk></em>/samples/<em><platform></em>/AppNavigation}).</li>
+(<code><em><sdk></em>/samples/<em><platform></em>/AppNavigation</code>).</li>
<li>Added {@link android.support.v4.app.NotificationCompat.Builder} to provide a
compatibility implementation of Android 3.0's {@link android.app.Notification.Builder} helper class
for creating standardized system notifications.</li>
diff --git a/docs/html/tools/support-library/setup.jd b/docs/html/tools/support-library/setup.jd
index 8112071..a39e4b0 100644
--- a/docs/html/tools/support-library/setup.jd
+++ b/docs/html/tools/support-library/setup.jd
@@ -72,7 +72,7 @@
<p>After downloading, the tool installs the Support Library files to your existing Android SDK
directory. The library files are located in the following subdirectory of your SDK:
- {@code <sdk>/extras/android/support/} directory.</p>
+ {@code <sdk>/extras/android/support/} directory.</p>
<h2 id="choosing">Choosing Support Libraries</h2>
@@ -115,7 +115,7 @@
using the <a href="#download">SDK Manager</a>.</li>
<li>Create a {@code libs/} directory in the root of your application project.</li>
<li>Copy the JAR file from your Android SDK installation directory (e.g.,
- {@code <sdk>/extras/android/support/v4/android-support-v4.jar}) into your
+ {@code <sdk>/extras/android/support/v4/android-support-v4.jar}) into your
application's project {@code libs/} directory.
<li>Right click the JAR file and select <strong>Build Path > Add to Build Path</strong>.
</li>
@@ -333,9 +333,9 @@
SDK installation directory, as listed below:</p>
<ul>
- <li>4v Samples: {@code <sdk>/extras/android/support/samples/Support4Demos/}</li>
- <li>7v Samples: {@code <sdk>/extras/android/support/samples/Support7Demos/}</li>
- <li>13v Samples: {@code <sdk>/extras/android/support/samples/Support13Demos/}</li>
- <li>App Navigation: {@code <sdk>/extras/android/support/samples/SupportAppNavigation/}</li>
+ <li>4v Samples: {@code <sdk>/extras/android/support/samples/Support4Demos/}</li>
+ <li>7v Samples: {@code <sdk>/extras/android/support/samples/Support7Demos/}</li>
+ <li>13v Samples: {@code <sdk>/extras/android/support/samples/Support13Demos/}</li>
+ <li>App Navigation: {@code <sdk>/extras/android/support/samples/SupportAppNavigation/}</li>
</ul>
diff --git a/docs/html/tools/testing-support-library/index.jd b/docs/html/tools/testing-support-library/index.jd
index 44f5631..97c2dcf 100644
--- a/docs/html/tools/testing-support-library/index.jd
+++ b/docs/html/tools/testing-support-library/index.jd
@@ -127,7 +127,7 @@
4.10) tests. However, you should avoid mixing JUnit 3 and and JUnit 4 test code in the same
package, as this might cause unexpected results. If you are creating an instrumented JUnit 4
test class to run on a device or emulator, your test class must be prefixed with the
- {@code @RunWith(AndroidJUnit4.class)} annotation.
+ {@code @RunWith(AndroidJUnit4.class)} annotation.
</p>
<p>The following code snippet shows how you might write an instrumented JUnit 4 test to validate
@@ -193,14 +193,14 @@
</p>
<ul>
- <li><a href="{@docRoot}reference/android/support/test/filters/RequiresDevice.html">{@code @RequiresDevice}</a>:
+ <li><a href="{@docRoot}reference/android/support/test/filters/RequiresDevice.html">{@code @RequiresDevice}</a>:
Specifies that the test should run only on physical devices, not on emulators.
</li>
- <li><a href="{@docRoot}reference/android/support/test/filters/SdkSuppress.html">{@code @SdkSupress}</a>:
+ <li><a href="{@docRoot}reference/android/support/test/filters/SdkSuppress.html">{@code @SdkSupress}</a>:
Suppresses the test from running on a lower Android API level than the given level. For
example, to suppress tests on all API levels lower than 18 from running, use the annotation
- {@code @SDKSupress(minSdkVersion=18)}.
+ {@code @SDKSupress(minSdkVersion=18)}.
</li>
<li>{@link android.test.suitebuilder.annotation.SmallTest @SmallTest},
@@ -440,7 +440,7 @@
</p>
<p>
- The {@code uiautomatorviewer} tool is located in the {@code <android-sdk>/tools/}
+ The {@code uiautomatorviewer} tool is located in the {@code <android-sdk>/tools/}
directory.
</p>
@@ -570,7 +570,7 @@
<p>
After downloading, the tool installs the Support Repository files to your existing Android
SDK directory. The library files are located in the following subdirectory of your SDK:
- {@code <sdk>/extras/android/m2repository} directory.
+ {@code <sdk>/extras/android/m2repository} directory.
</p>
<p>
diff --git a/docs/html/tools/testing/testing_ui.jd b/docs/html/tools/testing/testing_ui.jd
index 4318a21..3f4bf7a 100644
--- a/docs/html/tools/testing/testing_ui.jd
+++ b/docs/html/tools/testing/testing_ui.jd
@@ -96,7 +96,7 @@
<p>To analyze the UI components of the application that you want to test:</p>
<ol>
<li>Connect your Android device to your development machine.</li>
-<li>Open a terminal window and navigate to {@code <android-sdk>/tools/}.</li>
+<li>Open a terminal window and navigate to {@code <android-sdk>/tools/}.</li>
<LI>Run the tool with this command:<pre>$ uiautomatorviewer</pre></LI>
<li><p>To capture a screen for analysis, click the <strong>Device Screenshot</strong> button in the GUI of the {@code uiautomatorviewer} tool.</p>
<p class="note"><strong>Note: </strong>If you have more than one device connected, specify the device for screen capture by setting the {@code ANDROID_SERIAL} environment variable:
@@ -158,7 +158,7 @@
</ol>
</li>
</ol>
-<p>If you did not configure Eclipse as your development environment, make sure that the {@code uiautomator.jar} and {@code android.jar} files from the {@code <android-sdk>/platforms/<sdk>} directory are in your Java class path.</p>
+<p>If you did not configure Eclipse as your development environment, make sure that the {@code uiautomator.jar} and {@code android.jar} files from the {@code <android-sdk>/platforms/<sdk>} directory are in your Java class path.</p>
<p>Once you have completed these prerequisite tasks, you're almost ready to start creating your {@code uiautomator} tests. </li>
<h2 id="creating">Creating uiautomator Tests</h2>
@@ -169,7 +169,7 @@
<p>The first thing your test case should do is access the device that contains the target app. It’s also good practice to start the test from the Home screen of the device. From the Home screen (or some other starting location you’ve chosen in the target app), you can use the classes provided by the {@code uiautomator} API to simulate user actions and to test specific UI components. For an example of how to put together a {@code uiautomator} test case, see the <a href="#sample">sample test case</a>.</p>
<h3 id="classes">uiautomator API</h3>
-<p>The {@code uiautomator} API is bundled in the {@code uiautomator.jar} file under the {@code <android-sdk>/platforms/} directory. The API includes these key classes that allow you to capture and manipulate UI components on the target app:</p>
+<p>The {@code uiautomator} API is bundled in the {@code uiautomator.jar} file under the {@code <android-sdk>/platforms/} directory. The API includes these key classes that allow you to capture and manipulate UI components on the target app:</p>
<dl>
<DT><a href="{@docRoot}tools/help/uiautomator/UiDevice.html">{@code UiDevice}</a></DT>
<dd><p>Represents the device state. In your tests, you can call methods on the <a href="{@docRoot}tools/help/uiautomator/UiDevice.html">{@code UiDevice}</a> instance to check for the state of various properties, such as current orientation or display size. Your tests also can use the <a href="{@docRoot}tools/help/uiautomator/UiDevice.html">{@code UiDevice}</a> instance to perform device level actions, such as forcing the device into a specific rotation, pressing the d-pad hardware button, or pressing the Home and Menu buttons.</p>
@@ -323,7 +323,7 @@
<ol>
<li>Create the required build configuration files to build the output JAR. To generate the build configuration files, open a terminal and run the following command:
<pre><android-sdk>/tools/android create uitest-project -n <name> -t 1 -p <path></pre>
-The {@code <name>} is the name of the project that contains your {@code uiautomator} test source files, and the {@code <path>} is the path to the corresponding project directory.
+The {@code <name>} is the name of the project that contains your {@code uiautomator} test source files, and the {@code <path>} is the path to the corresponding project directory.
</li>
<LI>From the command line, set the {@code ANDROID_HOME} variable:
<ul>
diff --git a/docs/html/training/activity-testing/activity-basic-testing.jd b/docs/html/training/activity-testing/activity-basic-testing.jd
index 016289d..6f39bcd 100644
--- a/docs/html/training/activity-testing/activity-basic-testing.jd
+++ b/docs/html/training/activity-testing/activity-basic-testing.jd
@@ -55,13 +55,13 @@
<li>In the Package Explorer, right-click on the {@code /src} directory for
your test project and select <strong>New > Package</strong>.</li>
<li>Set the <strong>Name</strong> field to
-{@code <your_app_package_name>.tests} (for example,
+{@code <your_app_package_name>.tests} (for example,
{@code com.example.android.testingfun.tests}) and click
<strong>Finish</strong>.</li>
<li>Right-click on the test package you created, and select
<strong>New > Class</strong>.</li>
<li>Set the <strong>Name</strong> field to
-{@code <your_app_activity_name>Test} (for example,
+{@code <your_app_activity_name>Test} (for example,
{@code MyFirstTestActivityTest}) and click <strong>Finish</strong>.</li>
</ol>
diff --git a/docs/html/training/activity-testing/activity-ui-testing.jd b/docs/html/training/activity-testing/activity-ui-testing.jd
index 644f3ca..a47ccf3 100644
--- a/docs/html/training/activity-testing/activity-ui-testing.jd
+++ b/docs/html/training/activity-testing/activity-ui-testing.jd
@@ -137,7 +137,7 @@
object, then call assertion methods to verify that the
{@link android.widget.Button} object's width and height attributes match the
expected values.</p>
-<p>The {@code @MediumTest} annotation specifies how the test is categorized,
+<p>The {@code @MediumTest} annotation specifies how the test is categorized,
relative to its absolute execution time. To learn more about using test size
annotations, see <a href="#annotations">Apply Test Annotations</a>.</p>
@@ -185,7 +185,7 @@
<p class="caution"><strong>Caution: </strong>The {@link android.test.TouchUtils}
methods are designed to send events to the UI thread safely from the test thread.
You should not run {@link android.test.TouchUtils} directly in the UI thread or
-any test method annotated with {@code @UIThread}. Doing so might
+any test method annotated with {@code @UIThread}. Doing so might
raise the {@code WrongThreadException}.</p>
<h2 id="annotations">Apply Test Annotations</h2>
@@ -202,8 +202,8 @@
<dd>Marks a test that should run as part of the large tests.</dd>
</dl>
<p>Typically, a short running test that take only a few milliseconds should be
-marked as a {@code @SmallTest}. Longer running tests (100 milliseconds or
-more) are usually marked as {@code @MediumTest}s or {@code @LargeTest}s,
+marked as a {@code @SmallTest}. Longer running tests (100 milliseconds or
+more) are usually marked as {@code @MediumTest}s or {@code @LargeTest}s,
depending on whether the test accesses resources on the local system only or
remote resources over a network. For guidance on using test size annotations,
see this <a href="https://plus.sandbox.google.com/+AndroidDevelopers/posts/TPy1EeSaSg8">Android Tools Protip</a>.</p>
diff --git a/docs/html/training/app-indexing/deep-linking.jd b/docs/html/training/app-indexing/deep-linking.jd
index 2679937..fc67b26 100644
--- a/docs/html/training/app-indexing/deep-linking.jd
+++ b/docs/html/training/app-indexing/deep-linking.jd
@@ -32,13 +32,13 @@
<p>To create a deep link to your app content, add an intent filter that
contains these elements and attribute values in your manifest:</p>
<dl>
-<dt><a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a></dt>
+<dt><a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a></dt>
<dd>Specify the {@link android.content.Intent#ACTION_VIEW} intent action so
that the intent filter can be reached from Google Search.</dd>
-<dt><a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a></dt>
-<dd>Add one or more <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> tags, where each tag represents a URI format that resolves to the activity. At minimum, the <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> tag must include the <a href="{@docRoot}guide/topics/manifest/data-element.html#scheme">{@code android:scheme}</a> attribute.
+<dt><a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a></dt>
+<dd>Add one or more <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> tags, where each tag represents a URI format that resolves to the activity. At minimum, the <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> tag must include the <a href="{@docRoot}guide/topics/manifest/data-element.html#scheme">{@code android:scheme}</a> attribute.
<p>You can add additional attributes to further refine the type of URI that the activity accepts. For example, you might have multiple activities that accept similar URIs, but which differ simply based on the path name. In this case, use the <a href="{@docRoot}guide/topics/manifest/data-element.html#path">{@code android:path}</a> attribute or its variants ({@code pathPattern} or {@code pathPrefix}) to differentiate which activity the system should open for different URI paths.</p></dd>
-<dt><a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a></dt>
+<dt><a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a></dt>
<dd>Include the {@link android.content.Intent#CATEGORY_BROWSABLE BROWSABLE}
category. The {@link android.content.Intent#CATEGORY_BROWSABLE BROWSABLE}
category is required in order for the intent filter to be accessible from a web
diff --git a/docs/html/training/app-indexing/enabling-app-indexing.jd b/docs/html/training/app-indexing/enabling-app-indexing.jd
index f0339d6..d483795 100644
--- a/docs/html/training/app-indexing/enabling-app-indexing.jd
+++ b/docs/html/training/app-indexing/enabling-app-indexing.jd
@@ -28,7 +28,7 @@
By opting in, you can allow Googlebot to crawl the content in the APK
through the Google Play Store to index the app content. To indicate which app
content you’d like Google to index, simply add link elements either to
-your existing <a href="https://support.google.com/webmasters/answer/156184?hl=en" class="external-link" target="_blank">Sitemap</a> file or in the {@code <head>} element of each web
+your existing <a href="https://support.google.com/webmasters/answer/156184?hl=en" class="external-link" target="_blank">Sitemap</a> file or in the {@code <head>} element of each web
page in your site, in the same way as you would for web pages.</p>
<p>The deep links that you share with Google Search must take this URI
@@ -49,10 +49,10 @@
<h2 id="sitemap">Add Deep Links in Your Sitemap</h2>
<p>To annotate the deep link for Google Search app indexing in your
<a href="https://support.google.com/webmasters/answer/156184?hl=en" class="external-link" target="_blank">Sitemap</a>, use the
-{@code <xhtml:link>} tag and specify the deep link as an alternate URI.</p>
+{@code <xhtml:link>} tag and specify the deep link as an alternate URI.</p>
<p>For example, the following XML snippet shows how you might specify a link to
-your web page by using the {@code <loc>} tag, and a corresponding deep
-link to your Android app by using the {@code <xhtml:link>} tag.</p>
+your web page by using the {@code <loc>} tag, and a corresponding deep
+link to your Android app by using the {@code <xhtml:link>} tag.</p>
<pre>
<?xml version="1.0" encoding="UTF-8" ?>
<urlset
@@ -70,8 +70,8 @@
<h2 id="webpages">Add Deep Links in Your Web Pages</h2>
<p>Instead of specifying the deep links for Google Search app indexing in your
Sitemap file, you can annotate the deep links in the HTML markup of your web
-pages. You can do this in the {@code <head>} section for each web
-page by adding a {@code <link>} tag and specifying the deep link as an
+pages. You can do this in the {@code <head>} section for each web
+page by adding a {@code <link>} tag and specifying the deep link as an
alternate URI.</p>
<p>For example, the following HTML snippet shows how you might specify the
corresponding deep link in a web page that has the URL
diff --git a/docs/html/training/articles/memory.jd b/docs/html/training/articles/memory.jd
index f15af68..de7af58 100644
--- a/docs/html/training/articles/memory.jd
+++ b/docs/html/training/articles/memory.jd
@@ -319,7 +319,7 @@
<p>In very special situations, you can request a larger heap size by setting the <a
href="{@docRoot}guide/topics/manifest/application-element.html#largeHeap">{@code largeHeap}</a>
attribute to "true" in the manifest <a
-href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
+href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
tag. If you do so, you can call {@link
android.app.ActivityManager#getLargeMemoryClass()} to get an estimate of the large heap size.</p>
diff --git a/docs/html/training/articles/security-tips.jd b/docs/html/training/articles/security-tips.jd
index 3215a0e..a3b7529 100644
--- a/docs/html/training/articles/security-tips.jd
+++ b/docs/html/training/articles/security-tips.jd
@@ -197,7 +197,7 @@
on the internal storage.</p>
<p>In addition to requesting permissions, your application can use the <a
-href="{@docRoot}guide/topics/manifest/permission-element.html">{@code <permissions>}</a>
+href="{@docRoot}guide/topics/manifest/permission-element.html">{@code <permissions>}</a>
to protect IPC that is security sensitive and will be exposed to other
applications, such as a {@link android.content.ContentProvider}.
In general, we recommend using access controls
@@ -537,7 +537,7 @@
If your IPC mechanism is not intended for use by other applications, set the
{@code android:exported} attribute to {@code "false"} in the component's manifest element,
such as for the <a
-href="{@docRoot}guide/topics/manifest/service-element.html#exported">{@code <service>}</a>
+href="{@docRoot}guide/topics/manifest/service-element.html#exported">{@code <service>}</a>
element. This is useful for applications that consist of multiple processes
within the same UID, or if you decide late in development that you do not
actually want to expose functionality as IPC but you don’t want to rewrite
@@ -545,7 +545,7 @@
<p>If your IPC is intended to be accessible to other applications, you can
apply a security policy by using the <a
-href="{@docRoot}guide/topics/manifest/permission-element.html">{@code <permission>}</a>
+href="{@docRoot}guide/topics/manifest/permission-element.html">{@code <permission>}</a>
element. If IPC is between your own separate apps that are signed with the same key,
it is preferable to use {@code "signature"} level permission in the <a
href="{@docRoot}guide/topics/manifest/permission-element.html#plevel">{@code
diff --git a/docs/html/training/auto/start/index.jd b/docs/html/training/auto/start/index.jd
index 6c6f188..0fdcb2a 100644
--- a/docs/html/training/auto/start/index.jd
+++ b/docs/html/training/auto/start/index.jd
@@ -98,8 +98,8 @@
<uses name="media" />
</automotiveApp>
</pre>
-<p>The {@code <uses>} element declares the Auto capability your app
-intends to use. Multiple {@code <uses>} tags can be added if your
+<p>The {@code <uses>} element declares the Auto capability your app
+intends to use. Multiple {@code <uses>} tags can be added if your
application uses multiple car capabilities. The {@code name} attribute indicates
the specific capability your app uses. The values supported are:</p>
<ul>
@@ -115,7 +115,7 @@
<p>In your app’s manifest ({@code AndroidManifest.xml}), provide a reference to
the Auto XML configuration file you created in the previous section. Add a
{@code "com.google.android.gms.car.application"} metadata entry under the
-<a href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
+<a href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
element that references your Auto XML configuration file. Omit the {@code .xml}
file extension when specifying the configuration filename.</p>
<p>The following code snippet shows how to include this reference in your
diff --git a/docs/html/training/basics/actionbar/adding-buttons.jd b/docs/html/training/basics/actionbar/adding-buttons.jd
index 40d0bd1..caee729 100644
--- a/docs/html/training/basics/actionbar/adding-buttons.jd
+++ b/docs/html/training/basics/actionbar/adding-buttons.jd
@@ -45,7 +45,7 @@
actions to the action bar, create a new XML file in your project's
{@code res/menu/} directory.</p>
-<p>Add an {@code <item>} element for each item you want to include in the action bar.
+<p>Add an {@code <item>} element for each item you want to include in the action bar.
For example:</p>
<p class="code-caption">res/menu/main_activity_actions.xml</p>
@@ -77,9 +77,9 @@
overflow, but it's good practice to explicitly declare your design intentions for each action.)
<p>The {@code icon} attribute requires a resource ID for an
-image. The name that follows {@code @drawable/} must be the name of a bitmap image you've
+image. The name that follows {@code @drawable/} must be the name of a bitmap image you've
saved in your project's {@code res/drawable/} directory. For example,
-{@code "@drawable/ic_action_search"} refers to {@code ic_action_search.png}.
+{@code "@drawable/ic_action_search"} refers to {@code ic_action_search.png}.
Likewise, the {@code title} attribute uses a string resource that's defined by an XML
file in your project's {@code res/values/} directory, as discussed in <a
href="{@docRoot}training/basics/firstapp/building-ui.html#Strings">Building a Simple User
@@ -139,7 +139,7 @@
onOptionsItemSelected()} callback method. In your implementation of this method,
call {@link android.view.MenuItem#getItemId getItemId()} on the given {@link android.view.MenuItem} to
determine which item was pressed—the returned ID matches the value you declared in the
-corresponding {@code <item>} element's {@code android:id} attribute.</p>
+corresponding {@code <item>} element's {@code android:id} attribute.</p>
<pre>
@Override
diff --git a/docs/html/training/basics/actionbar/setting-up.jd b/docs/html/training/basics/actionbar/setting-up.jd
index bccbd04..2cd4140 100644
--- a/docs/html/training/basics/actionbar/setting-up.jd
+++ b/docs/html/training/basics/actionbar/setting-up.jd
@@ -90,8 +90,8 @@
</li>
<li>In your manifest file, update either the <a
href="{@docRoot}guide/topics/manifest/application-element.html">{@code
- <application>}</a> element or individual
- <a href="{@docRoot}guide/topics/manifest/application-element.html">{@code <activity>}</a>
+ <application>}</a> element or individual
+ <a href="{@docRoot}guide/topics/manifest/application-element.html">{@code <activity>}</a>
elements to use one of the {@link android.support.v7.appcompat.R.style#Theme_AppCompat
Theme.AppCompat} themes. For example:
<pre><activity android:theme="@style/Theme.AppCompat.Light" ... ></pre>
diff --git a/docs/html/training/basics/actionbar/styling.jd b/docs/html/training/basics/actionbar/styling.jd
index 7c63952..b658423 100644
--- a/docs/html/training/basics/actionbar/styling.jd
+++ b/docs/html/training/basics/actionbar/styling.jd
@@ -75,8 +75,8 @@
<p>You can apply these themes to your entire app or to individual activities by
declaring them in your manifest file with the {@code android:theme} attribute
for the <a href="{@docRoot}guide/topics/manifest/application-element.html">{@code
-<application>}</a> element or individual
-<a href="{@docRoot}guide/topics/manifest/application-element.html">{@code <activity>}</a>
+<application>}</a> element or individual
+<a href="{@docRoot}guide/topics/manifest/application-element.html">{@code <activity>}</a>
elements.</p>
<p>For example:</p>
diff --git a/docs/html/training/basics/activity-lifecycle/starting.jd b/docs/html/training/basics/activity-lifecycle/starting.jd
index 2501f38..5b238b8 100644
--- a/docs/html/training/basics/activity-lifecycle/starting.jd
+++ b/docs/html/training/basics/activity-lifecycle/starting.jd
@@ -152,7 +152,7 @@
<p>The main activity for your app must be declared in the manifest with an <a
href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
-<intent-filter>}</a> that includes the {@link
+<intent-filter>}</a> that includes the {@link
android.content.Intent#ACTION_MAIN MAIN} action and
{@link android.content.Intent#CATEGORY_LAUNCHER LAUNCHER} category. For example:</p>
diff --git a/docs/html/training/basics/firstapp/starting-activity.jd b/docs/html/training/basics/firstapp/starting-activity.jd
index 7aad894..4f43ea0 100644
--- a/docs/html/training/basics/firstapp/starting-activity.jd
+++ b/docs/html/training/basics/firstapp/starting-activity.jd
@@ -383,7 +383,7 @@
<li>In your manifest file, <code>AndroidManifest.xml</code>, within the <code>Application</code>
element, add the
-<a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element
+<a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element
for your {@code DisplayMessageActivity} class, as follows:
<pre>
@@ -412,7 +412,7 @@
older versions of Android by using the
<a href="{@docRoot}tools/support-library/index.html">Support Library</a> and adding
the <a href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code
-<meta-data>}</a> element as shown here.</p>
+<meta-data>}</a> element as shown here.</p>
<p class="note"><strong>Note:</strong> Your Android SDK should already include
the latest Android Support Library, which you installed during the
diff --git a/docs/html/training/basics/fragments/fragment-ui.jd b/docs/html/training/basics/fragments/fragment-ui.jd
index 1061c15..c0bd0a4 100644
--- a/docs/html/training/basics/fragments/fragment-ui.jd
+++ b/docs/html/training/basics/fragments/fragment-ui.jd
@@ -55,7 +55,7 @@
<h2 id="AddAtRuntime">Add a Fragment to an Activity at Runtime</h2>
<p>Rather than defining the fragments for an activity in the layout file—as shown in the
-<a href="creating.html">previous lesson</a> with the {@code <fragment>} element—you can add
+<a href="creating.html">previous lesson</a> with the {@code <fragment>} element—you can add
a fragment to the activity during the activity runtime. This is necessary
if you plan to change fragments during the life of the activity.</p>
@@ -140,7 +140,7 @@
</pre>
<p>Because the fragment has been added to the {@link android.widget.FrameLayout} container at
-runtime—instead of defining it in the activity's layout with a {@code <fragment>}
+runtime—instead of defining it in the activity's layout with a {@code <fragment>}
element—the activity can remove the fragment and replace it with a different one.</p>
diff --git a/docs/html/training/basics/intents/filters.jd b/docs/html/training/basics/intents/filters.jd
index 221e31b..0a6d401 100644
--- a/docs/html/training/basics/intents/filters.jd
+++ b/docs/html/training/basics/intents/filters.jd
@@ -32,9 +32,9 @@
"share" action from another app and launch your app to perform the action.</p>
<p>To allow other apps to start your activity, you need to add an <a
-href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
+href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
element in your manifest file for the corresponding <a
-href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element.</p>
+href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element.</p>
<p>When your app is installed on a device, the system identifies your intent
filters and adds the information to an internal catalog of intents supported by all installed apps.
@@ -59,14 +59,14 @@
<dd>A string naming the action to perform. Usually one of the platform-defined values such
as {@link android.content.Intent#ACTION_SEND} or {@link android.content.Intent#ACTION_VIEW}.
<p>Specify this in your intent filter with the <a
-href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a> element.
+href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a> element.
The value you specify in this element must be the full string name for the action, instead of the
API constant (see the examples below).</p></dd>
<dt>Data</dt>
<dd>A description of the data associated with the intent.
<p>Specify this in your intent filter with the <a
-href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> element. Using one
+href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> element. Using one
or more attributes in this element, you can specify just the MIME type, just a URI prefix,
just a URI scheme, or a combination of these and others that indicate the data type
accepted.</p>
@@ -81,13 +81,13 @@
supported by the system, but most are rarely used. However, all implicit intents are defined with
{@link android.content.Intent#CATEGORY_DEFAULT} by default.
<p>Specify this in your intent filter with the <a
-href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a>
+href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a>
element.</p></dd>
</dl>
<p>In your intent filter, you can declare which criteria your activity accepts
by declaring each of them with corresponding XML elements nested in the <a
-href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
+href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
element.</p>
<p>For example, here's an activity with an intent filter that handles the {@link
@@ -106,11 +106,11 @@
<p>Each incoming intent specifies only one action and one data type, but it's OK to declare multiple
instances of the <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code
-<action>}</a>, <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
-<category>}</a>, and <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code
-<data>}</a> elements in each
+<action>}</a>, <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
+<category>}</a>, and <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code
+<data>}</a> elements in each
<a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
-<intent-filter>}</a>.</p>
+<intent-filter>}</a>.</p>
<p>If any two pairs of action and data are mutually exclusive in
their behaviors, you should create separate intent filters to specify which actions are acceptable
diff --git a/docs/html/training/basics/network-ops/managing.jd b/docs/html/training/basics/network-ops/managing.jd
index 990b8cb..a645b3f 100644
--- a/docs/html/training/basics/network-ops/managing.jd
+++ b/docs/html/training/basics/network-ops/managing.jd
@@ -398,12 +398,12 @@
{@link android.app.Activity#onCreate(android.os.Bundle) onCreate()},
and it unregisters it in
{@link android.app.Activity#onDestroy onDestroy()}. This is more lightweight
-than declaring a {@code <receiver>} in the manifest. When you declare a
-{@code <receiver>} in the manifest, it can wake up your app at any time,
+than declaring a {@code <receiver>} in the manifest. When you declare a
+{@code <receiver>} in the manifest, it can wake up your app at any time,
even if you haven't run it for weeks. By registering and unregistering
{@code NetworkReceiver} within the main activity, you ensure that the app won't
be woken up after the user leaves the app.
-If you do declare a {@code <receiver>} in the manifest and you know exactly
+If you do declare a {@code <receiver>} in the manifest and you know exactly
where you need it, you can use
{@link android.content.pm.PackageManager#setComponentEnabledSetting setComponentEnabledSetting()}
to enable and disable it as appropriate.</p>
diff --git a/docs/html/training/basics/supporting-devices/languages.jd b/docs/html/training/basics/supporting-devices/languages.jd
index 098b556..e1bf657 100644
--- a/docs/html/training/basics/supporting-devices/languages.jd
+++ b/docs/html/training/basics/supporting-devices/languages.jd
@@ -106,10 +106,10 @@
<h2 id="UseString">Use the String Resources</h2>
<p>You can reference your string resources in your source code and other XML files using the
-resource name defined by the {@code <string>} element's {@code name} attribute.</p>
+resource name defined by the {@code <string>} element's {@code name} attribute.</p>
<p>In your source code, you can refer to a string resource with the syntax {@code
-R.string.<string_name>}. There are a variety of methods that accept a string resource this
+R.string.<string_name>}. There are a variety of methods that accept a string resource this
way.</p>
<p>For example:</p>
@@ -123,8 +123,8 @@
textView.setText(R.string.hello_world);
</pre>
-<p>In other XML files, you can refer to a string resource with the syntax {@code
-@string/<string_name>} whenever the XML attribute accepts a string value.</p>
+<p>In other XML files, you can refer to a string resource with the syntax
+<code>@string/<string_name></code> whenever the XML attribute accepts a string value.</p>
<p>For example:</p>
diff --git a/docs/html/training/basics/supporting-devices/platforms.jd b/docs/html/training/basics/supporting-devices/platforms.jd
index 9890c98..eecb356 100644
--- a/docs/html/training/basics/supporting-devices/platforms.jd
+++ b/docs/html/training/basics/supporting-devices/platforms.jd
@@ -52,7 +52,7 @@
describes details about your app and
identifies which versions of Android it supports. Specifically, the <code>minSdkVersion</code>
and <code>targetSdkVersion</code> attributes for the <a
-href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk}</a> element
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a> element
identify the lowest API level with which your app is compatible and the highest API level against
which you’ve designed and tested your app.</p>
@@ -128,7 +128,7 @@
<p>To apply a theme to your entire app (all activities), add the <code>android:theme</code>
attribute
to the <a href="{@docRoot}guide/topics/manifest/application-element.html">{@code
-<application>}</a> element:</p>
+<application>}</a> element:</p>
<pre><application android:theme="@style/CustomTheme"></pre>
diff --git a/docs/html/training/camera/photobasics.jd b/docs/html/training/camera/photobasics.jd
index 188b5cc..efac5483 100644
--- a/docs/html/training/camera/photobasics.jd
+++ b/docs/html/training/camera/photobasics.jd
@@ -58,7 +58,7 @@
its visibility on Google Play to devices that have a camera. To advertise
that your application depends on having a camera, put a <a
href="{@docRoot}guide/topics/manifest/uses-feature-element.html"> {@code
-<uses-feature>}</a> tag in your manifest file:</p>
+<uses-feature>}</a> tag in your manifest file:</p>
<pre style="clear:right">
<manifest ... >
diff --git a/docs/html/training/camera/videobasics.jd b/docs/html/training/camera/videobasics.jd
index 135d4a1..6da239a 100644
--- a/docs/html/training/camera/videobasics.jd
+++ b/docs/html/training/camera/videobasics.jd
@@ -52,7 +52,7 @@
<h2 id="TaskManifest">Request Camera Permission</h2>
<p>To advertise that your application depends on having a camera, put a
-{@code <uses-feature>} tag in the manifest file:</p>
+{@code <uses-feature>} tag in the manifest file:</p>
<pre style="clear:right">
<manifest ... >
diff --git a/docs/html/training/custom-views/create-view.jd b/docs/html/training/custom-views/create-view.jd
index 11be85f..a476bbe 100644
--- a/docs/html/training/custom-views/create-view.jd
+++ b/docs/html/training/custom-views/create-view.jd
@@ -84,7 +84,7 @@
<ul>
<li>Define custom attributes for your view in a {@code
- <declare-styleable>
+ <declare-styleable>
} resource element
</li>
<li>Specify values for the attributes in your XML layout</li>
@@ -97,7 +97,7 @@
retrieving and applying the values at runtime.</p>
<p>To define custom attributes, add {@code
- <declare-styleable>
+ <declare-styleable>
} resources to your project. It's customary to put these resources into a {@code
res/values/attrs.xml} file. Here's
an example of an {@code attrs.xml} file:
@@ -179,7 +179,7 @@
<p>The Android resource compiler does a lot of work for you to make calling {@link
android.content.res.Resources.Theme#obtainStyledAttributes obtainStyledAttributes()}
- easier. For each {@code <declare-styleable>}
+ easier. For each {@code <declare-styleable>}
resource in the res directory, the generated R.java defines both an array of attribute
ids and a set of
constants that define the index for each attribute in the array. You use the predefined
diff --git a/docs/html/training/displaying-bitmaps/manage-memory.jd b/docs/html/training/displaying-bitmaps/manage-memory.jd
index 5a5c2cd..b7c72bc 100644
--- a/docs/html/training/displaying-bitmaps/manage-memory.jd
+++ b/docs/html/training/displaying-bitmaps/manage-memory.jd
@@ -78,7 +78,7 @@
{@link android.graphics.Bitmap#recycle recycle()} only when you are sure that the
bitmap is no longer being used. If you call {@link android.graphics.Bitmap#recycle recycle()}
and later attempt to draw the bitmap, you will get the error:
-{@code "Canvas: trying to use a recycled bitmap"}.</p>
+<code>"Canvas: trying to use a recycled bitmap"</code>.</p>
<p>The following code snippet gives an example of calling
{@link android.graphics.Bitmap#recycle recycle()}. It uses reference counting
diff --git a/docs/html/training/gestures/detector.jd b/docs/html/training/gestures/detector.jd
index a8e0fdb..97f039c 100644
--- a/docs/html/training/gestures/detector.jd
+++ b/docs/html/training/gestures/detector.jd
@@ -186,7 +186,7 @@
<p>In the following snippet, a return value of {@code true} from the individual
-{@code on<em><TouchEvent></em>} methods indicates that you
+<code>on<em><TouchEvent></em></code> methods indicates that you
have handled the touch event. A return value of {@code false} passes events down
through the view stack until the touch has been successfully handled.</p>
@@ -286,7 +286,7 @@
<p>
{@link
android.view.GestureDetector.SimpleOnGestureListener} provides an implementation
-for all of the {@code on<em><TouchEvent></em>} methods by returning {@code false}
+for all of the <code>on<em><TouchEvent></em></code> methods by returning {@code false}
for all of them. Thus you can override only the methods you care about.
For
example, the snippet below creates a class that extends {@link
diff --git a/docs/html/training/gestures/movement.jd b/docs/html/training/gestures/movement.jd
index 136b37a..ed4928e 100644
--- a/docs/html/training/gestures/movement.jd
+++ b/docs/html/training/gestures/movement.jd
@@ -73,8 +73,8 @@
<li>History. You can find the size of a gesture's history by calling the {@link
android.view.MotionEvent} method {@link android.view.MotionEvent#getHistorySize
getHistorySize()}. You can then obtain the positions, sizes, time, and pressures
-of each of the historical events by using the motion event's {@code
-getHistorical<em><Value></em>} methods. History is useful when rendering a trail of the user's finger,
+of each of the historical events by using the motion event's
+<code>getHistorical<em><Value></em></code> methods. History is useful when rendering a trail of the user's finger,
such as for touch drawing. See the {@link android.view.MotionEvent} reference for
details.</li>
diff --git a/docs/html/training/id-auth/custom_auth.jd b/docs/html/training/id-auth/custom_auth.jd
index 0509c6e..def9b51 100644
--- a/docs/html/training/id-auth/custom_auth.jd
+++ b/docs/html/training/id-auth/custom_auth.jd
@@ -148,7 +148,7 @@
href="http://developer.android.com/resources/samples/SampleSyncAdapter/index.html">
SampleSyncAdapter</a> contains a good example of an authenticator service.</p>
-<p>Don't forget to add a {@code <service>} tag to your manifest file
+<p>Don't forget to add a {@code <service>} tag to your manifest file
and add an intent filter for the AccountAuthenticator intent and declare the account
authenticator:</p>
diff --git a/docs/html/training/id-auth/identify.jd b/docs/html/training/id-auth/identify.jd
index 2b31bdd..db9ab3a 100644
--- a/docs/html/training/id-auth/identify.jd
+++ b/docs/html/training/id-auth/identify.jd
@@ -83,7 +83,7 @@
<p>In order to get a list of accounts on the device, your app needs the {@link
android.Manifest.permission#GET_ACCOUNTS}
permission. Add a <a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">{@code
-<uses-permission>}</a> tag in your manifest file to request
+<uses-permission>}</a> tag in your manifest file to request
this permission:</p>
<pre>
diff --git a/docs/html/training/implementing-navigation/ancestral.jd b/docs/html/training/implementing-navigation/ancestral.jd
index 8aa0fd6..29e1710 100644
--- a/docs/html/training/implementing-navigation/ancestral.jd
+++ b/docs/html/training/implementing-navigation/ancestral.jd
@@ -65,14 +65,14 @@
activity by specifying the <a
href="{@docRoot}guide/topics/manifest/activity-element.html#parent">{@code
android:parentActivityName}</a> attribute
-in the <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
+in the <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
element.</p>
<p>If your app supports Android 4.0 and lower, include the
<a href="{@docRoot}tools/support-library/index.html">Support Library</a> with your app and
-add a <a href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code <meta-data>}</a>
+add a <a href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code <meta-data>}</a>
element inside the <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code
-<activity>}</a>. Then specify the parent activity as the value
+<activity>}</a>. Then specify the parent activity as the value
for {@code android.support.PARENT_ACTIVITY}, matching the <a
href="{@docRoot}guide/topics/manifest/activity-element.html#parent">{@code
android:parentActivityName}</a> attribute.</p>
@@ -140,14 +140,14 @@
<ul>
<li>If the parent activity has launch mode <a
href="{@docRoot}guide/topics/manifest/activity-element.html#lmode">{@code
- <singleTop>}</a>, or the <code>up</code> intent contains {@link
+ <singleTop>}</a>, or the <code>up</code> intent contains {@link
android.content.Intent#FLAG_ACTIVITY_CLEAR_TOP}, the parent activity is
brought to the top of the stack, and receives the intent through its
{@link android.app.Activity#onNewIntent onNewIntent()} method.</li>
<li>If the parent activity has launch mode <a
href="{@docRoot}guide/topics/manifest/activity-element.html#lmode">{@code
- <standard>}</a>, and the <code>up</code> intent does not contain
+ <standard>}</a>, and the <code>up</code> intent does not contain
{@link android.content.Intent#FLAG_ACTIVITY_CLEAR_TOP}, the parent activity
is popped off the stack, and a new instance of that activity is created on
top of the stack to receive the intent.</li>
@@ -226,5 +226,5 @@
you must declare the logical parent of each activity in your manifest file, using the
<a href="{@docRoot}guide/topics/manifest/activity-element.html#parent">{@code
android:parentActivityName}</a> attribute (and corresponding <a
-href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code <meta-data>}</a> element)
+href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code <meta-data>}</a> element)
as described above.</p>
diff --git a/docs/html/training/implementing-navigation/lateral.jd b/docs/html/training/implementing-navigation/lateral.jd
index 9c83479..01ef599 100644
--- a/docs/html/training/implementing-navigation/lateral.jd
+++ b/docs/html/training/implementing-navigation/lateral.jd
@@ -62,7 +62,7 @@
a separate page (a separate tab) in the layout.</p>
<p>To set up your layout with {@link android.support.v4.view.ViewPager}, add a
-{@code <ViewPager>} element to your XML layout. For example, if each page in the swipe view
+{@code <ViewPager>} element to your XML layout. For example, if each page in the swipe view
should consume the entire layout, then your layout looks like this:</p>
<pre>
diff --git a/docs/html/training/implementing-navigation/temporal.jd b/docs/html/training/implementing-navigation/temporal.jd
index e736648..cbe1333 100644
--- a/docs/html/training/implementing-navigation/temporal.jd
+++ b/docs/html/training/implementing-navigation/temporal.jd
@@ -80,15 +80,15 @@
href="{@docRoot}guide/topics/manifest/activity-element.html#parent">{@code
android:parentActivityName}</a> attribute
in the <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code
-<activity>}</a> element. This allows the system to facilitate navigation patterns
+<activity>}</a> element. This allows the system to facilitate navigation patterns
because it can determine the logical <em>Back</em> or <em>Up</em> navigation path with this
information.</p>
<p>If your app supports Android 4.0 and lower, include the
<a href="{@docRoot}tools/support-library/index.html">Support Library</a> with your app and
-add a <a href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code <meta-data>}</a>
+add a <a href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code <meta-data>}</a>
element inside the <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code
-<activity>}</a>. Then specify the parent activity as the value
+<activity>}</a>. Then specify the parent activity as the value
for {@code android.support.PARENT_ACTIVITY}, matching the <a
href="{@docRoot}guide/topics/manifest/activity-element.html#parent">{@code
android:parentActivityName}</a> attribute.</p>
@@ -165,7 +165,7 @@
you must declare the logical parent of each activity in your manifest file, using the
<a href="{@docRoot}guide/topics/manifest/activity-element.html#parent">{@code
android:parentActivityName}</a> attribute (and corresponding <a
-href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code <meta-data>}</a> element)
+href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code <meta-data>}</a> element)
as described above.</p>
diff --git a/docs/html/training/improving-layouts/loading-ondemand.jd b/docs/html/training/improving-layouts/loading-ondemand.jd
index 9abd8fa..770157f 100644
--- a/docs/html/training/improving-layouts/loading-ondemand.jd
+++ b/docs/html/training/improving-layouts/loading-ondemand.jd
@@ -81,7 +81,7 @@
android.view.ViewStub} layout is visible/inflated.)</p>
<p class="note"><strong>Note:</strong> One drawback of {@link android.view.ViewStub} is that it
-doesn’t currently support the {@code <merge/>} tag in the layouts to be inflated.</p>
+doesn’t currently support the {@code <merge>} tag in the layouts to be inflated.</p>
diff --git a/docs/html/training/improving-layouts/optimizing-layout.jd b/docs/html/training/improving-layouts/optimizing-layout.jd
index 003e7a2..e0baedf 100644
--- a/docs/html/training/improving-layouts/optimizing-layout.jd
+++ b/docs/html/training/improving-layouts/optimizing-layout.jd
@@ -71,7 +71,7 @@
<p class="img-caption"><strong>Figure 1.</strong> Conceptual layout for an item in a {@link
android.widget.ListView}.</p>
-<p>The {@code hierarchyviewer} tool is available in {@code <sdk>/tools/}. When opened,
+<p>The {@code hierarchyviewer} tool is available in {@code <sdk>/tools/}. When opened,
the Hierarchy Viewer shows a list of available devices and its running components. Click
<strong>Load View Hierarchy</strong> to view the layout hierarchy of the selected component. For
example, figure 2 shows the layout for the list item illustrated by figure 1.</p>
diff --git a/docs/html/training/improving-layouts/reusing-layouts.jd b/docs/html/training/improving-layouts/reusing-layouts.jd
index 87431d3..7b0185d 100644
--- a/docs/html/training/improving-layouts/reusing-layouts.jd
+++ b/docs/html/training/improving-layouts/reusing-layouts.jd
@@ -37,7 +37,7 @@
<p>Although Android offers a variety of widgets to provide small and re-usable interactive elements,
you might also need to re-use larger components that require a special layout. To efficiently
-re-use complete layouts, you can use the {@code <include/>} and {@code <merge/>} tags
+re-use complete layouts, you can use the {@code <include/>} and {@code <merge/>} tags
to embed another layout inside the current layout.</p>
<p>Reusing layouts is particularly powerful as it allows you create reusable complex layouts. For
@@ -73,7 +73,7 @@
<h2 id="Include">Use the <include> Tag</h2>
<p>Inside the layout to which you want to add the re-usable component, add the {@code
-<include/>} tag. For example, here's a layout from the
+<include/>} tag. For example, here's a layout from the
G-Kenya codelab that includes the title bar from above:</p>
<p>Here's the layout file:</p>
@@ -99,7 +99,7 @@
</pre>
<p>You can also override all the layout parameters (any {@code android:layout_*} attributes) of the
-included layout's root view by specifying them in the {@code <include/>} tag. For
+included layout's root view by specifying them in the {@code <include/>} tag. For
example:</p>
<pre>
@@ -117,7 +117,7 @@
<h2 id="Merge">Use the <merge> Tag</h2>
-<p>The {@code <merge />} tag helps eliminate redundant view groups in your view hierarchy
+<p>The {@code <merge />} tag helps eliminate redundant view groups in your view hierarchy
when including one layout within another. For example, if your main layout is a vertical {@link
android.widget.LinearLayout} in which two consecutive views can be
re-used in multiple layouts, then the re-usable layout in which you place the two views requires its
@@ -127,7 +127,7 @@
serves no real purpose other than to slow down your UI performance.</p>
<p>To avoid including such a redundant view group, you can instead use the
-{@code <merge>} element as the root view for the re-usable layout. For example:</p>
+{@code <merge>} element as the root view for the re-usable layout. For example:</p>
<pre>
<merge xmlns:android="http://schemas.android.com/apk/res/android">
@@ -145,7 +145,7 @@
</merge>
</pre>
-<p>Now, when you include this layout in another layout (using the {@code <include/>} tag), the
-system ignores the {@code <merge>} element and places the two buttons directly in the
-layout, in place of the {@code <include/>} tag.</p>
+<p>Now, when you include this layout in another layout (using the {@code <include/>} tag), the
+system ignores the {@code <merge>} element and places the two buttons directly in the
+layout, in place of the {@code <include/>} tag.</p>
diff --git a/docs/html/training/in-app-billing/preparing-iab-app.jd b/docs/html/training/in-app-billing/preparing-iab-app.jd
index 17cd0d51..42bc947 100644
--- a/docs/html/training/in-app-billing/preparing-iab-app.jd
+++ b/docs/html/training/in-app-billing/preparing-iab-app.jd
@@ -41,7 +41,7 @@
<li>Select <strong>Google Play Billing Library</strong>.</li>
<li>Click <strong>Install packages</strong> to complete the download.</li>
</ol>
-<p>The sample files will be installed to {@code <sdk>/extras/google/play_billing/}.</p>
+<p>The sample files will be installed to {@code <sdk>/extras/google/play_billing/}.</p>
<h2 id="AddToDevConsole">Add Your Application to the Developer Console</h2>
<p>The Google Play Developer Console is where you publish your In-app Billing application and manage the various digital goods that are available for purchase from your application. When you create a new application entry in the Developer Console, it automatically generates a public license key for your application. You will need this key to establish a trusted connection from your application to the Google Play servers. You only need to generate this key once per application, and don’t need to repeat these steps when you update the APK file for your application.</p>
diff --git a/docs/html/training/keyboard-input/visibility.jd b/docs/html/training/keyboard-input/visibility.jd
index 5dc6fc260..258884ae 100644
--- a/docs/html/training/keyboard-input/visibility.jd
+++ b/docs/html/training/keyboard-input/visibility.jd
Binary files differ
diff --git a/docs/html/training/location/display-address.jd b/docs/html/training/location/display-address.jd
index 516f14f..8606629 100644
--- a/docs/html/training/location/display-address.jd
+++ b/docs/html/training/location/display-address.jd
@@ -131,7 +131,7 @@
</manifest>
</pre>
-<p class="note"><strong>Note:</strong> The {@code <service>} element in
+<p class="note"><strong>Note:</strong> The {@code <service>} element in
the manifest doesn't need to include an intent filter, because your main
activity creates an explicit intent by specifying the name of the class to use
for the intent.</p>
diff --git a/docs/html/training/scheduling/alarms.jd b/docs/html/training/scheduling/alarms.jd
index 8373d95..b332cb7 100644
--- a/docs/html/training/scheduling/alarms.jd
+++ b/docs/html/training/scheduling/alarms.jd
@@ -348,7 +348,7 @@
<p>Notice that in the manifest, the boot receiver is set to
-{@code android:enabled="false"}. This means that the receiver will not be called
+<code>android:enabled="false"</code>. This means that the receiver will not be called
unless the application explicitly enables it. This prevents the boot receiver from being
called unnecessarily. You can enable a receiver (for example, if the user sets an alarm)
as follows:</p>
diff --git a/docs/html/training/testing/ui-testing/uiautomator-testing.jd b/docs/html/training/testing/ui-testing/uiautomator-testing.jd
index a0050a8..d0defd8 100644
--- a/docs/html/training/testing/ui-testing/uiautomator-testing.jd
+++ b/docs/html/training/testing/ui-testing/uiautomator-testing.jd
@@ -119,7 +119,7 @@
<ol>
<li>Launch the target app on a physical device.</li>
<li>Connect the device to your development machine.</li>
- <li>Open a terminal window and navigate to the {@code <android-sdk>/tools/} directory.</li>
+ <li>Open a terminal window and navigate to the {@code <android-sdk>/tools/} directory.</li>
<li>Run the tool with this command:
<pre>$ uiautomatorviewer</pre>
</li>
diff --git a/docs/html/training/testing/unit-testing/instrumented-unit-tests.jd b/docs/html/training/testing/unit-testing/instrumented-unit-tests.jd
index 81921f8..9906d8c 100644
--- a/docs/html/training/testing/unit-testing/instrumented-unit-tests.jd
+++ b/docs/html/training/testing/unit-testing/instrumented-unit-tests.jd
@@ -91,7 +91,7 @@
creating JUnit 4 test classes and using JUnit 4 assertions and annotations, see
<a href="local-unit-tests.html#build">Create a Local Unit Test Class</a>.
</p>
-<p>To create an instrumented JUnit 4 test class, add the {@code @RunWith(AndroidJUnit4.class)}
+<p>To create an instrumented JUnit 4 test class, add the {@code @RunWith(AndroidJUnit4.class)}
annotation at the beginning of your test class definition. You also need to specify the
<a href="{@docRoot}reference/android/support/test/runner/AndroidJUnitRunner.html">
{@code AndroidJUnitRunner}</a> class
@@ -168,8 +168,8 @@
class="external-link">{@code RunWith}</a> and
<a href="http://junit.sourceforge.net/javadoc/org/junit/runners/Suite.html"
class="external-link">{@code Suite}</a> classes. In your test suite, add the
-{@code @RunWith(Suite.class)} and the {@code @Suite.SuitClasses()} annotations. In
-the {@code @Suite.SuiteClasses()} annotation, list the individual test classes or test
+{@code @RunWith(Suite.class)} and the {@code @Suite.SuitClasses()} annotations. In
+the {@code @Suite.SuiteClasses()} annotation, list the individual test classes or test
suites as arguments.
</p>
@@ -245,6 +245,6 @@
</pre>
<p>You can find the generated HTML test result reports in the
-{@code <path_to_your_project>/app/build/outputs/reports/androidTests/connected/} directory,
+{@code <path_to_your_project>/app/build/outputs/reports/androidTests/connected/} directory,
and the corresponding XML files in the
-{@code <path_to_your_project>/app/build/outputs/androidTest-results/connected/} directory.</p>
\ No newline at end of file
+{@code <path_to_your_project>/app/build/outputs/androidTest-results/connected/} directory.</p>
\ No newline at end of file
diff --git a/docs/html/training/testing/unit-testing/local-unit-tests.jd b/docs/html/training/testing/unit-testing/local-unit-tests.jd
index 421709b..8221a6d 100644
--- a/docs/html/training/testing/unit-testing/local-unit-tests.jd
+++ b/docs/html/training/testing/unit-testing/local-unit-tests.jd
@@ -89,7 +89,7 @@
{@code junit.extensions} package.</p>
<p>To create a basic JUnit 4 test class, create a Java class that contains one or more test methods.
-A test method begins with the {@code @Test} annotation and contains the code to exercise
+A test method begins with the {@code @Test} annotation and contains the code to exercise
and verify a single functionality in the component that you want to test.</p>
<p>The following example shows how you might implement a local unit test class. The test method
@@ -125,32 +125,32 @@
<ul>
<li>
-{@code @Before}: Use this annotation to specify a block of code with test setup operations. This
-code block will be invoked before each test. You can have multiple {@code @Before} methods but
+{@code @Before}: Use this annotation to specify a block of code with test setup operations. This
+code block will be invoked before each test. You can have multiple {@code @Before} methods but
the order which these methods are called is not fixed.
</li>
<li>
-{@code @After}: This annotation specifies a block of code with test tear-down operations. This
-code block will be called after every test method. You can define multiple {@code @After}
+{@code @After}: This annotation specifies a block of code with test tear-down operations. This
+code block will be called after every test method. You can define multiple {@code @After}
operations in your test code. Use this annotation to release any resources from memory.
</li>
<li>
-{@code @Test}: Use this annotation to mark a test method. A single test class can contain
+{@code @Test}: Use this annotation to mark a test method. A single test class can contain
multiple test methods, each prefixed with this annotation.
</li>
<li>
-{@code @BeforeClass}: Use this annotation to specify static methods to be invoked only once per
+{@code @BeforeClass}: Use this annotation to specify static methods to be invoked only once per
test class. This testing step is useful for expensive operations such as connecting to a database.
</li>
<li>
-{@code @AfterClass}: Use this annotation to specify static methods to be invoked only after all
+{@code @AfterClass}: Use this annotation to specify static methods to be invoked only after all
tests in the class have been run. This testing step is useful for releasing any resources allocated
-in the {@code @BeforeClass} block.
+in the {@code @BeforeClass} block.
</li>
<li>
-{@code @Test(timeout=<milliseconds>)}: Specifies a timeout period for the test. If the
+{@code @Test(timeout=<milliseconds>)}: Specifies a timeout period for the test. If the
test starts but does not complete within the given timeout period, it automatically fails. You must
-specify the timeout period in milliseconds, for example: {@code @Test(timeout=5000)}.
+specify the timeout period in milliseconds, for example: {@code @Test(timeout=5000)}.
</li>
</ul>
@@ -179,11 +179,11 @@
<a href="#setup">Set Up Your Testing Environment</a>.
</li>
<li>At the beginning of your unit test class definition, add the
-{@code @RunWith(MockitoJUnitRunner.class)} annotation. This annotation tells the Mockito test
+{@code @RunWith(MockitoJUnitRunner.class)} annotation. This annotation tells the Mockito test
runner to validate that your usage of the framework is correct and simplifies the initialization of
your mock objects.
</li>
-<li>To create a mock object for an Android dependency, add the {@code @Mock} annotation before
+<li>To create a mock object for an Android dependency, add the {@code @Mock} annotation before
the field declaration.</li>
<li>To stub the behavior of the dependency, you can specify a condition and return
value when the condition is met by using the {@code when()} and {@code thenReturn()} methods.
@@ -298,5 +298,5 @@
<p>If there are failing tests, the command will display links to HTML reports (one per build
variant). You can find the generated HTML test result reports in the
-{@code <path_to_your_project>/app/build/reports/tests/} directory, and the corresponding XML
-files in the {@code <path_to_your_project>/app/build/test-results/} directory.</p>
\ No newline at end of file
+{@code <path_to_your_project>/app/build/reports/tests/} directory, and the corresponding XML
+files in the {@code <path_to_your_project>/app/build/test-results/} directory.</p>
\ No newline at end of file
diff --git a/docs/html/training/tv/discovery/searchable.jd b/docs/html/training/tv/discovery/searchable.jd
index 4ca7abb..bbcb56e 100644
--- a/docs/html/training/tv/discovery/searchable.jd
+++ b/docs/html/training/tv/discovery/searchable.jd
@@ -238,7 +238,7 @@
<p>In your manifest file, the content provider receives special treatment. Rather than getting
tagged as an activity, it is described as a
-<a href="{@docRoot}guide/topics/manifest/provider-element.html">{@code <provider>}</a>. The
+<a href="{@docRoot}guide/topics/manifest/provider-element.html">{@code <provider>}</a>. The
provider includes the {@code android:searchSuggestAuthority} attribute to tell the system the
namespace of your content provider. Also, you must set its {@code android:exported} attribute to
{@code "true"} so that the Android global search can use the results returned from it.</p>
@@ -257,7 +257,7 @@
{@code android:searchSuggestAuthority}</a> attribute to tell the system the namespace of your
content provider. This must match the string value you specify in the
<a href="{@docRoot}guide/topics/manifest/provider-element.html#auth">{@code android:authorities}</a>
-attribute of the <a href="{@docRoot}guide/topics/manifest/provider-element.html">{@code <provider>}
+attribute of the <a href="{@docRoot}guide/topics/manifest/provider-element.html">{@code <provider>}
</a> element in your {@code AndroidManifest.xml} file.</p>
The <a href="{@docRoot}guide/topics/search/searchable-config.html">{@code searchable.xml}</a> file
@@ -339,7 +339,7 @@
<a href="{@docRoot}guide/topics/search/searchable-config.html">{@code searchable.xml}</a> file.
To <a href="{@docRoot}guide/topics/search/search-dialog.html">use the global search dialog</a>,
the manifest must describe which activity should receive search queries. The manifest must also
-describe the <a href="{@docRoot}guide/topics/manifest/provider-element.html">{@code <provider>}
+describe the <a href="{@docRoot}guide/topics/manifest/provider-element.html">{@code <provider>}
</a>element, exactly as it is described in the <a href="{@docRoot}guide/topics/search/searchable-config.html">
{@code searchable.xml}</a> file.</p>
diff --git a/docs/html/training/tv/start/start.jd b/docs/html/training/tv/start/start.jd
index e55e202..4d04ad6 100644
--- a/docs/html/training/tv/start/start.jd
+++ b/docs/html/training/tv/start/start.jd
@@ -233,7 +233,7 @@
<p>
The Android SDK includes support libraries that are intended for use with TV apps. These
libraries provide APIs and user interface widgets for use on TV devices. The libraries are
- located in the {@code <sdk>/extras/android/support/} directory. Here is a list of the
+ located in the {@code <sdk>/extras/android/support/} directory. Here is a list of the
libraries and their general purpose:
</p>
diff --git a/docs/html/training/volley/request-custom.jd b/docs/html/training/volley/request-custom.jd
index 7b669b9..c62c254 100644
--- a/docs/html/training/volley/request-custom.jd
+++ b/docs/html/training/volley/request-custom.jd
@@ -36,12 +36,12 @@
<ul>
-<li>Extend the {@code Request<T>} class, where
-{@code <T>} represents the type of parsed response
+<li>Extend the {@code Request<T>} class, where
+{@code <T>} represents the type of parsed response
the request expects. So if your parsed response is a string, for example,
-create your custom request by extending {@code Request<String>}. See the Volley
+create your custom request by extending {@code Request<String>}. See the Volley
toolbox classes {@code StringRequest} and {@code ImageRequest} for examples of
-extending {@code Request<T>}.</li>
+extending {@code Request<T>}.</li>
<li>Implement the abstract methods {@code parseNetworkResponse()}
and {@code deliverResponse()}, described in more detail below.</li>
@@ -74,7 +74,7 @@
<ul>
<li>{@code parseNetworkResponse()} takes as its parameter a {@code NetworkResponse}, which
contains the response payload as a byte[], HTTP status code, and response headers.</li>
-<li>Your implementation must return a {@code Response<T>}, which contains your typed
+<li>Your implementation must return a {@code Response<T>}, which contains your typed
response object and cache metadata or an error, such as in the case of a parse failure.</li>
</ul>
diff --git a/graphics/java/android/graphics/drawable/AnimationDrawable.java b/graphics/java/android/graphics/drawable/AnimationDrawable.java
index 6bf3afd..0fd1741 100644
--- a/graphics/java/android/graphics/drawable/AnimationDrawable.java
+++ b/graphics/java/android/graphics/drawable/AnimationDrawable.java
@@ -40,8 +40,8 @@
* animation.
* <p>
* An AnimationDrawable defined in XML consists of a single
- * {@code <animation-list>} element and a series of nested
- * {@code <item>} tags. Each item defines a frame of the animation. See
+ * {@code <animation-list>} element and a series of nested
+ * {@code <item>} tags. Each item defines a frame of the animation. See
* the example below.
* <p>
* spin_animation.xml file in res/drawable/ folder:
diff --git a/graphics/java/android/graphics/drawable/ScaleDrawable.java b/graphics/java/android/graphics/drawable/ScaleDrawable.java
index f87c19a..330266f 100644
--- a/graphics/java/android/graphics/drawable/ScaleDrawable.java
+++ b/graphics/java/android/graphics/drawable/ScaleDrawable.java
@@ -50,7 +50,7 @@
* {@code android.R.styleable#ScaleDrawable_scaleHeight scaleHeight}. At run
* time, the level may be set via {@link #setLevel(int)}.
* <p>
- * A scale drawable may be defined in an XML file with the {@code <scale>}
+ * A scale drawable may be defined in an XML file with the {@code <scale>}
* element. For more information, see the guide to
* <a href="{@docRoot}guide/topics/resources/drawable-resource.html">Drawable
* Resources</a>.
diff --git a/keystore/java/android/security/KeyChain.java b/keystore/java/android/security/KeyChain.java
index 5b2594d..40fb0d3 100644
--- a/keystore/java/android/security/KeyChain.java
+++ b/keystore/java/android/security/KeyChain.java
@@ -457,9 +457,9 @@
* KeyFactory keyFactory =
* KeyFactory.getInstance(key.getAlgorithm(), "AndroidKeyStore");
* KeyInfo keyInfo = keyFactory.getKeySpec(key, KeyInfo.class);
- * if (keyInfo.isInsideSecureHardware()) {
+ * if (keyInfo.isInsideSecureHardware()) {
* // The key is bound to the secure hardware of this Android
- * }}</pre>
+ * }}</pre>
*/
@Deprecated
public static boolean isBoundKeyAlgorithm(
diff --git a/keystore/java/android/security/keystore/KeyInfo.java b/keystore/java/android/security/keystore/KeyInfo.java
index 785ec15..7cf4b04 100644
--- a/keystore/java/android/security/keystore/KeyInfo.java
+++ b/keystore/java/android/security/keystore/KeyInfo.java
@@ -38,32 +38,30 @@
* <p><h3>Example: Symmetric Key</h3>
* The following example illustrates how to obtain a {@code KeyInfo} describing the provided Android
* Keystore {@link SecretKey}.
- * <pre> {@code
+ * <pre>{@code
* SecretKey key = ...; // Android Keystore key
*
* SecretKeyFactory factory = SecretKeyFactory.getInstance(key.getAlgorithm(), "AndroidKeyStore");
* KeyInfo keyInfo;
- * try {
+ * try {
* keyInfo = (KeyInfo) factory.getKeySpec(key, KeyInfo.class);
- * } catch (InvalidKeySpecException e) {
+ * } catch (InvalidKeySpecException e) {
* // Not an Android KeyStore key.
- * }
- * }</pre>
+ * }}</pre>
*
* <p><h3>Example: Private Key</h3>
* The following example illustrates how to obtain a {@code KeyInfo} describing the provided
* Android KeyStore {@link PrivateKey}.
- * <pre> {@code
+ * <pre>{@code
* PrivateKey key = ...; // Android KeyStore key
*
* KeyFactory factory = KeyFactory.getInstance(key.getAlgorithm(), "AndroidKeyStore");
* KeyInfo keyInfo;
- * try {
+ * try {
* keyInfo = factory.getKeySpec(key, KeyInfo.class);
- * } catch (InvalidKeySpecException e) {
+ * } catch (InvalidKeySpecException e) {
* // Not an Android KeyStore key.
- * }
- * }</pre>
+ * }}</pre>
*/
public class KeyInfo implements KeySpec {
private final String mKeystoreAlias;
diff --git a/libs/hwui/Android.mk b/libs/hwui/Android.mk
index fc4916c..d98497b 100644
--- a/libs/hwui/Android.mk
+++ b/libs/hwui/Android.mk
@@ -30,7 +30,6 @@
utils/StringUtils.cpp \
utils/TestWindowContext.cpp \
utils/VectorDrawableUtils.cpp \
- utils/TestUtils.cpp \
AmbientShadow.cpp \
AnimationContext.cpp \
Animator.cpp \
@@ -90,6 +89,9 @@
VectorDrawablePath.cpp \
protos/hwui.proto
+hwui_test_common_src_files := \
+ tests/common/TestUtils.cpp
+
hwui_cflags := \
-DEGL_EGLEXT_PROTOTYPES -DGL_GLEXT_PROTOTYPES \
-DATRACE_TAG=ATRACE_TAG_VIEW -DLOG_TAG=\"OpenGLRenderer\" \
@@ -180,8 +182,8 @@
-DHWUI_NULL_GPU
LOCAL_SRC_FILES := \
$(hwui_src_files) \
- tests/nullegl.cpp \
- tests/nullgles.cpp
+ tests/common/nullegl.cpp \
+ tests/common/nullgles.cpp
LOCAL_C_INCLUDES := $(hwui_c_includes) $(call hwui_proto_include)
LOCAL_EXPORT_C_INCLUDE_DIRS := $(hwui_c_includes) $(call hwui_proto_include)
@@ -215,28 +217,29 @@
-DHWUI_NULL_GPU
LOCAL_SRC_FILES += \
- unit_tests/CanvasStateTests.cpp \
- unit_tests/ClipAreaTests.cpp \
- unit_tests/DamageAccumulatorTests.cpp \
- unit_tests/DeviceInfoTests.cpp \
- unit_tests/FatVectorTests.cpp \
- unit_tests/LayerUpdateQueueTests.cpp \
- unit_tests/LinearAllocatorTests.cpp \
- unit_tests/VectorDrawableTests.cpp \
- unit_tests/OffscreenBufferPoolTests.cpp \
- unit_tests/StringUtilsTests.cpp
+ $(hwui_test_common_src_files) \
+ tests/unit/CanvasStateTests.cpp \
+ tests/unit/ClipAreaTests.cpp \
+ tests/unit/DamageAccumulatorTests.cpp \
+ tests/unit/DeviceInfoTests.cpp \
+ tests/unit/FatVectorTests.cpp \
+ tests/unit/LayerUpdateQueueTests.cpp \
+ tests/unit/LinearAllocatorTests.cpp \
+ tests/unit/VectorDrawableTests.cpp \
+ tests/unit/OffscreenBufferPoolTests.cpp \
+ tests/unit/StringUtilsTests.cpp
ifeq (true, $(HWUI_NEW_OPS))
LOCAL_SRC_FILES += \
- unit_tests/BakedOpStateTests.cpp \
- unit_tests/RecordingCanvasTests.cpp \
- unit_tests/OpReordererTests.cpp
+ tests/unit/BakedOpStateTests.cpp \
+ tests/unit/RecordingCanvasTests.cpp \
+ tests/unit/OpReordererTests.cpp
endif
include $(BUILD_NATIVE_TEST)
# ------------------------
-# test app
+# Macro-bench app
# ------------------------
include $(CLEAR_VARS)
@@ -255,11 +258,12 @@
LOCAL_WHOLE_STATIC_LIBRARIES := libhwui_static
LOCAL_SRC_FILES += \
- tests/TestContext.cpp \
- tests/TestSceneRunner.cpp \
- tests/main.cpp
+ $(hwui_test_common_src_files) \
+ tests/macrobench/TestContext.cpp \
+ tests/macrobench/TestSceneRunner.cpp \
+ tests/macrobench/main.cpp
-LOCAL_SRC_FILES += $(call all-cpp-files-under, tests/scenes)
+LOCAL_SRC_FILES += $(call all-cpp-files-under, tests/common/scenes)
include $(BUILD_EXECUTABLE)
@@ -285,14 +289,15 @@
LOCAL_STATIC_LIBRARIES := libbenchmark libbase
LOCAL_SRC_FILES += \
- microbench/DisplayListCanvasBench.cpp \
- microbench/LinearAllocatorBench.cpp \
- microbench/PathParserBench.cpp \
- microbench/ShadowBench.cpp
+ $(hwui_test_common_src_files) \
+ tests/microbench/DisplayListCanvasBench.cpp \
+ tests/microbench/LinearAllocatorBench.cpp \
+ tests/microbench/PathParserBench.cpp \
+ tests/microbench/ShadowBench.cpp
ifeq (true, $(HWUI_NEW_OPS))
LOCAL_SRC_FILES += \
- microbench/OpReordererBench.cpp
+ tests/microbench/OpReordererBench.cpp
endif
include $(BUILD_EXECUTABLE)
diff --git a/libs/hwui/TextDropShadowCache.cpp b/libs/hwui/TextDropShadowCache.cpp
index 996ac8e..51f1652 100644
--- a/libs/hwui/TextDropShadowCache.cpp
+++ b/libs/hwui/TextDropShadowCache.cpp
@@ -83,7 +83,7 @@
if (!lhs.positions) return -1;
if (!rhs.positions) return +1;
- return memcmp(lhs.positions, rhs.positions, lhs.glyphCount << 1);
+ return memcmp(lhs.positions, rhs.positions, lhs.glyphCount * sizeof(float) * 2);
}
return 0;
@@ -169,7 +169,7 @@
ShadowTexture* TextDropShadowCache::get(const SkPaint* paint, const char* glyphs, int numGlyphs,
float radius, const float* positions) {
- ShadowText entry(paint, radius, numGlyphs * 2, glyphs, positions);
+ ShadowText entry(paint, radius, numGlyphs, glyphs, positions);
ShadowTexture* texture = mCache.get(entry);
if (!texture) {
diff --git a/libs/hwui/tests/TestScene.h b/libs/hwui/tests/common/TestScene.h
similarity index 100%
rename from libs/hwui/tests/TestScene.h
rename to libs/hwui/tests/common/TestScene.h
diff --git a/libs/hwui/utils/TestUtils.cpp b/libs/hwui/tests/common/TestUtils.cpp
similarity index 100%
rename from libs/hwui/utils/TestUtils.cpp
rename to libs/hwui/tests/common/TestUtils.cpp
diff --git a/libs/hwui/utils/TestUtils.h b/libs/hwui/tests/common/TestUtils.h
similarity index 100%
rename from libs/hwui/utils/TestUtils.h
rename to libs/hwui/tests/common/TestUtils.h
diff --git a/libs/hwui/tests/nullegl.cpp b/libs/hwui/tests/common/nullegl.cpp
similarity index 100%
rename from libs/hwui/tests/nullegl.cpp
rename to libs/hwui/tests/common/nullegl.cpp
diff --git a/libs/hwui/tests/nullgles.cpp b/libs/hwui/tests/common/nullgles.cpp
similarity index 100%
rename from libs/hwui/tests/nullgles.cpp
rename to libs/hwui/tests/common/nullgles.cpp
diff --git a/libs/hwui/tests/scenes/HwLayerAnimation.cpp b/libs/hwui/tests/common/scenes/HwLayerAnimation.cpp
similarity index 100%
rename from libs/hwui/tests/scenes/HwLayerAnimation.cpp
rename to libs/hwui/tests/common/scenes/HwLayerAnimation.cpp
diff --git a/libs/hwui/tests/scenes/ListViewAnimation.cpp b/libs/hwui/tests/common/scenes/ListViewAnimation.cpp
similarity index 100%
rename from libs/hwui/tests/scenes/ListViewAnimation.cpp
rename to libs/hwui/tests/common/scenes/ListViewAnimation.cpp
diff --git a/libs/hwui/tests/scenes/OvalAnimation.cpp b/libs/hwui/tests/common/scenes/OvalAnimation.cpp
similarity index 100%
rename from libs/hwui/tests/scenes/OvalAnimation.cpp
rename to libs/hwui/tests/common/scenes/OvalAnimation.cpp
diff --git a/libs/hwui/tests/scenes/PartialDamageAnimation.cpp b/libs/hwui/tests/common/scenes/PartialDamageAnimation.cpp
similarity index 100%
rename from libs/hwui/tests/scenes/PartialDamageAnimation.cpp
rename to libs/hwui/tests/common/scenes/PartialDamageAnimation.cpp
diff --git a/libs/hwui/tests/scenes/RecentsAnimation.cpp b/libs/hwui/tests/common/scenes/RecentsAnimation.cpp
similarity index 100%
rename from libs/hwui/tests/scenes/RecentsAnimation.cpp
rename to libs/hwui/tests/common/scenes/RecentsAnimation.cpp
diff --git a/libs/hwui/tests/scenes/RectGridAnimation.cpp b/libs/hwui/tests/common/scenes/RectGridAnimation.cpp
similarity index 100%
rename from libs/hwui/tests/scenes/RectGridAnimation.cpp
rename to libs/hwui/tests/common/scenes/RectGridAnimation.cpp
diff --git a/libs/hwui/tests/scenes/SaveLayerAnimation.cpp b/libs/hwui/tests/common/scenes/SaveLayerAnimation.cpp
similarity index 100%
rename from libs/hwui/tests/scenes/SaveLayerAnimation.cpp
rename to libs/hwui/tests/common/scenes/SaveLayerAnimation.cpp
diff --git a/libs/hwui/tests/scenes/ShadowGrid2Animation.cpp b/libs/hwui/tests/common/scenes/ShadowGrid2Animation.cpp
similarity index 100%
rename from libs/hwui/tests/scenes/ShadowGrid2Animation.cpp
rename to libs/hwui/tests/common/scenes/ShadowGrid2Animation.cpp
diff --git a/libs/hwui/tests/scenes/ShadowGridAnimation.cpp b/libs/hwui/tests/common/scenes/ShadowGridAnimation.cpp
similarity index 100%
rename from libs/hwui/tests/scenes/ShadowGridAnimation.cpp
rename to libs/hwui/tests/common/scenes/ShadowGridAnimation.cpp
diff --git a/libs/hwui/tests/scenes/TestSceneBase.h b/libs/hwui/tests/common/scenes/TestSceneBase.h
similarity index 86%
rename from libs/hwui/tests/scenes/TestSceneBase.h
rename to libs/hwui/tests/common/scenes/TestSceneBase.h
index a208509..8a24149 100644
--- a/libs/hwui/tests/scenes/TestSceneBase.h
+++ b/libs/hwui/tests/common/scenes/TestSceneBase.h
@@ -19,10 +19,10 @@
#include "DisplayListCanvas.h"
#include "RecordingCanvas.h"
#include "RenderNode.h"
-#include "tests/Benchmark.h"
-#include "tests/TestContext.h"
-#include "tests/TestScene.h"
-#include "utils/TestUtils.h"
+#include "tests/macrobench/Benchmark.h"
+#include "tests/macrobench/TestContext.h"
+#include "tests/common/TestScene.h"
+#include "tests/common/TestUtils.h"
#include <functional>
diff --git a/libs/hwui/tests/Benchmark.h b/libs/hwui/tests/macrobench/Benchmark.h
similarity index 97%
rename from libs/hwui/tests/Benchmark.h
rename to libs/hwui/tests/macrobench/Benchmark.h
index 3f87d7f..aad8eb3 100644
--- a/libs/hwui/tests/Benchmark.h
+++ b/libs/hwui/tests/macrobench/Benchmark.h
@@ -16,7 +16,7 @@
#ifndef TESTS_BENCHMARK_H
#define TESTS_BENCHMARK_H
-#include "TestScene.h"
+#include "tests/common/TestScene.h"
#include <string>
#include <vector>
diff --git a/libs/hwui/tests/TestContext.cpp b/libs/hwui/tests/macrobench/TestContext.cpp
similarity index 100%
rename from libs/hwui/tests/TestContext.cpp
rename to libs/hwui/tests/macrobench/TestContext.cpp
diff --git a/libs/hwui/tests/TestContext.h b/libs/hwui/tests/macrobench/TestContext.h
similarity index 100%
rename from libs/hwui/tests/TestContext.h
rename to libs/hwui/tests/macrobench/TestContext.h
diff --git a/libs/hwui/tests/TestSceneRunner.cpp b/libs/hwui/tests/macrobench/TestSceneRunner.cpp
similarity index 98%
rename from libs/hwui/tests/TestSceneRunner.cpp
rename to libs/hwui/tests/macrobench/TestSceneRunner.cpp
index 0376e10..1e1c6a1 100644
--- a/libs/hwui/tests/TestSceneRunner.cpp
+++ b/libs/hwui/tests/macrobench/TestSceneRunner.cpp
@@ -18,7 +18,7 @@
#include "Benchmark.h"
#include "RenderNode.h"
#include "TestContext.h"
-#include "scenes/TestSceneBase.h"
+#include "tests/common/scenes/TestSceneBase.h"
#include "renderthread/RenderProxy.h"
#include "renderthread/RenderTask.h"
diff --git a/libs/hwui/tests/how_to_run.txt b/libs/hwui/tests/macrobench/how_to_run.txt
similarity index 100%
rename from libs/hwui/tests/how_to_run.txt
rename to libs/hwui/tests/macrobench/how_to_run.txt
diff --git a/libs/hwui/tests/main.cpp b/libs/hwui/tests/macrobench/main.cpp
similarity index 100%
rename from libs/hwui/tests/main.cpp
rename to libs/hwui/tests/macrobench/main.cpp
diff --git a/libs/hwui/microbench/DisplayListCanvasBench.cpp b/libs/hwui/tests/microbench/DisplayListCanvasBench.cpp
similarity index 98%
rename from libs/hwui/microbench/DisplayListCanvasBench.cpp
rename to libs/hwui/tests/microbench/DisplayListCanvasBench.cpp
index 4be1f99..2e59eb4 100644
--- a/libs/hwui/microbench/DisplayListCanvasBench.cpp
+++ b/libs/hwui/tests/microbench/DisplayListCanvasBench.cpp
@@ -22,8 +22,8 @@
#else
#include "DisplayListCanvas.h"
#endif
-#include "microbench/MicroBench.h"
-#include "utils/TestUtils.h"
+#include "tests/common/TestUtils.h"
+#include "tests/microbench/MicroBench.h"
using namespace android;
using namespace android::uirenderer;
diff --git a/libs/hwui/microbench/LinearAllocatorBench.cpp b/libs/hwui/tests/microbench/LinearAllocatorBench.cpp
similarity index 97%
rename from libs/hwui/microbench/LinearAllocatorBench.cpp
rename to libs/hwui/tests/microbench/LinearAllocatorBench.cpp
index 75f57cb..28513e4 100644
--- a/libs/hwui/microbench/LinearAllocatorBench.cpp
+++ b/libs/hwui/tests/microbench/LinearAllocatorBench.cpp
@@ -16,8 +16,8 @@
#include <benchmark/Benchmark.h>
+#include "tests/microbench/MicroBench.h"
#include "utils/LinearAllocator.h"
-#include "microbench/MicroBench.h"
#include <vector>
diff --git a/libs/hwui/microbench/MicroBench.h b/libs/hwui/tests/microbench/MicroBench.h
similarity index 100%
rename from libs/hwui/microbench/MicroBench.h
rename to libs/hwui/tests/microbench/MicroBench.h
diff --git a/libs/hwui/microbench/OpReordererBench.cpp b/libs/hwui/tests/microbench/OpReordererBench.cpp
similarity index 98%
rename from libs/hwui/microbench/OpReordererBench.cpp
rename to libs/hwui/tests/microbench/OpReordererBench.cpp
index 53b64c3..406bfcc 100644
--- a/libs/hwui/microbench/OpReordererBench.cpp
+++ b/libs/hwui/tests/microbench/OpReordererBench.cpp
@@ -23,7 +23,7 @@
#include "OpReorderer.h"
#include "RecordedOp.h"
#include "RecordingCanvas.h"
-#include "utils/TestUtils.h"
+#include "tests/common/TestUtils.h"
#include "Vector.h"
#include "microbench/MicroBench.h"
diff --git a/libs/hwui/microbench/PathParserBench.cpp b/libs/hwui/tests/microbench/PathParserBench.cpp
similarity index 100%
rename from libs/hwui/microbench/PathParserBench.cpp
rename to libs/hwui/tests/microbench/PathParserBench.cpp
diff --git a/libs/hwui/microbench/ShadowBench.cpp b/libs/hwui/tests/microbench/ShadowBench.cpp
similarity index 98%
rename from libs/hwui/microbench/ShadowBench.cpp
rename to libs/hwui/tests/microbench/ShadowBench.cpp
index 1b0f5ea..98ec4d9 100644
--- a/libs/hwui/microbench/ShadowBench.cpp
+++ b/libs/hwui/tests/microbench/ShadowBench.cpp
@@ -21,7 +21,7 @@
#include "Vector.h"
#include "VertexBuffer.h"
#include "TessellationCache.h"
-#include "microbench/MicroBench.h"
+#include "tests/microbench/MicroBench.h"
#include <SkPath.h>
diff --git a/libs/hwui/microbench/how_to_run.txt b/libs/hwui/tests/microbench/how_to_run.txt
similarity index 100%
rename from libs/hwui/microbench/how_to_run.txt
rename to libs/hwui/tests/microbench/how_to_run.txt
diff --git a/libs/hwui/unit_tests/BakedOpStateTests.cpp b/libs/hwui/tests/unit/BakedOpStateTests.cpp
similarity index 98%
rename from libs/hwui/unit_tests/BakedOpStateTests.cpp
rename to libs/hwui/tests/unit/BakedOpStateTests.cpp
index 7ad2f9b..de14abf 100644
--- a/libs/hwui/unit_tests/BakedOpStateTests.cpp
+++ b/libs/hwui/tests/unit/BakedOpStateTests.cpp
@@ -18,7 +18,7 @@
#include <BakedOpState.h>
#include <RecordedOp.h>
-#include <utils/TestUtils.h>
+#include <tests/common/TestUtils.h>
namespace android {
namespace uirenderer {
diff --git a/libs/hwui/unit_tests/CanvasStateTests.cpp b/libs/hwui/tests/unit/CanvasStateTests.cpp
similarity index 100%
rename from libs/hwui/unit_tests/CanvasStateTests.cpp
rename to libs/hwui/tests/unit/CanvasStateTests.cpp
diff --git a/libs/hwui/unit_tests/ClipAreaTests.cpp b/libs/hwui/tests/unit/ClipAreaTests.cpp
similarity index 100%
rename from libs/hwui/unit_tests/ClipAreaTests.cpp
rename to libs/hwui/tests/unit/ClipAreaTests.cpp
diff --git a/libs/hwui/unit_tests/DamageAccumulatorTests.cpp b/libs/hwui/tests/unit/DamageAccumulatorTests.cpp
similarity index 100%
rename from libs/hwui/unit_tests/DamageAccumulatorTests.cpp
rename to libs/hwui/tests/unit/DamageAccumulatorTests.cpp
diff --git a/libs/hwui/unit_tests/DeviceInfoTests.cpp b/libs/hwui/tests/unit/DeviceInfoTests.cpp
similarity index 100%
rename from libs/hwui/unit_tests/DeviceInfoTests.cpp
rename to libs/hwui/tests/unit/DeviceInfoTests.cpp
diff --git a/libs/hwui/unit_tests/FatVectorTests.cpp b/libs/hwui/tests/unit/FatVectorTests.cpp
similarity index 98%
rename from libs/hwui/unit_tests/FatVectorTests.cpp
rename to libs/hwui/tests/unit/FatVectorTests.cpp
index c6ccf4d..64b0ba1 100644
--- a/libs/hwui/unit_tests/FatVectorTests.cpp
+++ b/libs/hwui/tests/unit/FatVectorTests.cpp
@@ -17,7 +17,7 @@
#include <gtest/gtest.h>
#include <utils/FatVector.h>
-#include <utils/TestUtils.h>
+#include <tests/common/TestUtils.h>
using namespace android;
using namespace android::uirenderer;
diff --git a/libs/hwui/unit_tests/LayerUpdateQueueTests.cpp b/libs/hwui/tests/unit/LayerUpdateQueueTests.cpp
similarity index 98%
rename from libs/hwui/unit_tests/LayerUpdateQueueTests.cpp
rename to libs/hwui/tests/unit/LayerUpdateQueueTests.cpp
index cc15cc6..8b0e91c 100644
--- a/libs/hwui/unit_tests/LayerUpdateQueueTests.cpp
+++ b/libs/hwui/tests/unit/LayerUpdateQueueTests.cpp
@@ -19,7 +19,7 @@
#include <LayerUpdateQueue.h>
#include <RenderNode.h>
-#include <utils/TestUtils.h>
+#include <tests/common/TestUtils.h>
namespace android {
namespace uirenderer {
diff --git a/libs/hwui/unit_tests/LinearAllocatorTests.cpp b/libs/hwui/tests/unit/LinearAllocatorTests.cpp
similarity index 98%
rename from libs/hwui/unit_tests/LinearAllocatorTests.cpp
rename to libs/hwui/tests/unit/LinearAllocatorTests.cpp
index 0591db6..78d65dd 100644
--- a/libs/hwui/unit_tests/LinearAllocatorTests.cpp
+++ b/libs/hwui/tests/unit/LinearAllocatorTests.cpp
@@ -17,7 +17,7 @@
#include <gtest/gtest.h>
#include <utils/LinearAllocator.h>
-#include <utils/TestUtils.h>
+#include <tests/common/TestUtils.h>
using namespace android;
using namespace android::uirenderer;
diff --git a/libs/hwui/unit_tests/OffscreenBufferPoolTests.cpp b/libs/hwui/tests/unit/OffscreenBufferPoolTests.cpp
similarity index 98%
rename from libs/hwui/unit_tests/OffscreenBufferPoolTests.cpp
rename to libs/hwui/tests/unit/OffscreenBufferPoolTests.cpp
index de86aed..2187654 100644
--- a/libs/hwui/unit_tests/OffscreenBufferPoolTests.cpp
+++ b/libs/hwui/tests/unit/OffscreenBufferPoolTests.cpp
@@ -17,7 +17,7 @@
#include <gtest/gtest.h>
#include <renderstate/OffscreenBufferPool.h>
-#include <utils/TestUtils.h>
+#include <tests/common/TestUtils.h>
using namespace android;
using namespace android::uirenderer;
diff --git a/libs/hwui/unit_tests/OpReordererTests.cpp b/libs/hwui/tests/unit/OpReordererTests.cpp
similarity index 99%
rename from libs/hwui/unit_tests/OpReordererTests.cpp
rename to libs/hwui/tests/unit/OpReordererTests.cpp
index 2ce1d0a..98a430a 100644
--- a/libs/hwui/unit_tests/OpReordererTests.cpp
+++ b/libs/hwui/tests/unit/OpReordererTests.cpp
@@ -21,7 +21,7 @@
#include <OpReorderer.h>
#include <RecordedOp.h>
#include <RecordingCanvas.h>
-#include <utils/TestUtils.h>
+#include <tests/common/TestUtils.h>
#include <unordered_map>
diff --git a/libs/hwui/unit_tests/RecordingCanvasTests.cpp b/libs/hwui/tests/unit/RecordingCanvasTests.cpp
similarity index 99%
rename from libs/hwui/unit_tests/RecordingCanvasTests.cpp
rename to libs/hwui/tests/unit/RecordingCanvasTests.cpp
index 81f0851..2449ce8 100644
--- a/libs/hwui/unit_tests/RecordingCanvasTests.cpp
+++ b/libs/hwui/tests/unit/RecordingCanvasTests.cpp
@@ -18,7 +18,7 @@
#include <RecordedOp.h>
#include <RecordingCanvas.h>
-#include <utils/TestUtils.h>
+#include <tests/common/TestUtils.h>
namespace android {
namespace uirenderer {
diff --git a/libs/hwui/unit_tests/StringUtilsTests.cpp b/libs/hwui/tests/unit/StringUtilsTests.cpp
similarity index 100%
rename from libs/hwui/unit_tests/StringUtilsTests.cpp
rename to libs/hwui/tests/unit/StringUtilsTests.cpp
diff --git a/libs/hwui/unit_tests/VectorDrawableTests.cpp b/libs/hwui/tests/unit/VectorDrawableTests.cpp
similarity index 100%
rename from libs/hwui/unit_tests/VectorDrawableTests.cpp
rename to libs/hwui/tests/unit/VectorDrawableTests.cpp
diff --git a/libs/hwui/unit_tests/how_to_run.txt b/libs/hwui/tests/unit/how_to_run.txt
similarity index 100%
rename from libs/hwui/unit_tests/how_to_run.txt
rename to libs/hwui/tests/unit/how_to_run.txt
diff --git a/libs/input/PointerController.cpp b/libs/input/PointerController.cpp
index bd6af78..6a1167a 100644
--- a/libs/input/PointerController.cpp
+++ b/libs/input/PointerController.cpp
@@ -91,7 +91,14 @@
mLocked.buttonState = 0;
+ mPolicy->loadPointerIcon(&mLocked.pointerIcon);
+
loadResources();
+
+ if (mLocked.pointerIcon.isValid()) {
+ mLocked.pointerIconChanged = true;
+ updatePointerLocked();
+ }
}
PointerController::~PointerController() {
@@ -325,6 +332,23 @@
}
}
+void PointerController::reloadPointerResources() {
+ AutoMutex _l(mLock);
+
+ loadResources();
+
+ if (mLocked.presentation == PRESENTATION_POINTER) {
+ mLocked.additionalMouseResources.clear();
+ mLocked.animationResources.clear();
+ mPolicy->loadPointerIcon(&mLocked.pointerIcon);
+ mPolicy->loadAdditionalMouseResources(&mLocked.additionalMouseResources,
+ &mLocked.animationResources);
+ }
+
+ mLocked.presentationChanged = true;
+ updatePointerLocked();
+}
+
void PointerController::setDisplayViewport(int32_t width, int32_t height, int32_t orientation) {
AutoMutex _l(mLock);
@@ -415,15 +439,6 @@
}
}
-void PointerController::setPointerIcon(const SpriteIcon& icon) {
- AutoMutex _l(mLock);
-
- mLocked.pointerIcon = icon.copy();
- mLocked.pointerIconChanged = true;
-
- updatePointerLocked();
-}
-
void PointerController::handleMessage(const Message& message) {
switch (message.what) {
case MSG_INACTIVITY_TIMEOUT:
diff --git a/libs/input/PointerController.h b/libs/input/PointerController.h
index b6c01d2..4fd2d850 100644
--- a/libs/input/PointerController.h
+++ b/libs/input/PointerController.h
@@ -62,6 +62,7 @@
virtual ~PointerControllerPolicyInterface() { }
public:
+ virtual void loadPointerIcon(SpriteIcon* icon) = 0;
virtual void loadPointerResources(PointerResources* outResources) = 0;
virtual void loadAdditionalMouseResources(std::map<int32_t, SpriteIcon>* outResources,
std::map<int32_t, PointerAnimation>* outAnimationResources) = 0;
@@ -105,8 +106,8 @@
void updatePointerShape(int32_t iconId);
void setDisplayViewport(int32_t width, int32_t height, int32_t orientation);
- void setPointerIcon(const SpriteIcon& icon);
void setInactivityTimeout(InactivityTimeout inactivityTimeout);
+ void reloadPointerResources();
private:
static const size_t MAX_RECYCLED_SPRITES = 12;
diff --git a/media/java/android/media/MediaMetadataEditor.java b/media/java/android/media/MediaMetadataEditor.java
index 566b93f..877c872 100644
--- a/media/java/android/media/MediaMetadataEditor.java
+++ b/media/java/android/media/MediaMetadataEditor.java
@@ -73,7 +73,8 @@
/**
* Applies all of the metadata changes that have been set since the MediaMetadataEditor instance
- * was created or since {@link #clear()} was called.
+ * was created or since {@link #clear()} was called. Subclasses should synchronize on
+ * {@code this} for thread safety.
*/
public abstract void apply();
diff --git a/packages/DocumentsUI/AndroidManifest.xml b/packages/DocumentsUI/AndroidManifest.xml
index 60f5d60..8cc79a4c 100644
--- a/packages/DocumentsUI/AndroidManifest.xml
+++ b/packages/DocumentsUI/AndroidManifest.xml
@@ -41,6 +41,7 @@
<activity
android:name=".DownloadsActivity"
android:theme="@style/DocumentsFullScreenTheme"
+ android:label="@string/downloads_label"
android:icon="@drawable/ic_doc_text">
<intent-filter>
<action android:name="android.provider.action.MANAGE_ROOT" />
diff --git a/packages/DocumentsUI/res/values/config.xml b/packages/DocumentsUI/res/values/config.xml
index ad419aa..ff28e15 100644
--- a/packages/DocumentsUI/res/values/config.xml
+++ b/packages/DocumentsUI/res/values/config.xml
@@ -15,6 +15,9 @@
-->
<resources>
+ <!-- Allow Advanced Devices default value to be customised -->
+ <bool name="config_defaultAdvancedDevices">false</bool>
+
<bool name="productivity_device">true</bool>
<!-- Intentionally unset. Vendors should set this in an overlay. -->
<string name="trusted_quick_viewer_package"></string>
diff --git a/packages/DocumentsUI/res/values/strings.xml b/packages/DocumentsUI/res/values/strings.xml
index d21b5ee..016657e 100644
--- a/packages/DocumentsUI/res/values/strings.xml
+++ b/packages/DocumentsUI/res/values/strings.xml
@@ -21,6 +21,9 @@
<!-- Title of the standalone files activity. [CHAR LIMIT=32] -->
<string name="files_label">Files</string>
+ <!-- Title of the standalone downloads activity. [CHAR LIMIT=32] -->
+ <string name="downloads_label">Downloads</string>
+
<!-- Action bar title prompting user to choose a location to open a document from [CHAR LIMIT=32] -->
<string name="title_open">Open from</string>
<!-- Action bar title prompting user to choose a location to save a document to [CHAR LIMIT=32] -->
diff --git a/packages/DocumentsUI/src/com/android/documentsui/BaseActivity.java b/packages/DocumentsUI/src/com/android/documentsui/BaseActivity.java
index abb08f5..0f25016 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/BaseActivity.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/BaseActivity.java
@@ -223,49 +223,61 @@
@Override
public boolean onOptionsItemSelected(MenuItem item) {
- final int id = item.getItemId();
- if (id == android.R.id.home) {
- onBackPressed();
- return true;
- } else if (id == R.id.menu_create_dir) {
- showCreateDirectoryDialog();
- return true;
- } else if (id == R.id.menu_search) {
- return false;
- } else if (id == R.id.menu_sort_name) {
- setUserSortOrder(State.SORT_ORDER_DISPLAY_NAME);
- return true;
- } else if (id == R.id.menu_sort_date) {
- setUserSortOrder(State.SORT_ORDER_LAST_MODIFIED);
- return true;
- } else if (id == R.id.menu_sort_size) {
- setUserSortOrder(State.SORT_ORDER_SIZE);
- return true;
- } else if (id == R.id.menu_grid) {
- setUserMode(State.MODE_GRID);
- return true;
- } else if (id == R.id.menu_list) {
- setUserMode(State.MODE_LIST);
- return true;
- } else if (id == R.id.menu_paste_from_clipboard) {
- DirectoryFragment.get(getFragmentManager())
- .pasteFromClipboard();
- return true;
- } else if (id == R.id.menu_advanced) {
- setDisplayAdvancedDevices(!LocalPreferences.getDisplayAdvancedDevices(this));
- return true;
- } else if (id == R.id.menu_file_size) {
- setDisplayFileSize(!LocalPreferences.getDisplayFileSize(this));
- return true;
- } else if (id == R.id.menu_settings) {
- final RootInfo root = getCurrentRoot();
- final Intent intent = new Intent(DocumentsContract.ACTION_DOCUMENT_ROOT_SETTINGS);
- intent.setDataAndType(root.getUri(), DocumentsContract.Root.MIME_TYPE_ITEM);
- startActivity(intent);
- return true;
- }
- return super.onOptionsItemSelected(item);
+ switch (item.getItemId()) {
+ case android.R.id.home:
+ onBackPressed();
+ return true;
+
+ case R.id.menu_create_dir:
+ showCreateDirectoryDialog();
+ return true;
+
+ case R.id.menu_search:
+ return false;
+
+ case R.id.menu_sort_name:
+ setUserSortOrder(State.SORT_ORDER_DISPLAY_NAME);
+ return true;
+
+ case R.id.menu_sort_date:
+ setUserSortOrder(State.SORT_ORDER_LAST_MODIFIED);
+ return true;
+ case R.id.menu_sort_size:
+ setUserSortOrder(State.SORT_ORDER_SIZE);
+ return true;
+
+ case R.id.menu_grid:
+ setUserMode(State.MODE_GRID);
+ return true;
+
+ case R.id.menu_list:
+ setUserMode(State.MODE_LIST);
+ return true;
+
+ case R.id.menu_paste_from_clipboard:
+ DirectoryFragment.get(getFragmentManager())
+ .pasteFromClipboard();
+ return true;
+
+ case R.id.menu_advanced:
+ setDisplayAdvancedDevices(!LocalPreferences.getDisplayAdvancedDevices(this));
+ return true;
+
+ case R.id.menu_file_size:
+ setDisplayFileSize(!LocalPreferences.getDisplayFileSize(this));
+ return true;
+
+ case R.id.menu_settings:
+ final RootInfo root = getCurrentRoot();
+ final Intent intent = new Intent(DocumentsContract.ACTION_DOCUMENT_ROOT_SETTINGS);
+ intent.setDataAndType(root.getUri(), DocumentsContract.Root.MIME_TYPE_ITEM);
+ startActivity(intent);
+ return true;
+
+ default:
+ return super.onOptionsItemSelected(item);
+ }
}
void showCreateDirectoryDialog() {
diff --git a/packages/DocumentsUI/src/com/android/documentsui/FilesActivity.java b/packages/DocumentsUI/src/com/android/documentsui/FilesActivity.java
index 840f7fa..99d0cf4 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/FilesActivity.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/FilesActivity.java
@@ -369,9 +369,15 @@
// TODO: Should be statically bound using alphabeticShortcut. See b/21330356.
dir = DirectoryFragment.get(getFragmentManager());
dir.copySelectedToClipboard();
+ return true;
+ case KeyEvent.KEYCODE_V:
+ // TODO: Should be statically bound using alphabeticShortcut. See b/21330356.
+ dir = DirectoryFragment.get(getFragmentManager());
+ dir.pasteFromClipboard();
+ return true;
+ default:
+ return super.onKeyShortcut(keyCode, event);
}
-
- return super.onKeyShortcut(keyCode, event);
}
@Override
diff --git a/packages/DocumentsUI/src/com/android/documentsui/LocalPreferences.java b/packages/DocumentsUI/src/com/android/documentsui/LocalPreferences.java
index e6c5ae2..113e9d7 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/LocalPreferences.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/LocalPreferences.java
@@ -24,8 +24,10 @@
private static final String KEY_FILE_SIZE = "fileSize";
public static boolean getDisplayAdvancedDevices(Context context) {
+ boolean defaultAdvanced = context.getResources()
+ .getBoolean(R.bool.config_defaultAdvancedDevices);
return PreferenceManager.getDefaultSharedPreferences(context)
- .getBoolean(KEY_ADVANCED_DEVICES, false);
+ .getBoolean(KEY_ADVANCED_DEVICES, defaultAdvanced);
}
public static boolean getDisplayFileSize(Context context) {
diff --git a/packages/DocumentsUI/src/com/android/documentsui/dirlist/DirectoryFragment.java b/packages/DocumentsUI/src/com/android/documentsui/dirlist/DirectoryFragment.java
index be3013b..2e7c908 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/dirlist/DirectoryFragment.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/dirlist/DirectoryFragment.java
@@ -147,7 +147,7 @@
public static final int REQUEST_COPY_DESTINATION = 1;
private static final int LOADER_ID = 42;
- private static final boolean DEBUG_ENABLE_DND = false;
+ private static final boolean DEBUG_ENABLE_DND = true;
private static final String EXTRA_TYPE = "type";
private static final String EXTRA_ROOT = "root";
diff --git a/packages/DocumentsUI/tests/src/com/android/documentsui/dirlist/MultiSelectManager_SelectionTest.java b/packages/DocumentsUI/tests/src/com/android/documentsui/dirlist/MultiSelectManager_SelectionTest.java
index 72fc108..030ac6c 100644
--- a/packages/DocumentsUI/tests/src/com/android/documentsui/dirlist/MultiSelectManager_SelectionTest.java
+++ b/packages/DocumentsUI/tests/src/com/android/documentsui/dirlist/MultiSelectManager_SelectionTest.java
@@ -22,7 +22,7 @@
import com.android.documentsui.dirlist.MultiSelectManager.Selection;
@SmallTest
-public class MultiSelectManager_SelectionTest extends AndroidTestCase{
+public class MultiSelectManager_SelectionTest extends AndroidTestCase {
private Selection selection;
diff --git a/packages/MtpDocumentsProvider/tests/src/com/android/mtp/MtpManagerTest.java b/packages/MtpDocumentsProvider/tests/src/com/android/mtp/MtpManagerTest.java
index a045d06..ed617e7 100644
--- a/packages/MtpDocumentsProvider/tests/src/com/android/mtp/MtpManagerTest.java
+++ b/packages/MtpDocumentsProvider/tests/src/com/android/mtp/MtpManagerTest.java
@@ -24,6 +24,9 @@
import android.test.InstrumentationTestCase;
import java.io.IOException;
+import java.util.concurrent.Callable;
+import java.util.concurrent.FutureTask;
+import java.util.concurrent.TimeUnit;
@RealDeviceTest
public class MtpManagerTest extends InstrumentationTestCase {
@@ -53,20 +56,23 @@
public void testCancelEvent() throws Exception {
final CancellationSignal signal = new CancellationSignal();
- final Thread thread = new Thread() {
- @Override
- public void run() {
- try {
- mManager.readEvent(mUsbDevice.getDeviceId(), signal);
- } catch (OperationCanceledException | IOException e) {
- getInstrumentation().show(e.getMessage());
- }
- }
- };
+ final FutureTask<Boolean> future = new FutureTask<Boolean>(
+ new Callable<Boolean>() {
+ @Override
+ public Boolean call() throws IOException {
+ try {
+ mManager.readEvent(mUsbDevice.getDeviceId(), signal);
+ return false;
+ } catch (OperationCanceledException exception) {
+ return true;
+ }
+ }
+ });
+ final Thread thread = new Thread(future);
thread.start();
Thread.sleep(TIMEOUT_MS);
signal.cancel();
- thread.join(TIMEOUT_MS);
+ assertTrue(future.get(TIMEOUT_MS, TimeUnit.MILLISECONDS));
}
private Context getContext() {
diff --git a/packages/MtpDocumentsProvider/tests/src/com/android/mtp/TestResultInstrumentation.java b/packages/MtpDocumentsProvider/tests/src/com/android/mtp/TestResultInstrumentation.java
index 3e64f9a2..4e4cf78 100644
--- a/packages/MtpDocumentsProvider/tests/src/com/android/mtp/TestResultInstrumentation.java
+++ b/packages/MtpDocumentsProvider/tests/src/com/android/mtp/TestResultInstrumentation.java
@@ -23,6 +23,10 @@
import junit.framework.Test;
import junit.framework.TestListener;
+/**
+ * Instrumentation that can show the test result in the TestResultActivity.
+ * It's useful when it runs testcases with a real USB device and could not use USB port for ADB.
+ */
public class TestResultInstrumentation extends InstrumentationTestRunner implements TestListener {
private boolean mHasError = false;
diff --git a/packages/MtpDocumentsProvider/tests/src/com/android/mtp/TestUtil.java b/packages/MtpDocumentsProvider/tests/src/com/android/mtp/TestUtil.java
index e6c12cb..f910321 100644
--- a/packages/MtpDocumentsProvider/tests/src/com/android/mtp/TestUtil.java
+++ b/packages/MtpDocumentsProvider/tests/src/com/android/mtp/TestUtil.java
@@ -33,7 +33,7 @@
/**
* Static utility methods for testing.
*/
-class TestUtil {
+final class TestUtil {
private static final String ACTION_USB_PERMISSION =
"com.android.mtp.USB_PERMISSION";
@@ -42,12 +42,11 @@
/**
* Requests permission for a MTP device and returns the first MTP device that has at least one
* storage.
- * @throws Exception
*/
static UsbDevice setupMtpDevice(
TestResultInstrumentation instrumentation,
UsbManager usbManager,
- MtpManager manager) throws Exception {
+ MtpManager manager) throws InterruptedException, IOException {
for (int i = 0; i < 2; i++) {
final UsbDevice device = findMtpDevice(instrumentation, usbManager);
manager.openDevice(device.getDeviceId());
@@ -121,7 +120,7 @@
private static void waitForStorages(
TestResultInstrumentation instrumentation,
MtpManager manager,
- int deviceId) throws Exception {
+ int deviceId) throws IOException, InterruptedException {
while (true) {
if (manager.getRoots(deviceId).length == 0) {
instrumentation.show("Wait for storages.");
diff --git a/packages/SettingsLib/res/values/arrays.xml b/packages/SettingsLib/res/values/arrays.xml
index a52ed69..4e88c1c 100644
--- a/packages/SettingsLib/res/values/arrays.xml
+++ b/packages/SettingsLib/res/values/arrays.xml
@@ -78,4 +78,306 @@
<!-- Status message of Wi-Fi when connectiong is being verified. -->
<item>Temporarily avoiding poor connection</item>
</string-array>
+
+ <!-- Titles for HDCP checking preference. [CHAR LIMIT=35] -->
+ <string-array name="hdcp_checking_titles">
+ <item>Never check</item>
+ <item>Check for DRM content only</item>
+ <item>Always check</item>
+ </string-array>
+
+ <!-- Values for HDCP checking preference. -->
+ <string-array name="hdcp_checking_values" translatable="false" >
+ <item>never</item>
+ <item>drm-only</item>
+ <item>always</item>
+ </string-array>
+
+ <!-- Summaries for HDCP checking preference. [CHAR LIMIT=100]-->
+ <string-array name="hdcp_checking_summaries" >
+ <item>Never use HDCP checking</item>
+ <item>Use HDCP checking for DRM content only</item>
+ <item>Always use HDCP checking</item>
+ </string-array>
+
+ <!-- Titles for logd limit size selection preference. [CHAR LIMIT=14] -->
+ <string-array name="select_logd_size_titles">
+ <item>64K</item>
+ <item>256K</item>
+ <item>1M</item>
+ <item>4M</item>
+ <item>16M</item>
+ </string-array>
+
+ <!-- Titles for logd limit size lowram selection preference. [CHAR LIMIT=14] -->
+ <string-array name="select_logd_size_lowram_titles">
+ <item>64K</item>
+ <item>256K</item>
+ <item>1M</item>
+ </string-array>
+
+ <!-- Values for logd limit size selection preference. -->
+ <string-array name="select_logd_size_values" translatable="false" >
+ <item>65536</item>
+ <item>262144</item>
+ <item>1048576</item>
+ <item>4194304</item>
+ <item>16777216</item>
+ </string-array>
+
+ <!-- Summaries for logd limit size selection preference. [CHAR LIMIT=30]-->
+ <string-array name="select_logd_size_summaries" >
+ <item>64K per log buffer</item>
+ <item>256K per log buffer</item>
+ <item>1M per log buffer</item>
+ <item>4M per log buffer</item>
+ <item>16M per log buffer</item>
+ </string-array>
+
+ <!-- Titles for window animation scale preference. [CHAR LIMIT=35] -->
+ <string-array name="window_animation_scale_entries">
+ <item>Animation off</item>
+ <item>Animation scale .5x</item>
+ <item>Animation scale 1x</item>
+ <item>Animation scale 1.5x</item>
+ <item>Animation scale 2x</item>
+ <item>Animation scale 5x</item>
+ <item>Animation scale 10x</item>
+ </string-array>
+
+ <!-- Values for window animation scale preference. -->
+ <string-array name="window_animation_scale_values" translatable="false" >
+ <item>0</item>
+ <item>.5</item>
+ <item>1</item>
+ <item>1.5</item>
+ <item>2</item>
+ <item>5</item>
+ <item>10</item>
+ </string-array>
+
+ <!-- Titles for transition animation scale preference. [CHAR LIMIT=35] -->
+ <string-array name="transition_animation_scale_entries">
+ <item>Animation off</item>
+ <item>Animation scale .5x</item>
+ <item>Animation scale 1x</item>
+ <item>Animation scale 1.5x</item>
+ <item>Animation scale 2x</item>
+ <item>Animation scale 5x</item>
+ <item>Animation scale 10x</item>
+ </string-array>
+
+ <!-- Values for transition animation scale preference. -->
+ <string-array name="transition_animation_scale_values" translatable="false" >
+ <item>0</item>
+ <item>.5</item>
+ <item>1</item>
+ <item>1.5</item>
+ <item>2</item>
+ <item>5</item>
+ <item>10</item>
+ </string-array>
+
+ <!-- Titles for animator duration scale preference. [CHAR LIMIT=35] -->
+ <string-array name="animator_duration_scale_entries">
+ <item>Animation off</item>
+ <item>Animation scale .5x</item>
+ <item>Animation scale 1x</item>
+ <item>Animation scale 1.5x</item>
+ <item>Animation scale 2x</item>
+ <item>Animation scale 5x</item>
+ <item>Animation scale 10x</item>
+ </string-array>
+
+ <!-- Values for animator duration scale preference. -->
+ <string-array name="animator_duration_scale_values" translatable="false" >
+ <item>0</item>
+ <item>.5</item>
+ <item>1</item>
+ <item>1.5</item>
+ <item>2</item>
+ <item>5</item>
+ <item>10</item>
+ </string-array>
+
+ <!-- Titles for overlay display devices preference. [CHAR LIMIT=35] -->
+ <string-array name="overlay_display_devices_entries">
+ <item>None</item>
+ <item>480p</item>
+ <item>480p (secure)</item>
+ <item>720p</item>
+ <item>720p (secure)</item>
+ <item>1080p</item>
+ <item>1080p (secure)</item>
+ <item>4K</item>
+ <item>4K (secure)</item>
+ <item>4K (upscaled)</item>
+ <item>4K (upscaled, secure)</item>
+ <item>720p, 1080p (dual screen)</item>
+ </string-array>
+
+ <!-- Values for overlay display devices preference. -->
+ <string-array name="overlay_display_devices_values" translatable="false" >
+ <item></item>
+ <item>720x480/142</item>
+ <item>720x480/142,secure</item>
+ <item>1280x720/213</item>
+ <item>1280x720/213,secure</item>
+ <item>1920x1080/320</item>
+ <item>1920x1080/320,secure</item>
+ <item>3840x2160/320</item>
+ <item>3840x2160/320,secure</item>
+ <item>1920x1080/320|3840x2160/640</item>
+ <item>1920x1080/320|3840x2160/640,secure</item>
+ <item>1280x720/213;1920x1080/320</item>
+ </string-array>
+
+ <!-- Titles for OpenGL traces preference. [CHAR LIMIT=35] -->
+ <string-array name="enable_opengl_traces_entries">
+ <item>None</item>
+ <item>Logcat</item>
+ <item>Systrace (Graphics)</item>
+ <item>Call stack on glGetError</item>
+ </string-array>
+
+ <!-- Values for OpenGL traces preference. -->
+ <string-array name="enable_opengl_traces_values" translatable="false" >
+ <item>0</item>
+ <item>1</item>
+ <item>systrace</item>
+ <item>error</item>
+ </string-array>
+
+ <!-- Titles for non-rectangular clipping preference. [CHAR LIMIT=35] -->
+ <string-array name="show_non_rect_clip_entries">
+ <item>Off</item>
+ <item>Draw non-rectangular clip region in blue</item>
+ <item>Highlight tested drawing commands in green</item>
+ </string-array>
+
+ <!-- Values for non-rectangular clipping preference. -->
+ <string-array name="show_non_rect_clip_values" translatable="false" >
+ <item>hide</item>
+ <item>region</item>
+ <item>highlight</item>
+ </string-array>
+
+ <!-- Titles for frame time tracking preference. [CHAR LIMIT=35] -->
+ <string-array name="track_frame_time_entries">
+ <item>Off</item>
+ <item>On screen as bars</item>
+ <item>In adb shell dumpsys gfxinfo</item>
+ </string-array>
+
+ <!-- Values for frame time tracking preference. -->
+ <string-array name="track_frame_time_values" translatable="false" >
+ <item>false</item>
+ <item>visual_bars</item>
+ <item>true</item>
+ </string-array>
+
+ <!-- Titles for debug overdraw preference. [CHAR LIMIT=50] -->
+ <string-array name="debug_hw_overdraw_entries">
+ <item>Off</item>
+ <item>Show overdraw areas</item>
+ <item>Show areas for Deuteranomaly</item>
+ </string-array>
+
+ <!-- Values for debug overdraw preference. -->
+ <string-array name="debug_hw_overdraw_values" translatable="false" >
+ <item>false</item>
+ <item>show</item>
+ <item>show_deuteranomaly</item>
+ </string-array>
+
+ <!-- Titles for app process limit preference. [CHAR LIMIT=35] -->
+ <string-array name="app_process_limit_entries">
+ <item>Standard limit</item>
+ <item>No background processes</item>
+ <item>At most 1 process</item>
+ <item>At most 2 processes</item>
+ <item>At most 3 processes</item>
+ <item>At most 4 processes</item>
+ </string-array>
+
+ <!-- Values for app process limit preference. -->
+ <string-array name="app_process_limit_values" translatable="false" >
+ <item>-1</item>
+ <item>0</item>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ </string-array>
+
+ <!-- USB configuration names for Developer Settings.
+ This can be overridden by devices with additional USB configurations. -->
+ <string-array name="usb_configuration_titles">
+ <item>Charging</item>
+ <item>MTP (Media Transfer Protocol)</item>
+ <item>PTP (Picture Transfer Protocol)</item>
+ <item>RNDIS (USB Ethernet)</item>
+ <item>Audio Source</item>
+ <item>MIDI</item>
+ </string-array>
+
+ <!-- USB configuration values for Developer Settings.
+ These are lists of USB functions passed to the USB Manager to change USB configuraton.
+ This can be overridden by devices with additional USB configurations.
+ Do not translate. -->
+ <string-array name="usb_configuration_values" translatable="false">
+ <!-- Do not translate. -->
+ <item>none</item>
+ <!-- Do not translate. -->
+ <item>mtp</item>
+ <!-- Do not translate. -->
+ <item>ptp</item>
+ <!-- Do not translate. -->
+ <item>rndis</item>
+ <!-- Do not translate. -->
+ <item>audio_source</item>
+ <!-- Do not translate. -->
+ <item>midi</item>
+ </string-array>
+
+ <!-- Possible values for user theme in Display Settings.
+ Do not translate. -->
+ <string-array name="night_mode_entries" translatable="false">
+ <!-- Do not translate. -->
+ <item>@string/night_mode_no</item>
+ <!-- Do not translate. -->
+ <item>@string/night_mode_yes</item>
+ <!-- Do not translate. -->
+ <item>@string/night_mode_auto</item>
+ </string-array>
+
+ <!-- These values should match up with the MODE_NIGHT constants in UiModeManager.
+ Do not translate. -->
+ <string-array name="night_mode_values" translatable="false">
+ <!-- Do not translate. -->
+ <item>1</item>
+ <!-- Do not translate. -->
+ <item>2</item>
+ <!-- Do not translate. -->
+ <item>0</item>
+ </string-array>
+
+ <!-- Display color space adjustment modes for developers -->
+ <string-array name="simulate_color_space_entries" translatable="false">
+ <item>@string/daltonizer_mode_disabled</item>
+ <item>@string/daltonizer_mode_monochromacy</item>
+ <item>@string/daltonizer_mode_deuteranomaly</item>
+ <item>@string/daltonizer_mode_protanomaly</item>
+ <item>@string/daltonizer_mode_tritanomaly</item>
+ </string-array>
+
+ <!-- Values for display color space adjustment modes for developers -->
+ <string-array name="simulate_color_space_values" translatable="false">
+ <item>-1</item>
+ <item>0</item>
+ <item>2</item>
+ <item>1</item>
+ <item>3</item>
+ </string-array>
+
</resources>
diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml
index a37196e..55bd08a 100644
--- a/packages/SettingsLib/res/values/strings.xml
+++ b/packages/SettingsLib/res/values/strings.xml
@@ -351,4 +351,369 @@
<!-- Full package name of OEM preferred device feedback reporter. Leave this blank, overlaid in Settings/TvSettings [DO NOT TRANSLATE] -->
<string name="oem_preferred_feedback_reporter" translatable="false" />
+ <!-- Development settings -->
+ <skip/>
+ <!-- Development Settings. the title for the item to take the user to Development settings. Development settings are settings meant for application developers. -->
+ <string name="development_settings_title">Developer options</string>
+ <!-- Development settings enable title. -->
+ <string name="development_settings_enable">Enable developer options</string>
+ <!-- Development Settings summary. The summary of the item to take the user to Development settings. Development settings are settings meant for application developers. -->
+ <string name="development_settings_summary">Set options for app development</string>
+ <!-- Setting checkbox title for Whether to enable USB debugging support on the phone. -->
+ <!-- Error message for users that aren't allowed to modify developer options [CHAR LIMIT=none] -->
+ <string name="development_settings_not_available">Developer options are not available for this user</string>
+ <!-- Error message for users that aren't allowed to modify VPN settings [CHAR LIMIT=none] -->
+ <string name="vpn_settings_not_available">VPN settings are not available for this user</string>
+ <!-- Error message for users that aren't allowed to modify Tethering settings [CHAR LIMIT=none] -->
+ <string name="tethering_settings_not_available">Tethering settings are not available for this user</string>
+ <!-- Error message for users that aren't allowed to modify Access Point Names settings [CHAR LIMIT=none] -->
+ <string name="apn_settings_not_available">Access Point Name settings are not available for this user</string>
+ <string name="enable_adb">USB debugging</string>
+ <!-- Setting checkbox summary for Whether to enable USB debugging support on the phone -->
+ <string name="enable_adb_summary">Debug mode when USB is connected</string>
+ <!-- Setting title to revoke secure USB debugging authorizations -->
+ <string name="clear_adb_keys">Revoke USB debugging authorizations</string>
+ <!-- [CHAR LIMIT=NONE] Setting checkbox title for Whether to include bug report item in power menu. -->
+ <string name="bugreport_in_power">Bug report shortcut</string>
+ <!-- [CHAR LIMIT=NONE] Setting checkbox summary for Whether to include bug report item in power -->
+ <string name="bugreport_in_power_summary">Show a button in the power menu for taking a bug report</string>
+ <!-- Setting Checkbox title whether to keep the screen on when plugged in to a power source -->
+ <string name="keep_screen_on">Stay awake</string>
+ <!-- setting Checkbox summary whether to keep the screen on when plugged in -->
+ <string name="keep_screen_on_summary">Screen will never sleep while charging</string>
+ <!-- Setting Checkbox title whether to enable bluetooth HCI snoop log -->
+ <string name="bt_hci_snoop_log">Enable Bluetooth HCI snoop log</string>
+ <!-- setting Checkbox summary whether to capture all bluetooth HCI packets in a file -->
+ <string name="bt_hci_snoop_log_summary">Capture all bluetooth HCI packets in a file</string>
+ <!-- setting Checkbox title whether to enable OEM unlock [CHAR_LIMIT=35] -->
+ <string name="oem_unlock_enable">OEM unlocking</string>
+ <!-- setting Checkbox summary whether to enable OEM unlock [CHAR_LIMIT=50] -->
+ <string name="oem_unlock_enable_summary">Allow the bootloader to be unlocked</string>
+ <!-- Confirmation dialog title to ensure user wishes to enable OEM unlock and disable theft protection features -->
+ <string name="confirm_enable_oem_unlock_title">Allow OEM unlocking?</string>
+ <!-- Warning dialog message to confirm user wishes to enable OEM unlock and disable theft protection features -->
+ <string name="confirm_enable_oem_unlock_text">WARNING: Device protection features will not work on this device while this setting is turned on.</string>
+
+ <!-- UI debug setting: select current app to mock location [CHAR LIMIT=50] -->
+ <string name="mock_location_app">Select mock location app</string>
+ <!-- UI debug setting: no mock location app has been set [CHAR LIMIT=50] -->
+ <string name="mock_location_app_not_set">No mock location app set</string>
+ <!-- UI debug setting: mock location app has been set [CHAR LIMIT=50] -->
+ <string name="mock_location_app_set">Mock location app: <xliff:g id="app_name">%1$s</xliff:g></string>
+
+ <!-- Preference category for networking debugging development settings. [CHAR LIMIT=50] -->
+ <string name="debug_networking_category">Networking</string>
+
+ <!-- Setting Checkbox title whether to show options for wireless display certification -->
+ <string name="wifi_display_certification">Wireless display certification</string>
+ <!-- Setting Checkbox title whether to enable WiFi Verbose Logging. [CHAR LIMIT=40] -->
+ <string name="wifi_verbose_logging">Enable Wi\u2011Fi Verbose Logging</string>
+ <!-- Setting Checkbox title whether to enable WiFi Aggressive Handover. [CHAR LIMIT=40] -->
+ <string name="wifi_aggressive_handover">Aggressive Wi\u2011Fi to Cellular handover</string>
+ <!-- Setting Checkbox title whether to enable WiFi Scanning in the presence of traffic. [CHAR LIMIT=80] -->
+ <string name="wifi_allow_scan_with_traffic">Always allow Wi\u2011Fi Roam Scans</string>
+ <!-- Setting Checkbox title whether to enable WiFi Scanning in the presence of traffic. [CHAR LIMIT=80] -->
+ <string name="legacy_dhcp_client">Use legacy DHCP client</string>
+ <!-- Setting Checkbox title whether to always keep cellular data active. [CHAR LIMIT=80] -->
+ <string name="mobile_data_always_on">Cellular data always active</string>
+
+ <!-- setting Checkbox summary whether to show options for wireless display certification -->
+ <string name="wifi_display_certification_summary">Show options for wireless display certification</string>
+ <!-- Setting Checkbox summary whether to enable Wifi verbose Logging [CHAR LIMIT=80] -->
+ <string name="wifi_verbose_logging_summary">Increase Wi\u2011Fi logging level, show per SSID RSSI in Wi\u2011Fi Picker</string>
+ <!-- Setting Checkbox summary whether to enable Wifi aggressive handover [CHAR LIMIT=130] -->
+ <string name="wifi_aggressive_handover_summary">When enabled, Wi\u2011Fi will be more aggressive in handing over the data connection to Cellular, when Wi\u2011Fi signal is low</string>
+ <!-- Setting Checkbox summary whether to always allow WiFi Roam Scans [CHAR LIMIT=130] -->
+ <string name="wifi_allow_scan_with_traffic_summary">Allow/Disallow Wi\u2011Fi Roam Scans based on the amount of data traffic present at the interface</string>
+ <!-- UI debug setting: limit size of Android logger buffers -->
+ <string name="select_logd_size_title">Logger buffer sizes</string>
+ <!-- UI debug setting: limit size of Android logger buffers [CHAR LIMIT=59] -->
+ <string name="select_logd_size_dialog_title">Select Logger sizes per log buffer</string>
+ <!-- UI debug setting: select USB configuration -->
+ <string name="select_usb_configuration_title">Select USB Configuration</string>
+ <!-- UI debug setting: limit size of Android logger buffers [CHAR LIMIT=59] -->
+ <string name="select_usb_configuration_dialog_title">Select USB Configuration</string>
+ <!-- Setting Checkbox title whether to allow mock locations -->
+ <string name="allow_mock_location">Allow mock locations</string>
+ <!-- setting Checkbox summary whether to allow mock locations -->
+ <string name="allow_mock_location_summary">Allow mock locations</string>
+ <!-- Setting Checkbox title whether to enable view attribute inspection -->
+ <string name="debug_view_attributes">Enable view attribute inspection</string>
+ <!-- Setting Checkbox summary whether to use DHCP client from Lollipop (Android 5.0) [CHAR LIMIT=130] -->
+ <string name="legacy_dhcp_client_summary">Use the DHCP client from Lollipop instead of the new Android DHCP client.</string>
+ <string name="mobile_data_always_on_summary">Always keep mobile data active, even when Wi\u2011Fi is active (for fast network switching).</string>
+ <!-- Title of warning dialog about the implications of enabling USB debugging -->
+ <string name="adb_warning_title">Allow USB debugging?</string>
+ <!-- Warning text to user about the implications of enabling USB debugging -->
+ <string name="adb_warning_message">USB debugging is intended for development purposes only. Use it to copy data between your computer and your device, install apps on your device without notification, and read log data.</string>
+ <!-- Message of dialog confirming that user wants to revoke access to adb from all computers they have authorized -->
+ <string name="adb_keys_warning_message">Revoke access to USB debugging from all computers you\u2019ve previously authorized?</string>
+ <!-- Title of warning dialog about the implications of enabling developer settings -->
+ <string name="dev_settings_warning_title">Allow development settings?</string>
+ <!-- Warning text to user about the implications of enabling USB debugging -->
+ <string name="dev_settings_warning_message">These settings are intended for development use only. They can cause your device and the applications on it to break or misbehave.</string>
+ <!-- Title of checkbox setting to perform package verification on apps installed over USB/ADT/ADB [CHAR LIMIT=32] -->
+ <string name="verify_apps_over_usb_title">Verify apps over USB</string>
+ <!-- Summary of checkbox setting to perform package verification on apps installed over USB/ADT/ADB [CHAR LIMIT=NONE] -->
+ <string name="verify_apps_over_usb_summary">Check apps installed via ADB/ADT for harmful behavior.</string>
+
+ <!-- Title of checkbox setting that enables the terminal app. [CHAR LIMIT=32] -->
+ <string name="enable_terminal_title">Local terminal</string>
+ <!-- Summary of checkbox setting that enables the terminal app. [CHAR LIMIT=64] -->
+ <string name="enable_terminal_summary">Enable terminal app that offers local shell access</string>
+
+ <!-- HDCP checking title, used for debug purposes only. [CHAR LIMIT=25] -->
+ <string name="hdcp_checking_title">HDCP checking</string>
+ <!-- HDCP checking dialog title, used for debug purposes only. [CHAR LIMIT=25] -->
+ <string name="hdcp_checking_dialog_title">Set HDCP checking behavior</string>
+
+ <!-- Preference category for app debugging development settings. [CHAR LIMIT=50] -->
+ <string name="debug_debugging_category">Debugging</string>
+
+ <!-- UI debug setting: select current app to debug [CHAR LIMIT=50] -->
+ <string name="debug_app">Select debug app</string>
+ <!-- UI debug setting: no debug app has been set [CHAR LIMIT=50] -->
+ <string name="debug_app_not_set">No debug application set</string>
+ <!-- UI debug setting: debug app has been set [CHAR LIMIT=50] -->
+ <string name="debug_app_set">Debugging application: <xliff:g id="app_name">%1$s</xliff:g></string>
+
+ <!-- UI debug setting: title for app picker dialog [CHAR LIMIT=50] -->
+ <string name="select_application">Select application</string>
+ <!-- UI debug setting: label for app picker to select no applicatiojn [CHAR LIMIT=50] -->
+ <string name="no_application">Nothing</string>
+
+ <!-- UI debug setting: wait for debugger to attach to debugging process? [CHAR LIMIT=50] -->
+ <string name="wait_for_debugger">Wait for debugger</string>
+ <!-- UI debug setting: wait for debugger to attach to debugging process summary [CHAR LIMIT=500] -->
+ <string name="wait_for_debugger_summary">Debugged application waits for debugger to
+ attach before executing</string>
+
+ <!-- Preference category for input debugging development settings. [CHAR LIMIT=25] -->
+ <string name="debug_input_category">Input</string>
+
+ <!-- Preference category for drawing debugging development settings. [CHAR LIMIT=25] -->
+ <string name="debug_drawing_category">Drawing</string>
+
+ <!-- Preference category for hardware accelerated drawing debugging development settings. [CHAR LIMIT=50] -->
+ <string name="debug_hw_drawing_category">Hardware accelerated rendering</string>
+
+ <!-- Preference category for media development settings. [CHAR LIMIT=50] -->
+ <string name="media_category">Media</string>
+
+ <!-- Preference category for monitoring debugging development settings. [CHAR LIMIT=25] -->
+ <string name="debug_monitoring_category">Monitoring</string>
+
+ <!-- UI debug setting: always enable strict mode? [CHAR LIMIT=25] -->
+ <string name="strict_mode">Strict mode enabled</string>
+ <!-- UI debug setting: show strict mode summary [CHAR LIMIT=50] -->
+ <string name="strict_mode_summary">Flash screen when apps do long operations
+ on main thread</string>
+
+ <!-- UI debug setting: show pointer location? [CHAR LIMIT=25] -->
+ <string name="pointer_location">Pointer location</string>
+ <!-- UI debug setting: show pointer location summary [CHAR LIMIT=50] -->
+ <string name="pointer_location_summary">Screen overlay showing current touch data</string>
+
+ <!-- UI debug setting: show touches? [CHAR LIMIT=25] -->
+ <string name="show_touches">Show touches</string>
+ <!-- UI debug setting: show touches location summary [CHAR LIMIT=50] -->
+ <string name="show_touches_summary">Show visual feedback for touches</string>
+
+ <!-- UI debug setting: show where surface updates happen? [CHAR LIMIT=25] -->
+ <string name="show_screen_updates">Show surface updates</string>
+ <!-- UI debug setting: show surface updates summary [CHAR LIMIT=50] -->
+ <string name="show_screen_updates_summary">Flash entire window surfaces when they update</string>
+
+ <!-- UI debug setting: show where window updates happen with GPU rendering? [CHAR LIMIT=25] -->
+ <string name="show_hw_screen_updates">Show GPU view updates</string>
+ <!-- UI debug setting: show GPU rendering screen updates summary [CHAR LIMIT=50] -->
+ <string name="show_hw_screen_updates_summary">Flash views inside windows when drawn with the GPU</string>
+
+ <!-- UI debug setting: show when hardware layers get updated [CHAR LIMIT=25] -->
+ <string name="show_hw_layers_updates">Show hardware layers updates</string>
+ <!-- UI debug setting: show hardware layers updates summary [CHAR LIMIT=50] -->
+ <string name="show_hw_layers_updates_summary">Flash hardware layers green when they update</string>
+
+ <!-- UI debug setting: show the amount of overdraw in apps using the GPU [CHAR LIMIT=25] -->
+ <string name="debug_hw_overdraw">Debug GPU overdraw</string>
+
+ <!-- UI debug setting: disable use of overlays? [CHAR LIMIT=25] -->
+ <string name="disable_overlays">Disable HW overlays</string>
+ <!-- UI debug setting: disable use of overlays summary [CHAR LIMIT=50] -->
+ <string name="disable_overlays_summary">Always use GPU for screen compositing</string>
+
+ <!-- UI debug setting: simulate color space anomalies. [CHAR LIMIT=25] -->
+ <string name="simulate_color_space">Simulate color space</string>
+
+ <!-- UI debug setting: enable various types of OpenGL traces [CHAR LIMIT=25] -->
+ <string name="enable_opengl_traces_title">Enable OpenGL traces</string>
+
+ <!-- UI debug setting: disable USB audio routing title [CHAR LIMIT=32] -->
+ <string name="usb_audio_disable_routing">Disable USB audio routing</string>
+ <!-- UI debug setting: disable USB audio routing summary [CHAR LIMIT=50] -->
+ <string name="usb_audio_disable_routing_summary">Disable automatic routing to USB audio peripherals</string>
+
+ <!-- UI debug setting: show layout bounds information [CHAR LIMIT=25] -->
+ <string name="debug_layout">Show layout bounds</string>
+ <!-- UI debug setting: show layout bounds information summary [CHAR LIMIT=50] -->
+ <string name="debug_layout_summary">Show clip bounds, margins, etc.</string>
+
+ <!-- UI debug setting: force right to left layout [CHAR LIMIT=37] -->
+ <string name="force_rtl_layout_all_locales">Force RTL layout direction</string>
+ <!-- UI debug setting: force right to left layout summary [CHAR LIMIT=100] -->
+ <string name="force_rtl_layout_all_locales_summary">Force screen layout direction to RTL for all locales</string>
+
+ <!-- UI debug setting: show how CPU is being used? [CHAR LIMIT=25] -->
+ <string name="show_cpu_usage">Show CPU usage</string>
+ <!-- UI debug setting: show cpu usage summary [CHAR LIMIT=50] -->
+ <string name="show_cpu_usage_summary">Screen overlay showing current CPU usage</string>
+
+ <!-- UI debug setting: force hardware acceleration to render apps [CHAR LIMIT=25] -->
+ <string name="force_hw_ui">Force GPU rendering</string>
+ <!-- UI debug setting: force hardware acceleration summary [CHAR LIMIT=50] -->
+ <string name="force_hw_ui_summary">Force use of GPU for 2d drawing</string>
+
+ <!-- UI debug setting: force anti-aliasing to render apps [CHAR LIMIT=25] -->
+ <string name="force_msaa">Force 4x MSAA</string>
+ <!-- UI debug setting: force anti-aliasing summary [CHAR LIMIT=50] -->
+ <string name="force_msaa_summary">Enable 4x MSAA in OpenGL ES 2.0 apps</string>
+
+ <!-- UI debug setting: show when non-rectangular clip operations are used [CHAR LIMIT=100] -->
+ <string name="show_non_rect_clip">Debug non-rectangular clip operations</string>
+
+ <!-- UI debug setting: profile time taken by hardware acceleration to render apps [CHAR LIMIT=25] -->
+ <string name="track_frame_time">Profile GPU rendering</string>
+
+ <!-- UI debug setting: scaling factor for window animations [CHAR LIMIT=25] -->
+ <string name="window_animation_scale_title">Window animation scale</string>
+
+ <!-- UI debug setting: scaling factor for transition animations [CHAR LIMIT=25] -->
+ <string name="transition_animation_scale_title">Transition animation scale</string>
+
+ <!-- UI debug setting: scaling factor for all Animator-based animations [CHAR LIMIT=25] -->
+ <string name="animator_duration_scale_title">Animator duration scale</string>
+
+ <!-- UI debug setting: simulate secondary display devices using overlays [CHAR LIMIT=25] -->
+ <string name="overlay_display_devices_title">Simulate secondary displays</string>
+
+ <!-- Preference category for application debugging development settings. [CHAR LIMIT=25] -->
+ <string name="debug_applications_category">Apps</string>
+
+ <!-- UI debug setting: immediately destroy activities? [CHAR LIMIT=25] -->
+ <string name="immediately_destroy_activities">Don\u2019t keep activities</string>
+ <!-- UI debug setting: immediately destroy activities summary [CHAR LIMIT=50] -->
+ <string name="immediately_destroy_activities_summary">Destroy every activity as soon as
+ the user leaves it</string>
+
+ <!-- UI debug setting: limit number of running background processes [CHAR LIMIT=25] -->
+ <string name="app_process_limit_title">Background process limit</string>
+
+ <!-- UI debug setting: show all ANRs? [CHAR LIMIT=25] -->
+ <string name="show_all_anrs">Show all ANRs</string>
+ <!-- UI debug setting: show all ANRs summary [CHAR LIMIT=50] -->
+ <string name="show_all_anrs_summary">Show App Not Responding dialog
+ for background apps</string>
+
+ <!-- UI debug setting: force allow apps on external storage [CHAR LIMIT=50] -->
+ <string name="force_allow_on_external">Force allow apps on external</string>
+ <!-- UI debug setting: force allow on external summary [CHAR LIMIT=150] -->
+ <string name="force_allow_on_external_summary">Makes any app elligible to be written to external storage, regardless of manifest values</string>
+
+ <!-- UI debug setting: force all activites to be resizable for multiwindow [CHAR LIMIT=50] -->
+ <string name="force_resizable_activities">Force activities to be resizable</string>
+ <!-- UI debug setting: force allow on external summary [CHAR LIMIT=150] -->
+ <string name="force_resizable_activities_summary">Makes all activities resizable for multi-window, regardless of manifest values.</string>
+
+ <!-- Local (desktop) backup password menu title [CHAR LIMIT=25] -->
+ <string name="local_backup_password_title">Desktop backup password</string>
+ <!-- Summary text of the "local backup password" setting when the user has not supplied a password -->
+ <string name="local_backup_password_summary_none">Desktop full backups aren\u2019t currently protected</string>
+ <!-- Summary text of the "local backup password" setting when the user has already supplied a password -->
+ <string name="local_backup_password_summary_change">Touch to change or remove the password for desktop full backups</string>
+
+ <!-- Toast message shown when the user successfully sets a new local backup password [CHAR LIMIT=80] -->
+ <string name="local_backup_password_toast_success">New backup password set</string>
+ <!-- Toast message shown when setting a new local backup password fails due to the user not correctly typing the password again for confirmation [CHAR LIMIT=80] -->
+ <string name="local_backup_password_toast_confirmation_mismatch">New password and confirmation don\u2019t match</string>
+ <!-- Toast message shown when setting a new local backup password fails due to the user not supplying the correct existing password. The phrasing here is deliberately quite general. [CHAR LIMIT=80] -->
+ <string name="local_backup_password_toast_validation_failure">Failure setting backup password</string>
+
+ <!-- Name of each color mode for the display. [CHAR LIMIT=40] -->
+ <string-array name="color_mode_names">
+ <item>Vibrant (default)</item>
+ <item>Natural</item>
+ <item>Standard</item>
+ </string-array>
+
+ <!-- Description of each color mode for the display. [CHAR LIMIT=NONE] -->
+ <string-array name="color_mode_descriptions">
+ <item>Enhanced colors</item>
+ <item>Natural colors as seen by the eye</item>
+ <item>Colors optimized for digital content</item>
+ </string-array>
+
+ <!-- Settings item title for inactive apps [CHAR LIMIT=35] -->
+ <string name="inactive_apps_title">Inactive apps</string>
+ <!-- Settings item summary for inactive app [CHAR LIMIT=100] -->
+ <string name="inactive_app_inactive_summary">Inactive. Touch to toggle.</string>
+ <!-- Settings item summary for active app [CHAR LIMIT=100] -->
+ <string name="inactive_app_active_summary">Active. Touch to toggle.</string>
+
+ <!-- Services settings screen, setting option name for the user to go to the screen to view running services -->
+ <string name="runningservices_settings_title">Running services</string>
+ <!-- Services settings screen, setting option summary for the user to go to the screen to view running services -->
+ <string name="runningservices_settings_summary">View and control currently running services</string>
+
+ <!-- Sound & display settings screen, setting option name to change the user interface theme [CHAR LIMIT=30] -->
+ <string name="night_mode_title">Night mode</string>
+ <!-- Sound & display settings screen, setting option summary to change the user interface theme [CHAR LIMIT=100] -->
+ <string name="night_mode_summary">%s</string>
+ <!-- Sound & display settings screen, theme setting value to prefer a light-colored user interface [CHAR LIMIT=30] -->
+ <string name="night_mode_no">Disabled</string>
+ <!-- Sound & display settings screen, theme setting value to prefer a dark-colored user interface [CHAR LIMIT=30] -->
+ <string name="night_mode_yes">Always on</string>
+ <!-- Sound & display settings screen, theme setting value to automatically switch between a light- or dark-colored user interface [CHAR LIMIT=30] -->
+ <string name="night_mode_auto">Automatic</string>
+
+ <!-- Developer settings screen, convert userdata to file encryption option name -->
+ <string name="convert_to_file_encryption">Convert to file encryption</string>
+ <!-- Developer settings screen, convert userdata to file encryption summary when option is available -->
+ <string name="convert_to_file_encryption_enabled">Convert\u2026</string>
+ <!-- Developer settings screen, convert userdata to file encryption summary when option is already done -->
+ <string name="convert_to_file_encryption_done">Already file encrypted</string>
+ <!-- Title used on dialog with final prompt for converting to file encryption -->
+ <string name="title_convert_fbe">Converting to file based encryption</string>
+ <!-- Warning displayed on dialog with final prompt for converting to file encryption -->
+ <string name="convert_to_fbe_warning">
+ Convert data partition to file based encryption.\n
+ !!Warning!! This will erase all your data.\n
+ This feature is alpha, and may not work correctly.\n
+ Press \'Wipe and convert\u2026\' to continue.</string>
+ <!-- Button on dialog that triggers convertion to file encryption -->
+ <string name="button_convert_fbe">Wipe and convert\u2026</string>
+
+ <!-- Name of feature to change color setting for the display [CHAR LIMIT=60] -->
+ <string name="picture_color_mode">Picture color mode</string>
+
+ <!-- Description of feature to change color setting for the display [CHAR LIMIT=NONE] -->
+ <string name="picture_color_mode_desc">Use sRGB</string>
+
+ <!-- Label for disabling color space adjustment [CHAR LIMIT=45] -->
+ <string name="daltonizer_mode_disabled">Disabled</string>
+ <!-- Label for converting display colors to grayscale, which simulates monochromacy (complete color blindness). [CHAR LIMIT=45] -->
+ <string name="daltonizer_mode_monochromacy">Monochromacy</string>
+ <!-- Label for deuteranomaly (red-green color blindness) [CHAR LIMIT=45] -->
+ <string name="daltonizer_mode_deuteranomaly">Deuteranomaly (red-green)</string>
+ <!-- Label for protanomaly (red-green color blindness) [CHAR LIMIT=45] -->
+ <string name="daltonizer_mode_protanomaly">Protanomaly (red-green)</string>
+ <!-- Label for tritanomaly (blue-yellow color blindness) [CHAR LIMIT=45] -->
+ <string name="daltonizer_mode_tritanomaly">Tritanomaly (blue-yellow)</string>
+
+ <!-- Title for the accessibility preference to configure display color space correction. [CHAR LIMIT=NONE] -->
+ <string name="accessibility_display_daltonizer_preference_title">Color correction</string>
+ <!-- Subtitle for the accessibility preference to configure display color space correction. [CHAR LIMIT=NONE] -->
+ <string name="accessibility_display_daltonizer_preference_subtitle">This feature is experimental and may affect performance.</string>
+ <!-- Summary shown for color space correction preference when its value is overridden by another preference [CHAR LIMIT=35] -->
+ <string name="daltonizer_type_overridden">Overridden by <xliff:g id="title" example="Simulate color space">%1$s</xliff:g></string>
+
</resources>
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
index c324abd..6680d88 100644
--- a/packages/SettingsProvider/res/values/defaults.xml
+++ b/packages/SettingsProvider/res/values/defaults.xml
@@ -209,4 +209,7 @@
<!-- Default for Settings.Secure.NFC_PAYMENT_COMPONENT -->
<string name="def_nfc_payment_component"></string>
+
+ <!-- Default setting for ability to add users from the lock screen -->
+ <bool name="def_add_users_from_lockscreen">false</bool>
</resources>
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
index fbf8a2bd9..7365e66 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
@@ -61,6 +61,7 @@
import com.android.internal.annotations.GuardedBy;
import com.android.internal.content.PackageMonitor;
import com.android.internal.os.BackgroundThread;
+import com.android.providers.settings.SettingsState.Setting;
import java.io.File;
import java.io.FileDescriptor;
@@ -72,8 +73,6 @@
import java.util.Set;
import java.util.regex.Pattern;
-import com.android.providers.settings.SettingsState.Setting;
-
/**
* <p>
* This class is a content provider that publishes the system settings.
@@ -1891,7 +1890,7 @@
}
private final class UpgradeController {
- private static final int SETTINGS_VERSION = 122;
+ private static final int SETTINGS_VERSION = 123;
private final int mUserId;
@@ -2043,6 +2042,24 @@
}
currentVersion = 122;
}
+
+ if (currentVersion == 122) {
+ // Version 123: Adding a default value for the ability to add a user from
+ // the lock screen.
+ if (userId == UserHandle.USER_SYSTEM) {
+ final SettingsState globalSettings = getGlobalSettingsLocked();
+ Setting currentSetting = globalSettings.getSettingLocked(
+ Settings.Global.ADD_USERS_WHEN_LOCKED);
+ if (currentSetting == null) {
+ globalSettings.insertSettingLocked(
+ Settings.Global.ADD_USERS_WHEN_LOCKED,
+ getContext().getResources().getBoolean(
+ R.bool.def_add_users_from_lockscreen) ? "1" : "0",
+ SettingsState.SYSTEM_PACKAGE_NAME);
+ }
+ }
+ currentVersion = 123;
+ }
// vXXX: Add new settings above this point.
// Return the current version.
diff --git a/packages/Shell/res/values/strings.xml b/packages/Shell/res/values/strings.xml
index cff36f7..5c25576 100644
--- a/packages/Shell/res/values/strings.xml
+++ b/packages/Shell/res/values/strings.xml
@@ -17,8 +17,8 @@
<resources>
<string name="app_label">Shell</string>
- <!-- Title of notification indicating a bugreport process is in progress. [CHAR LIMIT=50] -->
- <string name="bugreport_in_progress_title">Bug report in progress</string>
+ <!-- Title of notification indicating a bugreport is being generated. [CHAR LIMIT=50] -->
+ <string name="bugreport_in_progress_title">Bug report is being generated</string>
<!-- Title of notification indicating a bugreport has been successfully captured. [CHAR LIMIT=50] -->
<string name="bugreport_finished_title">Bug report captured</string>
@@ -39,4 +39,7 @@
<!-- Toast message sent when the bugreport file could be read. -->
<string name="bugreport_unreadable_text">Bug report file could not be read</string>
+ <!-- Title for bug reports received from dumpstate without a name. [CHAR LIMIT=30]-->
+ <string name="bugreport_unnamed">unnamed</string>
+
</resources>
diff --git a/packages/Shell/src/com/android/shell/BugreportProgressService.java b/packages/Shell/src/com/android/shell/BugreportProgressService.java
index f41f52c..79d4f17 100644
--- a/packages/Shell/src/com/android/shell/BugreportProgressService.java
+++ b/packages/Shell/src/com/android/shell/BugreportProgressService.java
@@ -28,7 +28,6 @@
import java.io.InputStream;
import java.io.PrintWriter;
import java.text.NumberFormat;
-import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.zip.ZipEntry;
@@ -117,11 +116,13 @@
/** How long (in ms) a dumpstate process will be monitored if it didn't show progress. */
private static final long INACTIVITY_TIMEOUT = 3 * DateUtils.MINUTE_IN_MILLIS;
- /** System property used for monitoring progress. */
- private static final String PROPERTY_TEMPLATE_PROGRESS = "dumpstate.%d.progress";
+ /** System properties used for monitoring progress. */
+ private static final String DUMPSTATE_PREFIX = "dumpstate.";
+ private static final String PROGRESS_SUFFIX = ".progress";
+ private static final String MAX_SUFFIX = ".max";
/** System property (and value) used for stop dumpstate. */
- private static final String PROPERTY_CTL_STOP = "ctl.stop";
+ private static final String CTL_STOP = "ctl.stop";
private static final String BUGREPORT_SERVICE = "bugreport";
/** Managed dumpstate processes (keyed by pid) */
@@ -179,13 +180,13 @@
private final class ServiceHandler extends Handler {
public ServiceHandler(Looper looper) {
super(looper);
- pollProgress();
+ poll();
}
@Override
public void handleMessage(Message msg) {
if (msg.what == MSG_POLL) {
- pollProgress();
+ poll();
return;
}
@@ -242,172 +243,191 @@
}
- /**
- * Creates the {@link BugreportInfo} for a process and issue a system notification to
- * indicate its progress.
- *
- * @return whether it succeeded or not.
- */
- private boolean startProgress(String name, int pid, int max) {
- if (name == null) {
- Log.w(TAG, "Missing " + EXTRA_NAME + " on start intent");
- name = "N/A";
- }
- if (pid == -1) {
- Log.e(TAG, "Missing " + EXTRA_PID + " on start intent");
- return false;
- }
- if (max <= 0) {
- Log.e(TAG, "Invalid value for extra " + EXTRA_MAX + ": " + max);
- return false;
- }
-
- final BugreportInfo info = new BugreportInfo(pid, name, max);
- synchronized (mProcesses) {
- if (mProcesses.indexOfKey(pid) >= 0) {
- Log.w(TAG, "PID " + pid + " already watched");
- } else {
- mProcesses.put(info.pid, info);
- }
- }
- updateProgress(info);
- return true;
- }
-
- /**
- * Updates the system notification for a given bug report.
- */
- private void updateProgress(BugreportInfo info) {
- if (info.max <= 0 || info.progress < 0 || info.name == null) {
- Log.e(TAG, "Invalid progress values for " + info);
- return;
- }
-
- final Context context = getApplicationContext();
- final NumberFormat nf = NumberFormat.getPercentInstance();
- nf.setMinimumFractionDigits(2);
- nf.setMaximumFractionDigits(2);
- final String percentText = nf.format((double) info.progress / info.max);
-
- final Intent cancelIntent = new Intent(context, BugreportReceiver.class);
- cancelIntent.setAction(INTENT_BUGREPORT_CANCEL);
- cancelIntent.putExtra(EXTRA_PID, info.pid);
- final Action cancelAction = new Action.Builder(null,
- context.getString(com.android.internal.R.string.cancel),
- PendingIntent.getBroadcast(context, info.pid, cancelIntent,
- PendingIntent.FLAG_CANCEL_CURRENT)).build();
-
- final String title = context.getString(R.string.bugreport_in_progress_title);
- final Notification notification = new Notification.Builder(context)
- .setSmallIcon(com.android.internal.R.drawable.stat_sys_adb)
- .setContentTitle(title)
- .setTicker(title)
- .setContentText(info.name)
- .setContentInfo(percentText)
- .setProgress(info.max, info.progress, false)
- .setOngoing(true)
- .setLocalOnly(true)
- .setColor(context.getColor(
- com.android.internal.R.color.system_notification_accent_color))
- .addAction(cancelAction)
- .build();
-
- NotificationManager.from(context).notify(TAG, info.pid, notification);
- }
-
- /**
- * Finalizes the progress on a given process and sends the finished intent.
- */
- private void stopProgress(int pid, Intent intent) {
- synchronized (mProcesses) {
- if (mProcesses.indexOfKey(pid) < 0) {
- Log.w(TAG, "PID not watched: " + pid);
- } else {
- mProcesses.remove(pid);
- }
- stopSelfWhenDone();
- }
- if (DEBUG) Log.v(TAG, "stopProgress(" + pid + "): cancel notification");
- NotificationManager.from(getApplicationContext()).cancel(TAG, pid);
- if (intent != null) {
- // Bug report finished fine: send a new, different notification.
- if (DEBUG) Log.v(TAG, "stopProgress(" + pid + "): finish bug report");
- onBugreportFinished(pid, intent);
- }
- }
-
- /**
- * Cancels a bugreport upon user's request.
- */
- private void cancel(int pid) {
- Log.i(TAG, "Cancelling PID " + pid + " on user's request");
- SystemProperties.set(PROPERTY_CTL_STOP, BUGREPORT_SERVICE);
- stopProgress(pid, null);
- }
-
- /**
- * Poll {@link SystemProperties} to get the progress on each monitored process.
- */
- private void pollProgress() {
- synchronized (mProcesses) {
- if (mProcesses.size() == 0) {
- Log.d(TAG, "No process to poll progress.");
- }
- for (int i = 0; i < mProcesses.size(); i++) {
- int pid = mProcesses.keyAt(i);
- String property = String.format(PROPERTY_TEMPLATE_PROGRESS, pid);
- int progress = SystemProperties.getInt(property, 0);
- if (progress == 0) {
- Log.v(TAG, "System property " + property + " is not set yet");
- continue;
- }
-
- BugreportInfo info = mProcesses.valueAt(i);
-
- if (progress != info.progress) {
- if (DEBUG) Log.v(TAG, "Updating progress for PID " + pid + " from "
- + info.progress + " to " + progress);
- info.progress = progress;
- info.lastUpdate = System.currentTimeMillis();
- updateProgress(info);
- } else {
- long inactiveTime = System.currentTimeMillis() - info.lastUpdate;
- if (inactiveTime >= INACTIVITY_TIMEOUT) {
- Log.w(TAG, "No progress update for process " + pid + " since "
- + info.getFormattedLastUpdate());
- stopProgress(info.pid, null);
- }
- }
- }
+ private void poll() {
+ if (pollProgress()) {
// Keep polling...
sendEmptyMessageDelayed(MSG_POLL, POLLING_FREQUENCY);
}
}
+ }
- /**
- * Finishes the service when it's not monitoring any more processes.
- */
- private void stopSelfWhenDone() {
- synchronized (mProcesses) {
- if (mProcesses.size() > 0) {
- if (DEBUG) Log.v(TAG, "Staying alive, waiting for pids " + mProcesses);
- return;
- }
- Log.v(TAG, "No more pids to handle, shutting down");
- stopSelf();
- }
+ /**
+ * Creates the {@link BugreportInfo} for a process and issue a system notification to
+ * indicate its progress.
+ *
+ * @return whether it succeeded or not.
+ */
+ private boolean startProgress(String name, int pid, int max) {
+ if (name == null) {
+ Log.w(TAG, "Missing " + EXTRA_NAME + " on start intent");
+ }
+ if (pid == -1) {
+ Log.e(TAG, "Missing " + EXTRA_PID + " on start intent");
+ return false;
+ }
+ if (max <= 0) {
+ Log.e(TAG, "Invalid value for extra " + EXTRA_MAX + ": " + max);
+ return false;
}
- private void onBugreportFinished(int pid, Intent intent) {
- final Context context = getApplicationContext();
- final Configuration conf = context.getResources().getConfiguration();
- final File bugreportFile = getFileExtra(intent, EXTRA_BUGREPORT);
- final File screenshotFile = getFileExtra(intent, EXTRA_SCREENSHOT);
-
- if ((conf.uiMode & Configuration.UI_MODE_TYPE_MASK) != Configuration.UI_MODE_TYPE_WATCH) {
- triggerLocalNotification(context, pid, bugreportFile, screenshotFile);
+ final BugreportInfo info = new BugreportInfo(getApplicationContext(), pid, name, max);
+ synchronized (mProcesses) {
+ if (mProcesses.indexOfKey(pid) >= 0) {
+ Log.w(TAG, "PID " + pid + " already watched");
+ } else {
+ mProcesses.put(info.pid, info);
}
}
+ updateProgress(info);
+ return true;
+ }
+
+ /**
+ * Updates the system notification for a given bug report.
+ */
+ private void updateProgress(BugreportInfo info) {
+ if (info.max <= 0 || info.progress < 0) {
+ Log.e(TAG, "Invalid progress values for " + info);
+ return;
+ }
+
+ final Context context = getApplicationContext();
+ final NumberFormat nf = NumberFormat.getPercentInstance();
+ nf.setMinimumFractionDigits(2);
+ nf.setMaximumFractionDigits(2);
+ final String percentText = nf.format((double) info.progress / info.max);
+
+ final Intent cancelIntent = new Intent(context, BugreportReceiver.class);
+ cancelIntent.setAction(INTENT_BUGREPORT_CANCEL);
+ cancelIntent.putExtra(EXTRA_PID, info.pid);
+ final Action cancelAction = new Action.Builder(null,
+ context.getString(com.android.internal.R.string.cancel),
+ PendingIntent.getBroadcast(context, info.pid, cancelIntent,
+ PendingIntent.FLAG_CANCEL_CURRENT)).build();
+
+ final String title = context.getString(R.string.bugreport_in_progress_title);
+ final String name =
+ info.name != null ? info.name : context.getString(R.string.bugreport_unnamed);
+
+ final Notification notification = new Notification.Builder(context)
+ .setSmallIcon(com.android.internal.R.drawable.stat_sys_adb)
+ .setContentTitle(title)
+ .setTicker(title)
+ .setContentText(name)
+ .setContentInfo(percentText)
+ .setProgress(info.max, info.progress, false)
+ .setOngoing(true)
+ .setLocalOnly(true)
+ .setColor(context.getColor(
+ com.android.internal.R.color.system_notification_accent_color))
+ .addAction(cancelAction)
+ .build();
+
+ NotificationManager.from(context).notify(TAG, info.pid, notification);
+ }
+
+ /**
+ * Finalizes the progress on a given process and sends the finished intent.
+ */
+ private void stopProgress(int pid, Intent intent) {
+ synchronized (mProcesses) {
+ if (mProcesses.indexOfKey(pid) < 0) {
+ Log.w(TAG, "PID not watched: " + pid);
+ } else {
+ mProcesses.remove(pid);
+ }
+ stopSelfWhenDone();
+ }
+ if (DEBUG) Log.v(TAG, "stopProgress(" + pid + "): cancel notification");
+ NotificationManager.from(getApplicationContext()).cancel(TAG, pid);
+ if (intent != null) {
+ // Bug report finished fine: send a new, different notification.
+ if (DEBUG) Log.v(TAG, "stopProgress(" + pid + "): finish bug report");
+ onBugreportFinished(pid, intent);
+ }
+ }
+
+ /**
+ * Cancels a bugreport upon user's request.
+ */
+ private void cancel(int pid) {
+ Log.i(TAG, "Cancelling PID " + pid + " on user's request");
+ SystemProperties.set(CTL_STOP, BUGREPORT_SERVICE);
+ stopProgress(pid, null);
+ }
+
+ /**
+ * Poll {@link SystemProperties} to get the progress on each monitored process.
+ *
+ * @return whether it should keep polling.
+ */
+ private boolean pollProgress() {
+ synchronized (mProcesses) {
+ if (mProcesses.size() == 0) {
+ Log.d(TAG, "No process to poll progress.");
+ }
+ for (int i = 0; i < mProcesses.size(); i++) {
+ final int pid = mProcesses.keyAt(i);
+ final String progressKey = DUMPSTATE_PREFIX + pid + PROGRESS_SUFFIX;
+ final int progress = SystemProperties.getInt(progressKey, 0);
+ if (progress == 0) {
+ Log.v(TAG, "System property " + progressKey + " is not set yet");
+ continue;
+ }
+ final int max = SystemProperties.getInt(DUMPSTATE_PREFIX + pid + MAX_SUFFIX, 0);
+ final BugreportInfo info = mProcesses.valueAt(i);
+ final boolean maxChanged = max > 0 && max != info.max;
+ final boolean progressChanged = progress > 0 && progress != info.progress;
+
+ if (progressChanged || maxChanged) {
+ if (progressChanged) {
+ if (DEBUG) Log.v(TAG, "Updating progress for PID " + pid + " from "
+ + info.progress + " to " + progress);
+ info.progress = progress;
+ }
+ if (maxChanged) {
+ Log.i(TAG, "Updating max progress for PID " + pid + " from " + info.max
+ + " to " + max);
+ info.max = max;
+ }
+ info.lastUpdate = System.currentTimeMillis();
+ updateProgress(info);
+ } else {
+ long inactiveTime = System.currentTimeMillis() - info.lastUpdate;
+ if (inactiveTime >= INACTIVITY_TIMEOUT) {
+ Log.w(TAG, "No progress update for process " + pid + " since "
+ + info.getFormattedLastUpdate());
+ stopProgress(info.pid, null);
+ }
+ }
+ }
+ return true;
+ }
+ }
+
+ /**
+ * Finishes the service when it's not monitoring any more processes.
+ */
+ private void stopSelfWhenDone() {
+ synchronized (mProcesses) {
+ if (mProcesses.size() > 0) {
+ if (DEBUG) Log.v(TAG, "Staying alive, waiting for pids " + mProcesses);
+ return;
+ }
+ Log.v(TAG, "No more pids to handle, shutting down");
+ stopSelf();
+ }
+ }
+
+ private void onBugreportFinished(int pid, Intent intent) {
+ final Context context = getApplicationContext();
+ final Configuration conf = context.getResources().getConfiguration();
+ final File bugreportFile = getFileExtra(intent, EXTRA_BUGREPORT);
+ final File screenshotFile = getFileExtra(intent, EXTRA_SCREENSHOT);
+
+ if ((conf.uiMode & Configuration.UI_MODE_TYPE_MASK) != Configuration.UI_MODE_TYPE_WATCH) {
+ triggerLocalNotification(context, pid, bugreportFile, screenshotFile);
+ }
}
/**
@@ -612,6 +632,8 @@
* Information about a bug report process while its in progress.
*/
private static final class BugreportInfo {
+ private final Context context;
+
/**
* {@code pid} of the {@code dumpstate} process generating the bug report.
*/
@@ -623,12 +645,12 @@
* Initial value is the bug report filename reported by {@code dumpstate}, but user can
* change it later to a more meaningful name.
*/
- final String name;
+ String name;
/**
* Maximum progress of the bug report generation.
*/
- final int max;
+ int max;
/**
* Current progress of the bug report generation.
@@ -640,22 +662,23 @@
*/
long lastUpdate = System.currentTimeMillis();
- BugreportInfo(int pid, String name, int max) {
+ BugreportInfo(Context context, int pid, String name, int max) {
+ this.context = context;
this.pid = pid;
this.name = name;
this.max = max;
}
String getFormattedLastUpdate() {
- return SimpleDateFormat.getDateTimeInstance().format(new Date(lastUpdate));
+ return DateUtils.formatDateTime(context, lastUpdate,
+ DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_TIME);
}
@Override
public String toString() {
final float percent = ((float) progress * 100 / max);
- return String.format("Progress for %s (pid=%d): %d/%d (%2.2f%%) Last update: %s", name,
- pid, progress, max, percent,
- getFormattedLastUpdate());
+ return "Progress for " + name + " (pid=" + pid + "): " + progress + "/" + max
+ + " (" + percent + "%) Last update: " + getFormattedLastUpdate();
}
}
}
diff --git a/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java b/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
index 33c4ef1..a54d9ef 100644
--- a/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
+++ b/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
@@ -104,7 +104,8 @@
public void testFullWorkflow() throws Exception {
final String name = "BUG, Y U NO REPORT?";
// TODO: call method to remove property instead
- SystemProperties.set("dumpstate.42.progress", "-1");
+ SystemProperties.set("dumpstate.42.progress", "0");
+ SystemProperties.set("dumpstate.42.max", "0");
Intent intent = new Intent(INTENT_BUGREPORT_STARTED);
intent.putExtra(EXTRA_PID, 42);
@@ -120,6 +121,9 @@
SystemProperties.set("dumpstate.42.progress", "500");
assertProgressNotification(name, "50.00%");
+ SystemProperties.set("dumpstate.42.max", "2000");
+ assertProgressNotification(name, "25.00%");
+
createTextFile(PLAIN_TEXT_PATH, BUGREPORT_CONTENT);
createTextFile(SCREENSHOT_PATH, SCREENSHOT_CONTENT);
Bundle extras = sendBugreportFinishedIntent(42, PLAIN_TEXT_PATH, SCREENSHOT_PATH);
diff --git a/packages/Shell/tests/src/com/android/shell/UiBot.java b/packages/Shell/tests/src/com/android/shell/UiBot.java
index fa1714e..5e8bab1 100644
--- a/packages/Shell/tests/src/com/android/shell/UiBot.java
+++ b/packages/Shell/tests/src/com/android/shell/UiBot.java
@@ -20,6 +20,7 @@
import android.support.test.uiautomator.UiDevice;
import android.support.test.uiautomator.UiObject;
import android.support.test.uiautomator.UiObjectNotFoundException;
+import android.support.test.uiautomator.UiScrollable;
import android.support.test.uiautomator.UiSelector;
import android.support.test.uiautomator.Until;
import android.util.Log;
@@ -116,21 +117,27 @@
*/
// TODO: UI Automator should provide such logic.
public void chooseActivity(String name) {
- // First select activity if it's not the default option.
- boolean gotIt = mDevice.wait(Until.hasObject(By.text(name)), mTimeout);
- // TODO: if the activity is indeed the default option, call above will timeout, which will
- // make the tests run slower. It might be better to change the logic to assume the default
- // first.
+ // First check if the activity is the default option.
+ String shareText = String.format("Share with %s", name);
+ boolean gotIt = mDevice.wait(Until.hasObject(By.text(shareText)), mTimeout);
+
if (gotIt) {
- Log.v(TAG, "Found activity " + name + ", it's not default action");
- UiObject activityChooser = getVisibleObject(name);
- click(activityChooser, "activity chooser");
+ Log.v(TAG, "Found activity " + name + ", it's the default action");
} else {
- String text = String.format("Share with %s", name);
- Log.v(TAG, "Didn't find activity " + name
- + ", assuming it's the default action and search for '" + text + "'");
- gotIt = mDevice.wait(Until.hasObject(By.text(text)), mTimeout);
- assertTrue("did not find text '" + text + "'", gotIt);
+ // Since it's not, need to find it in the scrollable list...
+ Log.v(TAG, "Activity " + name + " is not default action");
+ UiScrollable activitiesList = new UiScrollable(new UiSelector().scrollable(true));
+
+ UiObject activity;
+ try {
+ activitiesList.scrollForward();
+ activity = getVisibleObject(name);
+ } catch (UiObjectNotFoundException e) {
+ throw new IllegalStateException("didn't find activity '" + name
+ + "' on activities chooser", e);
+ }
+ // ... then select it.
+ click(activity, name);
}
// Then clicks the "Just Once" button.
diff --git a/packages/SystemUI/Android.mk b/packages/SystemUI/Android.mk
index ece34fb..eb63e5d 100644
--- a/packages/SystemUI/Android.mk
+++ b/packages/SystemUI/Android.mk
@@ -21,8 +21,11 @@
LOCAL_RESOURCE_DIR := \
frameworks/base/packages/Keyguard/res \
- $(LOCAL_PATH)/res
-LOCAL_AAPT_FLAGS := --auto-add-overlay --extra-packages com.android.keyguard
+ $(LOCAL_PATH)/res \
+ frameworks/support/v7/recyclerview/res
+
+LOCAL_AAPT_FLAGS := --auto-add-overlay \
+ --extra-packages com.android.keyguard:android.support.v7.recyclerview
ifneq ($(SYSTEM_UI_INCREMENTAL_BUILDS),)
LOCAL_PROGUARD_ENABLED := disabled
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
index bfd8af9..5618e9b 100644
--- a/packages/SystemUI/res/values/colors.xml
+++ b/packages/SystemUI/res/values/colors.xml
@@ -21,7 +21,6 @@
<drawable name="ticker_background_color">#ff1d1d1d</drawable>
<drawable name="system_bar_background">@color/system_bar_background_opaque</drawable>
<color name="system_bar_background_opaque">#ff000000</color>
- <color name="system_bar_background_semi_transparent">#66000000</color> <!-- 40% black -->
<color name="system_bar_background_transparent">#00000000</color>
<color name="notification_panel_solid_background">#ff000000</color>
<drawable name="status_bar_notification_row_background_color">#ff090909</drawable>
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index 902db26..a0052ce 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -175,7 +175,7 @@
<integer name="recents_animate_task_view_remove_duration">250</integer>
<!-- The animation duration for scrolling the stack to a particular item. -->
- <integer name="recents_animate_task_stack_scroll_duration">225</integer>
+ <integer name="recents_animate_task_stack_scroll_duration">200</integer>
<!-- The animation duration for entering and exiting the history. -->
<integer name="recents_history_transition_duration">250</integer>
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index d6a361c..002b9f5 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -1171,13 +1171,23 @@
<!-- Toggles fullscreen screenshots. DO NOT TRANSLATE -->
<string name="overview_fullscreen_thumbnails">Enable fullscreen screenshots</string>
<!-- Description for the toggle for fullscreen screenshots. DO NOT TRANSLATE -->
- <string name="overview_fullscreen_thumbnails_desc">Enable fullscreen screenshots in Overview</string>
+ <string name="overview_fullscreen_thumbnails_desc">Enable fullscreen screenshots in Overview. Restart required.</string>
+
+ <!-- Toggle to enable the Overview nav bar gesture. DO NOT TRANSLATE -->
+ <string name="overview_nav_bar_gesture">Enable navigation bar gesture</string>
+ <!-- Description for the toggle to enable the Overview nav bar gesture. DO NOT TRANSLATE -->
+ <string name="overview_nav_bar_gesture_desc">Enables the gesture to enter Overview by swiping up on the Nav bar</string>
<!-- Toggle to show the history view in Overview. DO NOT TRANSLATE -->
<string name="overview_show_history">Show History</string>
<!-- Description for the toggle to show the history view in Overview. DO NOT TRANSLATE -->
<string name="overview_show_history_desc">Enables the history view to see more recent tasks</string>
+ <!-- Toggle to set the initial scroll state to be paging or stack. DO NOT TRANSLATE -->
+ <string name="overview_initial_state_paging">Initialize to paging</string>
+ <!-- Description for the toggle to set the initial scroll state to be paging or stack. DO NOT TRANSLATE -->
+ <string name="overview_initial_state_paging_desc">Determines whether Overview will initially be in a stacked or paged state</string>
+
<!-- Category in the System UI Tuner settings, where new/experimental
settings are -->
<string name="experimental">Experimental</string>
diff --git a/packages/SystemUI/res/xml/tuner_prefs.xml b/packages/SystemUI/res/xml/tuner_prefs.xml
index f398af3..8dcf8a7 100644
--- a/packages/SystemUI/res/xml/tuner_prefs.xml
+++ b/packages/SystemUI/res/xml/tuner_prefs.xml
@@ -93,11 +93,21 @@
android:summary="@string/overview_page_on_toggle_desc" />
<com.android.systemui.tuner.TunerSwitch
+ android:key="overview_initial_state_paging"
+ android:title="@string/overview_initial_state_paging"
+ android:summary="@string/overview_initial_state_paging_desc" />
+
+ <com.android.systemui.tuner.TunerSwitch
android:key="overview_fast_toggle"
android:title="@string/overview_fast_toggle_via_button"
android:summary="@string/overview_fast_toggle_via_button_desc" />
<com.android.systemui.tuner.TunerSwitch
+ android:key="overview_nav_bar_gesture"
+ android:title="@string/overview_nav_bar_gesture"
+ android:summary="@string/overview_nav_bar_gesture_desc" />
+
+ <com.android.systemui.tuner.TunerSwitch
android:key="overview_fullscreen_thumbnails"
android:title="@string/overview_fullscreen_thumbnails"
android:summary="@string/overview_fullscreen_thumbnails_desc" />
diff --git a/packages/SystemUI/src/com/android/systemui/RecentsComponent.java b/packages/SystemUI/src/com/android/systemui/RecentsComponent.java
index 4cb8a3c..7f6cda0 100644
--- a/packages/SystemUI/src/com/android/systemui/RecentsComponent.java
+++ b/packages/SystemUI/src/com/android/systemui/RecentsComponent.java
@@ -32,7 +32,7 @@
/**
* Docks the top-most task and opens recents.
*/
- void dockTopTask(boolean draggingInRecents, Rect initialBounds);
+ void dockTopTask(boolean draggingInRecents, int stackCreateMode, Rect initialBounds);
/**
* Called during a drag-from-navbar-in gesture.
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index eee685f..443778e 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -43,6 +43,7 @@
import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.UserManager;
+import android.os.storage.StorageManager;
import android.provider.Settings;
import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager;
@@ -135,6 +136,8 @@
private static final String DELAYED_KEYGUARD_ACTION =
"com.android.internal.policy.impl.PhoneWindowManager.DELAYED_KEYGUARD";
+ private static final String DELAYED_LOCK_PROFILE_ACTION =
+ "com.android.internal.policy.impl.PhoneWindowManager.DELAYED_LOCK";
// used for handler messages
private static final int SHOW = 2;
@@ -322,6 +325,8 @@
private boolean mWakeAndUnlocking;
private IKeyguardDrawnCallback mDrawnCallback;
+ private boolean mIsPerUserLock;
+
KeyguardUpdateMonitorCallback mUpdateCallback = new KeyguardUpdateMonitorCallback() {
@Override
@@ -565,6 +570,8 @@
mShowKeyguardWakeLock.setReferenceCounted(false);
mContext.registerReceiver(mBroadcastReceiver, new IntentFilter(DELAYED_KEYGUARD_ACTION));
+ mContext.registerReceiver(
+ mBroadcastReceiver, new IntentFilter(DELAYED_LOCK_PROFILE_ACTION));
mKeyguardDisplayManager = new KeyguardDisplayManager(mContext);
@@ -637,6 +644,7 @@
doKeyguardLocked(null);
mUpdateMonitor.registerCallback(mUpdateCallback);
}
+ mIsPerUserLock = StorageManager.isFileBasedEncryptionEnabled();
// Most services aren't available until the system reaches the ready state, so we
// send it here when the device first boots.
maybeSendUserPresentBroadcast();
@@ -660,7 +668,7 @@
final boolean lockImmediately =
mLockPatternUtils.getPowerButtonInstantlyLocks(currentUser)
|| !mLockPatternUtils.isSecure(currentUser);
- long timeout = getLockTimeout();
+ long timeout = getLockTimeout(KeyguardUpdateMonitor.getCurrentUser());
if (mExitSecureCallback != null) {
if (DEBUG) Log.d(TAG, "pending exit secure callback cancelled");
@@ -710,10 +718,11 @@
mPendingLock = false;
}
}
+ doKeyguardLaterLockedForChildProfiles();
KeyguardUpdateMonitor.getInstance(mContext).dispatchFinishedGoingToSleep(why);
}
- private long getLockTimeout() {
+ private long getLockTimeout(int userId) {
// if the screen turned off because of timeout or the user hit the power button
// and we don't need to lock immediately, set an alarm
// to enable it a little bit later (i.e, give the user a chance
@@ -721,10 +730,6 @@
// having to unlock the screen)
final ContentResolver cr = mContext.getContentResolver();
- // From DisplaySettings
- long displayTimeout = Settings.System.getInt(cr, SCREEN_OFF_TIMEOUT,
- KEYGUARD_DISPLAY_TIMEOUT_DELAY_DEFAULT);
-
// From SecuritySettings
final long lockAfterTimeout = Settings.Secure.getInt(cr,
Settings.Secure.LOCK_SCREEN_LOCK_AFTER_TIMEOUT,
@@ -732,21 +737,28 @@
// From DevicePolicyAdmin
final long policyTimeout = mLockPatternUtils.getDevicePolicyManager()
- .getMaximumTimeToLock(null, KeyguardUpdateMonitor.getCurrentUser());
+ .getMaximumTimeToLock(null, userId);
long timeout;
- if (policyTimeout > 0) {
+
+ UserInfo user = UserManager.get(mContext).getUserInfo(userId);
+ if ((!user.isManagedProfile() && LockPatternUtils.isSeparateWorkChallengeEnabled())
+ || policyTimeout <= 0) {
+ timeout = lockAfterTimeout;
+ } else {
+ // From DisplaySettings
+ long displayTimeout = Settings.System.getInt(cr, SCREEN_OFF_TIMEOUT,
+ KEYGUARD_DISPLAY_TIMEOUT_DELAY_DEFAULT);
+
// policy in effect. Make sure we don't go beyond policy limit.
displayTimeout = Math.max(displayTimeout, 0); // ignore negative values
timeout = Math.min(policyTimeout - displayTimeout, lockAfterTimeout);
- } else {
- timeout = lockAfterTimeout;
}
return timeout;
}
private void doKeyguardLaterLocked() {
- long timeout = getLockTimeout();
+ long timeout = getLockTimeout(KeyguardUpdateMonitor.getCurrentUser());
if (timeout == 0) {
doKeyguardLocked(null);
} else {
@@ -764,6 +776,25 @@
mAlarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, when, sender);
if (DEBUG) Log.d(TAG, "setting alarm to turn off keyguard, seq = "
+ mDelayedShowingSequence);
+ doKeyguardLaterLockedForChildProfiles();
+ }
+
+ private void doKeyguardLaterLockedForChildProfiles() {
+ UserManager um = UserManager.get(mContext);
+ List<UserInfo> profiles = um.getEnabledProfiles(UserHandle.myUserId());
+ if (LockPatternUtils.isSeparateWorkChallengeEnabled() && profiles.size() > 1) {
+ for (UserInfo info : profiles) {
+ if (info.id != UserHandle.myUserId() && info.isManagedProfile()) {
+ long userTimeout = getLockTimeout(info.id);
+ long userWhen = SystemClock.elapsedRealtime() + userTimeout;
+ Intent lockIntent = new Intent(DELAYED_LOCK_PROFILE_ACTION);
+ lockIntent.putExtra(Intent.EXTRA_USER_ID, info.id);
+ PendingIntent lockSender = PendingIntent.getBroadcast(
+ mContext, 0, lockIntent, PendingIntent.FLAG_CANCEL_CURRENT);
+ mAlarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, userWhen, lockSender);
+ }
+ }
+ }
}
private void cancelDoKeyguardLaterLocked() {
@@ -1099,6 +1130,10 @@
showLocked(options);
}
+ private void lockProfile(int userId) {
+ mTrustManager.setDeviceLockedForUser(userId, true);
+ }
+
private boolean shouldWaitForProvisioning() {
return !mUpdateMonitor.isDeviceProvisioned() && !isSecure();
}
@@ -1213,8 +1248,13 @@
if (DEBUG) Log.d(TAG, "received DELAYED_KEYGUARD_ACTION with seq = "
+ sequence + ", mDelayedShowingSequence = " + mDelayedShowingSequence);
synchronized (KeyguardViewMediator.this) {
- if (mDelayedShowingSequence == sequence) {
- doKeyguardLocked(null);
+ doKeyguardLocked(null);
+ }
+ } else if (DELAYED_LOCK_PROFILE_ACTION.equals(intent.getAction())) {
+ int userId = intent.getIntExtra(Intent.EXTRA_USER_ID, 0);
+ if (userId != 0) {
+ synchronized (KeyguardViewMediator.this) {
+ lockProfile(userId);
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSTileServiceWrapper.java b/packages/SystemUI/src/com/android/systemui/qs/QSTileServiceWrapper.java
index 55f4736..a5e1fd5 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSTileServiceWrapper.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSTileServiceWrapper.java
@@ -66,9 +66,9 @@
}
@Override
- public void onClick() {
+ public void onClick(IBinder token) {
try {
- mService.onClick();
+ mService.onClick(token);
} catch (Exception e) {
Log.d(TAG, "Caught exception from QSTileService", e);
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/CustomTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/CustomTile.java
index d26e8d6..04006eb 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/CustomTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/CustomTile.java
@@ -24,12 +24,16 @@
import android.content.pm.PackageManager;
import android.content.pm.ServiceInfo;
import android.graphics.drawable.Drawable;
+import android.os.Binder;
import android.os.IBinder;
+import android.os.RemoteException;
import android.os.UserHandle;
import android.service.quicksettings.IQSTileService;
import android.service.quicksettings.Tile;
import android.util.Log;
-
+import android.view.IWindowManager;
+import android.view.WindowManager;
+import android.view.WindowManagerGlobal;
import com.android.internal.logging.MetricsLogger;
import com.android.systemui.qs.QSTile;
import com.android.systemui.qs.QSTileServiceWrapper;
@@ -38,19 +42,26 @@
public class CustomTile extends QSTile<QSTile.State> {
public static final String PREFIX = "custom(";
+ private static final boolean DEBUG = false;
+
// We don't want to thrash binding and unbinding if the user opens and closes the panel a lot.
// So instead we have a period of waiting.
private static final long UNBIND_DELAY = 30000;
private final ComponentName mComponent;
private final Tile mTile;
+ private final IWindowManager mWindowManager;
+ private final IBinder mToken = new Binder();
private QSTileServiceWrapper mService;
private boolean mListening;
private boolean mBound;
+ private boolean mIsTokenGranted;
+ private boolean mIsShowingDialog;
private CustomTile(QSTileHost host, String action) {
super(host);
+ mWindowManager = WindowManagerGlobal.getWindowManagerService();
mComponent = ComponentName.unflattenFromString(action);
mTile = new Tile(mComponent, host);
try {
@@ -72,12 +83,15 @@
}
public void updateState(Tile tile) {
- Log.d("TileService", "Setting state " + tile.getLabel());
mTile.setIcon(tile.getIcon());
mTile.setLabel(tile.getLabel());
mTile.setContentDescription(tile.getContentDescription());
}
+ public void onDialogShown() {
+ mIsShowingDialog = true;
+ }
+
@Override
public void setListening(boolean listening) {
if (mListening == listening) return;
@@ -95,14 +109,30 @@
if (mService!= null) {
mService.onStopListening();
}
+ if (mIsTokenGranted && !mIsShowingDialog) {
+ try {
+ if (DEBUG) Log.d(TAG, "Removing token");
+ mWindowManager.removeWindowToken(mToken);
+ } catch (RemoteException e) {
+ }
+ mIsTokenGranted = false;
+ }
+ mIsShowingDialog = false;
mHandler.postDelayed(mUnbind, UNBIND_DELAY);
}
}
-
+
@Override
protected void handleDestroy() {
super.handleDestroy();
mHandler.removeCallbacks(mUnbind);
+ if (mIsTokenGranted) {
+ try {
+ if (DEBUG) Log.d(TAG, "Removing token");
+ mWindowManager.removeWindowToken(mToken);
+ } catch (RemoteException e) {
+ }
+ }
mUnbind.run();
}
@@ -119,7 +149,13 @@
@Override
protected void handleClick() {
if (mService != null) {
- mService.onClick();
+ try {
+ if (DEBUG) Log.d(TAG, "Adding token");
+ mWindowManager.addWindowToken(mToken, WindowManager.LayoutParams.TYPE_QS_DIALOG);
+ mIsTokenGranted = true;
+ } catch (RemoteException e) {
+ }
+ mService.onClick(mToken);
} else {
Log.e(TAG, "Click with no service " + getTileSpec());
}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/Recents.java b/packages/SystemUI/src/com/android/systemui/recents/Recents.java
index c98ecb5..b81c23a 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/Recents.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/Recents.java
@@ -365,8 +365,8 @@
}
@Override
- public void dockTopTask(boolean draggingInRecents, Rect initialBounds) {
- mImpl.dockTopTask(draggingInRecents, initialBounds);
+ public void dockTopTask(boolean draggingInRecents, int stackCreateMode, Rect initialBounds) {
+ mImpl.dockTopTask(draggingInRecents, stackCreateMode,initialBounds);
if (draggingInRecents) {
mDraggingInRecentsCurrentUser = sSystemServicesProxy.getCurrentUser();
}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
index 063bb3e..384b86f 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
@@ -425,10 +425,6 @@
EventBus.getDefault().send(new EnterRecentsWindowAnimationCompletedEvent());
}
- if (!launchState.launchedHasConfigurationChanged) {
- mRecentsView.disableLayersForOneFrame();
- }
-
// Notify that recents is now visible
SystemServicesProxy ssp = Recents.getSystemServices();
EventBus.getDefault().send(new RecentsVisibilityChangedEvent(this, ssp, true));
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivityLaunchState.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivityLaunchState.java
index 43db666..e0bd59b 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivityLaunchState.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivityLaunchState.java
@@ -82,7 +82,7 @@
if (launchedFromHome) {
return numTasks - 1;
} else {
- if (flags.isFastToggleRecentsEnabled()) {
+ if (flags.isFastToggleRecentsEnabled() || !flags.isInitialStatePaging()) {
return numTasks - 1;
} else {
return numTasks - 2;
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
index cdfad18..53c10b7 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
@@ -115,8 +115,8 @@
// Recompute some values based on the given state, since we can not rely on the resource
// system to get certain values.
boolean isLandscape = windowRect.width() > windowRect.height();
- hasTransposedNavBar = isLandscape && isLargeScreen && !isXLargeScreen;
- hasTransposedSearchBar = isLandscape && isLargeScreen && !isXLargeScreen;
+ hasTransposedNavBar = isLandscape && !isXLargeScreen;
+ hasTransposedSearchBar = isLandscape && !isXLargeScreen;
}
/**
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsDebugFlags.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsDebugFlags.java
index e8b8816..d778886 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsDebugFlags.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsDebugFlags.java
@@ -30,6 +30,7 @@
private static final String KEY_PAGE_ON_TOGGLE = "overview_page_on_toggle";
private static final String KEY_FULLSCREEN_THUMBNAILS = "overview_fullscreen_thumbnails";
private static final String KEY_SHOW_HISTORY = "overview_show_history";
+ private static final String KEY_INITIAL_STATE_PAGING = "overview_initial_state_paging";
public static class Static {
// Enables debug drawing for the transition thumbnail
@@ -54,6 +55,7 @@
private boolean mPageOnToggle;
private boolean mUseFullscreenThumbnails;
private boolean mShowHistory;
+ private boolean mInitialStatePaging;
/**
* We read the prefs once when we start the activity, then update them as the tuner changes
@@ -63,7 +65,7 @@
// Register all our flags, this will also call onTuningChanged() for each key, which will
// initialize the current state of each flag
TunerService.get(context).addTunable(this, KEY_FAST_TOGGLE, KEY_PAGE_ON_TOGGLE,
- KEY_FULLSCREEN_THUMBNAILS, KEY_SHOW_HISTORY);
+ KEY_FULLSCREEN_THUMBNAILS, KEY_SHOW_HISTORY, KEY_INITIAL_STATE_PAGING);
}
/**
@@ -94,6 +96,13 @@
return mShowHistory;
}
+ /**
+ * @return whether the initial stack state is paging.
+ */
+ public boolean isInitialStatePaging() {
+ return mInitialStatePaging;
+ }
+
@Override
public void onTuningChanged(String key, String newValue) {
switch (key) {
@@ -113,6 +122,10 @@
mShowHistory = (newValue != null) &&
(Integer.parseInt(newValue) != 0);
break;
+ case KEY_INITIAL_STATE_PAGING:
+ mInitialStatePaging = (newValue != null) &&
+ (Integer.parseInt(newValue) != 0);
+ break;
}
EventBus.getDefault().send(new DebugFlagsChangedEvent());
}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java
index 3efb0cc..2a4017a 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java
@@ -539,12 +539,11 @@
showRelativeAffiliatedTask(false);
}
- public void dockTopTask(boolean draggingInRecents, Rect initialBounds) {
+ public void dockTopTask(boolean draggingInRecents, int stackCreateMode, Rect initialBounds) {
SystemServicesProxy ssp = Recents.getSystemServices();
ActivityManager.RunningTaskInfo topTask = ssp.getTopMostTask();
if (topTask != null && !SystemServicesProxy.isHomeStack(topTask.stackId)) {
- ssp.moveTaskToDockedStack(topTask.id,
- ActivityManager.DOCKED_STACK_CREATE_MODE_TOP_OR_LEFT, initialBounds);
+ ssp.moveTaskToDockedStack(topTask.id, stackCreateMode, initialBounds);
showRecents(false /* triggeredFromAltTab */, draggingInRecents, false /* animate */,
true /* reloadTasks*/);
}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java b/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
index 2b20c07..5d17e2c 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
@@ -115,7 +115,6 @@
/** Private constructor */
public SystemServicesProxy(Context context) {
- RecentsDebugFlags flags = Recents.getDebugFlags();
mAccm = AccessibilityManager.getInstance(context);
mAm = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
mIam = ActivityManagerNative.getDefault();
diff --git a/packages/SystemUI/src/com/android/systemui/recents/model/RecentsTaskLoadPlan.java b/packages/SystemUI/src/com/android/systemui/recents/model/RecentsTaskLoadPlan.java
index 3bb89a3..63d09ee 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/model/RecentsTaskLoadPlan.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/model/RecentsTaskLoadPlan.java
@@ -48,7 +48,8 @@
private static boolean DEBUG = false;
private static int MIN_NUM_TASKS = 5;
- private static int SESSION_BEGIN_TIME = 60 /* s/min */ * 60 /* min/hr */ * 6 /* hrs */;
+ private static int SESSION_BEGIN_TIME = 1000 /* ms/s */ * 60 /* s/min */ * 60 /* min/hr */ *
+ 6 /* hrs */;
/** The set of conditions to load tasks. */
public static class Options {
diff --git a/packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java b/packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java
index 530cd2d..7a98393 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java
@@ -137,7 +137,7 @@
/** Returns the index of this task in the list of filtered tasks */
int indexOf(Task t) {
- if (mTaskIndices.containsKey(t.key)) {
+ if (t != null && mTaskIndices.containsKey(t.key)) {
return mTaskIndices.get(t.key);
}
return -1;
@@ -199,8 +199,8 @@
/** Task stack callbacks */
public interface TaskStackCallbacks {
/* Notifies when a task has been removed from the stack */
- void onStackTaskRemoved(TaskStack stack, Task removedTask, int removedTaskIndex,
- boolean wasFrontMostTask, Task newFrontMostTask);
+ void onStackTaskRemoved(TaskStack stack, Task removedTask, boolean wasFrontMostTask,
+ Task newFrontMostTask);
/* Notifies when a task has been removed from the history */
void onHistoryTaskRemoved(TaskStack stack, Task removedTask);
@@ -393,8 +393,7 @@
}
if (mCb != null) {
// Notify that a task has been removed
- mCb.onStackTaskRemoved(this, t, removedTaskIndex, wasFrontMostTask,
- newFrontMostTask);
+ mCb.onStackTaskRemoved(this, t, wasFrontMostTask, newFrontMostTask);
}
} else if (mHistoryTaskList.contains(t)) {
removeTaskImpl(mHistoryTaskList, t);
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java b/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java
index 0911578..a0a1bac 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java
@@ -16,6 +16,8 @@
package com.android.systemui.recents.views;
+import android.animation.Animator;
+import android.animation.AnimatorListenerAdapter;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Canvas;
@@ -27,6 +29,8 @@
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
+import android.view.ViewConfiguration;
+import android.view.ViewPropertyAnimator;
import android.view.WindowInsets;
import android.view.animation.AnimationUtils;
import android.view.animation.Interpolator;
@@ -55,6 +59,8 @@
import com.android.systemui.recents.misc.SystemServicesProxy;
import com.android.systemui.recents.model.Task;
import com.android.systemui.recents.model.TaskStack;
+import com.android.systemui.stackdivider.WindowManagerProxy;
+import com.android.systemui.statusbar.FlingAnimationUtils;
import java.util.ArrayList;
import java.util.List;
@@ -94,8 +100,10 @@
Rect mSystemInsets = new Rect();
+ final FlingAnimationUtils mFlingAnimationUtils;
+
public RecentsView(Context context) {
- super(context);
+ this(context, null);
}
public RecentsView(Context context, AttributeSet attrs) {
@@ -118,6 +126,7 @@
com.android.internal.R.interpolator.fast_out_linear_in);
mHistoryTransitionDuration = res.getInteger(R.integer.recents_history_transition_duration);
mTouchHandler = new RecentsViewTouchHandler(this);
+ mFlingAnimationUtils = new FlingAnimationUtils(context, 0.3f);
LayoutInflater inflater = LayoutInflater.from(context);
mHistoryButton = inflater.inflate(R.layout.recents_history_button, this, false);
@@ -138,6 +147,8 @@
// If onRecentsHidden is not triggered, we need to the stack view again here
mTaskStackView.reset();
mTaskStackView.setStack(stack);
+ removeView(mTaskStackView);
+ addView(mTaskStackView);
} else {
mTaskStackView = new TaskStackView(getContext(), stack);
mTaskStackView.setCallbacks(this);
@@ -443,12 +454,6 @@
return super.verifyDrawable(who);
}
- public void disableLayersForOneFrame() {
- if (mTaskStackView != null) {
- mTaskStackView.disableLayersForOneFrame();
- }
- }
-
/**** TaskStackView.TaskStackCallbacks Implementation ****/
@Override
@@ -515,7 +520,22 @@
}
public final void onBusEvent(DraggingInRecentsEndedEvent event) {
- animate().translationY(0f);
+ ViewPropertyAnimator animator = animate();
+ if (event.velocity > mFlingAnimationUtils.getMinVelocityPxPerSecond()) {
+ animator.translationY(getHeight());
+ animator.withEndAction(new Runnable() {
+ @Override
+ public void run() {
+ WindowManagerProxy.getInstance().maximizeDockedStack();
+ }
+ });
+ mFlingAnimationUtils.apply(animator, getTranslationY(), getHeight(), event.velocity);
+ } else {
+ animator.translationY(0f);
+ animator.setListener(null);
+ mFlingAnimationUtils.apply(animator, getTranslationY(), 0, event.velocity);
+ }
+ animator.start();
}
public final void onBusEvent(ShowHistoryEvent event) {
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java
index 6dc380c..7d5daae 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java
@@ -118,18 +118,21 @@
*/
public static class StackState {
- public static final StackState FREEFORM_ONLY = new StackState(1f);
- public static final StackState STACK_ONLY = new StackState(0f);
- public static final StackState SPLIT = new StackState(0.5f);
+ public static final StackState FREEFORM_ONLY = new StackState(1f, 0);
+ public static final StackState STACK_ONLY = new StackState(0f, 0);
+ public static final StackState SPLIT = new StackState(0.5f, 255);
public final float freeformHeightPct;
+ public final int freeformBackgroundAlpha;
/**
* @param freeformHeightPct the percentage of the stack height (not including paddings) to
* allocate to the freeform workspace
+ * @param freeformBackgroundAlpha the background alpha for the freeform workspace
*/
- StackState(float freeformHeightPct) {
+ StackState(float freeformHeightPct, int freeformBackgroundAlpha) {
this.freeformHeightPct = freeformHeightPct;
+ this.freeformBackgroundAlpha = freeformBackgroundAlpha;
}
/**
@@ -210,7 +213,7 @@
Context mContext;
private TaskStackView mStackView;
- private Interpolator mFastOutSlowInInterpolator;
+ private Interpolator mLinearOutSlowInInterpolator;
private StackState mState = StackState.SPLIT;
// The task bounds (untransformed) for layout. This rect is anchored at mTaskRoot.
@@ -278,7 +281,6 @@
FreeformWorkspaceLayoutAlgorithm mFreeformLayoutAlgorithm;
public TaskStackLayoutAlgorithm(Context context, TaskStackView stackView) {
- SystemServicesProxy ssp = Recents.getSystemServices();
Resources res = context.getResources();
mStackView = stackView;
@@ -293,8 +295,8 @@
mMaxTranslationZ = res.getDimensionPixelSize(R.dimen.recents_task_view_z_max);
mContext = context;
mFreeformLayoutAlgorithm = new FreeformWorkspaceLayoutAlgorithm();
- mFastOutSlowInInterpolator = AnimationUtils.loadInterpolator(context,
- com.android.internal.R.interpolator.fast_out_slow_in);
+ mLinearOutSlowInInterpolator = AnimationUtils.loadInterpolator(context,
+ com.android.internal.R.interpolator.linear_out_slow_in);
}
/**
@@ -309,9 +311,6 @@
*/
public void setSystemInsets(Rect systemInsets) {
mSystemInsets.set(systemInsets);
- if (DEBUG) {
- Log.d(TAG, "setSystemInsets: " + systemInsets);
- }
}
/**
@@ -343,6 +342,7 @@
// The freeform height is the visible height (not including system insets) - padding above
// freeform and below stack - gap between the freeform and stack
+ mState = state;
mStackTopOffset = mFocusedPeekHeight + heightPadding;
mStackBottomOffset = mSystemInsets.bottom + heightPadding;
state.computeRects(mFreeformRect, mStackRect, taskStackBounds, widthPadding, heightPadding,
@@ -486,8 +486,9 @@
if (Float.compare(newState, getFocusState()) != 0) {
mFocusStateAnimator = ObjectAnimator.ofFloat(this, FOCUS_STATE, getFocusState(),
newState);
- mFocusStateAnimator.setDuration(200);
- mFocusStateAnimator.setInterpolator(mFastOutSlowInInterpolator);
+ mFocusStateAnimator.setDuration(mContext.getResources().getInteger(
+ R.integer.recents_animate_task_stack_scroll_duration));
+ mFocusStateAnimator.setInterpolator(mLinearOutSlowInInterpolator);
mFocusStateAnimator.start();
}
}
@@ -498,13 +499,31 @@
public float getDefaultFocusState() {
RecentsActivityLaunchState launchState = Recents.getConfiguration().getLaunchState();
RecentsDebugFlags debugFlags = Recents.getDebugFlags();
- if (debugFlags.isPageOnToggleEnabled() || launchState.launchedWithAltTab) {
+ if (launchState.launchedWithAltTab ||
+ (debugFlags.isPageOnToggleEnabled() && debugFlags.isInitialStatePaging())) {
return 1f;
}
return 0f;
}
/**
+ * Returns the task progress that would put the task just off the front of the stack.
+ */
+ public float getStackFrontTaskProgress(float stackScroll) {
+ float max = mUnfocusedRange.relativeMax +
+ mFocusState * (mFocusedRange.relativeMax - mUnfocusedRange.relativeMax);
+ return stackScroll + max;
+ }
+
+ /**
+ *
+ * Returns the current stack state.
+ */
+ public StackState getStackState() {
+ return mState;
+ }
+
+ /**
* Computes the maximum number of visible tasks and thumbnails when the scroll is at the initial
* stack scroll. Requires that update() is called first.
*/
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
index d45fba2..cc5aaae 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
@@ -16,6 +16,7 @@
package com.android.systemui.recents.views;
+import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.content.ComponentName;
import android.content.Context;
@@ -23,8 +24,11 @@
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.drawable.ColorDrawable;
+import android.graphics.drawable.Drawable;
import android.os.Bundle;
+import android.util.IntProperty;
import android.util.Log;
+import android.util.Property;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
@@ -90,6 +94,19 @@
private static final float SHOW_HISTORY_BUTTON_SCROLL_THRESHOLD = 0.3f;
private static final float HIDE_HISTORY_BUTTON_SCROLL_THRESHOLD = 0.3f;
+ public static final Property<ColorDrawable, Integer> COLOR_DRAWABLE_ALPHA =
+ new IntProperty<ColorDrawable>("colorDrawableAlpha") {
+ @Override
+ public void setValue(ColorDrawable object, int alpha) {
+ object.setAlpha(alpha);
+ }
+
+ @Override
+ public Integer get(ColorDrawable object) {
+ return object.getAlpha();
+ }
+ };
+
/** The TaskView callbacks */
interface TaskStackViewCallbacks {
public void onTaskViewClicked(TaskStackView stackView, TaskView tv, TaskStack stack, Task t,
@@ -102,10 +119,11 @@
TaskStackViewTouchHandler mTouchHandler;
TaskStackViewCallbacks mCb;
ColorDrawable mFreeformWorkspaceBackground;
+ ObjectAnimator mFreeformWorkspaceBackgroundAnimator;
ViewPool<TaskView, Task> mViewPool;
ArrayList<TaskViewTransform> mCurrentTaskTransforms = new ArrayList<>();
DozeTrigger mUIDozeTrigger;
- int mFocusedTaskIndex = -1;
+ Task mFocusedTask;
// Optimizations
int mStackViewsAnimationDuration;
boolean mStackViewsDirty = true;
@@ -119,7 +137,6 @@
int[] mTmpVisibleRange = new int[2];
Rect mTmpRect = new Rect();
RectF mTmpTaskRect = new RectF();
- TaskViewTransform mTmpTransform = new TaskViewTransform();
TaskViewTransform mTmpStackBackTransform = new TaskViewTransform();
TaskViewTransform mTmpStackFrontTransform = new TaskViewTransform();
HashMap<Task, TaskView> mTmpTaskViewMap = new HashMap<>();
@@ -127,7 +144,6 @@
List<TaskView> mImmutableTaskViews = new ArrayList<>();
List<TaskView> mTmpTaskViews = new ArrayList<>();
LayoutInflater mInflater;
- boolean mLayersDisabled;
boolean mTouchExplorationEnabled;
Interpolator mFastOutSlowInInterpolator;
@@ -186,6 +202,7 @@
setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
mFreeformWorkspaceBackground = new ColorDrawable(0x33000000);
+ mFreeformWorkspaceBackground.setCallback(this);
}
/** Sets the callbacks */
@@ -462,24 +479,14 @@
Log.d(TAG, "picking up from pool: " + task.key);
}
tv = mViewPool.pickUpViewFromPool(task, task);
- if (mLayersDisabled) {
- tv.disableLayersForOneFrame();
- }
} else {
// Reattach it in the right z order
- detachViewFromParent(tv);
- int insertIndex = -1;
int taskIndex = mStack.indexOfStackTask(task);
- taskViews = getTaskViews();
- taskViewCount = taskViews.size();
- for (int j = 0; j < taskViewCount; j++) {
- Task tvTask = taskViews.get(j).getTask();
- if (taskIndex <= mStack.indexOfStackTask(tvTask)) {
- insertIndex = j;
- break;
- }
+ int insertIndex = findTaskViewInsertIndex(task, taskIndex);
+ if (insertIndex != getTaskViews().indexOf(tv)){
+ detachViewFromParent(tv);
+ attachViewToParent(tv, insertIndex, tv.getLayoutParams());
}
- attachViewToParent(tv, insertIndex, tv.getLayoutParams());
}
// Animate the task into place
@@ -500,9 +507,6 @@
if (tv == null) {
tv = mViewPool.pickUpViewFromPool(task, task);
- if (mLayersDisabled) {
- tv.disableLayersForOneFrame();
- }
if (mStackViewsAnimationDuration > 0) {
// For items in the list, put them in start animating them from the
// approriate ends of the list where they are expected to appear
@@ -517,8 +521,9 @@
} else {
if (!hasStackFrontTransform) {
hasStackFrontTransform = true;
- mLayoutAlgorithm.getStackTransform(1f, 0f, mTmpStackFrontTransform,
- null);
+ mLayoutAlgorithm.getStackTransform(
+ mLayoutAlgorithm.getStackFrontTaskProgress(0f), 0f,
+ mTmpStackFrontTransform, null);
}
tv.updateViewPropertiesToTaskTransform(mTmpStackFrontTransform, 0, 0,
mFastOutSlowInInterpolator, mRequestUpdateClippingListener);
@@ -612,7 +617,6 @@
SystemServicesProxy ssp = Recents.getSystemServices();
if (ssp.hasFreeformWorkspaceSupport()) {
mTmpRect.set(mLayoutAlgorithm.mFreeformRect);
- mFreeformWorkspaceBackground.setAlpha(255);
mFreeformWorkspaceBackground.setBounds(mTmpRect);
}
@@ -642,7 +646,7 @@
* @return whether or not the stack will scroll as a part of this focus change
*/
private boolean setFocusedTask(int taskIndex, boolean scrollToTask, final boolean animated,
- final boolean requestViewFocus) {
+ final boolean requestViewFocus) {
// Find the next task to focus
int newFocusedTaskIndex = mStack.getStackTaskCount() > 0 ?
Math.max(0, Math.min(mStack.getStackTaskCount() - 1, taskIndex)) : -1;
@@ -650,16 +654,13 @@
mStack.getStackTasks().get(newFocusedTaskIndex) : null;
// Reset the last focused task state if changed
- if (mFocusedTaskIndex != -1) {
- Task focusedTask = mStack.getStackTasks().get(mFocusedTaskIndex);
- if (focusedTask != newFocusedTask) {
- resetFocusedTask(focusedTask);
- }
+ if (mFocusedTask != null) {
+ resetFocusedTask(mFocusedTask);
}
boolean willScroll = false;
- mFocusedTaskIndex = newFocusedTaskIndex;
- if (mFocusedTaskIndex != -1) {
+ mFocusedTask = newFocusedTask;
+ if (newFocusedTask != null) {
Runnable focusTaskRunnable = new Runnable() {
@Override
public void run() {
@@ -729,13 +730,11 @@
*/
public void setRelativeFocusedTask(boolean forward, boolean stackTasksOnly, boolean animated,
boolean cancelWindowAnimations) {
- int newIndex = -1;
- if (mFocusedTaskIndex != -1) {
+ int newIndex = mStack.indexOfStackTask(mFocusedTask);
+ if (mFocusedTask != null) {
if (stackTasksOnly) {
List<Task> tasks = mStack.getStackTasks();
- newIndex = mFocusedTaskIndex;
- Task task = tasks.get(mFocusedTaskIndex);
- if (task.isFreeformTask()) {
+ if (mFocusedTask.isFreeformTask()) {
// Try and focus the front most stack task
TaskView tv = getFrontMostTaskView(stackTasksOnly);
if (tv != null) {
@@ -743,7 +742,7 @@
}
} else {
// Try the next task if it is a stack task
- int tmpNewIndex = mFocusedTaskIndex + (forward ? -1 : 1);
+ int tmpNewIndex = newIndex + (forward ? -1 : 1);
if (0 <= tmpNewIndex && tmpNewIndex < tasks.size()) {
Task t = tasks.get(tmpNewIndex);
if (!t.isFreeformTask()) {
@@ -755,7 +754,7 @@
// No restrictions, lets just move to the new task (looping forward/backwards if
// necessary)
int taskCount = mStack.getStackTaskCount();
- newIndex = (mFocusedTaskIndex + (forward ? -1 : 1) + taskCount) % taskCount;
+ newIndex = (newIndex + (forward ? -1 : 1) + taskCount) % taskCount;
}
} else {
// We don't have a focused task, so focus the first visible task view
@@ -784,17 +783,14 @@
tv.setFocusedState(false, false /* animated */, false /* requestViewFocus */);
}
}
- mFocusedTaskIndex = -1;
+ mFocusedTask = null;
}
/**
* Returns the focused task.
*/
Task getFocusedTask() {
- if (mFocusedTaskIndex != -1) {
- return mStack.getStackTasks().get(mFocusedTaskIndex);
- }
- return null;
+ return mFocusedTask;
}
@Override
@@ -819,12 +815,13 @@
super.onInitializeAccessibilityNodeInfo(info);
List<TaskView> taskViews = getTaskViews();
int taskViewCount = taskViews.size();
- if (taskViewCount > 1 && mFocusedTaskIndex != -1) {
+ if (taskViewCount > 1 && mFocusedTask != null) {
info.setScrollable(true);
- if (mFocusedTaskIndex > 0) {
+ int focusedTaskIndex = mStack.indexOfStackTask(mFocusedTask);
+ if (focusedTaskIndex > 0) {
info.addAction(AccessibilityNodeInfo.ACTION_SCROLL_FORWARD);
}
- if (mFocusedTaskIndex < mStack.getStackTaskCount() - 1) {
+ if (focusedTaskIndex < mStack.getStackTaskCount() - 1) {
info.addAction(AccessibilityNodeInfo.ACTION_SCROLL_BACKWARD);
}
}
@@ -1027,6 +1024,11 @@
mStartEnterAnimationContext = null;
}
+ // Animate in the freeform workspace
+ animateFreeformWorkspaceBackgroundAlpha(
+ mLayoutAlgorithm.getStackState().freeformBackgroundAlpha, 150,
+ mFastOutSlowInInterpolator);
+
// Set the task focused state without requesting view focus, and leave the focus animations
// until after the enter-animation
RecentsConfiguration config = Recents.getConfiguration();
@@ -1088,11 +1090,11 @@
// requesting view focus in onFirstLayout(), actually request view focus and
// animate the focused state if we are alt-tabbing now, after the window enter
// animation is completed
- if (mFocusedTaskIndex != -1) {
+ if (mFocusedTask != null) {
RecentsConfiguration config = Recents.getConfiguration();
RecentsActivityLaunchState launchState = config.getLaunchState();
- setFocusedTask(mFocusedTaskIndex, false /* scrollToTask */,
- launchState.launchedWithAltTab);
+ setFocusedTask(mStack.indexOfStackTask(mFocusedTask),
+ false /* scrollToTask */, launchState.launchedWithAltTab);
}
}
});
@@ -1106,6 +1108,11 @@
mStackScroller.stopBoundScrollAnimation();
// Animate all the task views out of view
ctx.offscreenTranslationY = mLayoutAlgorithm.mStackRect.bottom;
+ // Dismiss the freeform workspace background
+ int taskViewExitToHomeDuration = getResources().getInteger(
+ R.integer.recents_task_exit_to_home_duration);
+ animateFreeformWorkspaceBackgroundAlpha(0, taskViewExitToHomeDuration,
+ mFastOutSlowInInterpolator);
List<TaskView> taskViews = getTaskViews();
int taskViewCount = taskViews.size();
@@ -1146,8 +1153,6 @@
@Override
protected void dispatchDraw(Canvas canvas) {
- mLayersDisabled = false;
-
// Draw the freeform workspace background
SystemServicesProxy ssp = Recents.getSystemServices();
if (ssp.hasFreeformWorkspaceSupport()) {
@@ -1159,12 +1164,12 @@
super.dispatchDraw(canvas);
}
- public void disableLayersForOneFrame() {
- mLayersDisabled = true;
- List<TaskView> taskViews = getTaskViews();
- for (int i = 0; i < taskViews.size(); i++) {
- taskViews.get(i).disableLayersForOneFrame();
+ @Override
+ protected boolean verifyDrawable(Drawable who) {
+ if (who == mFreeformWorkspaceBackground) {
+ return true;
}
+ return super.verifyDrawable(who);
}
/**
@@ -1182,9 +1187,9 @@
/**** TaskStackCallbacks Implementation ****/
@Override
- public void onStackTaskRemoved(TaskStack stack, Task removedTask, int removedTaskIndex,
- boolean wasFrontMostTask, Task newFrontMostTask) {
- if (mFocusedTaskIndex == removedTaskIndex) {
+ public void onStackTaskRemoved(TaskStack stack, Task removedTask, boolean wasFrontMostTask,
+ Task newFrontMostTask) {
+ if (mFocusedTask == removedTask) {
resetFocusedTask(removedTask);
}
@@ -1313,19 +1318,8 @@
tv.setNoUserInteractionState();
// Find the index where this task should be placed in the stack
- int insertIndex = -1;
int taskIndex = mStack.indexOfStackTask(task);
- if (taskIndex != -1) {
- List<TaskView> taskViews = getTaskViews();
- int taskViewCount = taskViews.size();
- for (int i = 0; i < taskViewCount; i++) {
- Task tvTask = taskViews.get(i).getTask();
- if (taskIndex < mStack.indexOfStackTask(tvTask)) {
- insertIndex = i;
- break;
- }
- }
- }
+ int insertIndex = findTaskViewInsertIndex(task, taskIndex);
// Add/attach the view to the hierarchy
if (isNewView) {
@@ -1343,7 +1337,7 @@
tv.setCallbacks(this);
tv.setTouchEnabled(true);
tv.setClipViewInStack(true);
- if (mFocusedTaskIndex == taskIndex) {
+ if (mFocusedTask == task) {
tv.setFocusedState(true, false /* animated */, false /* requestViewFocus */);
}
}
@@ -1429,10 +1423,12 @@
}
public final void onBusEvent(DismissFocusedTaskViewEvent event) {
- if (mFocusedTaskIndex != -1) {
- Task t = mStack.getStackTasks().get(mFocusedTaskIndex);
- TaskView tv = getChildViewForTask(t);
- tv.dismissTask();
+ if (mFocusedTask != null) {
+ TaskView tv = getChildViewForTask(mFocusedTask);
+ if (tv != null) {
+ tv.dismissTask();
+ }
+ resetFocusedTask(mFocusedTask);
}
}
@@ -1574,4 +1570,50 @@
// Remove the task from the stack
mStack.removeTask(task);
}
+
+ /**
+ * Starts an alpha animation on the freeform workspace background.
+ */
+ private void animateFreeformWorkspaceBackgroundAlpha(int targetAlpha, int duration,
+ Interpolator interpolator) {
+ if (mFreeformWorkspaceBackground.getAlpha() == targetAlpha) {
+ return;
+ }
+
+ Utilities.cancelAnimationWithoutCallbacks(mFreeformWorkspaceBackgroundAnimator);
+ mFreeformWorkspaceBackgroundAnimator = ObjectAnimator.ofInt(mFreeformWorkspaceBackground,
+ COLOR_DRAWABLE_ALPHA, mFreeformWorkspaceBackground.getAlpha(), targetAlpha);
+ mFreeformWorkspaceBackgroundAnimator.setDuration(duration);
+ mFreeformWorkspaceBackgroundAnimator.setInterpolator(interpolator);
+ mFreeformWorkspaceBackgroundAnimator.start();
+ }
+
+ /**
+ * Returns the insert index for the task in the current set of task views. If the given task
+ * is already in the task view list, then this method returns the insert index assuming it
+ * is first removed at the previous index.
+ *
+ * @param task the task we are finding the index for
+ * @param taskIndex the index of the task in the stack
+ */
+ private int findTaskViewInsertIndex(Task task, int taskIndex) {
+ if (taskIndex != -1) {
+ List<TaskView> taskViews = getTaskViews();
+ boolean foundTaskView = false;
+ int taskViewCount = taskViews.size();
+ for (int i = 0; i < taskViewCount; i++) {
+ Task tvTask = taskViews.get(i).getTask();
+ if (tvTask == task) {
+ foundTaskView = true;
+ } else if (taskIndex < mStack.indexOfStackTask(tvTask)) {
+ if (foundTaskView) {
+ return i - 1;
+ } else {
+ return i;
+ }
+ }
+ }
+ }
+ return -1;
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewScroller.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewScroller.java
index 4095d2e..56942a8 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewScroller.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewScroller.java
@@ -49,7 +49,7 @@
ObjectAnimator mScrollAnimator;
float mFinalAnimatedScroll;
- Interpolator mLinearOutSlowInInterpolator;
+ private Interpolator mLinearOutSlowInInterpolator;
public TaskStackViewScroller(Context context, TaskStackLayoutAlgorithm layoutAlgorithm) {
mContext = context;
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java
index 907ed2f..1a6f129 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java
@@ -176,11 +176,11 @@
}
case MotionEvent.ACTION_POINTER_DOWN: {
final int index = ev.getActionIndex();
- mDownX = (int) ev.getX();
- mDownY = (int) ev.getY();
+ mActivePointerId = ev.getPointerId(index);
+ mDownX = (int) ev.getX(index);
+ mDownY = (int) ev.getY(index);
mLastY = mDownY;
mDownScrollP = mScroller.getStackScroll();
- mActivePointerId = ev.getPointerId(index);
mVelocityTracker.addMovement(ev);
break;
}
@@ -221,6 +221,10 @@
// Select a new active pointer id and reset the motion state
final int newPointerIndex = (pointerIndex == 0) ? 1 : 0;
mActivePointerId = ev.getPointerId(newPointerIndex);
+ mDownX = (int) ev.getX(pointerIndex);
+ mDownY = (int) ev.getY(pointerIndex);
+ mLastY = mDownY;
+ mDownScrollP = mScroller.getStackScroll();
}
mVelocityTracker.addMovement(ev);
break;
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
index 1baa1a3..813a1fc2 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
@@ -659,10 +659,6 @@
}
}
- public void disableLayersForOneFrame() {
- mHeaderView.disableLayersForOneFrame();
- }
-
/**** TaskCallbacks Implementation ****/
/** Binds this task view to the task */
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java
index ec59f31..78a2c7f 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java
@@ -80,13 +80,10 @@
// Header dim, which is only used when task view hardware layers are not used
Paint mDimLayerPaint = new Paint();
- PorterDuffColorFilter mDimColorFilter = new PorterDuffColorFilter(0, PorterDuff.Mode.SRC_ATOP);
Interpolator mFastOutSlowInInterpolator;
Interpolator mFastOutLinearInInterpolator;
- boolean mLayersDisabled;
-
public TaskViewHeader(Context context) {
this(context, null);
}
@@ -111,6 +108,7 @@
});
// Load the dismiss resources
+ mDimLayerPaint.setColor(Color.argb(0, 0, 0, 0));
mLightDismissDrawable = context.getDrawable(R.drawable.recents_dismiss_light);
mDarkDismissDrawable = context.getDrawable(R.drawable.recents_dismiss_dark);
mDismissContentDescription =
@@ -173,21 +171,13 @@
canvas.restoreToCount(count);
}
- @Override
- public boolean hasOverlappingRendering() {
- return false;
- }
-
/**
* Sets the dim alpha, only used when we are not using hardware layers.
* (see RecentsConfiguration.useHardwareLayers)
*/
void setDimAlpha(int alpha) {
- mDimColorFilter.setColor(Color.argb(alpha, 0, 0, 0));
- mDimLayerPaint.setColorFilter(mDimColorFilter);
- if (!mLayersDisabled) {
- setLayerType(LAYER_TYPE_HARDWARE, mDimLayerPaint);
- }
+ mDimLayerPaint.setColor(Color.argb(alpha, 0, 0, 0));
+ invalidate();
}
/** Returns the secondary color for a primary color. */
@@ -341,23 +331,11 @@
@Override
protected void dispatchDraw(Canvas canvas) {
super.dispatchDraw(canvas);
- if (mLayersDisabled) {
- mLayersDisabled = false;
- postOnAnimation(new Runnable() {
- @Override
- public void run() {
- mLayersDisabled = false;
- setLayerType(LAYER_TYPE_HARDWARE, mDimLayerPaint);
- }
- });
- }
- }
- public void disableLayersForOneFrame() {
- mLayersDisabled = true;
-
- // Disable layer for a frame so we can draw our first frame faster.
- setLayerType(LAYER_TYPE_NONE, null);
+ // Draw the thumbnail with the rounded corners
+ canvas.drawRoundRect(0, 0, getWidth(), getHeight(),
+ mCornerRadius,
+ mCornerRadius, mDimLayerPaint);
}
/** Notifies the associated TaskView has been focused. */
diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java b/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java
index 98f3f0c..93264ff 100644
--- a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java
+++ b/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java
@@ -74,7 +74,7 @@
private final Rect mTmpRect = new Rect();
private final Rect mLastResizeRect = new Rect();
- private final WindowManagerProxy mWindowManagerProxy = new WindowManagerProxy();
+ private final WindowManagerProxy mWindowManagerProxy = WindowManagerProxy.getInstance();
private Interpolator mFastOutSlowInInterpolator;
private final Interpolator mTouchResponseInterpolator =
new PathInterpolator(0.3f, 0f, 0.1f, 1f);
diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/WindowManagerProxy.java b/packages/SystemUI/src/com/android/systemui/stackdivider/WindowManagerProxy.java
index 0d3f803..58de5d5 100644
--- a/packages/SystemUI/src/com/android/systemui/stackdivider/WindowManagerProxy.java
+++ b/packages/SystemUI/src/com/android/systemui/stackdivider/WindowManagerProxy.java
@@ -37,6 +37,8 @@
private static final String TAG = "WindowManagerProxy";
+ private static final WindowManagerProxy sInstance = new WindowManagerProxy();
+
@GuardedBy("mResizeRect")
private final Rect mResizeRect = new Rect();
private final Rect mTmpRect = new Rect();
@@ -78,6 +80,13 @@
}
};
+ private WindowManagerProxy() {
+ }
+
+ public static WindowManagerProxy getInstance() {
+ return sInstance;
+ }
+
public void resizeDockedStack(Rect rect) {
synchronized (mResizeRect) {
mResizeRect.set(rect);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java
index 1601b83..a3f404a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java
@@ -146,7 +146,8 @@
mWarning = 0xffff0000;
} else {
mOpaque = context.getColor(R.color.system_bar_background_opaque);
- mSemiTransparent = context.getColor(R.color.system_bar_background_semi_transparent);
+ mSemiTransparent = context.getColor(
+ com.android.internal.R.color.system_bar_background_semi_transparent);
mTransparent = context.getColor(R.color.system_bar_background_transparent);
mWarning = context.getColor(com.android.internal.R.color.battery_saver_mode_color);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarGestureHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarGestureHelper.java
index d91bfb92..a2616fe 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarGestureHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarGestureHelper.java
@@ -16,30 +16,29 @@
package com.android.systemui.statusbar.phone;
+import android.app.ActivityManager;
import android.content.Context;
-import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Rect;
-import android.os.SystemProperties;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.VelocityTracker;
import android.view.ViewConfiguration;
-import android.view.WindowManager;
import com.android.systemui.R;
import com.android.systemui.RecentsComponent;
import com.android.systemui.stackdivider.Divider;
-import com.android.systemui.statusbar.BaseStatusBar;
+import com.android.systemui.tuner.TunerService;
import static android.view.WindowManager.*;
/**
* Class to detect gestures on the navigation bar.
*/
-public class NavigationBarGestureHelper extends GestureDetector.SimpleOnGestureListener {
+public class NavigationBarGestureHelper extends GestureDetector.SimpleOnGestureListener
+ implements TunerService.Tunable {
- private static final String DOCK_WINDOW_GESTURE_ENABLED_PROP = "persist.dock_gesture_enabled";
+ private static final String KEY_DOCK_WINDOW_GESTURE = "overview_nav_bar_gesture";
/**
* When dragging from the navigation bar, we drag in recents.
@@ -53,6 +52,7 @@
private RecentsComponent mRecentsComponent;
private Divider mDivider;
+ private Context mContext;
private boolean mIsVertical;
private boolean mIsRTL;
@@ -69,13 +69,14 @@
private int mDragMode;
public NavigationBarGestureHelper(Context context) {
+ mContext = context;
ViewConfiguration configuration = ViewConfiguration.get(context);
Resources r = context.getResources();
mScrollTouchSlop = r.getDimensionPixelSize(R.dimen.navigation_bar_min_swipe_distance);
mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
mMinFlingVelocity = configuration.getScaledMinimumFlingVelocity();
mTaskSwitcherDetector = new GestureDetector(context, this);
- mDockWindowEnabled = SystemProperties.getBoolean(DOCK_WINDOW_GESTURE_ENABLED_PROP, false);
+ TunerService.get(context).addTunable(this, KEY_DOCK_WINDOW_GESTURE);
}
public void setComponents(RecentsComponent recentsComponent, Divider divider) {
@@ -172,6 +173,7 @@
== DOCKED_INVALID) {
mDragMode = calculateDragMode();
Rect initialBounds = null;
+ int createMode = ActivityManager.DOCKED_STACK_CREATE_MODE_TOP_OR_LEFT;
if (mDragMode == DRAG_MODE_DIVIDER) {
initialBounds = new Rect();
mDivider.getView().calculateBoundsForPosition(mIsVertical
@@ -181,8 +183,12 @@
? DOCKED_TOP
: DOCKED_LEFT,
initialBounds);
+ } else if (mDragMode == DRAG_MODE_RECENTS && mTouchDownX
+ < mContext.getResources().getDisplayMetrics().widthPixels / 2) {
+ createMode = ActivityManager.DOCKED_STACK_CREATE_MODE_BOTTOM_OR_RIGHT;
}
- mRecentsComponent.dockTopTask(mDragMode == DRAG_MODE_RECENTS, initialBounds);
+ mRecentsComponent.dockTopTask(mDragMode == DRAG_MODE_RECENTS, createMode,
+ initialBounds);
if (mDragMode == DRAG_MODE_DIVIDER) {
mDivider.getView().startDragging();
}
@@ -259,4 +265,14 @@
}
return true;
}
+
+ @Override
+ public void onTuningChanged(String key, String newValue) {
+ switch (key) {
+ case KEY_DOCK_WINDOW_GESTURE:
+ mDockWindowEnabled = (newValue != null) &&
+ (Integer.parseInt(newValue) != 0);
+ break;
+ }
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index 685c4e5..e51cf7ac 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -1133,7 +1133,9 @@
@Override
public boolean onLongClick(View v) {
if (mRecents != null) {
- mRecents.dockTopTask(false /* draggingInRecents */, null /* initialBounds */);
+ mRecents.dockTopTask(false /* draggingInRecents */,
+ ActivityManager.DOCKED_STACK_CREATE_MODE_TOP_OR_LEFT,
+ null /* initialBounds */);
return true;
}
return false;
@@ -2486,12 +2488,14 @@
// update status bar mode
final int sbMode = computeBarMode(oldVal, newVal, mStatusBarView.getBarTransitions(),
- View.STATUS_BAR_TRANSIENT, View.STATUS_BAR_TRANSLUCENT);
+ View.STATUS_BAR_TRANSIENT, View.STATUS_BAR_TRANSLUCENT,
+ View.STATUS_BAR_TRANSPARENT);
// update navigation bar mode
final int nbMode = mNavigationBarView == null ? -1 : computeBarMode(
oldVal, newVal, mNavigationBarView.getBarTransitions(),
- View.NAVIGATION_BAR_TRANSIENT, View.NAVIGATION_BAR_TRANSLUCENT);
+ View.NAVIGATION_BAR_TRANSIENT, View.NAVIGATION_BAR_TRANSLUCENT,
+ View.NAVIGATION_BAR_TRANSPARENT);
final boolean sbModeChanged = sbMode != -1;
final boolean nbModeChanged = nbMode != -1;
boolean checkBarModes = false;
@@ -2542,21 +2546,21 @@
}
private int computeBarMode(int oldVis, int newVis, BarTransitions transitions,
- int transientFlag, int translucentFlag) {
- final int oldMode = barMode(oldVis, transientFlag, translucentFlag);
- final int newMode = barMode(newVis, transientFlag, translucentFlag);
+ int transientFlag, int translucentFlag, int transparentFlag) {
+ final int oldMode = barMode(oldVis, transientFlag, translucentFlag, transparentFlag);
+ final int newMode = barMode(newVis, transientFlag, translucentFlag, transparentFlag);
if (oldMode == newMode) {
return -1; // no mode change
}
return newMode;
}
- private int barMode(int vis, int transientFlag, int translucentFlag) {
- int lightsOutTransparent = View.SYSTEM_UI_FLAG_LOW_PROFILE | View.SYSTEM_UI_TRANSPARENT;
+ private int barMode(int vis, int transientFlag, int translucentFlag, int transparentFlag) {
+ int lightsOutTransparent = View.SYSTEM_UI_FLAG_LOW_PROFILE | transparentFlag;
return (vis & transientFlag) != 0 ? MODE_SEMI_TRANSPARENT
: (vis & translucentFlag) != 0 ? MODE_TRANSLUCENT
: (vis & lightsOutTransparent) == lightsOutTransparent ? MODE_LIGHTS_OUT_TRANSPARENT
- : (vis & View.SYSTEM_UI_TRANSPARENT) != 0 ? MODE_TRANSPARENT
+ : (vis & transparentFlag) != 0 ? MODE_TRANSPARENT
: (vis & View.SYSTEM_UI_FLAG_LOW_PROFILE) != 0 ? MODE_LIGHTS_OUT
: MODE_OPAQUE;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java
index 57c2648..f7ff8aa 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java
@@ -293,12 +293,21 @@
verifyCaller(tile.getComponentName().getPackageName());
CustomTile customTile = getTileForComponent(tile.getComponentName());
if (customTile != null) {
- Log.d("TileService", "Got tile update for " + tile.getComponentName());
customTile.updateState(tile);
customTile.refreshState();
}
}
+ @Override
+ public void onShowDialog(Tile tile) throws RemoteException {
+ verifyCaller(tile.getComponentName().getPackageName());
+ CustomTile customTile = getTileForComponent(tile.getComponentName());
+ if (customTile != null) {
+ customTile.onDialogShown();
+ collapsePanels();
+ }
+ }
+
private void verifyCaller(String packageName) {
try {
int uid = mContext.getPackageManager().getPackageUid(packageName,
diff --git a/services/core/java/com/android/server/AppOpsService.java b/services/core/java/com/android/server/AppOpsService.java
index a5cef1a..ede92fb 100644
--- a/services/core/java/com/android/server/AppOpsService.java
+++ b/services/core/java/com/android/server/AppOpsService.java
@@ -513,33 +513,35 @@
String[] uidPackageNames = getPackagesForUid(uid);
ArrayMap<Callback, ArraySet<String>> callbackSpecs = null;
- ArrayList<Callback> callbacks = mOpModeWatchers.get(code);
- if (callbacks != null) {
- final int callbackCount = callbacks.size();
- for (int i = 0; i < callbackCount; i++) {
- Callback callback = callbacks.get(i);
- ArraySet<String> changedPackages = new ArraySet<>();
- Collections.addAll(changedPackages, uidPackageNames);
- callbackSpecs = new ArrayMap<>();
- callbackSpecs.put(callback, changedPackages);
- }
- }
-
- for (String uidPackageName : uidPackageNames) {
- callbacks = mPackageModeWatchers.get(uidPackageName);
+ synchronized (this) {
+ ArrayList<Callback> callbacks = mOpModeWatchers.get(code);
if (callbacks != null) {
- if (callbackSpecs == null) {
- callbackSpecs = new ArrayMap<>();
- }
final int callbackCount = callbacks.size();
for (int i = 0; i < callbackCount; i++) {
Callback callback = callbacks.get(i);
- ArraySet<String> changedPackages = callbackSpecs.get(callback);
- if (changedPackages == null) {
- changedPackages = new ArraySet<>();
- callbackSpecs.put(callback, changedPackages);
+ ArraySet<String> changedPackages = new ArraySet<>();
+ Collections.addAll(changedPackages, uidPackageNames);
+ callbackSpecs = new ArrayMap<>();
+ callbackSpecs.put(callback, changedPackages);
+ }
+ }
+
+ for (String uidPackageName : uidPackageNames) {
+ callbacks = mPackageModeWatchers.get(uidPackageName);
+ if (callbacks != null) {
+ if (callbackSpecs == null) {
+ callbackSpecs = new ArrayMap<>();
}
- changedPackages.add(uidPackageName);
+ final int callbackCount = callbacks.size();
+ for (int i = 0; i < callbackCount; i++) {
+ Callback callback = callbacks.get(i);
+ ArraySet<String> changedPackages = callbackSpecs.get(callback);
+ if (changedPackages == null) {
+ changedPackages = new ArraySet<>();
+ callbackSpecs.put(callback, changedPackages);
+ }
+ changedPackages.add(uidPackageName);
+ }
}
}
}
@@ -2051,7 +2053,7 @@
private static String[] getPackagesForUid(int uid) {
String[] packageNames = null;
try {
- packageNames= AppGlobals.getPackageManager().getPackagesForUid(uid);
+ packageNames = AppGlobals.getPackageManager().getPackagesForUid(uid);
} catch (RemoteException e) {
/* ignore - local call */
}
diff --git a/services/core/java/com/android/server/LockSettingsService.java b/services/core/java/com/android/server/LockSettingsService.java
index d6c6f13..033a4b8 100644
--- a/services/core/java/com/android/server/LockSettingsService.java
+++ b/services/core/java/com/android/server/LockSettingsService.java
@@ -21,6 +21,8 @@
import android.app.admin.DevicePolicyManager;
import android.app.backup.BackupManager;
import android.app.trust.IStrongAuthTracker;
+import android.app.trust.ITrustManager;
+import android.app.trust.TrustManager;
import android.content.BroadcastReceiver;
import android.content.ContentResolver;
import android.content.Context;
@@ -38,6 +40,7 @@
import android.os.IBinder;
import android.os.RemoteException;
import android.os.storage.IMountService;
+import android.os.storage.StorageManager;
import android.os.ServiceManager;
import android.os.SystemProperties;
import android.os.UserHandle;
@@ -621,7 +624,13 @@
byte[] hash = credentialUtil.toHash(credential, userId);
if (Arrays.equals(hash, storedHash.hash)) {
unlockKeystore(credentialUtil.adjustForKeystore(credential), userId);
- unlockUser(userId, null);
+
+ // TODO: pass through a meaningful token from gatekeeper to
+ // unlock credential keys; for now pass through a stub value to
+ // indicate that we came from a user challenge.
+ final byte[] token = String.valueOf(userId).getBytes();
+ unlockUser(userId, token);
+
// migrate credential to GateKeeper
credentialUtil.setCredential(credential, null, userId);
if (!hasChallenge) {
@@ -674,7 +683,19 @@
if (response.getResponseCode() == VerifyCredentialResponse.RESPONSE_OK) {
// credential has matched
unlockKeystore(credential, userId);
- unlockUser(userId, null);
+
+ // TODO: pass through a meaningful token from gatekeeper to
+ // unlock credential keys; for now pass through a stub value to
+ // indicate that we came from a user challenge.
+ final byte[] token = String.valueOf(userId).getBytes();
+ unlockUser(userId, token);
+
+ UserInfo info = UserManager.get(mContext).getUserInfo(userId);
+ if (LockPatternUtils.isSeparateWorkChallengeEnabled() && info.isManagedProfile()) {
+ TrustManager trustManager =
+ (TrustManager) mContext.getSystemService(Context.TRUST_SERVICE);
+ trustManager.setDeviceLockedForUser(userId, false);
+ }
if (shouldReEnroll) {
credentialUtil.setCredential(credential, credential, userId);
}
diff --git a/services/core/java/com/android/server/LockSettingsStorage.java b/services/core/java/com/android/server/LockSettingsStorage.java
index eb49a78..137fa27 100644
--- a/services/core/java/com/android/server/LockSettingsStorage.java
+++ b/services/core/java/com/android/server/LockSettingsStorage.java
@@ -17,6 +17,7 @@
package com.android.server;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.widget.LockPatternUtils;
import android.content.ContentValues;
import android.content.Context;
@@ -25,9 +26,7 @@
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.os.Environment;
-import android.os.SystemProperties;
import android.os.UserManager;
-import android.os.storage.StorageManager;
import android.util.ArrayMap;
import android.util.Log;
import android.util.Slog;
@@ -389,7 +388,7 @@
private int getUserParentOrSelfId(int userId) {
// Device supports per user encryption, so lock is applied to the given user.
- if (StorageManager.isFileBasedEncryptionEnabled()) {
+ if (LockPatternUtils.isSeparateWorkChallengeEnabled()) {
return userId;
}
// Device uses Block Based Encryption, and the parent user's lock is used for the whole
diff --git a/services/core/java/com/android/server/MountService.java b/services/core/java/com/android/server/MountService.java
index bd43a71..807c0d6 100644
--- a/services/core/java/com/android/server/MountService.java
+++ b/services/core/java/com/android/server/MountService.java
@@ -100,6 +100,7 @@
import com.android.internal.util.HexDump;
import com.android.internal.util.IndentingPrintWriter;
import com.android.internal.util.Preconditions;
+import com.android.internal.widget.LockPatternUtils;
import com.android.server.NativeDaemonConnector.Command;
import com.android.server.NativeDaemonConnector.SensitiveArg;
import com.android.server.pm.PackageManagerService;
@@ -435,6 +436,7 @@
private PackageManagerService mPms;
private final Callbacks mCallbacks;
+ private final LockPatternUtils mLockPatternUtils;
// Two connectors - mConnector & mCryptConnector
private final CountDownLatch mConnectedSignal = new CountDownLatch(2);
@@ -1429,6 +1431,7 @@
mContext = context;
mCallbacks = new Callbacks(FgThread.get().getLooper());
+ mLockPatternUtils = new LockPatternUtils(mContext);
// XXX: This will go away soon in favor of IMountServiceObserver
mPms = (PackageManagerService) ServiceManager.getService("package");
@@ -2721,6 +2724,12 @@
enforcePermission(android.Manifest.permission.STORAGE_INTERNAL);
waitForReady();
+ // When a user has secure lock screen, require a challenge token to
+ // actually unlock. This check is mostly in place for emulation mode.
+ if (mLockPatternUtils.isSecure(userId) && ArrayUtils.isEmpty(token)) {
+ throw new IllegalStateException("Token required to unlock secure user " + userId);
+ }
+
final String encodedToken;
if (ArrayUtils.isEmpty(token)) {
encodedToken = "!";
diff --git a/services/core/java/com/android/server/NativeDaemonConnector.java b/services/core/java/com/android/server/NativeDaemonConnector.java
index e6b6074..d6dbad8 100644
--- a/services/core/java/com/android/server/NativeDaemonConnector.java
+++ b/services/core/java/com/android/server/NativeDaemonConnector.java
@@ -177,6 +177,7 @@
mCallbacks.onDaemonConnected();
+ FileDescriptor[] fdList = null;
byte[] buffer = new byte[BUFFER_SIZE];
int start = 0;
@@ -186,6 +187,7 @@
loge("got " + count + " reading with start = " + start);
break;
}
+ fdList = socket.getAncillaryFileDescriptors();
// Add our starting point to the count and reset the start.
count += start;
@@ -200,8 +202,8 @@
boolean releaseWl = false;
try {
- final NativeDaemonEvent event = NativeDaemonEvent.parseRawEvent(
- rawEvent);
+ final NativeDaemonEvent event =
+ NativeDaemonEvent.parseRawEvent(rawEvent, fdList);
log("RCV <- {" + event + "}");
diff --git a/services/core/java/com/android/server/NativeDaemonEvent.java b/services/core/java/com/android/server/NativeDaemonEvent.java
index 4e61c0b..e6feda3 100644
--- a/services/core/java/com/android/server/NativeDaemonEvent.java
+++ b/services/core/java/com/android/server/NativeDaemonEvent.java
@@ -19,6 +19,7 @@
import android.util.Slog;
import com.google.android.collect.Lists;
+import java.io.FileDescriptor;
import java.util.ArrayList;
/**
@@ -35,15 +36,17 @@
private final String mRawEvent;
private final String mLogMessage;
private String[] mParsed;
+ private FileDescriptor[] mFdList;
private NativeDaemonEvent(int cmdNumber, int code, String message,
- String rawEvent, String logMessage) {
+ String rawEvent, String logMessage, FileDescriptor[] fdList) {
mCmdNumber = cmdNumber;
mCode = code;
mMessage = message;
mRawEvent = rawEvent;
mLogMessage = logMessage;
mParsed = null;
+ mFdList = fdList;
}
static public final String SENSITIVE_MARKER = "{{sensitive}}";
@@ -60,6 +63,10 @@
return mMessage;
}
+ public FileDescriptor[] getFileDescriptors() {
+ return mFdList;
+ }
+
@Deprecated
public String getRawEvent() {
return mRawEvent;
@@ -127,7 +134,7 @@
* @throws IllegalArgumentException when line doesn't match format expected
* from native side.
*/
- public static NativeDaemonEvent parseRawEvent(String rawEvent) {
+ public static NativeDaemonEvent parseRawEvent(String rawEvent, FileDescriptor[] fdList) {
final String[] parsed = rawEvent.split(" ");
if (parsed.length < 2) {
throw new IllegalArgumentException("Insufficient arguments");
@@ -164,7 +171,7 @@
final String message = rawEvent.substring(skiplength);
- return new NativeDaemonEvent(cmdNumber, code, message, rawEvent, logMessage);
+ return new NativeDaemonEvent(cmdNumber, code, message, rawEvent, logMessage, fdList);
}
/**
diff --git a/services/core/java/com/android/server/SystemService.java b/services/core/java/com/android/server/SystemService.java
index e0a9ab4..ce3166d 100644
--- a/services/core/java/com/android/server/SystemService.java
+++ b/services/core/java/com/android/server/SystemService.java
@@ -133,6 +133,15 @@
public void onStartUser(int userHandle) {}
/**
+ * Called when an existing user is unlocked. This means the
+ * credential-encrypted storage for that user is now available, and
+ * encryption-aware component filtering is no longer in effect.
+ *
+ * @param userHandle The identifier of the user.
+ */
+ public void onUnlockUser(int userHandle) {}
+
+ /**
* Called when switching to a different foreground user, for system services that have
* special behavior for whichever user is currently in the foreground. This is called
* before any application processes are aware of the new user.
diff --git a/services/core/java/com/android/server/SystemServiceManager.java b/services/core/java/com/android/server/SystemServiceManager.java
index 92e6814..ecc69e9 100644
--- a/services/core/java/com/android/server/SystemServiceManager.java
+++ b/services/core/java/com/android/server/SystemServiceManager.java
@@ -165,6 +165,19 @@
}
}
+ public void unlockUser(final int userHandle) {
+ final int serviceLen = mServices.size();
+ for (int i = 0; i < serviceLen; i++) {
+ final SystemService service = mServices.get(i);
+ try {
+ service.onUnlockUser(userHandle);
+ } catch (Exception ex) {
+ Slog.wtf(TAG, "Failure reporting unlock of user " + userHandle
+ + " to service " + service.getClass().getName(), ex);
+ }
+ }
+ }
+
public void switchUser(final int userHandle) {
final int serviceLen = mServices.size();
for (int i = 0; i < serviceLen; i++) {
diff --git a/services/core/java/com/android/server/UiModeManagerService.java b/services/core/java/com/android/server/UiModeManagerService.java
index 0b67ad8..6f713cd 100644
--- a/services/core/java/com/android/server/UiModeManagerService.java
+++ b/services/core/java/com/android/server/UiModeManagerService.java
@@ -57,7 +57,6 @@
private static final boolean LOG = false;
// Enable launching of applications when entering the dock.
- private static final boolean ENABLE_LAUNCH_CAR_DOCK_APP = true;
private static final boolean ENABLE_LAUNCH_DESK_DOCK_APP = true;
final Object mLock = new Object();
@@ -76,6 +75,13 @@
private boolean mComputedNightMode;
private int mCarModeEnableFlags;
+ // flag set by resource, whether to enable Car dock launch when starting car mode.
+ private boolean mEnableCarDockLaunch = true;
+ // flag set by resource, whether to lock UI mode to the default one or not.
+ private boolean mUiModeLocked = false;
+ // flag set by resource, whether to night mode change for normal all or not.
+ private boolean mNightModeLocked = false;
+
int mCurUiMode = 0;
private int mSetUiMode = 0;
private boolean mHoldingConfiguration = false;
@@ -176,6 +182,10 @@
com.android.internal.R.integer.config_carDockKeepsScreenOn) == 1);
mDeskModeKeepsScreenOn = (res.getInteger(
com.android.internal.R.integer.config_deskDockKeepsScreenOn) == 1);
+ mEnableCarDockLaunch = res.getBoolean(
+ com.android.internal.R.bool.config_enableCarDockHomeLaunch);
+ mUiModeLocked = res.getBoolean(com.android.internal.R.bool.config_lockUiMode);
+ mNightModeLocked = res.getBoolean(com.android.internal.R.bool.config_lockDayNightMode);
final PackageManager pm = context.getPackageManager();
mTelevision = pm.hasSystemFeature(PackageManager.FEATURE_TELEVISION)
@@ -199,6 +209,10 @@
private final IBinder mService = new IUiModeManager.Stub() {
@Override
public void enableCarMode(int flags) {
+ if (isUiModeLocked()) {
+ Slog.e(TAG, "enableCarMode while UI mode is locked");
+ return;
+ }
final long ident = Binder.clearCallingIdentity();
try {
synchronized (mLock) {
@@ -214,6 +228,10 @@
@Override
public void disableCarMode(int flags) {
+ if (isUiModeLocked()) {
+ Slog.e(TAG, "disableCarMode while UI mode is locked");
+ return;
+ }
final long ident = Binder.clearCallingIdentity();
try {
synchronized (mLock) {
@@ -241,6 +259,13 @@
@Override
public void setNightMode(int mode) {
+ if (isNightModeLocked() && (getContext().checkCallingOrSelfPermission(
+ android.Manifest.permission.MODIFY_DAY_NIGHT_MODE)
+ != PackageManager.PERMISSION_GRANTED)) {
+ Slog.e(TAG,
+ "Night mode locked, requires MODIFY_DAY_NIGHT_MODE permission");
+ return;
+ }
switch (mode) {
case UiModeManager.MODE_NIGHT_NO:
case UiModeManager.MODE_NIGHT_YES:
@@ -273,6 +298,20 @@
}
@Override
+ public boolean isUiModeLocked() {
+ synchronized (mLock) {
+ return mUiModeLocked;
+ }
+ }
+
+ @Override
+ public boolean isNightModeLocked() {
+ synchronized (mLock) {
+ return mNightModeLocked;
+ }
+ }
+
+ @Override
protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
if (getContext().checkCallingOrSelfPermission(android.Manifest.permission.DUMP)
!= PackageManager.PERMISSION_GRANTED) {
@@ -293,10 +332,13 @@
pw.print(" mDockState="); pw.print(mDockState);
pw.print(" mLastBroadcastState="); pw.println(mLastBroadcastState);
pw.print(" mNightMode="); pw.print(mNightMode);
+ pw.print(" mNightModeLocked="); pw.print(mNightModeLocked);
pw.print(" mCarModeEnabled="); pw.print(mCarModeEnabled);
pw.print(" mComputedNightMode="); pw.print(mComputedNightMode);
- pw.print(" mCarModeEnableFlags="); pw.println(mCarModeEnableFlags);
+ pw.print(" mCarModeEnableFlags="); pw.print(mCarModeEnableFlags);
+ pw.print(" mEnableCarDockLaunch="); pw.println(mEnableCarDockLaunch);
pw.print(" mCurUiMode=0x"); pw.print(Integer.toHexString(mCurUiMode));
+ pw.print(" mUiModeLocked="); pw.print(mUiModeLocked);
pw.print(" mSetUiMode=0x"); pw.println(Integer.toHexString(mSetUiMode));
pw.print(" mHoldingConfiguration="); pw.print(mHoldingConfiguration);
pw.print(" mSystemReady="); pw.println(mSystemReady);
@@ -356,7 +398,9 @@
private void updateConfigurationLocked() {
int uiMode = mDefaultUiModeType;
- if (mTelevision) {
+ if (mUiModeLocked) {
+ // no-op, keeps default one
+ } else if (mTelevision) {
uiMode = Configuration.UI_MODE_TYPE_TELEVISION;
} else if (mWatch) {
uiMode = Configuration.UI_MODE_TYPE_WATCH;
@@ -460,7 +504,7 @@
} else {
String category = null;
if (mCarModeEnabled) {
- if (ENABLE_LAUNCH_CAR_DOCK_APP
+ if (mEnableCarDockLaunch
&& (enableFlags & UiModeManager.ENABLE_CAR_MODE_GO_CAR_HOME) != 0) {
category = Intent.CATEGORY_CAR_DOCK;
}
@@ -503,7 +547,7 @@
if (UiModeManager.ACTION_ENTER_CAR_MODE.equals(action)) {
// Only launch car home when car mode is enabled and the caller
// has asked us to switch to it.
- if (ENABLE_LAUNCH_CAR_DOCK_APP
+ if (mEnableCarDockLaunch
&& (enableFlags & UiModeManager.ENABLE_CAR_MODE_GO_CAR_HOME) != 0) {
category = Intent.CATEGORY_CAR_DOCK;
}
diff --git a/services/core/java/com/android/server/accounts/AccountManagerService.java b/services/core/java/com/android/server/accounts/AccountManagerService.java
index 93eaf0e..502d61a 100644
--- a/services/core/java/com/android/server/accounts/AccountManagerService.java
+++ b/services/core/java/com/android/server/accounts/AccountManagerService.java
@@ -2475,6 +2475,129 @@
}
}
+ @Override
+ public void finishSession(IAccountManagerResponse response,
+ @NonNull Bundle sessionBundle,
+ boolean expectActivityLaunch,
+ Bundle appInfo) {
+ if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ Log.v(TAG,
+ "finishSession: response "+ response
+ + ", expectActivityLaunch " + expectActivityLaunch
+ + ", caller's uid " + Binder.getCallingUid()
+ + ", pid " + Binder.getCallingPid());
+ }
+ if (response == null) {
+ throw new IllegalArgumentException("response is null");
+ }
+
+ // Session bundle is the encrypted bundle of the original bundle created by authenticator.
+ // Account type is added to it before encryption.
+ if (sessionBundle == null || sessionBundle.size() == 0) {
+ throw new IllegalArgumentException("sessionBundle is empty");
+ }
+
+ int userId = Binder.getCallingUserHandle().getIdentifier();
+ if (!canUserModifyAccounts(userId)) {
+ sendErrorResponse(response,
+ AccountManager.ERROR_CODE_USER_RESTRICTED,
+ "User is not allowed to add an account!");
+ showCantAddAccount(AccountManager.ERROR_CODE_USER_RESTRICTED, userId);
+ return;
+ }
+
+ final int pid = Binder.getCallingPid();
+ final int uid = Binder.getCallingUid();
+ final Bundle decryptedBundle;
+ final String accountType;
+ // First decrypt session bundle to get account type for checking permission.
+ try {
+ CryptoHelper cryptoHelper = CryptoHelper.getInstance();
+ decryptedBundle = cryptoHelper.decryptBundle(sessionBundle);
+ if (decryptedBundle == null) {
+ sendErrorResponse(
+ response,
+ AccountManager.ERROR_CODE_BAD_REQUEST,
+ "failed to decrypt session bundle");
+ return;
+ }
+ accountType = decryptedBundle.getString(AccountManager.KEY_ACCOUNT_TYPE);
+ // Account type cannot be null. This should not happen if session bundle was created
+ // properly by #StartAccountSession.
+ if (TextUtils.isEmpty(accountType)) {
+ sendErrorResponse(
+ response,
+ AccountManager.ERROR_CODE_BAD_ARGUMENTS,
+ "accountType is empty");
+ return;
+ }
+
+ // If by any chances, decryptedBundle contains colliding keys with
+ // system info
+ // such as AccountManager.KEY_ANDROID_PACKAGE_NAME required by the add account flow or
+ // update credentials flow, we should replace with the new values of the current call.
+ if (appInfo != null) {
+ decryptedBundle.putAll(appInfo);
+ }
+
+ // Add info that may be used by add account or update credentials flow.
+ decryptedBundle.putInt(AccountManager.KEY_CALLER_UID, uid);
+ decryptedBundle.putInt(AccountManager.KEY_CALLER_PID, pid);
+ } catch (GeneralSecurityException e) {
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Log.v(TAG, "Failed to decrypt session bundle!", e);
+ }
+ sendErrorResponse(
+ response,
+ AccountManager.ERROR_CODE_BAD_REQUEST,
+ "failed to decrypt session bundle");
+ return;
+ }
+
+ if (!canUserModifyAccountsForType(userId, accountType)) {
+ sendErrorResponse(
+ response,
+ AccountManager.ERROR_CODE_MANAGEMENT_DISABLED_FOR_ACCOUNT_TYPE,
+ "User cannot modify accounts of this type (policy).");
+ showCantAddAccount(AccountManager.ERROR_CODE_MANAGEMENT_DISABLED_FOR_ACCOUNT_TYPE,
+ userId);
+ return;
+ }
+
+ long identityToken = clearCallingIdentity();
+ try {
+ UserAccounts accounts = getUserAccounts(userId);
+ logRecordWithUid(
+ accounts,
+ DebugDbHelper.ACTION_CALLED_ACCOUNT_SESSION_FINISH,
+ TABLE_ACCOUNTS,
+ uid);
+ new Session(
+ accounts,
+ response,
+ accountType,
+ expectActivityLaunch,
+ true /* stripAuthTokenFromResult */,
+ null /* accountName */,
+ false /* authDetailsRequired */,
+ true /* updateLastAuthenticationTime */) {
+ @Override
+ public void run() throws RemoteException {
+ mAuthenticator.finishSession(this, mAccountType, decryptedBundle);
+ }
+
+ @Override
+ protected String toDebugString(long now) {
+ return super.toDebugString(now)
+ + ", finishSession"
+ + ", accountType " + accountType;
+ }
+ }.bind();
+ } finally {
+ restoreCallingIdentity(identityToken);
+ }
+ }
+
private void showCantAddAccount(int errorCode, int userId) {
Intent cantAddAccount = new Intent(mContext, CantAddAccountActivity.class);
cantAddAccount.putExtra(CantAddAccountActivity.EXTRA_ERROR_CODE, errorCode);
@@ -3484,6 +3607,14 @@
return false;
}
+ final ActivityManager am = mContext.getSystemService(ActivityManager.class);
+ if (am.isUserRunningAndLocked(mAccounts.userId)
+ && !authenticatorInfo.componentInfo.encryptionAware) {
+ Slog.w(TAG, "Blocking binding to authenticator " + authenticatorInfo.componentName
+ + " which isn't encryption aware");
+ return false;
+ }
+
Intent intent = new Intent();
intent.setAction(AccountManager.ACTION_AUTHENTICATOR_INTENT);
intent.setComponent(authenticatorInfo.componentName);
@@ -3498,7 +3629,6 @@
return false;
}
-
return true;
}
}
@@ -3582,10 +3712,11 @@
private static String ACTION_CALLED_ACCOUNT_ADD = "action_called_account_add";
private static String ACTION_CALLED_ACCOUNT_REMOVE = "action_called_account_remove";
- // TODO: This action doesn't add account to accountdb. Account is only
- // added in finishAddAccount or finishAddAccountAsUser which may be in
- // a different user profile.
+ //This action doesn't add account to accountdb. Account is only
+ // added in finishSession which may be in a different user profile.
private static String ACTION_CALLED_START_ACCOUNT_ADD = "action_called_start_account_add";
+ private static String ACTION_CALLED_ACCOUNT_SESSION_FINISH =
+ "action_called_account_session_finish";
private static SimpleDateFormat dateFromat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index ef623eb..b769d39 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -1487,6 +1487,7 @@
static final int APP_BOOST_DEACTIVATE_MSG = 58;
static final int CONTENT_PROVIDER_PUBLISH_TIMEOUT_MSG = 59;
static final int IDLE_UIDS_MSG = 60;
+ static final int SYSTEM_USER_UNLOCK_MSG = 61;
static final int FIRST_ACTIVITY_STACK_MSG = 100;
static final int FIRST_BROADCAST_QUEUE_MSG = 200;
@@ -1989,6 +1990,10 @@
mSystemServiceManager.startUser(msg.arg1);
break;
}
+ case SYSTEM_USER_UNLOCK_MSG: {
+ mSystemServiceManager.unlockUser(msg.arg1);
+ break;
+ }
case SYSTEM_USER_CURRENT_MSG: {
mBatteryStatsService.noteEvent(
BatteryStats.HistoryItem.EVENT_USER_FOREGROUND_FINISH,
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index 02a372a..1f06b45 100644
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -24,7 +24,7 @@
import static android.content.pm.ActivityInfo.FLAG_SHOW_FOR_ALL_USERS;
import static com.android.server.am.ActivityManagerDebugConfig.*;
-
+import static com.android.server.am.ActivityManagerService.LOCK_SCREEN_SHOWN;
import static com.android.server.am.ActivityRecord.HOME_ACTIVITY_TYPE;
import static com.android.server.am.ActivityRecord.APPLICATION_ACTIVITY_TYPE;
@@ -538,9 +538,8 @@
if (addIndex > 0) {
final ActivityStack topStack = mStacks.get(addIndex - 1);
- if (topStack.mStackId == PINNED_STACK_ID && topStack != this) {
- // The pinned stack is always the top most stack (always-on-top).
- // So, stack is moved just below the pinned stack.
+ if (StackId.isAlwaysOnTop(topStack.mStackId) && topStack != this) {
+ // If the top stack is always on top, we move this stack just below it.
addIndex--;
}
}
@@ -1334,6 +1333,11 @@
return false;
}
+ final boolean isLockscreenShown = mService.mLockScreenShown == LOCK_SCREEN_SHOWN;
+ if (isLockscreenShown && !StackId.isAllowedOverLockscreen(mStackId)) {
+ return false;
+ }
+
final ActivityStack focusedStack = mStackSupervisor.getFocusedStack();
final int focusedStackId = focusedStack.mStackId;
@@ -1424,16 +1428,15 @@
final void ensureActivitiesVisibleLocked(ActivityRecord starting, int configChanges,
boolean preserveWindows) {
ActivityRecord top = topRunningActivityLocked();
- if (top == null) {
- return;
- }
if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY, "ensureActivitiesVisible behind " + top
+ " configChanges=0x" + Integer.toHexString(configChanges));
- checkTranslucentActivityWaiting(top);
+ if (top != null) {
+ checkTranslucentActivityWaiting(top);
+ }
// If the top activity is not fullscreen, then we need to
// make sure any activities under it are now visible.
- boolean aboveTop = true;
+ boolean aboveTop = top != null;
final boolean stackInvisible = !isStackVisibleLocked();
boolean behindFullscreenActivity = stackInvisible;
boolean noStackActivityResumed = (isInStackLocked(starting) == null);
@@ -1447,13 +1450,15 @@
if (r.finishing) {
continue;
}
- if (aboveTop && r != top) {
+ final boolean isTop = r == top;
+ if (aboveTop && !isTop) {
continue;
}
aboveTop = false;
// mLaunchingBehind: Activities launching behind are at the back of the task stack
// but must be drawn initially for the animation as though they were visible.
- if (!behindFullscreenActivity || r.mLaunchTaskBehind) {
+ if ((!behindFullscreenActivity || r.mLaunchTaskBehind)
+ && okToShowLocked(r)) {
if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY,
"Make visible? " + r + " finishing=" + r.finishing
+ " state=" + r.state);
@@ -1464,7 +1469,7 @@
}
if (r.app == null || r.app.thread == null) {
- if (makeVisibleAndRestartIfNeeded(starting, configChanges, top,
+ if (makeVisibleAndRestartIfNeeded(starting, configChanges, isTop,
noStackActivityResumed, r)) {
if (activityNdx >= activities.size()) {
// Record may be removed if its process needs to restart.
@@ -1474,18 +1479,19 @@
}
}
} else if (r.visible) {
- if (alreadyVisible(r)) {
+ // If this activity is already visible, then there is nothing to do here.
+ if (handleAlreadyVisible(r)) {
noStackActivityResumed = false;
}
} else {
- becomeVisible(starting, r);
+ makeVisible(starting, r);
}
// Aggregate current change flags.
configChanges |= r.configChangeFlags;
behindFullscreenActivity = updateBehindFullscreen(stackInvisible,
behindFullscreenActivity, task, r);
} else {
- becomeInvisible(stackInvisible, behindFullscreenActivity, r);
+ makeInvisible(stackInvisible, behindFullscreenActivity, r);
}
}
if (mStackId == FREEFORM_WORKSPACE_STACK_ID) {
@@ -1516,12 +1522,12 @@
}
private boolean makeVisibleAndRestartIfNeeded(ActivityRecord starting, int configChanges,
- ActivityRecord top, boolean noStackActivityResumed, ActivityRecord r) {
+ boolean isTop, boolean noStackActivityResumed, ActivityRecord r) {
// We need to make sure the app is running if it's the top, or it is just made visible from
// invisible. If the app is already visible, it must have died while it was visible. In this
// case, we'll show the dead window but will not restart the app. Otherwise we could end up
// thrashing.
- if (r == top || !r.visible) {
+ if (isTop || !r.visible) {
// This activity needs to be visible, but isn't even running...
// get it started and resume if no other stack in this stack is resumed.
if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY, "Start and freeze screen for " + r);
@@ -1540,7 +1546,7 @@
return false;
}
- private void becomeInvisible(boolean stackInvisible, boolean behindFullscreenActivity,
+ private void makeInvisible(boolean stackInvisible, boolean behindFullscreenActivity,
ActivityRecord r) {
if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY, "Make invisible? " + r + " finishing="
+ r.finishing + " state=" + r.state + " stackInvisible=" + stackInvisible
@@ -1606,7 +1612,7 @@
return behindFullscreenActivity;
}
- private void becomeVisible(ActivityRecord starting, ActivityRecord r) {
+ private void makeVisible(ActivityRecord starting, ActivityRecord r) {
// This activity is not currently visible, but is running. Tell it to become visible.
r.visible = true;
if (r.state != ActivityState.RESUMED && r != starting) {
@@ -1631,8 +1637,7 @@
}
}
- private boolean alreadyVisible(ActivityRecord r) {
- // If this activity is already visible, then there is nothing else to do here.
+ private boolean handleAlreadyVisible(ActivityRecord r) {
if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY, "Skipping: already visible at " + r);
r.stopFreezingScreenLocked(false);
try {
@@ -4645,7 +4650,9 @@
voiceInteractor);
// add the task to stack first, mTaskPositioner might need the stack association
addTask(task, toTop, false);
- if (!layoutTaskInStack(task, info.layout) && mBounds != null && task.mResizeable) {
+ final boolean isLockscreenShown = mService.mLockScreenShown == LOCK_SCREEN_SHOWN;
+ if (!layoutTaskInStack(task, info.layout) && mBounds != null && task.mResizeable
+ && !isLockscreenShown) {
task.updateOverrideConfiguration(mBounds);
}
return task;
@@ -4751,7 +4758,7 @@
final Rect bounds = task.getLaunchBounds();
task.updateOverrideConfiguration(bounds);
mWindowManager.setAppTask(
- r.appToken, task.taskId, task.getLaunchBounds(), task.mOverrideConfig);
+ r.appToken, task.taskId, mStackId, task.getLaunchBounds(), task.mOverrideConfig);
mWindowManager.setTaskResizeable(task.taskId, task.mResizeable);
r.taskConfigOverride = task.mOverrideConfig;
}
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
index e9e02c1..18b3e62 100644
--- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
@@ -1669,11 +1669,11 @@
}
UserInfo user = getUserInfo(userId);
- // TODO: Timeout for work challenge
- if (user.isManagedProfile() && StorageManager.isFileBasedEncryptionEnabled()) {
- KeyguardManager km = (KeyguardManager) mService.mContext
- .getSystemService(Context.KEYGUARD_SERVICE);
-
+ KeyguardManager km = (KeyguardManager) mService.mContext
+ .getSystemService(Context.KEYGUARD_SERVICE);
+ if (user.isManagedProfile()
+ && LockPatternUtils.isSeparateWorkChallengeEnabled()
+ && km.isDeviceLocked(userId)) {
IIntentSender target = mService.getIntentSenderLocked(
ActivityManager.INTENT_SENDER_ACTIVITY, callingPackage,
Binder.getCallingUid(), userId, null, null, 0, new Intent[]{ intent },
@@ -2702,7 +2702,6 @@
Configuration config) {
if (DEBUG_ALL) Slog.v(TAG, "Activity idle: " + token);
- ArrayList<ActivityRecord> stops = null;
ArrayList<ActivityRecord> finishes = null;
ArrayList<UserState> startingUsers = null;
int NS = 0;
@@ -2756,7 +2755,7 @@
}
// Atomically retrieve all of the other things to do.
- stops = processStoppingActivitiesLocked(true);
+ final ArrayList<ActivityRecord> stops = processStoppingActivitiesLocked(true);
NS = stops != null ? stops.size() : 0;
if ((NF = mFinishingActivities.size()) > 0) {
finishes = new ArrayList<>(mFinishingActivities);
@@ -4304,12 +4303,14 @@
mWindowManager.getStackBounds(stack.mStackId, info.bounds);
info.displayId = Display.DEFAULT_DISPLAY;
info.stackId = stack.mStackId;
+ info.userId = stack.mCurrentUser;
ArrayList<TaskRecord> tasks = stack.getAllTasks();
final int numTasks = tasks.size();
int[] taskIds = new int[numTasks];
String[] taskNames = new String[numTasks];
Rect[] taskBounds = new Rect[numTasks];
+ int[] taskUserIds = new int[numTasks];
for (int i = 0; i < numTasks; ++i) {
final TaskRecord task = tasks.get(i);
taskIds[i] = task.taskId;
@@ -4319,10 +4320,12 @@
: "unknown";
taskBounds[i] = new Rect();
mWindowManager.getTaskBounds(task.taskId, taskBounds[i]);
+ taskUserIds[i] = task.userId;
}
info.taskIds = taskIds;
info.taskNames = taskNames;
info.taskBounds = taskBounds;
+ info.taskUserIds = taskUserIds;
return info;
}
diff --git a/services/core/java/com/android/server/am/TaskRecord.java b/services/core/java/com/android/server/am/TaskRecord.java
index 1e529dab..4d18e96 100644
--- a/services/core/java/com/android/server/am/TaskRecord.java
+++ b/services/core/java/com/android/server/am/TaskRecord.java
@@ -37,6 +37,7 @@
import static com.android.server.am.ActivityManagerDebugConfig.POSTFIX_TASKS;
import static com.android.server.am.ActivityManagerDebugConfig.TAG_AM;
import static com.android.server.am.ActivityManagerDebugConfig.TAG_WITH_CLASS_NAME;
+import static com.android.server.am.ActivityManagerService.LOCK_SCREEN_SHOWN;
import static com.android.server.am.ActivityRecord.APPLICATION_ACTIVITY_TYPE;
import static com.android.server.am.ActivityRecord.HOME_ACTIVITY_TYPE;
import static com.android.server.am.ActivityRecord.RECENTS_ACTIVITY_TYPE;
@@ -1341,6 +1342,12 @@
/** Returns the bounds that should be used to launch this task. */
Rect getLaunchBounds() {
final int stackId = stack.mStackId;
+
+ // If we're over lockscreen, forget about stack bounds and use fullscreen.
+ if (mService.mLockScreenShown == LOCK_SCREEN_SHOWN) {
+ return null;
+ }
+
if (stack == null
|| stackId == HOME_STACK_ID
|| stackId == FULLSCREEN_WORKSPACE_STACK_ID) {
diff --git a/services/core/java/com/android/server/am/UserController.java b/services/core/java/com/android/server/am/UserController.java
index 3e0ae17..f6f82da 100644
--- a/services/core/java/com/android/server/am/UserController.java
+++ b/services/core/java/com/android/server/am/UserController.java
@@ -34,6 +34,7 @@
import static com.android.server.am.ActivityManagerService.REPORT_USER_SWITCH_MSG;
import static com.android.server.am.ActivityManagerService.SYSTEM_USER_CURRENT_MSG;
import static com.android.server.am.ActivityManagerService.SYSTEM_USER_START_MSG;
+import static com.android.server.am.ActivityManagerService.SYSTEM_USER_UNLOCK_MSG;
import static com.android.server.am.ActivityManagerService.USER_SWITCH_TIMEOUT_MSG;
import android.annotation.NonNull;
@@ -81,8 +82,6 @@
import java.util.List;
import java.util.Set;
-import libcore.util.EmptyArray;
-
/**
* Helper class for {@link ActivityManagerService} responsible for multi-user functionality.
*/
@@ -147,7 +146,6 @@
// User 0 is the first and only user that runs at boot.
final UserState uss = new UserState(UserHandle.SYSTEM);
mStartedUsers.put(UserHandle.USER_SYSTEM, uss);
- updateUserUnlockedState(uss);
mUserLru.add(UserHandle.USER_SYSTEM);
updateStartedUserArrayLocked();
}
@@ -173,8 +171,8 @@
num--;
continue;
}
- if (oldUss.mState == UserState.STATE_STOPPING
- || oldUss.mState == UserState.STATE_SHUTDOWN) {
+ if (oldUss.state == UserState.STATE_STOPPING
+ || oldUss.state == UserState.STATE_SHUTDOWN) {
// This user is already stopping, doesn't count.
num--;
i++;
@@ -199,17 +197,65 @@
}
void finishUserBoot(UserState uss) {
+ finishUserBoot(uss, null);
+ }
+
+ void finishUserBoot(UserState uss, IIntentReceiver resultTo) {
+ final int userId = uss.mHandle.getIdentifier();
synchronized (mService) {
- if (uss.mState == UserState.STATE_BOOTING
- && mStartedUsers.get(uss.mHandle.getIdentifier()) == uss) {
- uss.mState = UserState.STATE_RUNNING;
- final int userId = uss.mHandle.getIdentifier();
- Intent intent = new Intent(Intent.ACTION_BOOT_COMPLETED, null);
+ // Bail if we ended up with a stale user
+ if (mStartedUsers.get(userId) != uss) return;
+
+ // We always walk through all the user lifecycle states to send
+ // consistent developer events. We step into RUNNING_LOCKED here,
+ // but we might immediately step into RUNNING below if the user
+ // storage is already unlocked.
+ if (uss.state == UserState.STATE_BOOTING) {
+ uss.setState(UserState.STATE_RUNNING_LOCKED);
+
+ Intent intent = new Intent(Intent.ACTION_LOCKED_BOOT_COMPLETED, null);
intent.putExtra(Intent.EXTRA_USER_HANDLE, userId);
intent.addFlags(Intent.FLAG_RECEIVER_NO_ABORT);
- mService.broadcastIntentLocked(null, null, intent,
- null, null, 0, null, null,
- new String[]{android.Manifest.permission.RECEIVE_BOOT_COMPLETED},
+ mService.broadcastIntentLocked(null, null, intent, null, resultTo, 0, null, null,
+ new String[] { android.Manifest.permission.RECEIVE_BOOT_COMPLETED },
+ AppOpsManager.OP_NONE, null, true, false, MY_PID, SYSTEM_UID, userId);
+ }
+
+ maybeUnlockUser(userId);
+ }
+ }
+
+ /**
+ * Consider stepping from {@link UserState#STATE_RUNNING_LOCKED} into
+ * {@link UserState#STATE_RUNNING}, which only occurs if the user storage is
+ * actually unlocked.
+ */
+ void finishUserUnlock(UserState uss) {
+ final int userId = uss.mHandle.getIdentifier();
+ synchronized (mService) {
+ // Bail if we ended up with a stale user
+ if (mStartedUsers.get(uss.mHandle.getIdentifier()) != uss) return;
+
+ // Only keep marching forward if user is actually unlocked
+ if (!isUserKeyUnlocked(userId)) return;
+
+ if (uss.state == UserState.STATE_RUNNING_LOCKED) {
+ uss.setState(UserState.STATE_RUNNING);
+
+ mHandler.sendMessage(mHandler.obtainMessage(SYSTEM_USER_UNLOCK_MSG, userId, 0));
+
+ final Intent unlockedIntent = new Intent(Intent.ACTION_USER_UNLOCKED);
+ unlockedIntent.addFlags(
+ Intent.FLAG_RECEIVER_REGISTERED_ONLY | Intent.FLAG_RECEIVER_FOREGROUND);
+ mService.broadcastIntentLocked(null, null, unlockedIntent, null, null, 0, null,
+ null, null, AppOpsManager.OP_NONE, null, false, false, MY_PID, SYSTEM_UID,
+ userId);
+
+ final Intent bootIntent = new Intent(Intent.ACTION_BOOT_COMPLETED, null);
+ bootIntent.putExtra(Intent.EXTRA_USER_HANDLE, userId);
+ bootIntent.addFlags(Intent.FLAG_RECEIVER_NO_ABORT);
+ mService.broadcastIntentLocked(null, null, bootIntent, null, null, 0, null, null,
+ new String[] { android.Manifest.permission.RECEIVE_BOOT_COMPLETED },
AppOpsManager.OP_NONE, null, true, false, MY_PID, SYSTEM_UID, userId);
}
}
@@ -291,9 +337,9 @@
uss.mStopCallbacks.add(callback);
}
- if (uss.mState != UserState.STATE_STOPPING
- && uss.mState != UserState.STATE_SHUTDOWN) {
- uss.mState = UserState.STATE_STOPPING;
+ if (uss.state != UserState.STATE_STOPPING
+ && uss.state != UserState.STATE_SHUTDOWN) {
+ uss.setState(UserState.STATE_STOPPING);
updateStartedUserArrayLocked();
long ident = Binder.clearCallingIdentity();
@@ -321,11 +367,11 @@
Bundle extras, boolean ordered, boolean sticky, int sendingUser) {
// On to the next.
synchronized (mService) {
- if (uss.mState != UserState.STATE_STOPPING) {
+ if (uss.state != UserState.STATE_STOPPING) {
// Whoops, we are being started back up. Abort, abort!
return;
}
- uss.mState = UserState.STATE_SHUTDOWN;
+ uss.setState(UserState.STATE_SHUTDOWN);
}
mService.mBatteryStatsService.noteEvent(
BatteryStats.HistoryItem.EVENT_USER_RUNNING_FINISH,
@@ -355,7 +401,7 @@
callbacks = new ArrayList<>(uss.mStopCallbacks);
if (mStartedUsers.get(userId) != uss) {
stopped = false;
- } else if (uss.mState != UserState.STATE_SHUTDOWN) {
+ } else if (uss.state != UserState.STATE_SHUTDOWN) {
stopped = false;
} else {
stopped = true;
@@ -438,8 +484,8 @@
Integer oldUserId = mUserLru.get(i);
UserState oldUss = mStartedUsers.get(oldUserId);
if (oldUserId == UserHandle.USER_SYSTEM || oldUserId == mCurrentUserId
- || oldUss.mState == UserState.STATE_STOPPING
- || oldUss.mState == UserState.STATE_SHUTDOWN) {
+ || oldUss.state == UserState.STATE_STOPPING
+ || oldUss.state == UserState.STATE_SHUTDOWN) {
continue;
}
UserInfo userInfo = getUserInfo(oldUserId);
@@ -482,18 +528,21 @@
return userManager;
}
- private void updateUserUnlockedState(UserState uss) {
- final IMountService mountService = IMountService.Stub
- .asInterface(ServiceManager.getService("mount"));
+ private IMountService getMountService() {
+ return IMountService.Stub.asInterface(ServiceManager.getService("mount"));
+ }
+
+ private boolean isUserKeyUnlocked(int userId) {
+ final IMountService mountService = getMountService();
if (mountService != null) {
try {
- uss.unlocked = mountService.isUserKeyUnlocked(uss.mHandle.getIdentifier());
+ return mountService.isUserKeyUnlocked(userId);
} catch (RemoteException e) {
throw e.rethrowAsRuntimeException();
}
} else {
- // System isn't fully booted yet, so guess based on property
- uss.unlocked = !StorageManager.isFileBasedEncryptionEnabled();
+ Slog.w(TAG, "Mount service not published; guessing locked state based on property");
+ return !StorageManager.isFileBasedEncryptionEnabled();
}
}
@@ -547,8 +596,6 @@
}
final UserState uss = mStartedUsers.get(userId);
- updateUserUnlockedState(uss);
-
final Integer userIdInt = userId;
mUserLru.remove(userIdInt);
mUserLru.add(userIdInt);
@@ -572,22 +619,22 @@
// Make sure user is in the started state. If it is currently
// stopping, we need to knock that off.
- if (uss.mState == UserState.STATE_STOPPING) {
+ if (uss.state == UserState.STATE_STOPPING) {
// If we are stopping, we haven't sent ACTION_SHUTDOWN,
// so we can just fairly silently bring the user back from
// the almost-dead.
- uss.mState = UserState.STATE_RUNNING;
+ uss.setState(uss.lastState);
updateStartedUserArrayLocked();
needStart = true;
- } else if (uss.mState == UserState.STATE_SHUTDOWN) {
+ } else if (uss.state == UserState.STATE_SHUTDOWN) {
// This means ACTION_SHUTDOWN has been sent, so we will
// need to treat this as a new boot of the user.
- uss.mState = UserState.STATE_BOOTING;
+ uss.setState(UserState.STATE_BOOTING);
updateStartedUserArrayLocked();
needStart = true;
}
- if (uss.mState == UserState.STATE_BOOTING) {
+ if (uss.state == UserState.STATE_BOOTING) {
// Let user manager propagate user restrictions to other services.
getUserManager().onBeforeStartUser(userId);
@@ -697,35 +744,40 @@
}
}
+ /**
+ * Attempt to unlock user without a credential token. This typically
+ * succeeds when the device doesn't have credential-encrypted storage, or
+ * when the the credential-encrypted storage isn't tied to a user-provided
+ * PIN or pattern.
+ */
+ boolean maybeUnlockUser(final int userId) {
+ // Try unlocking storage using empty token
+ return unlockUserCleared(userId, null);
+ }
+
boolean unlockUserCleared(final int userId, byte[] token) {
synchronized (mService) {
+ // Bail if already running unlocked
final UserState uss = mStartedUsers.get(userId);
- if (uss.unlocked) {
- // Bail early when already unlocked
- return true;
+ if (uss.state == UserState.STATE_RUNNING) return true;
+ }
+
+ if (!isUserKeyUnlocked(userId)) {
+ final UserInfo userInfo = getUserInfo(userId);
+ final IMountService mountService = getMountService();
+ try {
+ mountService.unlockUserKey(userId, userInfo.serialNumber, token);
+ } catch (RemoteException | RuntimeException e) {
+ Slog.w(TAG, "Failed to unlock: " + e.getMessage());
+ return false;
}
}
- final UserInfo userInfo = getUserInfo(userId);
- final IMountService mountService = IMountService.Stub
- .asInterface(ServiceManager.getService("mount"));
- try {
- mountService.unlockUserKey(userId, userInfo.serialNumber, token);
- } catch (RemoteException e) {
- Slog.w(TAG, "Failed to unlock: " + e.getMessage());
- return false;
- }
-
synchronized (mService) {
final UserState uss = mStartedUsers.get(userId);
- updateUserUnlockedState(uss);
+ finishUserUnlock(uss);
}
- final Intent intent = new Intent(Intent.ACTION_USER_UNLOCKED);
- intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY | Intent.FLAG_RECEIVER_FOREGROUND);
- mService.broadcastIntentLocked(null, null, intent, null, null, 0, null, null, null,
- AppOpsManager.OP_NONE, null, false, false, MY_PID, SYSTEM_UID, userId);
-
return true;
}
@@ -1045,8 +1097,8 @@
for (int i = 0; i < mStartedUsers.size(); i++) {
UserState uss = mStartedUsers.valueAt(i);
// This list does not include stopping users.
- if (uss.mState != UserState.STATE_STOPPING
- && uss.mState != UserState.STATE_SHUTDOWN) {
+ if (uss.state != UserState.STATE_STOPPING
+ && uss.state != UserState.STATE_SHUTDOWN) {
num++;
}
}
@@ -1054,8 +1106,8 @@
num = 0;
for (int i = 0; i < mStartedUsers.size(); i++) {
UserState uss = mStartedUsers.valueAt(i);
- if (uss.mState != UserState.STATE_STOPPING
- && uss.mState != UserState.STATE_SHUTDOWN) {
+ if (uss.state != UserState.STATE_STOPPING
+ && uss.state != UserState.STATE_SHUTDOWN) {
mStartedUserArray[num] = mStartedUsers.keyAt(i);
num++;
}
@@ -1065,17 +1117,7 @@
void sendBootCompletedLocked(IIntentReceiver resultTo) {
for (int i = 0; i < mStartedUsers.size(); i++) {
UserState uss = mStartedUsers.valueAt(i);
- if (uss.mState == UserState.STATE_BOOTING) {
- uss.mState = UserState.STATE_RUNNING;
- final int userId = mStartedUsers.keyAt(i);
- Intent intent = new Intent(Intent.ACTION_BOOT_COMPLETED, null);
- intent.putExtra(Intent.EXTRA_USER_HANDLE, userId);
- intent.addFlags(Intent.FLAG_RECEIVER_NO_ABORT);
- mService.broadcastIntentLocked(null, null, intent, null,
- resultTo, 0, null, null,
- new String[] {android.Manifest.permission.RECEIVE_BOOT_COMPLETED},
- AppOpsManager.OP_NONE, null, true, false, MY_PID, SYSTEM_UID, userId);
- }
+ finishUserBoot(uss, resultTo);
}
}
@@ -1117,14 +1159,33 @@
if ((flags & ActivityManager.FLAG_OR_STOPPED) != 0) {
return true;
}
- if ((flags & ActivityManager.FLAG_AND_LOCKED) != 0 && state.unlocked) {
- return false;
+
+ final boolean unlocked;
+ switch (state.state) {
+ case UserState.STATE_STOPPING:
+ case UserState.STATE_SHUTDOWN:
+ default:
+ return false;
+
+ case UserState.STATE_BOOTING:
+ case UserState.STATE_RUNNING_LOCKED:
+ unlocked = false;
+ break;
+
+ case UserState.STATE_RUNNING:
+ unlocked = true;
+ break;
}
- if ((flags & ActivityManager.FLAG_AND_UNLOCKED) != 0 && !state.unlocked) {
- return false;
+
+ if ((flags & ActivityManager.FLAG_AND_LOCKED) != 0) {
+ return !unlocked;
}
- return state.mState != UserState.STATE_STOPPING
- && state.mState != UserState.STATE_SHUTDOWN;
+ if ((flags & ActivityManager.FLAG_AND_UNLOCKED) != 0) {
+ return unlocked;
+ }
+
+ // One way or another, we're running!
+ return true;
}
UserInfo getCurrentUser() {
diff --git a/services/core/java/com/android/server/am/UserState.java b/services/core/java/com/android/server/am/UserState.java
index b5b5c1d..7b18a17 100644
--- a/services/core/java/com/android/server/am/UserState.java
+++ b/services/core/java/com/android/server/am/UserState.java
@@ -19,28 +19,37 @@
import java.io.PrintWriter;
import java.util.ArrayList;
+import static com.android.server.am.ActivityManagerDebugConfig.DEBUG_MU;
+import static com.android.server.am.ActivityManagerDebugConfig.TAG_AM;
+import static com.android.server.am.ActivityManagerDebugConfig.TAG_WITH_CLASS_NAME;
+
import android.app.IStopUserCallback;
import android.os.UserHandle;
import android.util.ArrayMap;
+import android.util.Slog;
public final class UserState {
+ private static final String TAG = TAG_WITH_CLASS_NAME ? "UserState" : TAG_AM;
+
// User is first coming up.
public final static int STATE_BOOTING = 0;
+ // User is in the locked running state.
+ public final static int STATE_RUNNING_LOCKED = 1;
// User is in the normal running state.
- public final static int STATE_RUNNING = 1;
+ public final static int STATE_RUNNING = 2;
// User is in the initial process of being stopped.
- public final static int STATE_STOPPING = 2;
+ public final static int STATE_STOPPING = 3;
// User is in the final phase of stopping, sending Intent.ACTION_SHUTDOWN.
- public final static int STATE_SHUTDOWN = 3;
+ public final static int STATE_SHUTDOWN = 4;
public final UserHandle mHandle;
public final ArrayList<IStopUserCallback> mStopCallbacks
= new ArrayList<IStopUserCallback>();
- public int mState = STATE_BOOTING;
+ public int state = STATE_BOOTING;
+ public int lastState = STATE_BOOTING;
public boolean switching;
public boolean initializing;
- public boolean unlocked;
/**
* The last time that a provider was reported to usage stats as being brought to important
@@ -52,22 +61,32 @@
mHandle = handle;
}
- void dump(String prefix, PrintWriter pw) {
- pw.print(prefix); pw.print("mState=");
- switch (mState) {
- case STATE_BOOTING: pw.print("BOOTING"); break;
- case STATE_RUNNING: pw.print("RUNNING"); break;
- case STATE_STOPPING: pw.print("STOPPING"); break;
- case STATE_SHUTDOWN: pw.print("SHUTDOWN"); break;
- default: pw.print(mState); break;
+ public void setState(int newState) {
+ if (DEBUG_MU) {
+ Slog.i(TAG, "User " + mHandle.getIdentifier() + " state changed from "
+ + stateToString(state) + " to " + stateToString(newState));
}
+ lastState = state;
+ state = newState;
+ }
+
+ private static String stateToString(int state) {
+ switch (state) {
+ case STATE_BOOTING: return "BOOTING";
+ case STATE_RUNNING_LOCKED: return "RUNNING_LOCKED";
+ case STATE_RUNNING: return "RUNNING";
+ case STATE_STOPPING: return "STOPPING";
+ case STATE_SHUTDOWN: return "SHUTDOWN";
+ default: return Integer.toString(state);
+ }
+ }
+
+ void dump(String prefix, PrintWriter pw) {
+ pw.print(prefix);
+ pw.print("state="); pw.print(stateToString(state));
+ pw.print(" lastState="); pw.print(stateToString(lastState));
if (switching) pw.print(" SWITCHING");
if (initializing) pw.print(" INITIALIZING");
- if (unlocked) {
- pw.print(" UNLOCKED");
- } else {
- pw.print(" LOCKED");
- }
pw.println();
}
}
diff --git a/services/core/java/com/android/server/content/SyncManager.java b/services/core/java/com/android/server/content/SyncManager.java
index 4f53882..a066835 100644
--- a/services/core/java/com/android/server/content/SyncManager.java
+++ b/services/core/java/com/android/server/content/SyncManager.java
@@ -422,8 +422,8 @@
if (Intent.ACTION_USER_REMOVED.equals(action)) {
onUserRemoved(userId);
- } else if (Intent.ACTION_USER_STARTING.equals(action)) {
- onUserStarting(userId);
+ } else if (Intent.ACTION_USER_UNLOCKED.equals(action)) {
+ onUserUnlocked(userId);
} else if (Intent.ACTION_USER_STOPPING.equals(action)) {
onUserStopping(userId);
}
@@ -517,7 +517,7 @@
intentFilter = new IntentFilter();
intentFilter.addAction(Intent.ACTION_USER_REMOVED);
- intentFilter.addAction(Intent.ACTION_USER_STARTING);
+ intentFilter.addAction(Intent.ACTION_USER_UNLOCKED);
intentFilter.addAction(Intent.ACTION_USER_STOPPING);
mContext.registerReceiverAsUser(
mUserIntentReceiver, UserHandle.ALL, intentFilter, null, null);
@@ -1292,7 +1292,7 @@
}
}
- private void onUserStarting(int userId) {
+ private void onUserUnlocked(int userId) {
// Make sure that accounts we're about to use are valid
AccountManagerService.getSingleton().validateAccounts(userId);
@@ -2673,21 +2673,20 @@
final Iterator<SyncOperation> operationIterator =
mSyncQueue.getOperations().iterator();
- final ActivityManager activityManager
- = (ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE);
+ final ActivityManager am = mContext.getSystemService(ActivityManager.class);
final Set<Integer> removedUsers = Sets.newHashSet();
while (operationIterator.hasNext()) {
final SyncOperation op = operationIterator.next();
- // If the user is not running, skip the request.
- if (!activityManager.isUserRunning(op.target.userId)) {
+ // If the user is not running unlocked, skip the request.
+ if (!am.isUserRunningAndUnlocked(op.target.userId)) {
final UserInfo userInfo = mUserManager.getUserInfo(op.target.userId);
if (userInfo == null) {
removedUsers.add(op.target.userId);
}
if (isLoggable) {
Log.v(TAG, " Dropping all sync operations for + "
- + op.target.userId + ": user not running.");
+ + op.target.userId + ": user not running unlocked.");
}
continue;
}
diff --git a/services/core/java/com/android/server/input/InputManagerService.java b/services/core/java/com/android/server/input/InputManagerService.java
index ae8fca8..f2d0031 100644
--- a/services/core/java/com/android/server/input/InputManagerService.java
+++ b/services/core/java/com/android/server/input/InputManagerService.java
@@ -212,6 +212,7 @@
private static native String nativeDump(long ptr);
private static native void nativeMonitor(long ptr);
private static native void nativeSetPointerIconShape(long ptr, int iconId);
+ private static native void nativeReloadPointerIcons(long ptr);
// Input event injection constants defined in InputDispatcher.h.
private static final int INPUT_EVENT_INJECTION_SUCCEEDED = 0;
@@ -311,12 +312,14 @@
registerPointerSpeedSettingObserver();
registerShowTouchesSettingObserver();
+ registerAccessibilityLargePointerSettingObserver();
mContext.registerReceiver(new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
updatePointerSpeedFromSettings();
updateShowTouchesFromSettings();
+ nativeReloadPointerIcons(mPtr);
}
}, new IntentFilter(Intent.ACTION_USER_SWITCHED), null, mHandler);
@@ -1362,6 +1365,17 @@
}, UserHandle.USER_ALL);
}
+ private void registerAccessibilityLargePointerSettingObserver() {
+ mContext.getContentResolver().registerContentObserver(
+ Settings.Secure.getUriFor(Settings.Secure.ACCESSIBILITY_LARGE_POINTER_ICON), true,
+ new ContentObserver(mHandler) {
+ @Override
+ public void onChange(boolean selfChange) {
+ nativeReloadPointerIcons(mPtr);
+ }
+ }, UserHandle.USER_ALL);
+ }
+
private int getShowTouchesSetting(int defaultValue) {
int result = defaultValue;
try {
@@ -1431,11 +1445,11 @@
}
}
- // Binder call
- @Override
- public void setPointerIconShape(int iconId) {
- nativeSetPointerIconShape(mPtr, iconId);
- }
+ // Binder call
+ @Override
+ public void setPointerIconShape(int iconId) {
+ nativeSetPointerIconShape(mPtr, iconId);
+ }
@Override
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
diff --git a/services/core/java/com/android/server/job/JobStore.java b/services/core/java/com/android/server/job/JobStore.java
index 0004c42..d9f94d0 100644
--- a/services/core/java/com/android/server/job/JobStore.java
+++ b/services/core/java/com/android/server/job/JobStore.java
@@ -278,6 +278,11 @@
// Copy over the jobs so we can release the lock before writing.
for (int i=0; i<mJobSet.size(); i++) {
JobStatus jobStatus = mJobSet.valueAt(i);
+
+ if (!jobStatus.isPersisted()){
+ continue;
+ }
+
JobStatus copy = new JobStatus(jobStatus.getJob(), jobStatus.getUid(),
jobStatus.getEarliestRunTime(), jobStatus.getLatestRunTimeElapsed());
mStoreCopy.add(copy);
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index e0b7370..33f39bc 100644
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -17,6 +17,19 @@
package com.android.server.notification;
import static android.service.notification.NotificationListenerService.HINT_HOST_DISABLE_EFFECTS;
+import static android.service.notification.NotificationAssistantService.REASON_DELEGATE_CLICK;
+import static android.service.notification.NotificationAssistantService.REASON_DELEGATE_CANCEL;
+import static android.service.notification.NotificationAssistantService.REASON_DELEGATE_CANCEL_ALL;
+import static android.service.notification.NotificationAssistantService.REASON_DELEGATE_ERROR;
+import static android.service.notification.NotificationAssistantService.REASON_PACKAGE_CHANGED;
+import static android.service.notification.NotificationAssistantService.REASON_USER_STOPPED;
+import static android.service.notification.NotificationAssistantService.REASON_PACKAGE_BANNED;
+import static android.service.notification.NotificationAssistantService.REASON_APP_CANCEL;
+import static android.service.notification.NotificationAssistantService.REASON_APP_CANCEL_ALL;
+import static android.service.notification.NotificationAssistantService.REASON_LISTENER_CANCEL;
+import static android.service.notification.NotificationAssistantService.REASON_LISTENER_CANCEL_ALL;
+import static android.service.notification.NotificationAssistantService.REASON_GROUP_SUMMARY_CANCELED;
+import static android.service.notification.NotificationAssistantService.REASON_GROUP_OPTIMIZATION;
import static android.service.notification.NotificationListenerService.SUPPRESSED_EFFECT_LIGHTS;
import static android.service.notification.NotificationListenerService.SUPPRESSED_EFFECT_PEEK;
import static android.service.notification.NotificationListenerService.TRIM_FULL;
@@ -281,19 +294,6 @@
private static final int MY_UID = Process.myUid();
private static final int MY_PID = Process.myPid();
- private static final int REASON_DELEGATE_CLICK = 1;
- private static final int REASON_DELEGATE_CANCEL = 2;
- private static final int REASON_DELEGATE_CANCEL_ALL = 3;
- private static final int REASON_DELEGATE_ERROR = 4;
- private static final int REASON_PACKAGE_CHANGED = 5;
- private static final int REASON_USER_STOPPED = 6;
- private static final int REASON_PACKAGE_BANNED = 7;
- private static final int REASON_NOMAN_CANCEL = 8;
- private static final int REASON_NOMAN_CANCEL_ALL = 9;
- private static final int REASON_LISTENER_CANCEL = 10;
- private static final int REASON_LISTENER_CANCEL_ALL = 11;
- private static final int REASON_GROUP_SUMMARY_CANCELED = 12;
- private static final int REASON_GROUP_OPTIMIZATION = 13;
private static class Archive {
final int mBufferSize;
@@ -1176,7 +1176,7 @@
cancelNotification(Binder.getCallingUid(), Binder.getCallingPid(), pkg, tag, id, 0,
Binder.getCallingUid() == Process.SYSTEM_UID
? 0 : Notification.FLAG_FOREGROUND_SERVICE, false, userId,
- REASON_NOMAN_CANCEL, null);
+ REASON_APP_CANCEL, null);
}
@Override
@@ -1190,7 +1190,7 @@
// running foreground services.
cancelAllNotificationsInt(Binder.getCallingUid(), Binder.getCallingPid(),
pkg, 0, Notification.FLAG_FOREGROUND_SERVICE, true, userId,
- REASON_NOMAN_CANCEL_ALL, null);
+ REASON_APP_CANCEL_ALL, null);
}
@Override
@@ -1243,6 +1243,20 @@
return mRankingHelper.getTopicVisibilityOverride(pkg, uid, topic);
}
+ @Override
+ public void setTopicImportance(String pkg, int uid, Notification.Topic topic,
+ int importance) {
+ checkCallerIsSystem();
+ mRankingHelper.setTopicImportance(pkg, uid, topic, importance);
+ savePolicyFile();
+ }
+
+ @Override
+ public int getTopicImportance(String pkg, int uid, Notification.Topic topic) {
+ checkCallerIsSystem();
+ return mRankingHelper.getTopicImportance(pkg, uid, topic);
+ }
+
/**
* System-only API for getting a list of current (i.e. not cleared) notifications.
*
@@ -2201,6 +2215,7 @@
}
mRankingHelper.extractSignals(r);
+ savePolicyFile();
// 3. Apply local rules
@@ -2879,8 +2894,8 @@
case REASON_LISTENER_CANCEL_ALL:
mUsageStats.registerDismissedByUser(r);
break;
- case REASON_NOMAN_CANCEL:
- case REASON_NOMAN_CANCEL_ALL:
+ case REASON_APP_CANCEL:
+ case REASON_APP_CANCEL_ALL:
mUsageStats.registerRemovedByApp(r);
break;
}
diff --git a/services/core/java/com/android/server/notification/NotificationRecord.java b/services/core/java/com/android/server/notification/NotificationRecord.java
index 2a7568d..3b7384e 100644
--- a/services/core/java/com/android/server/notification/NotificationRecord.java
+++ b/services/core/java/com/android/server/notification/NotificationRecord.java
@@ -23,6 +23,7 @@
import android.graphics.drawable.Icon;
import android.media.AudioAttributes;
import android.os.UserHandle;
+import android.service.notification.NotificationListenerService;
import android.service.notification.StatusBarNotification;
import com.android.internal.annotations.VisibleForTesting;
@@ -82,6 +83,7 @@
private int mAuthoritativeRank;
private String mGlobalSortKey;
private int mPackageVisibility;
+ private int mTopicImportance = NotificationListenerService.Ranking.IMPORTANCE_UNSPECIFIED;
private int mSuppressedVisualEffects = 0;
@@ -106,6 +108,7 @@
mRankingTimeMs = calculateRankingTimeMs(previous.getRankingTimeMs());
mCreationTimeMs = previous.mCreationTimeMs;
mVisibleSinceMs = previous.mVisibleSinceMs;
+ mTopicImportance = previous.mTopicImportance;
// Don't copy mGlobalSortKey, recompute it.
}
@@ -195,6 +198,8 @@
pw.println(prefix + " mRecentlyIntrusive=" + mRecentlyIntrusive);
pw.println(prefix + " mPackagePriority=" + mPackagePriority);
pw.println(prefix + " mPackageVisibility=" + mPackageVisibility);
+ pw.println(prefix + " mTopicImportance="
+ + NotificationListenerService.Ranking.importanceToString(mTopicImportance));
pw.println(prefix + " mIntercept=" + mIntercept);
pw.println(prefix + " mGlobalSortKey=" + mGlobalSortKey);
pw.println(prefix + " mRankingTimeMs=" + mRankingTimeMs);
@@ -268,6 +273,16 @@
return mPackageVisibility;
}
+ public void setTopicImportance(int importance) {
+ if (importance != NotificationListenerService.Ranking.IMPORTANCE_UNSPECIFIED) {
+ mTopicImportance = importance;
+ }
+ }
+
+ public int getTopicImportance() {
+ return mTopicImportance;
+ }
+
public boolean setIntercepted(boolean intercept) {
mIntercept = intercept;
return mIntercept;
diff --git a/services/core/java/com/android/server/notification/RankingConfig.java b/services/core/java/com/android/server/notification/RankingConfig.java
index 7ee29e4..acdd90a 100644
--- a/services/core/java/com/android/server/notification/RankingConfig.java
+++ b/services/core/java/com/android/server/notification/RankingConfig.java
@@ -31,4 +31,8 @@
void setTopicVisibilityOverride(String packageName, int uid, Notification.Topic topic,
int visibility);
+
+ void setTopicImportance(String packageName, int uid, Notification.Topic topic, int importance);
+
+ int getTopicImportance(String packageName, int uid, Notification.Topic topic);
}
diff --git a/services/core/java/com/android/server/notification/RankingHelper.java b/services/core/java/com/android/server/notification/RankingHelper.java
index 543cd89..5a31c6a 100644
--- a/services/core/java/com/android/server/notification/RankingHelper.java
+++ b/services/core/java/com/android/server/notification/RankingHelper.java
@@ -23,6 +23,7 @@
import android.os.Message;
import android.os.UserHandle;
import android.service.notification.NotificationListenerService;
+import android.service.notification.NotificationListenerService.Ranking;
import android.text.TextUtils;
import android.util.ArrayMap;
import android.util.Slog;
@@ -55,12 +56,13 @@
private static final String ATT_UID = "uid";
private static final String ATT_PRIORITY = "priority";
private static final String ATT_VISIBILITY = "visibility";
+ private static final String ATT_IMPORTANCE = "importance";
private static final String ATT_TOPIC_ID = "id";
private static final String ATT_TOPIC_LABEL = "label";
private static final int DEFAULT_PRIORITY = Notification.PRIORITY_DEFAULT;
- private static final int DEFAULT_VISIBILITY =
- NotificationListenerService.Ranking.VISIBILITY_NO_OVERRIDE;
+ private static final int DEFAULT_VISIBILITY = Ranking.VISIBILITY_NO_OVERRIDE;
+ private static final int DEFAULT_IMPORTANCE = Ranking.IMPORTANCE_UNSPECIFIED;
private final NotificationSignalExtractor[] mSignalExtractors;
private final NotificationComparator mPreliminaryComparator = new NotificationComparator();
@@ -197,6 +199,7 @@
if (TAG_TOPIC.equals(tagName)) {
int priority = safeInt(parser, ATT_PRIORITY, DEFAULT_PRIORITY);
int vis = safeInt(parser, ATT_VISIBILITY, DEFAULT_VISIBILITY);
+ int importance = safeInt(parser, ATT_IMPORTANCE, DEFAULT_IMPORTANCE);
String id = parser.getAttributeValue(null, ATT_TOPIC_ID);
CharSequence label = parser.getAttributeValue(null, ATT_TOPIC_LABEL);
@@ -209,6 +212,9 @@
if (vis != DEFAULT_VISIBILITY) {
topic.visibility = vis;
}
+ if (importance != DEFAULT_IMPORTANCE) {
+ topic.importance = importance;
+ }
r.topics.put(id, topic);
}
}
@@ -267,6 +273,9 @@
if (t.visibility != DEFAULT_VISIBILITY) {
out.attribute(null, ATT_VISIBILITY, Integer.toString(t.visibility));
}
+ if (t.importance != DEFAULT_IMPORTANCE) {
+ out.attribute(null, ATT_IMPORTANCE, Integer.toString(t.importance));
+ }
out.endTag(null, TAG_TOPIC);
}
}
@@ -403,6 +412,20 @@
updateConfig();
}
+ @Override
+ public int getTopicImportance(String packageName, int uid, Notification.Topic topic) {
+ final Record r = getOrCreateRecord(packageName, uid);
+ return getOrCreateTopic(r, topic).importance;
+ }
+
+ @Override
+ public void setTopicImportance(String pkgName, int uid, Notification.Topic topic,
+ int importance) {
+ final Record r = getOrCreateRecord(pkgName, uid);
+ getOrCreateTopic(r, topic).importance = importance;
+ updateConfig();
+ }
+
private Topic getOrCreateTopic(Record r, Notification.Topic topic) {
if (topic == null) {
topic = createDefaultTopic();
@@ -468,6 +491,10 @@
pw.print(" visibility=");
pw.print(Notification.visibilityToString(t.visibility));
}
+ if (t.importance != DEFAULT_IMPORTANCE) {
+ pw.print(" importance=");
+ pw.print(Ranking.importanceToString(t.importance));
+ }
pw.println();
}
}
@@ -512,6 +539,7 @@
Notification.Topic topic;
int priority = DEFAULT_PRIORITY;
int visibility = DEFAULT_VISIBILITY;
+ int importance = DEFAULT_IMPORTANCE;
public Topic(Notification.Topic topic) {
this.topic = topic;
diff --git a/services/core/java/com/android/server/notification/TopicImportanceExtractor.java b/services/core/java/com/android/server/notification/TopicImportanceExtractor.java
new file mode 100644
index 0000000..01770d0
--- /dev/null
+++ b/services/core/java/com/android/server/notification/TopicImportanceExtractor.java
@@ -0,0 +1,56 @@
+/**
+* Copyright (C) 2015 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 com.android.server.notification;
+
+import android.content.Context;
+import android.util.Slog;
+
+/**
+ * Determines the importance of the given notification.
+ */
+public class TopicImportanceExtractor implements NotificationSignalExtractor {
+ private static final String TAG = "ImportantTopicExtractor";
+ private static final boolean DBG = false;
+
+ private RankingConfig mConfig;
+
+ public void initialize(Context ctx, NotificationUsageStats usageStats) {
+ if (DBG) Slog.d(TAG, "Initializing " + getClass().getSimpleName() + ".");
+ }
+
+ public RankingReconsideration process(NotificationRecord record) {
+ if (record == null || record.getNotification() == null) {
+ if (DBG) Slog.d(TAG, "skipping empty notification");
+ return null;
+ }
+
+ if (mConfig == null) {
+ if (DBG) Slog.d(TAG, "missing config");
+ return null;
+ }
+
+ final int topicImportance = mConfig.getTopicImportance(record.sbn.getPackageName(),
+ record.sbn.getUid(), record.sbn.getNotification().getTopic());
+ record.setTopicImportance(topicImportance);
+
+ return null;
+ }
+
+ @Override
+ public void setConfig(RankingConfig config) {
+ mConfig = config;
+ }
+}
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index 0fde27f..6f19911 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -4868,15 +4868,21 @@
// Check for results in the current profile.
List<ResolveInfo> result = mActivities.queryIntent(
intent, resolvedType, flags, userId);
+ result = filterIfNotSystemUser(result, userId);
// Check for cross profile results.
+ boolean hasNonNegativePriorityResult = hasNonNegativePriority(result);
xpResolveInfo = queryCrossProfileIntents(
- matchingFilters, intent, resolvedType, flags, userId);
+ matchingFilters, intent, resolvedType, flags, userId,
+ hasNonNegativePriorityResult);
if (xpResolveInfo != null && isUserEnabled(xpResolveInfo.targetUserId)) {
- result.add(xpResolveInfo);
- Collections.sort(result, mResolvePrioritySorter);
+ boolean isVisibleToUser = filterIfNotSystemUser(
+ Collections.singletonList(xpResolveInfo), userId).size() > 0;
+ if (isVisibleToUser) {
+ result.add(xpResolveInfo);
+ Collections.sort(result, mResolvePrioritySorter);
+ }
}
- result = filterIfNotSystemUser(result, userId);
if (hasWebURI(intent)) {
CrossProfileDomainInfo xpDomainInfo = null;
final UserInfo parent = getProfileParent(userId);
@@ -5009,6 +5015,14 @@
return resolveInfos;
}
+ /**
+ * @param resolveInfos list of resolve infos in descending priority order
+ * @return if the list contains a resolve info with non-negative priority
+ */
+ private boolean hasNonNegativePriority(List<ResolveInfo> resolveInfos) {
+ return resolveInfos.size() > 0 && resolveInfos.get(0).priority >= 0;
+ }
+
private static boolean hasWebURI(Intent intent) {
if (intent.getData() == null) {
return false;
@@ -5212,10 +5226,10 @@
return null;
}
- // Return matching ResolveInfo if any for skip current profile intent filters.
+ // Return matching ResolveInfo in target user if any.
private ResolveInfo queryCrossProfileIntents(
List<CrossProfileIntentFilter> matchingFilters, Intent intent, String resolvedType,
- int flags, int sourceUserId) {
+ int flags, int sourceUserId, boolean matchInCurrentProfile) {
if (matchingFilters != null) {
// Two {@link CrossProfileIntentFilter}s can have the same targetUserId and
// match the same intent. For performance reasons, it is better not to
@@ -5225,8 +5239,12 @@
for (int i = 0; i < size; i++) {
CrossProfileIntentFilter filter = matchingFilters.get(i);
int targetUserId = filter.getTargetUserId();
- if ((filter.getFlags() & PackageManager.SKIP_CURRENT_PROFILE) == 0
- && !alreadyTriedUserIds.get(targetUserId)) {
+ boolean skipCurrentProfile =
+ (filter.getFlags() & PackageManager.SKIP_CURRENT_PROFILE) != 0;
+ boolean skipCurrentProfileIfNoMatchFound =
+ (filter.getFlags() & PackageManager.ONLY_IF_NO_MATCH_FOUND) != 0;
+ if (!skipCurrentProfile && !alreadyTriedUserIds.get(targetUserId)
+ && (!skipCurrentProfileIfNoMatchFound || !matchInCurrentProfile)) {
// Checking if there are activities in the target user that can handle the
// intent.
ResolveInfo resolveInfo = createForwardingResolveInfo(filter, intent,
@@ -8397,9 +8415,9 @@
}
}
if ((p.info.protectionLevel&PermissionInfo.PROTECTION_FLAG_APPOP) != 0) {
- ArraySet<String> appOpPerms = mAppOpPermissionPackages.get(p.info.name);
- if (appOpPerms != null) {
- appOpPerms.remove(pkg.packageName);
+ ArraySet<String> appOpPkgs = mAppOpPermissionPackages.get(p.info.name);
+ if (appOpPkgs != null) {
+ appOpPkgs.remove(pkg.packageName);
}
}
}
@@ -8413,10 +8431,10 @@
String perm = pkg.requestedPermissions.get(i);
BasePermission bp = mSettings.mPermissions.get(perm);
if (bp != null && (bp.protectionLevel&PermissionInfo.PROTECTION_FLAG_APPOP) != 0) {
- ArraySet<String> appOpPerms = mAppOpPermissionPackages.get(perm);
- if (appOpPerms != null) {
- appOpPerms.remove(pkg.packageName);
- if (appOpPerms.isEmpty()) {
+ ArraySet<String> appOpPkgs = mAppOpPermissionPackages.get(perm);
+ if (appOpPkgs != null) {
+ appOpPkgs.remove(pkg.packageName);
+ if (appOpPkgs.isEmpty()) {
mAppOpPermissionPackages.remove(perm);
}
}
diff --git a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
index dbb5818..c549b8c 100644
--- a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
+++ b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
@@ -101,6 +101,8 @@
return runList();
case "uninstall":
return runUninstall();
+ case "resolve-activity":
+ return runResolveActivity();
case "query-intent-activities":
return runQueryIntentActivities();
case "query-intent-services":
@@ -565,6 +567,28 @@
return intent;
}
+ private int runResolveActivity() {
+ Intent intent;
+ try {
+ intent = parseIntentAndUser();
+ } catch (URISyntaxException e) {
+ throw new RuntimeException(e.getMessage(), e);
+ }
+ try {
+ ResolveInfo ri = mInterface.resolveIntent(intent, null, 0, mTargetUser);
+ PrintWriter pw = getOutPrintWriter();
+ if (ri == null) {
+ pw.println("No activity found");
+ } else {
+ PrintWriterPrinter pr = new PrintWriterPrinter(pw);
+ ri.dump(pr, "");
+ }
+ } catch (RemoteException e) {
+ throw new RuntimeException("Failed calling service", e);
+ }
+ return 0;
+ }
+
private int runQueryIntentActivities() {
Intent intent;
try {
@@ -1016,6 +1040,8 @@
pw.println(" -s: short summary");
pw.println(" -d: only list dangerous permissions");
pw.println(" -u: list only the permissions users will see");
+ pw.println(" resolve-intent [--user USER_ID] INTENT");
+ pw.println(" Prints the activity that resolves to the given Intent.");
pw.println(" query-intent-activities [--user USER_ID] INTENT");
pw.println(" Prints all activities that can handle the given Intent.");
pw.println(" query-intent-services [--user USER_ID] INTENT");
diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java
index b31d731..b859915 100644
--- a/services/core/java/com/android/server/pm/UserManagerService.java
+++ b/services/core/java/com/android/server/pm/UserManagerService.java
@@ -70,6 +70,7 @@
import com.android.internal.util.FastXmlSerializer;
import com.android.internal.util.Preconditions;
import com.android.internal.util.XmlUtils;
+import com.android.internal.widget.LockPatternUtils;
import com.android.server.LocalServices;
import org.xmlpull.v1.XmlPullParser;
@@ -411,7 +412,7 @@
@Override
public int getCredentialOwnerProfile(int userHandle) {
checkManageUsersPermission("get the credential owner");
- if (!StorageManager.isFileBasedEncryptionEnabled()) {
+ if (!LockPatternUtils.isSeparateWorkChallengeEnabled()) {
synchronized (mUsersLock) {
UserInfo profileParent = getProfileParentLU(userHandle);
if (profileParent != null) {
diff --git a/services/core/java/com/android/server/policy/BarController.java b/services/core/java/com/android/server/policy/BarController.java
index 051b7fb..0c80ffa 100644
--- a/services/core/java/com/android/server/policy/BarController.java
+++ b/services/core/java/com/android/server/policy/BarController.java
@@ -47,6 +47,7 @@
private final int mTransientFlag;
private final int mUnhideFlag;
private final int mTranslucentFlag;
+ private final int mTransparentFlag;
private final int mStatusBarManagerId;
private final int mTranslucentWmFlag;
protected final Handler mHandler;
@@ -63,13 +64,14 @@
private boolean mNoAnimationOnNextShow;
public BarController(String tag, int transientFlag, int unhideFlag, int translucentFlag,
- int statusBarManagerId, int translucentWmFlag) {
+ int statusBarManagerId, int translucentWmFlag, int transparentFlag) {
mTag = "BarController." + tag;
mTransientFlag = transientFlag;
mUnhideFlag = unhideFlag;
mTranslucentFlag = translucentFlag;
mStatusBarManagerId = statusBarManagerId;
mTranslucentWmFlag = translucentWmFlag;
+ mTransparentFlag = transparentFlag;
mHandler = new Handler();
}
@@ -126,13 +128,13 @@
vis &= ~mTranslucentFlag;
}
if ((fl & WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0) {
- vis |= View.SYSTEM_UI_TRANSPARENT;
+ vis |= mTransparentFlag;
} else {
- vis &= ~View.SYSTEM_UI_TRANSPARENT;
+ vis &= ~mTransparentFlag;
}
} else {
vis = (vis & ~mTranslucentFlag) | (oldVis & mTranslucentFlag);
- vis = (vis & ~View.SYSTEM_UI_TRANSPARENT) | (oldVis & View.SYSTEM_UI_TRANSPARENT);
+ vis = (vis & ~mTransparentFlag) | (oldVis & mTransparentFlag);
}
}
return vis;
@@ -247,7 +249,7 @@
}
}
if (mShowTransparent) {
- vis |= View.SYSTEM_UI_TRANSPARENT;
+ vis |= mTransparentFlag;
if (mSetUnHideFlagWhenNextTransparent) {
vis |= mUnhideFlag;
mSetUnHideFlagWhenNextTransparent = false;
@@ -258,7 +260,7 @@
vis &= ~View.SYSTEM_UI_FLAG_LOW_PROFILE; // never show transient bars in low profile
}
if ((vis & mTranslucentFlag) != 0 || (oldVis & mTranslucentFlag) != 0 ||
- ((vis | oldVis) & View.SYSTEM_UI_TRANSPARENT) != 0) {
+ ((vis | oldVis) & mTransparentFlag) != 0) {
mLastTranslucent = SystemClock.uptimeMillis();
}
return vis;
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index 639753a..fe427d3 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -108,9 +108,6 @@
import android.view.KeyCharacterMap.FallbackAction;
import android.view.KeyEvent;
import android.view.MotionEvent;
-
-import com.android.internal.logging.MetricsLogger;
-import com.android.internal.policy.PhoneWindow;
import android.view.Surface;
import android.view.View;
import android.view.ViewConfiguration;
@@ -124,6 +121,8 @@
import android.view.animation.AnimationSet;
import android.view.animation.AnimationUtils;
import com.android.internal.R;
+import com.android.internal.logging.MetricsLogger;
+import com.android.internal.policy.PhoneWindow;
import com.android.internal.statusbar.IStatusBarService;
import com.android.internal.util.ScreenShapeHelper;
import com.android.internal.widget.PointerLocationView;
@@ -159,8 +158,7 @@
static final boolean SHOW_PROCESSES_ON_ALT_MENU = false;
// Whether to allow dock apps with METADATA_DOCK_HOME to temporarily take over the Home key.
- // No longer recommended for desk docks; still useful in car docks.
- static final boolean ENABLE_CAR_DOCK_HOME_CAPTURE = true;
+ // No longer recommended for desk docks;
static final boolean ENABLE_DESK_DOCK_HOME_CAPTURE = false;
static final int SHORT_PRESS_POWER_NOTHING = 0;
@@ -211,7 +209,8 @@
| View.SYSTEM_UI_FLAG_FULLSCREEN
| View.STATUS_BAR_TRANSLUCENT
| View.NAVIGATION_BAR_TRANSLUCENT
- | View.SYSTEM_UI_TRANSPARENT;
+ | View.STATUS_BAR_TRANSPARENT
+ | View.NAVIGATION_BAR_TRANSPARENT;
private static final AudioAttributes VIBRATION_ATTRIBUTES = new AudioAttributes.Builder()
.setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
@@ -317,6 +316,10 @@
int[] mNavigationBarHeightForRotation = new int[4];
int[] mNavigationBarWidthForRotation = new int[4];
+ // Whether to allow dock apps with METADATA_DOCK_HOME to temporarily take over the Home key.
+ // This is for car dock and this is updated from resource.
+ private boolean mEnableCarDockHomeCapture = true;
+
boolean mBootMessageNeedsHiding;
KeyguardServiceDelegate mKeyguardDelegate;
final Runnable mWindowManagerDrawCallback = new Runnable() {
@@ -624,6 +627,8 @@
private final LogDecelerateInterpolator mLogDecelerateInterpolator
= new LogDecelerateInterpolator(100, 0);
+ private boolean mForceWindowDrawsStatusBarBackground;
+
private static final int MSG_ENABLE_POINTER_LOCATION = 1;
private static final int MSG_DISABLE_POINTER_LOCATION = 2;
private static final int MSG_DISPATCH_MEDIA_KEY_WITH_WAKE_LOCK = 3;
@@ -804,7 +809,8 @@
View.NAVIGATION_BAR_UNHIDE,
View.NAVIGATION_BAR_TRANSLUCENT,
StatusBarManager.WINDOW_NAVIGATION_BAR,
- WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
+ WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION,
+ View.NAVIGATION_BAR_TRANSPARENT);
private ImmersiveModeConfirmation mImmersiveModeConfirmation;
@@ -1399,6 +1405,8 @@
mHomeIntent.addCategory(Intent.CATEGORY_HOME);
mHomeIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
+ mEnableCarDockHomeCapture = context.getResources().getBoolean(
+ com.android.internal.R.bool.config_enableCarDockHomeLaunch);
mCarDockIntent = new Intent(Intent.ACTION_MAIN, null);
mCarDockIntent.addCategory(Intent.CATEGORY_CAR_DOCK);
mCarDockIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK
@@ -1583,6 +1591,8 @@
mScreenshotChordEnabled = mContext.getResources().getBoolean(
com.android.internal.R.bool.config_enableScreenshotChord);
+ mForceWindowDrawsStatusBarBackground = mContext.getResources().getBoolean(
+ R.bool.config_forceWindowDrawsStatusBarBackground);
mGlobalKeyManager = new GlobalKeyManager(mContext);
@@ -1915,6 +1925,7 @@
case TYPE_PRIVATE_PRESENTATION:
case TYPE_VOICE_INTERACTION:
case TYPE_ACCESSIBILITY_OVERLAY:
+ case TYPE_QS_DIALOG:
// The window manager will check these.
break;
case TYPE_PHONE:
@@ -2044,10 +2055,14 @@
attrs.privateFlags &= ~WindowManager.LayoutParams.PRIVATE_FLAG_KEYGUARD;
}
- if (ActivityManager.isHighEndGfx()
- && (attrs.flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0) {
- attrs.subtreeSystemUiVisibility |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
- | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
+ if (ActivityManager.isHighEndGfx()) {
+ if ((attrs.flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0) {
+ attrs.subtreeSystemUiVisibility |= View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
+ }
+ if ((attrs.flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0
+ || mForceWindowDrawsStatusBarBackground) {
+ attrs.subtreeSystemUiVisibility |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
+ }
}
}
@@ -2110,6 +2125,8 @@
return 2;
case TYPE_DOCK_DIVIDER:
return 2;
+ case TYPE_QS_DIALOG:
+ return 2;
case TYPE_PHONE:
return 3;
case TYPE_SEARCH_BAR:
@@ -3602,7 +3619,7 @@
final int sysui = mLastSystemUiFlags;
boolean navVisible = (sysui & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0;
boolean navTranslucent = (sysui
- & (View.NAVIGATION_BAR_TRANSLUCENT | View.SYSTEM_UI_TRANSPARENT)) != 0;
+ & (View.NAVIGATION_BAR_TRANSLUCENT | View.NAVIGATION_BAR_TRANSPARENT)) != 0;
boolean immersive = (sysui & View.SYSTEM_UI_FLAG_IMMERSIVE) != 0;
boolean immersiveSticky = (sysui & View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY) != 0;
boolean navAllowedHidden = immersive || immersiveSticky;
@@ -3670,7 +3687,7 @@
boolean statusBarTransient = (sysui & View.STATUS_BAR_TRANSIENT) != 0;
boolean statusBarTranslucent = (sysui
- & (View.STATUS_BAR_TRANSLUCENT | View.SYSTEM_UI_TRANSPARENT)) != 0;
+ & (View.STATUS_BAR_TRANSLUCENT | View.STATUS_BAR_TRANSPARENT)) != 0;
if (!isKeyguardShowing) {
statusBarTranslucent &= areTranslucentBarsAllowed();
}
@@ -4001,7 +4018,8 @@
&& (fl & WindowManager.LayoutParams.FLAG_FULLSCREEN) == 0
&& (fl & WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS) == 0
&& (fl & WindowManager.LayoutParams.
- FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) == 0) {
+ FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) == 0
+ && !mForceWindowDrawsStatusBarBackground) {
// Ensure policy decor includes status bar
dcf.top = mStableTop;
}
@@ -6402,7 +6420,7 @@
* true:
* <ul>
* <li>The device is not in either car mode or desk mode
- * <li>The device is in car mode but ENABLE_CAR_DOCK_HOME_CAPTURE is false
+ * <li>The device is in car mode but mEnableCarDockHomeCapture is false
* <li>The device is in desk mode but ENABLE_DESK_DOCK_HOME_CAPTURE is false
* <li>The device is in car mode but there's no CAR_DOCK app with METADATA_DOCK_HOME
* <li>The device is in desk mode but there's no DESK_DOCK app with METADATA_DOCK_HOME
@@ -6416,7 +6434,7 @@
// is, when in car mode you should be taken to car home regardless
// of whether we are actually in a car dock.
if (mUiMode == Configuration.UI_MODE_TYPE_CAR) {
- if (ENABLE_CAR_DOCK_HOME_CAPTURE) {
+ if (mEnableCarDockHomeCapture) {
intent = mCarDockIntent;
}
} else if (mUiMode == Configuration.UI_MODE_TYPE_DESK) {
@@ -6726,10 +6744,7 @@
final boolean freeformStackVisible =
mWindowManagerInternal.isStackVisible(FREEFORM_WORKSPACE_STACK_ID);
final boolean forceShowSystemBars = dockedStackVisible || freeformStackVisible;
- // TODO(multi-window): Update to force opaque independently for status bar and nav bar.
- // This will require refactoring the code to have separate vis flag for each bar so it can
- // be adjusted independently.
- final boolean forceOpaqueSystemBars = forceShowSystemBars;
+ final boolean forceOpaqueSystemBars = forceShowSystemBars && !mForceStatusBarFromKeyguard;
// apply translucent bar vis flags
WindowState transWin = isStatusBarKeyguard() && !mHideLockScreen
@@ -6759,6 +6774,11 @@
| View.SYSTEM_UI_TRANSPARENT);
}
+ if (mForceWindowDrawsStatusBarBackground) {
+ vis |= View.STATUS_BAR_TRANSPARENT;
+ vis &= ~View.STATUS_BAR_TRANSLUCENT;
+ }
+
// update status bar
boolean immersiveSticky =
(vis & View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY) != 0;
@@ -6936,6 +6956,7 @@
pw.print(prefix); pw.print("mSupportAutoRotation="); pw.println(mSupportAutoRotation);
pw.print(prefix); pw.print("mUiMode="); pw.print(mUiMode);
pw.print(" mDockMode="); pw.print(mDockMode);
+ pw.print(" mEnableCarDockHomeCapture="); pw.print(mEnableCarDockHomeCapture);
pw.print(" mCarDockRotation="); pw.print(mCarDockRotation);
pw.print(" mDeskDockRotation="); pw.println(mDeskDockRotation);
pw.print(prefix); pw.print("mUserRotationMode="); pw.print(mUserRotationMode);
diff --git a/services/core/java/com/android/server/policy/StatusBarController.java b/services/core/java/com/android/server/policy/StatusBarController.java
index b935f5a..9d353c6 100644
--- a/services/core/java/com/android/server/policy/StatusBarController.java
+++ b/services/core/java/com/android/server/policy/StatusBarController.java
@@ -111,7 +111,8 @@
View.STATUS_BAR_UNHIDE,
View.STATUS_BAR_TRANSLUCENT,
StatusBarManager.WINDOW_STATUS_BAR,
- WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
+ WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS,
+ View.STATUS_BAR_TRANSPARENT);
}
public AppTransitionListener getAppTransitionListener() {
diff --git a/services/core/java/com/android/server/trust/TrustManagerService.java b/services/core/java/com/android/server/trust/TrustManagerService.java
index f9d29ac..4b6db99 100644
--- a/services/core/java/com/android/server/trust/TrustManagerService.java
+++ b/services/core/java/com/android/server/trust/TrustManagerService.java
@@ -53,6 +53,7 @@
import android.os.SystemClock;
import android.os.UserHandle;
import android.os.UserManager;
+import android.os.storage.StorageManager;
import android.provider.Settings;
import android.service.trust.TrustAgentService;
import android.util.ArraySet;
@@ -102,6 +103,7 @@
private static final int MSG_START_USER = 7;
private static final int MSG_CLEANUP_USER = 8;
private static final int MSG_SWITCH_USER = 9;
+ private static final int MSG_SET_DEVICE_LOCKED = 10;
private final ArraySet<AgentInfo> mActiveAgents = new ArraySet<>();
private final ArrayList<ITrustListener> mTrustListeners = new ArrayList<>();
@@ -288,6 +290,19 @@
}
}
+ public void setDeviceLockedForUser(int userId, boolean locked) {
+ if (LockPatternUtils.isSeparateWorkChallengeEnabled()) {
+ UserInfo info = mUserManager.getUserInfo(userId);
+ if (info.isManagedProfile()) {
+ synchronized (mDeviceLockedForUser) {
+ mDeviceLockedForUser.put(userId, locked);
+ }
+ } else {
+ Log.wtf(TAG, "Requested to change lock state for non-profile user " + userId);
+ }
+ }
+ }
+
boolean isDeviceLockedInner(int userId) {
synchronized (mDeviceLockedForUser) {
return mDeviceLockedForUser.get(userId, true);
@@ -655,7 +670,9 @@
public boolean isDeviceLocked(int userId) throws RemoteException {
userId = ActivityManager.handleIncomingUser(getCallingPid(), getCallingUid(), userId,
false /* allowAll */, true /* requireFull */, "isDeviceLocked", null);
- userId = resolveProfileParent(userId);
+ if (!LockPatternUtils.isSeparateWorkChallengeEnabled()) {
+ userId = resolveProfileParent(userId);
+ }
return isDeviceLockedInner(userId);
}
@@ -762,6 +779,12 @@
private String dumpHex(int i) {
return "0x" + Integer.toHexString(i);
}
+
+ @Override
+ public void setDeviceLockedForUser(int userId, boolean value) {
+ mHandler.obtainMessage(MSG_SET_DEVICE_LOCKED, value ? 1 : 0, userId)
+ .sendToTarget();
+ }
};
private int resolveProfileParent(int userId) {
@@ -806,6 +829,9 @@
mCurrentUser = msg.arg1;
refreshDeviceLockedForUser(UserHandle.USER_ALL);
break;
+ case MSG_SET_DEVICE_LOCKED:
+ setDeviceLockedForUser(msg.arg2, msg.arg1 != 0);
+ break;
}
}
};
diff --git a/services/core/java/com/android/server/wm/AccessibilityController.java b/services/core/java/com/android/server/wm/AccessibilityController.java
index c246609..a4b4276 100644
--- a/services/core/java/com/android/server/wm/AccessibilityController.java
+++ b/services/core/java/com/android/server/wm/AccessibilityController.java
@@ -351,6 +351,7 @@
case WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG:
case WindowManager.LayoutParams.TYPE_SYSTEM_ERROR:
case WindowManager.LayoutParams.TYPE_VOLUME_OVERLAY:
+ case WindowManager.LayoutParams.TYPE_QS_DIALOG:
case WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL: {
Rect magnifiedRegionBounds = mTempRect2;
mMagnifedViewport.getMagnifiedFrameInContentCoordsLocked(
diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java
index 4bbf586..898a9a4 100644
--- a/services/core/java/com/android/server/wm/DisplayContent.java
+++ b/services/core/java/com/android/server/wm/DisplayContent.java
@@ -237,8 +237,8 @@
}
void moveStack(TaskStack stack, boolean toTop) {
- if (stack.mStackId == PINNED_STACK_ID && !toTop) {
- // Pinned stack is always-on-top silly...
+ if (StackId.isAlwaysOnTop(stack.mStackId) && !toTop) {
+ // This stack is always-on-top silly...
Slog.w(TAG, "Ignoring move of always-on-top stack=" + stack + " to bottom");
return;
}
diff --git a/services/core/java/com/android/server/wm/DockedStackDividerController.java b/services/core/java/com/android/server/wm/DockedStackDividerController.java
index df8d5d6..32c9b2a 100644
--- a/services/core/java/com/android/server/wm/DockedStackDividerController.java
+++ b/services/core/java/com/android/server/wm/DockedStackDividerController.java
@@ -20,8 +20,6 @@
import android.graphics.Rect;
import android.os.RemoteException;
import android.util.Slog;
-import android.util.SparseArray;
-import android.util.SparseIntArray;
import android.view.IDockDividerVisibilityListener;
import static android.app.ActivityManager.StackId.DOCKED_STACK_ID;
@@ -46,6 +44,7 @@
private final Rect mLastRect = new Rect();
private IDockDividerVisibilityListener mListener;
private boolean mLastVisibility = false;
+ private boolean mForceVisibilityReevaluation;
DockedStackDividerController(Context context, DisplayContent displayContent) {
mDisplayContent = displayContent;
@@ -69,16 +68,16 @@
void setWindow(WindowState window) {
mWindow = window;
- reevaluateVisibility();
+ reevaluateVisibility(false);
}
- void reevaluateVisibility() {
+ void reevaluateVisibility(boolean force) {
if (mWindow == null) {
return;
}
TaskStack stack = mDisplayContent.mService.mStackIdToStack.get(DOCKED_STACK_ID);
final boolean visible = stack != null && stack.isVisibleLocked();
- if (mLastVisibility == visible) {
+ if (mLastVisibility == visible && !force) {
return;
}
mLastVisibility = visible;
@@ -131,5 +130,6 @@
throw new IllegalStateException("Dock divider visibility listener already set!");
}
mListener = listener;
+ reevaluateVisibility(true);
}
}
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java
index 22f1d63..e4f6c56 100644
--- a/services/core/java/com/android/server/wm/Task.java
+++ b/services/core/java/com/android/server/wm/Task.java
@@ -252,7 +252,7 @@
}
int boundsChange = BOUNDS_CHANGE_NONE;
- if (mBounds.left != bounds.left || mBounds.right != bounds.right) {
+ if (mBounds.left != bounds.left || mBounds.top != bounds.top) {
boundsChange |= BOUNDS_CHANGE_POSITION;
}
if (mBounds.width() != bounds.width() || mBounds.height() != bounds.height()) {
diff --git a/services/core/java/com/android/server/wm/TaskStack.java b/services/core/java/com/android/server/wm/TaskStack.java
index 611ad40..996fadf 100644
--- a/services/core/java/com/android/server/wm/TaskStack.java
+++ b/services/core/java/com/android/server/wm/TaskStack.java
@@ -692,6 +692,10 @@
}
boolean isVisibleLocked() {
+ final boolean keyguardOn = mService.mPolicy.isKeyguardShowingOrOccluded();
+ if (keyguardOn && !StackId.isAllowedOverLockscreen(mStackId)) {
+ return false;
+ }
for (int i = mTasks.size() - 1; i >= 0; i--) {
Task task = mTasks.get(i);
for (int j = task.mAppTokens.size() - 1; j >= 0; j--) {
diff --git a/services/core/java/com/android/server/wm/TaskTapPointerEventListener.java b/services/core/java/com/android/server/wm/TaskTapPointerEventListener.java
index 2f890be..af109d4 100644
--- a/services/core/java/com/android/server/wm/TaskTapPointerEventListener.java
+++ b/services/core/java/com/android/server/wm/TaskTapPointerEventListener.java
@@ -109,6 +109,7 @@
final int y = (int) motionEvent.getY();
final Task task = mDisplayContent.findTaskForControlPoint(x, y);
if (task == null) {
+ mPointerIconShape = STYLE_NOT_SPECIFIED;
break;
}
task.getDimBounds(mTmpRect);
@@ -137,6 +138,7 @@
} break;
case MotionEvent.ACTION_HOVER_EXIT:
+ mPointerIconShape = STYLE_NOT_SPECIFIED;
motionEvent.getDevice().setPointerShape(STYLE_DEFAULT);
break;
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 3dc596f..410d810 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -43,6 +43,7 @@
import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD;
import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD_DIALOG;
import static android.view.WindowManager.LayoutParams.TYPE_PRIVATE_PRESENTATION;
+import static android.view.WindowManager.LayoutParams.TYPE_QS_DIALOG;
import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR;
import static android.view.WindowManager.LayoutParams.TYPE_VOICE_INTERACTION;
import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER;
@@ -57,6 +58,8 @@
import android.animation.ValueAnimator;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.app.ActivityManager;
+import android.app.ActivityManager.StackId;
import android.app.ActivityManagerNative;
import android.app.AppOpsManager;
import android.app.IActivityManager;
@@ -1865,6 +1868,11 @@
+ attrs.token + ". Aborting.");
return WindowManagerGlobal.ADD_BAD_APP_TOKEN;
}
+ if (type == TYPE_QS_DIALOG) {
+ Slog.w(TAG, "Attempted to add QS dialog window with unknown token "
+ + attrs.token + ". Aborting.");
+ return WindowManagerGlobal.ADD_BAD_APP_TOKEN;
+ }
if (type == TYPE_ACCESSIBILITY_OVERLAY) {
Slog.w(TAG, "Attempted to add Accessibility overlay window with unknown token "
+ attrs.token + ". Aborting.");
@@ -3269,7 +3277,8 @@
}
@Override
- public void setAppTask(IBinder token, int taskId, Rect taskBounds, Configuration config) {
+ public void setAppTask(
+ IBinder token, int taskId, int stackId, Rect taskBounds, Configuration config) {
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
"setAppTask()")) {
throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
@@ -3287,8 +3296,7 @@
Task newTask = mTaskIdToTask.get(taskId);
if (newTask == null) {
newTask = createTaskLocked(
- taskId, oldTask.mStack.mStackId, oldTask.mUserId, atoken, taskBounds,
- config);
+ taskId, stackId, oldTask.mUserId, atoken, taskBounds, config);
}
newTask.addAppToken(Integer.MAX_VALUE /* at top */, atoken);
}
@@ -8024,7 +8032,7 @@
case UPDATE_DOCKED_STACK_DIVIDER: {
synchronized (mWindowMap) {
getDefaultDisplayContentLocked().getDockedDividerController()
- .reevaluateVisibility();
+ .reevaluateVisibility(false);
}
}
break;
@@ -8646,14 +8654,7 @@
} else if (wtoken != null) {
winAnimator.mAnimLayer =
w.mLayer + wtoken.mAppAnimator.animLayerAdjustment;
- if (wtoken.mWillReplaceWindow && wtoken.mReplacingWindow != w
- && wtoken.mAnimateReplacingWindow) {
- // We know that we will be animating a relaunching window in the near future,
- // which will receive a z-order increase. We want the replaced window to
- // immediately receive the same treatment, e.g. to be above the dock divider.
- w.mLayer += TYPE_LAYER_OFFSET;
- winAnimator.mAnimLayer += TYPE_LAYER_OFFSET;
- }
+ forceHigherLayerIfNeeded(w, winAnimator, wtoken);
} else {
winAnimator.mAnimLayer = w.mLayer;
}
@@ -8690,6 +8691,30 @@
}
}
+ private void forceHigherLayerIfNeeded(WindowState w, WindowStateAnimator winAnimator,
+ AppWindowToken wtoken) {
+ boolean force = false;
+ if (wtoken.mWillReplaceWindow && wtoken.mReplacingWindow != w
+ && wtoken.mAnimateReplacingWindow) {
+ // We know that we will be animating a relaunching window in the near future,
+ // which will receive a z-order increase. We want the replaced window to
+ // immediately receive the same treatment, e.g. to be above the dock divider.
+ force = true;
+ }
+ if (!force) {
+ final TaskStack stack = w.getStack();
+ if (stack != null && StackId.isAlwaysOnTop(stack.mStackId)) {
+ // If the window's stack is always on top, we want to make it above other windows
+ // also when these windows are animating.
+ force = true;
+ }
+ }
+ if (force) {
+ w.mLayer += TYPE_LAYER_OFFSET;
+ winAnimator.mAnimLayer += TYPE_LAYER_OFFSET;
+ }
+ }
+
void makeWindowFreezingScreenIfNeededLocked(WindowState w) {
// If the screen is currently frozen or off, then keep
// it frozen/off until this window draws at its new
@@ -10189,7 +10214,7 @@
public void setReplacingWindow(IBinder token, boolean animate) {
synchronized (mWindowMap) {
AppWindowToken appWindowToken = findAppWindowToken(token);
- if (appWindowToken == null) {
+ if (appWindowToken == null || !appWindowToken.isVisible()) {
Slog.w(TAG, "Attempted to set replacing window on non-existing app token " + token);
return;
}
diff --git a/services/core/jni/com_android_server_input_InputManagerService.cpp b/services/core/jni/com_android_server_input_InputManagerService.cpp
index b5654ee..9c9a5da 100644
--- a/services/core/jni/com_android_server_input_InputManagerService.cpp
+++ b/services/core/jni/com_android_server_input_InputManagerService.cpp
@@ -205,6 +205,7 @@
void setInteractive(bool interactive);
void reloadCalibration();
void setPointerIconShape(int32_t iconId);
+ void reloadPointerIcons();
/* --- InputReaderPolicyInterface implementation --- */
@@ -242,6 +243,7 @@
/* --- PointerControllerPolicyInterface implementation --- */
+ virtual void loadPointerIcon(SpriteIcon* icon);
virtual void loadPointerResources(PointerResources* outResources);
virtual void loadAdditionalMouseResources(std::map<int32_t, SpriteIcon>* outResources,
std::map<int32_t, PointerAnimation>* outAnimationResources);
@@ -477,22 +479,6 @@
v.logicalBottom - v.logicalTop,
v.orientation);
- JNIEnv* env = jniEnv();
- jobject pointerIconObj = env->CallObjectMethod(mServiceObj,
- gServiceClassInfo.getPointerIcon);
- if (!checkAndClearExceptionFromCallback(env, "getPointerIcon")) {
- PointerIcon pointerIcon;
- status_t status = android_view_PointerIcon_load(env, pointerIconObj,
- mContextObj, &pointerIcon);
- if (!status && !pointerIcon.isNullIcon()) {
- controller->setPointerIcon(SpriteIcon(pointerIcon.bitmap,
- pointerIcon.hotSpotX, pointerIcon.hotSpotY));
- } else {
- controller->setPointerIcon(SpriteIcon());
- }
- env->DeleteLocalRef(pointerIconObj);
- }
-
updateInactivityTimeoutLocked(controller);
}
return controller;
@@ -789,12 +775,19 @@
}
void NativeInputManager::setPointerIconShape(int32_t iconId) {
- AutoMutex _l(mLock);
- sp<PointerController> controller = mLocked.pointerController.promote();
- if (controller != NULL) {
- // Use 0 (the default icon) for ARROW.
+ AutoMutex _l(mLock);
+ sp<PointerController> controller = mLocked.pointerController.promote();
+ if (controller != NULL) {
controller->updatePointerShape(iconId);
- }
+ }
+}
+
+void NativeInputManager::reloadPointerIcons() {
+ AutoMutex _l(mLock);
+ sp<PointerController> controller = mLocked.pointerController.promote();
+ if (controller != NULL) {
+ controller->reloadPointerResources();
+ }
}
TouchAffineTransformation NativeInputManager::getTouchAffineTransformation(
@@ -1036,6 +1029,25 @@
return result;
}
+void NativeInputManager::loadPointerIcon(SpriteIcon* icon) {
+ JNIEnv* env = jniEnv();
+
+ ScopedLocalRef<jobject> pointerIconObj(env, env->CallObjectMethod(
+ mServiceObj, gServiceClassInfo.getPointerIcon));
+ if (checkAndClearExceptionFromCallback(env, "getPointerIcon")) {
+ return;
+ }
+
+ PointerIcon pointerIcon;
+ status_t status = android_view_PointerIcon_load(env, pointerIconObj.get(),
+ mContextObj, &pointerIcon);
+ if (!status && !pointerIcon.isNullIcon()) {
+ *icon = SpriteIcon(pointerIcon.bitmap, pointerIcon.hotSpotX, pointerIcon.hotSpotY);
+ } else {
+ *icon = SpriteIcon();
+ }
+}
+
void NativeInputManager::loadPointerResources(PointerResources* outResources) {
JNIEnv* env = jniEnv();
@@ -1420,6 +1432,11 @@
im->setPointerIconShape(iconId);
}
+static void nativeReloadPointerIcons(JNIEnv* /* env */, jclass /* clazz */, jlong ptr) {
+ NativeInputManager* im = reinterpret_cast<NativeInputManager*>(ptr);
+ im->reloadPointerIcons();
+}
+
// ----------------------------------------------------------------------------
static const JNINativeMethod gInputManagerMethods[] = {
@@ -1480,6 +1497,8 @@
(void*) nativeMonitor },
{ "nativeSetPointerIconShape", "(JI)V",
(void*) nativeSetPointerIconShape },
+ { "nativeReloadPointerIcons", "(J)V",
+ (void*) nativeReloadPointerIcons },
};
#define FIND_CLASS(var, className) \
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index dbfd80d..f2e89b1 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -3095,12 +3095,7 @@
enforceCrossUserPermission(userHandle);
synchronized (this) {
-
- // The active password is stored in the user that runs the launcher
- // If the user this is called from is part of a profile group, that is the parent
- // of the group.
- UserInfo parent = getProfileParent(userHandle);
- int id = (parent == null) ? userHandle : parent.id;
+ int id = getCredentialOwner(userHandle);
DevicePolicyData policy = getUserDataUnchecked(id);
// This API can only be called by an active device admin,
@@ -3130,10 +3125,8 @@
getActiveAdminForCallerLocked(null,
DeviceAdminInfo.USES_POLICY_WATCH_LOGIN);
- // The active password is stored in the parent.
- UserInfo parent = getProfileParent(userHandle);
- int id = (parent == null) ? userHandle : parent.id;
- DevicePolicyData policy = getUserDataUnchecked(id);
+ int credentialOwnerId = getCredentialOwner(userHandle);
+ DevicePolicyData policy = getUserDataUnchecked(credentialOwnerId);
return policy.mFailedPasswordAttempts;
}
@@ -3224,7 +3217,7 @@
long ident = mInjector.binderClearCallingIdentity();
try {
- if (mUserManager.getCredentialOwnerProfile(userHandle) != userHandle) {
+ if (getCredentialOwner(userHandle) != userHandle) {
throw new SecurityException("You can not change password for this profile because"
+ " it shares the password with the owner profile");
}
@@ -3879,7 +3872,7 @@
}
enforceCrossUserPermission(userHandle);
// Managed Profile password can only be changed when per user encryption is present.
- if (!StorageManager.isFileBasedEncryptionEnabled()) {
+ if (!LockPatternUtils.isSeparateWorkChallengeEnabled()) {
enforceNotManagedProfile(userHandle, "set the active password");
}
@@ -4490,11 +4483,11 @@
UserInfo user = mUserManager.getUserInfo(userHandle);
final List<UserInfo> profiles;
- if (user.isManagedProfile()) {
- // If we are being asked about a managed profile just return
- // keyguard features disabled by admins in the profile.
- profiles = new ArrayList<UserInfo>(1);
- profiles.add(user);
+ if (user.isManagedProfile() || LockPatternUtils.isSeparateWorkChallengeEnabled()) {
+ // If we are being asked about a managed profile or the main user profile has a
+ // separate lock from the work profile, just return keyguard features disabled
+ // by admins in the profile.
+ profiles = Collections.singletonList(user);
} else {
// Otherwise return those set by admins in the user
// and its profiles.
@@ -5057,10 +5050,10 @@
}
}
- private UserInfo getProfileParent(int userHandle) {
+ private int getCredentialOwner(int userHandle) {
long ident = mInjector.binderClearCallingIdentity();
try {
- return mUserManager.getProfileParent(userHandle);
+ return mUserManager.getCredentialOwnerProfile(userHandle);
} finally {
mInjector.binderRestoreCallingIdentity(ident);
}
diff --git a/services/tests/servicestests/src/com/android/server/accounts/AccountManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/accounts/AccountManagerServiceTest.java
index f9aa124..5b4803b 100644
--- a/services/tests/servicestests/src/com/android/server/accounts/AccountManagerServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/accounts/AccountManagerServiceTest.java
@@ -195,8 +195,8 @@
mServices = new ArrayList<ServiceInfo<AuthenticatorDescription>>();
AuthenticatorDescription d1 = new AuthenticatorDescription("type1", "p1", 0, 0, 0, 0);
AuthenticatorDescription d2 = new AuthenticatorDescription("type2", "p2", 0, 0, 0, 0);
- mServices.add(new ServiceInfo<AuthenticatorDescription>(d1, null, 0));
- mServices.add(new ServiceInfo<AuthenticatorDescription>(d2, null, 0));
+ mServices.add(new ServiceInfo<AuthenticatorDescription>(d1, null, null));
+ mServices.add(new ServiceInfo<AuthenticatorDescription>(d2, null, null));
}
@Override
diff --git a/services/tests/servicestests/src/com/android/server/job/JobStoreTest.java b/services/tests/servicestests/src/com/android/server/job/JobStoreTest.java
index 0b73beb..312b1b0 100644
--- a/services/tests/servicestests/src/com/android/server/job/JobStoreTest.java
+++ b/services/tests/servicestests/src/com/android/server/job/JobStoreTest.java
@@ -183,6 +183,28 @@
}
/**
+ * Test that non persisted job is not written to disk.
+ */
+ public void testNonPersistedTaskIsNotPersisted() throws Exception {
+ JobInfo.Builder b = new Builder(42, mComponent)
+ .setOverrideDeadline(10000)
+ .setPersisted(false);
+ JobStatus jsNonPersisted = new JobStatus(b.build(), SOME_UID);
+ mTaskStoreUnderTest.add(jsNonPersisted);
+ b = new Builder(43, mComponent)
+ .setOverrideDeadline(10000)
+ .setPersisted(true);
+ JobStatus jsPersisted = new JobStatus(b.build(), SOME_UID);
+ mTaskStoreUnderTest.add(jsPersisted);
+ Thread.sleep(IO_WAIT);
+ final ArraySet<JobStatus> jobStatusSet = new ArraySet<JobStatus>();
+ mTaskStoreUnderTest.readJobMapFromDisk(jobStatusSet);
+ assertEquals("Job count is incorrect.", 1, jobStatusSet.size());
+ JobStatus jobStatus = jobStatusSet.iterator().next();
+ assertEquals("Wrong job persisted.", 43, jobStatus.getJobId());
+ }
+
+ /**
* Helper function to throw an error if the provided task and TaskStatus objects are not equal.
*/
private void assertTasksEqual(JobInfo first, JobInfo second) {
diff --git a/services/tests/servicestests/src/com/android/server/notification/RankingHelperTest.java b/services/tests/servicestests/src/com/android/server/notification/RankingHelperTest.java
index b40fd068..d0065cd 100644
--- a/services/tests/servicestests/src/com/android/server/notification/RankingHelperTest.java
+++ b/services/tests/servicestests/src/com/android/server/notification/RankingHelperTest.java
@@ -15,10 +15,17 @@
*/
package com.android.server.notification;
+import static android.service.notification.NotificationListenerService.Ranking.IMPORTANCE_UNSPECIFIED;
+import static android.service.notification.NotificationListenerService.Ranking.IMPORTANCE_HIGH;
+import static android.service.notification.NotificationListenerService.Ranking.IMPORTANCE_LOW;
+import static android.service.notification.NotificationListenerService.Ranking.IMPORTANCE_MAX;
+import static android.service.notification.NotificationListenerService.Ranking.IMPORTANCE_NONE;
+
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import android.app.Notification;
+import android.os.Handler;
import android.os.UserHandle;
import android.service.notification.StatusBarNotification;
import android.test.AndroidTestCase;
@@ -28,6 +35,7 @@
public class RankingHelperTest extends AndroidTestCase {
@Mock NotificationUsageStats mUsageStats;
+ @Mock Handler handler;
private Notification mNotiGroupGSortA;
private Notification mNotiGroupGSortB;
@@ -46,13 +54,15 @@
MockitoAnnotations.initMocks(this);
UserHandle user = UserHandle.ALL;
- mHelper = new RankingHelper(getContext(), null, mUsageStats, new String[0]);
+ mHelper = new RankingHelper(getContext(), handler, mUsageStats,
+ new String[] {TopicImportanceExtractor.class.getName()});
mNotiGroupGSortA = new Notification.Builder(getContext())
.setContentTitle("A")
.setGroup("G")
.setSortKey("A")
.setWhen(1205)
+ .setTopic(new Notification.Topic("A", "a"))
.build();
mRecordGroupGSortA = new NotificationRecord(new StatusBarNotification(
"package", "package", 1, null, 0, 0, 0, mNotiGroupGSortA, user), 0);
@@ -62,6 +72,7 @@
.setGroup("G")
.setSortKey("B")
.setWhen(1200)
+ .setTopic(new Notification.Topic("A", "a"))
.build();
mRecordGroupGSortB = new NotificationRecord(new StatusBarNotification(
"package", "package", 1, null, 0, 0, 0, mNotiGroupGSortB, user), 0);
@@ -69,6 +80,7 @@
mNotiNoGroup = new Notification.Builder(getContext())
.setContentTitle("C")
.setWhen(1201)
+ .setTopic(new Notification.Topic("C", "c"))
.build();
mRecordNoGroup = new NotificationRecord(new StatusBarNotification(
"package", "package", 1, null, 0, 0, 0, mNotiNoGroup, user), 0);
@@ -76,6 +88,7 @@
mNotiNoGroup2 = new Notification.Builder(getContext())
.setContentTitle("D")
.setWhen(1202)
+ .setTopic(new Notification.Topic("D", "d"))
.build();
mRecordNoGroup2 = new NotificationRecord(new StatusBarNotification(
"package", "package", 1, null, 0, 0, 0, mNotiNoGroup2, user), 0);
@@ -84,6 +97,7 @@
.setContentTitle("E")
.setWhen(1201)
.setSortKey("A")
+ .setTopic(new Notification.Topic("E", "e"))
.build();
mRecordNoGroupSortA = new NotificationRecord(new StatusBarNotification(
"package", "package", 1, null, 0, 0, 0, mNotiNoGroupSortA, user), 0);
@@ -138,4 +152,30 @@
ArrayList<NotificationRecord> notificationList = new ArrayList<NotificationRecord>();
mHelper.sort(notificationList);
}
+
+ @SmallTest
+ public void testTopicImportanceExtractor() throws Exception {
+ mHelper.setTopicImportance("package", 0, new Notification.Topic("A", "a"),
+ IMPORTANCE_MAX);
+ // There is no B. There never was a b. Moving on...
+ mHelper.setTopicImportance("package", 0, new Notification.Topic("C", "c"),
+ IMPORTANCE_HIGH);
+ mHelper.setTopicImportance("package", 0, new Notification.Topic("D", "d"),
+ IMPORTANCE_LOW);
+ // watch out: different package.
+ mHelper.setTopicImportance("package2", 0, new Notification.Topic("E", "e"),
+ IMPORTANCE_NONE);
+
+ TopicImportanceExtractor validator = mHelper.findExtractor(TopicImportanceExtractor.class);
+ validator.process(mRecordGroupGSortA);
+ validator.process(mRecordGroupGSortB);
+ validator.process(mRecordNoGroup);
+ validator.process(mRecordNoGroup2);
+ validator.process(mRecordNoGroupSortA);
+ assertTrue(mRecordGroupGSortA.getTopicImportance() == IMPORTANCE_MAX);
+ assertTrue(mRecordGroupGSortB.getTopicImportance() == IMPORTANCE_MAX);
+ assertTrue(mRecordNoGroup.getTopicImportance() == IMPORTANCE_HIGH);
+ assertTrue(mRecordNoGroup2.getTopicImportance() == IMPORTANCE_LOW);
+ assertTrue(mRecordNoGroupSortA.getTopicImportance() == IMPORTANCE_UNSPECIFIED);
+ }
}
diff --git a/services/usb/java/com/android/server/usb/UsbSettingsManager.java b/services/usb/java/com/android/server/usb/UsbSettingsManager.java
index 154cbd3..4786d11 100644
--- a/services/usb/java/com/android/server/usb/UsbSettingsManager.java
+++ b/services/usb/java/com/android/server/usb/UsbSettingsManager.java
@@ -984,7 +984,14 @@
public boolean hasPermission(UsbDevice device) {
synchronized (mLock) {
int uid = Binder.getCallingUid();
- if (uid == Process.SYSTEM_UID || mDisablePermissionDialogs) {
+ int androidMediaUid;
+ try {
+ androidMediaUid = mPackageManager.getApplicationInfo("com.android.mtp", 0).uid;
+ } catch (NameNotFoundException e) {
+ androidMediaUid = -1;
+ }
+ if (uid == Process.SYSTEM_UID || UserHandle.getAppId(uid) == androidMediaUid ||
+ mDisablePermissionDialogs) {
return true;
}
SparseBooleanArray uidList = mDevicePermissionMap.get(device.getDeviceName());
diff --git a/telecomm/java/android/telecom/InCallService.java b/telecomm/java/android/telecom/InCallService.java
index 19c613d..5087080 100644
--- a/telecomm/java/android/telecom/InCallService.java
+++ b/telecomm/java/android/telecom/InCallService.java
@@ -48,13 +48,13 @@
* {@code InCallService} implementation intends to replace the built-in in-call UI.
* <pre>
* {@code
- * <service android:name="your.package.YourInCallServiceImplementation"
- * android:permission="android.permission.BIND_IN_CALL_SERVICE">
- * <meta-data android:name="android.telecom.IN_CALL_SERVICE_UI" android:value="true" />
- * <intent-filter>
- * <action android:name="android.telecom.InCallService"/>
- * </intent-filter>
- * </service>
+ * <service android:name="your.package.YourInCallServiceImplementation"
+ * android:permission="android.permission.BIND_IN_CALL_SERVICE">
+ * <meta-data android:name="android.telecom.IN_CALL_SERVICE_UI" android:value="true" />
+ * <intent-filter>
+ * <action android:name="android.telecom.InCallService"/>
+ * </intent-filter>
+ * </service>
* }
* </pre>
*/
diff --git a/telecomm/java/android/telecom/VideoCallImpl.java b/telecomm/java/android/telecom/VideoCallImpl.java
index c8072d1..93484cd 100644
--- a/telecomm/java/android/telecom/VideoCallImpl.java
+++ b/telecomm/java/android/telecom/VideoCallImpl.java
@@ -57,13 +57,20 @@
private final class VideoCallListenerBinder extends IVideoCallback.Stub {
@Override
public void receiveSessionModifyRequest(VideoProfile videoProfile) {
+ if (mHandler == null) {
+ return;
+ }
mHandler.obtainMessage(MessageHandler.MSG_RECEIVE_SESSION_MODIFY_REQUEST,
videoProfile).sendToTarget();
+
}
@Override
public void receiveSessionModifyResponse(int status, VideoProfile requestProfile,
VideoProfile responseProfile) {
+ if (mHandler == null) {
+ return;
+ }
SomeArgs args = SomeArgs.obtain();
args.arg1 = status;
args.arg2 = requestProfile;
@@ -74,12 +81,18 @@
@Override
public void handleCallSessionEvent(int event) {
+ if (mHandler == null) {
+ return;
+ }
mHandler.obtainMessage(MessageHandler.MSG_HANDLE_CALL_SESSION_EVENT, event)
.sendToTarget();
}
@Override
public void changePeerDimensions(int width, int height) {
+ if (mHandler == null) {
+ return;
+ }
SomeArgs args = SomeArgs.obtain();
args.arg1 = width;
args.arg2 = height;
@@ -88,18 +101,27 @@
@Override
public void changeVideoQuality(int videoQuality) {
+ if (mHandler == null) {
+ return;
+ }
mHandler.obtainMessage(MessageHandler.MSG_CHANGE_VIDEO_QUALITY, videoQuality, 0)
.sendToTarget();
}
@Override
public void changeCallDataUsage(long dataUsage) {
+ if (mHandler == null) {
+ return;
+ }
mHandler.obtainMessage(MessageHandler.MSG_CHANGE_CALL_DATA_USAGE, dataUsage)
.sendToTarget();
}
@Override
public void changeCameraCapabilities(VideoProfile.CameraCapabilities cameraCapabilities) {
+ if (mHandler == null) {
+ return;
+ }
mHandler.obtainMessage(MessageHandler.MSG_CHANGE_CAMERA_CAPABILITIES,
cameraCapabilities).sendToTarget();
}
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index 8ebef32..c7f3d0a 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -524,6 +524,30 @@
public static final String KEY_ALLOW_NON_EMERGENCY_CALLS_IN_ECM_BOOL =
"allow_non_emergency_calls_in_ecm_bool";
+ /**
+ * Flag indicating whether to allow carrier video calls to emergency numbers.
+ * When {@code true}, video calls to emergency numbers will be allowed. When {@code false},
+ * video calls to emergency numbers will be initiated as audio-only calls instead.
+ *
+ * @hide
+ */
+ @SystemApi
+ public static final String BOOL_ALLOW_EMERGENCY_VIDEO_CALLS =
+ "bool_allow_emergency_video_calls";
+
+ /**
+ * Flag indicating whether the carrier supports video pause signaling. When {@code true}, the
+ * carrier supports use of the {@link android.telecom.VideoProfile#STATE_PAUSED} video state
+ * to pause transmission of video when the In-Call app is sent to the background.
+ * When {@code false}, video pause signaling is not supported. {@code True} by default unless
+ * a carrier configuration overrides the default.
+ *
+ * @hide
+ */
+ @SystemApi
+ public static final String BOOL_ALLOW_VIDEO_PAUSE =
+ "bool_allow_video_pause";
+
/** The default value for every variable. */
private final static PersistableBundle sDefaults;
@@ -596,6 +620,8 @@
sDefaults.putBoolean(KEY_EDITABLE_ENHANCED_4G_LTE_BOOL, true);
sDefaults.putBoolean(KEY_HIDE_IMS_APN_BOOL, false);
sDefaults.putBoolean(KEY_HIDE_PREFERRED_NETWORK_TYPE_BOOL, false);
+ sDefaults.putBoolean(BOOL_ALLOW_EMERGENCY_VIDEO_CALLS, false);
+ sDefaults.putBoolean(BOOL_ALLOW_VIDEO_PAUSE, true);
// MMS defaults
sDefaults.putBoolean(KEY_MMS_ALIAS_ENABLED_BOOL, false);
diff --git a/telephony/java/android/telephony/CellSignalStrengthLte.java b/telephony/java/android/telephony/CellSignalStrengthLte.java
index 5a1559a..2606466 100644
--- a/telephony/java/android/telephony/CellSignalStrengthLte.java
+++ b/telephony/java/android/telephony/CellSignalStrengthLte.java
@@ -168,6 +168,20 @@
}
/**
+ * @hide
+ */
+ public int getRsrq() {
+ return mRsrq;
+ }
+
+ /**
+ * @hide
+ */
+ public int getRssnr() {
+ return mRssnr;
+ }
+
+ /**
* Get signal strength as dBm
*/
@Override
diff --git a/telephony/java/android/telephony/PhoneNumberUtils.java b/telephony/java/android/telephony/PhoneNumberUtils.java
index b430340..553221d 100644
--- a/telephony/java/android/telephony/PhoneNumberUtils.java
+++ b/telephony/java/android/telephony/PhoneNumberUtils.java
@@ -2354,7 +2354,7 @@
tempDialStr = postDialStr.substring(dialableIndex);
} else {
// Non-dialable character such as P/W should not be at the end of
- // the dial string after P/W processing in CdmaConnection.java
+ // the dial string after P/W processing in GsmCdmaConnection.java
// Set the postDialStr to "" to break out of the loop
if (dialableIndex < 0) {
postDialStr = "";
diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java
index 1337487..8537f9c 100644
--- a/telephony/java/android/telephony/ServiceState.java
+++ b/telephony/java/android/telephony/ServiceState.java
@@ -906,7 +906,7 @@
/**
* In CDMA, mOperatorAlphaLong can be set from the ERI text.
- * This is done from the CDMAPhone and not from the CdmaServiceStateTracker.
+ * This is done from the GsmCdmaPhone and not from the ServiceStateTracker.
*
* @hide
*/
diff --git a/telephony/java/com/android/ims/ImsStreamMediaProfile.java b/telephony/java/com/android/ims/ImsStreamMediaProfile.java
index 359b270..5a99212 100644
--- a/telephony/java/com/android/ims/ImsStreamMediaProfile.java
+++ b/telephony/java/com/android/ims/ImsStreamMediaProfile.java
@@ -76,7 +76,7 @@
}
public ImsStreamMediaProfile() {
- mAudioQuality = AUDIO_QUALITY_AMR_WB;
+ mAudioQuality = AUDIO_QUALITY_NONE;
mAudioDirection = DIRECTION_SEND_RECEIVE;
mVideoQuality = VIDEO_QUALITY_NONE;
mVideoDirection = DIRECTION_INVALID;
diff --git a/tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java b/tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java
index a390b0c..3c2659f 100644
--- a/tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java
+++ b/tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java
@@ -22,11 +22,10 @@
import android.os.ServiceManager;
import android.test.suitebuilder.annotation.SmallTest;
import android.view.IWindowManager;
-import android.view.KeyEvent;
-import android.view.MotionEvent;
-
import junit.framework.TestCase;
+import static android.app.ActivityManager.StackId.INVALID_STACK_ID;
+
/**
* TODO: Remove this. This is only a placeholder, need to implement this.
*/
@@ -104,7 +103,7 @@
}
try {
- mWm.setAppTask(null, 0, null, null);
+ mWm.setAppTask(null, 0, INVALID_STACK_ID, null, null);
fail("IWindowManager.setAppGroupId did not throw SecurityException as"
+ " expected");
} catch (SecurityException e) {
diff --git a/tools/aapt/pseudolocalize.h b/tools/aapt/pseudolocalize.h
index 71b974b..1faecd1 100644
--- a/tools/aapt/pseudolocalize.h
+++ b/tools/aapt/pseudolocalize.h
@@ -1,7 +1,7 @@
#ifndef HOST_PSEUDOLOCALIZE_H
#define HOST_PSEUDOLOCALIZE_H
-#include <base/macros.h>
+#include <android-base/macros.h>
#include "StringPool.h"
class PseudoMethodImpl {
diff --git a/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java b/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java
index eea254b..40437fa 100644
--- a/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java
+++ b/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java
@@ -321,7 +321,7 @@
}
@Override
- public void setAppTask(IBinder arg0, int arg1, Rect arg2, Configuration arg3)
+ public void setAppTask(IBinder arg0, int arg1, int arg2, Rect arg3, Configuration arg4)
throws RemoteException {
// TODO Auto-generated method stub
}
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java
index b054f7c..7a5a74f 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -188,6 +188,7 @@
*
* @hide
*/
+ @SystemApi
public static final String WIFI_AP_STATE_CHANGED_ACTION =
"android.net.wifi.WIFI_AP_STATE_CHANGED";
@@ -204,6 +205,7 @@
*
* @hide
*/
+ @SystemApi
public static final String EXTRA_WIFI_AP_STATE = "wifi_state";
/**
@@ -222,6 +224,7 @@
*
* @hide
*/
+ @SystemApi
public static final String EXTRA_PREVIOUS_WIFI_AP_STATE = "previous_wifi_state";
/**
* Wi-Fi AP is currently being disabled. The state will change to
@@ -232,6 +235,7 @@
*
* @hide
*/
+ @SystemApi
public static final int WIFI_AP_STATE_DISABLING = 10;
/**
* Wi-Fi AP is disabled.
@@ -241,6 +245,7 @@
*
* @hide
*/
+ @SystemApi
public static final int WIFI_AP_STATE_DISABLED = 11;
/**
* Wi-Fi AP is currently being enabled. The state will change to
@@ -251,6 +256,7 @@
*
* @hide
*/
+ @SystemApi
public static final int WIFI_AP_STATE_ENABLING = 12;
/**
* Wi-Fi AP is enabled.
@@ -260,6 +266,7 @@
*
* @hide
*/
+ @SystemApi
public static final int WIFI_AP_STATE_ENABLED = 13;
/**
* Wi-Fi AP is in a failed state. This state will occur when an error occurs during
@@ -270,6 +277,7 @@
*
* @hide
*/
+ @SystemApi
public static final int WIFI_AP_STATE_FAILED = 14;
/**
@@ -2173,7 +2181,7 @@
* is idle.
* <p>
* Any application using a WifiLock must request the {@code android.permission.WAKE_LOCK}
- * permission in an {@code <uses-permission>} element of the application's manifest.
+ * permission in an {@code <uses-permission>} element of the application's manifest.
*/
public class WifiLock {
private String mTag;
diff --git a/wifi/java/android/net/wifi/p2p/package.html b/wifi/java/android/net/wifi/p2p/package.html
index 94d695f..6a5e8e6 100644
--- a/wifi/java/android/net/wifi/p2p/package.html
+++ b/wifi/java/android/net/wifi/p2p/package.html
@@ -56,7 +56,7 @@
<p class="note"><strong>Note:</strong> Not all Android-powered devices support Wi-Fi
Direct. If your application uses Wi-Fi Direct, declare so with a <a
-href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
+href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
element in the manifest file:</p>
<pre>
<manifest ...>
diff --git a/wifi/java/android/net/wifi/package.html b/wifi/java/android/net/wifi/package.html
index 6f0d337..b21d39d0 100644
--- a/wifi/java/android/net/wifi/package.html
+++ b/wifi/java/android/net/wifi/package.html
@@ -17,7 +17,7 @@
<p class="note"><strong>Note:</strong> Not all Android-powered devices provide Wi-Fi functionality.
If your application uses Wi-Fi, declare so with a <a
-href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
+href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
element in the manifest file:</p>
<pre>
<manifest ...>