Merge "Removing default accessibility gesture handling." into jb-dev
diff --git a/api/16.txt b/api/16.txt
index e1ed28e..18a4b7b 100644
--- a/api/16.txt
+++ b/api/16.txt
@@ -75,16 +75,20 @@
field public static final deprecated java.lang.String PERSISTENT_ACTIVITY = "android.permission.PERSISTENT_ACTIVITY";
field public static final java.lang.String PROCESS_OUTGOING_CALLS = "android.permission.PROCESS_OUTGOING_CALLS";
field public static final java.lang.String READ_CALENDAR = "android.permission.READ_CALENDAR";
+ field public static final java.lang.String READ_CALL_LOG = "android.permission.READ_CALL_LOG";
field public static final java.lang.String READ_CONTACTS = "android.permission.READ_CONTACTS";
+ field public static final java.lang.String READ_EXTERNAL_STORAGE = "android.permission.READ_EXTERNAL_STORAGE";
field public static final java.lang.String READ_FRAME_BUFFER = "android.permission.READ_FRAME_BUFFER";
field public static final java.lang.String READ_HISTORY_BOOKMARKS = "com.android.browser.permission.READ_HISTORY_BOOKMARKS";
- field public static final java.lang.String READ_INPUT_STATE = "android.permission.READ_INPUT_STATE";
+ field public static final deprecated java.lang.String READ_INPUT_STATE = "android.permission.READ_INPUT_STATE";
field public static final java.lang.String READ_LOGS = "android.permission.READ_LOGS";
field public static final java.lang.String READ_PHONE_STATE = "android.permission.READ_PHONE_STATE";
field public static final java.lang.String READ_PROFILE = "android.permission.READ_PROFILE";
field public static final java.lang.String READ_SMS = "android.permission.READ_SMS";
+ field public static final java.lang.String READ_SOCIAL_STREAM = "android.permission.READ_SOCIAL_STREAM";
field public static final java.lang.String READ_SYNC_SETTINGS = "android.permission.READ_SYNC_SETTINGS";
field public static final java.lang.String READ_SYNC_STATS = "android.permission.READ_SYNC_STATS";
+ field public static final java.lang.String READ_USER_DICTIONARY = "android.permission.READ_USER_DICTIONARY";
field public static final java.lang.String REBOOT = "android.permission.REBOOT";
field public static final java.lang.String RECEIVE_BOOT_COMPLETED = "android.permission.RECEIVE_BOOT_COMPLETED";
field public static final java.lang.String RECEIVE_MMS = "android.permission.RECEIVE_MMS";
@@ -119,6 +123,7 @@
field public static final java.lang.String WAKE_LOCK = "android.permission.WAKE_LOCK";
field public static final java.lang.String WRITE_APN_SETTINGS = "android.permission.WRITE_APN_SETTINGS";
field public static final java.lang.String WRITE_CALENDAR = "android.permission.WRITE_CALENDAR";
+ field public static final java.lang.String WRITE_CALL_LOG = "android.permission.WRITE_CALL_LOG";
field public static final java.lang.String WRITE_CONTACTS = "android.permission.WRITE_CONTACTS";
field public static final java.lang.String WRITE_EXTERNAL_STORAGE = "android.permission.WRITE_EXTERNAL_STORAGE";
field public static final java.lang.String WRITE_GSERVICES = "android.permission.WRITE_GSERVICES";
@@ -127,22 +132,44 @@
field public static final java.lang.String WRITE_SECURE_SETTINGS = "android.permission.WRITE_SECURE_SETTINGS";
field public static final java.lang.String WRITE_SETTINGS = "android.permission.WRITE_SETTINGS";
field public static final java.lang.String WRITE_SMS = "android.permission.WRITE_SMS";
+ field public static final java.lang.String WRITE_SOCIAL_STREAM = "android.permission.WRITE_SOCIAL_STREAM";
field public static final java.lang.String WRITE_SYNC_SETTINGS = "android.permission.WRITE_SYNC_SETTINGS";
+ field public static final java.lang.String WRITE_USER_DICTIONARY = "android.permission.WRITE_USER_DICTIONARY";
}
public static final class Manifest.permission_group {
ctor public Manifest.permission_group();
field public static final java.lang.String ACCOUNTS = "android.permission-group.ACCOUNTS";
+ field public static final java.lang.String AFFECTS_BATTERY = "android.permission-group.AFFECTS_BATTERY";
+ field public static final java.lang.String APP_INFO = "android.permission-group.APP_INFO";
+ field public static final java.lang.String AUDIO_SETTINGS = "android.permission-group.AUDIO_SETTINGS";
+ field public static final java.lang.String BLUETOOTH_NETWORK = "android.permission-group.BLUETOOTH_NETWORK";
+ field public static final java.lang.String BOOKMARKS = "android.permission-group.BOOKMARKS";
+ field public static final java.lang.String CALENDAR = "android.permission-group.CALENDAR";
+ field public static final java.lang.String CAMERA = "android.permission-group.CAMERA";
field public static final java.lang.String COST_MONEY = "android.permission-group.COST_MONEY";
field public static final java.lang.String DEVELOPMENT_TOOLS = "android.permission-group.DEVELOPMENT_TOOLS";
+ field public static final java.lang.String DEVICE_ALARMS = "android.permission-group.DEVICE_ALARMS";
+ field public static final java.lang.String DISPLAY = "android.permission-group.DISPLAY";
field public static final java.lang.String HARDWARE_CONTROLS = "android.permission-group.HARDWARE_CONTROLS";
field public static final java.lang.String LOCATION = "android.permission-group.LOCATION";
field public static final java.lang.String MESSAGES = "android.permission-group.MESSAGES";
+ field public static final java.lang.String MICROPHONE = "android.permission-group.MICROPHONE";
field public static final java.lang.String NETWORK = "android.permission-group.NETWORK";
field public static final java.lang.String PERSONAL_INFO = "android.permission-group.PERSONAL_INFO";
field public static final java.lang.String PHONE_CALLS = "android.permission-group.PHONE_CALLS";
+ field public static final java.lang.String SCREENLOCK = "android.permission-group.SCREENLOCK";
+ field public static final java.lang.String SHORTRANGE_NETWORK = "android.permission-group.SHORTRANGE_NETWORK";
+ field public static final java.lang.String SOCIAL_INFO = "android.permission-group.SOCIAL_INFO";
+ field public static final java.lang.String STATUS_BAR = "android.permission-group.STATUS_BAR";
field public static final java.lang.String STORAGE = "android.permission-group.STORAGE";
+ field public static final java.lang.String SYNC_SETTINGS = "android.permission-group.SYNC_SETTINGS";
+ field public static final java.lang.String SYSTEM_CLOCK = "android.permission-group.SYSTEM_CLOCK";
field public static final java.lang.String SYSTEM_TOOLS = "android.permission-group.SYSTEM_TOOLS";
+ field public static final java.lang.String USER_DICTIONARY = "android.permission-group.USER_DICTIONARY";
+ field public static final java.lang.String VOICEMAIL = "android.permission-group.VOICEMAIL";
+ field public static final java.lang.String WALLPAPER = "android.permission-group.WALLPAPER";
+ field public static final java.lang.String WRITE_USER_DICTIONARY = "android.permission-group.WRITE_USER_DICTIONARY";
}
public final class R {
@@ -245,7 +272,7 @@
field public static final int animationCache = 16842989; // 0x10100ed
field public static final int animationDuration = 16843026; // 0x1010112
field public static final int animationOrder = 16843214; // 0x10101ce
- field public static final int animationResolution = 16843546; // 0x101031a
+ field public static final deprecated int animationResolution = 16843546; // 0x101031a
field public static final int antialias = 16843034; // 0x101011a
field public static final int anyDensity = 16843372; // 0x101026c
field public static final int apiKey = 16843281; // 0x1010211
@@ -410,9 +437,9 @@
field public static final int editorExtras = 16843300; // 0x1010224
field public static final int ellipsize = 16842923; // 0x10100ab
field public static final int ems = 16843096; // 0x1010158
- field public static final deprecated int enabled = 16842766; // 0x101000e
+ field public static final int enabled = 16842766; // 0x101000e
field public static final int endColor = 16843166; // 0x101019e
- field public static final int endYear = 16843133; // 0x101017d
+ field public static final deprecated int endYear = 16843133; // 0x101017d
field public static final int enterFadeDuration = 16843532; // 0x101030c
field public static final int entries = 16842930; // 0x10100b2
field public static final int entryValues = 16843256; // 0x10101f8
@@ -434,7 +461,7 @@
field public static final int fadeEnabled = 16843390; // 0x101027e
field public static final int fadeOffset = 16843383; // 0x1010277
field public static final int fadeScrollbars = 16843434; // 0x10102aa
- field public static final deprecated int fadingEdge = 16842975; // 0x10100df
+ field public static final int fadingEdge = 16842975; // 0x10100df
field public static final int fadingEdgeLength = 16842976; // 0x10100e0
field public static final int fastScrollAlwaysVisible = 16843573; // 0x1010335
field public static final int fastScrollEnabled = 16843302; // 0x1010226
@@ -528,6 +555,7 @@
field public static final int imeSubtypeLocale = 16843500; // 0x10102ec
field public static final int imeSubtypeMode = 16843501; // 0x10102ed
field public static final int immersive = 16843456; // 0x10102c0
+ field public static final int importantForAccessibility = 16843690; // 0x10103aa
field public static final int inAnimation = 16843127; // 0x1010177
field public static final int includeFontPadding = 16843103; // 0x101015f
field public static final int includeInGlobalSearch = 16843374; // 0x101026e
@@ -560,6 +588,7 @@
field public static final int isRepeatable = 16843336; // 0x1010248
field public static final int isScrollContainer = 16843342; // 0x101024e
field public static final int isSticky = 16843335; // 0x1010247
+ field public static final int isolatedProcess = 16843689; // 0x10103a9
field public static final int itemBackground = 16843056; // 0x1010130
field public static final int itemIconDisabledAlpha = 16843057; // 0x1010131
field public static final int itemPadding = 16843565; // 0x101032d
@@ -578,6 +607,7 @@
field public static final int keyTextColor = 16843318; // 0x1010236
field public static final int keyTextSize = 16843316; // 0x1010234
field public static final int keyWidth = 16843325; // 0x101023d
+ field public static final int keyboardLayout = 16843691; // 0x10103ab
field public static final int keyboardMode = 16843341; // 0x101024d
field public static final int keycode = 16842949; // 0x10100c5
field public static final int killAfterRestore = 16843420; // 0x101029c
@@ -716,12 +746,14 @@
field public static final int panelColorForeground = 16842848; // 0x1010060
field public static final int panelFullBackground = 16842847; // 0x101005f
field public static final int panelTextAppearance = 16842850; // 0x1010062
+ field public static final int parentActivityName = 16843687; // 0x10103a7
field public static final deprecated int password = 16843100; // 0x101015c
field public static final int path = 16842794; // 0x101002a
field public static final int pathPattern = 16842796; // 0x101002c
field public static final int pathPrefix = 16842795; // 0x101002b
field public static final int permission = 16842758; // 0x1010006
field public static final int permissionGroup = 16842762; // 0x101000a
+ field public static final int permissionGroupFlags = 16843688; // 0x10103a8
field public static final int persistent = 16842765; // 0x101000d
field public static final int persistentDrawingCache = 16842990; // 0x10100ee
field public static final deprecated int phoneNumber = 16843111; // 0x1010167
@@ -880,7 +912,7 @@
field public static final int starStyle = 16842882; // 0x1010082
field public static final int startColor = 16843165; // 0x101019d
field public static final int startOffset = 16843198; // 0x10101be
- field public static final int startYear = 16843132; // 0x101017c
+ field public static final deprecated int startYear = 16843132; // 0x101017c
field public static final int stateNotNeeded = 16842774; // 0x1010016
field public static final int state_above_anchor = 16842922; // 0x10100aa
field public static final int state_accelerated = 16843547; // 0x101031b
@@ -1975,11 +2007,35 @@
public abstract class AccessibilityService extends android.app.Service {
ctor public AccessibilityService();
+ method public android.view.accessibility.AccessibilityNodeInfo getRootInActiveWindow();
+ method public final android.accessibilityservice.AccessibilityServiceInfo getServiceInfo();
method public abstract void onAccessibilityEvent(android.view.accessibility.AccessibilityEvent);
method public final android.os.IBinder onBind(android.content.Intent);
+ method protected boolean onGesture(int);
method public abstract void onInterrupt();
method protected void onServiceConnected();
+ method public final boolean performGlobalAction(int);
method public final void setServiceInfo(android.accessibilityservice.AccessibilityServiceInfo);
+ field public static final int GESTURE_SWIPE_DOWN = 2; // 0x2
+ field public static final int GESTURE_SWIPE_DOWN_AND_LEFT = 15; // 0xf
+ field public static final int GESTURE_SWIPE_DOWN_AND_RIGHT = 16; // 0x10
+ field public static final int GESTURE_SWIPE_DOWN_AND_UP = 8; // 0x8
+ field public static final int GESTURE_SWIPE_LEFT = 3; // 0x3
+ field public static final int GESTURE_SWIPE_LEFT_AND_DOWN = 10; // 0xa
+ field public static final int GESTURE_SWIPE_LEFT_AND_RIGHT = 5; // 0x5
+ field public static final int GESTURE_SWIPE_LEFT_AND_UP = 9; // 0x9
+ field public static final int GESTURE_SWIPE_RIGHT = 4; // 0x4
+ field public static final int GESTURE_SWIPE_RIGHT_AND_DOWN = 12; // 0xc
+ field public static final int GESTURE_SWIPE_RIGHT_AND_LEFT = 6; // 0x6
+ field public static final int GESTURE_SWIPE_RIGHT_AND_UP = 11; // 0xb
+ field public static final int GESTURE_SWIPE_UP = 1; // 0x1
+ field public static final int GESTURE_SWIPE_UP_AND_DOWN = 7; // 0x7
+ field public static final int GESTURE_SWIPE_UP_AND_LEFT = 13; // 0xd
+ field public static final int GESTURE_SWIPE_UP_AND_RIGHT = 14; // 0xe
+ field public static final int GLOBAL_ACTION_BACK = 1; // 0x1
+ field public static final int GLOBAL_ACTION_HOME = 2; // 0x2
+ field public static final int GLOBAL_ACTION_NOTIFICATIONS = 4; // 0x4
+ field public static final int GLOBAL_ACTION_RECENTS = 3; // 0x3
field public static final java.lang.String SERVICE_INTERFACE = "android.accessibilityservice.AccessibilityService";
field public static final java.lang.String SERVICE_META_DATA = "android.accessibilityservice";
}
@@ -1990,10 +2046,11 @@
method public static java.lang.String feedbackTypeToString(int);
method public static java.lang.String flagToString(int);
method public boolean getCanRetrieveWindowContent();
- method public java.lang.String getDescription();
+ method public deprecated java.lang.String getDescription();
method public java.lang.String getId();
method public android.content.pm.ResolveInfo getResolveInfo();
method public java.lang.String getSettingsActivityName();
+ method public java.lang.String loadDescription(android.content.pm.PackageManager);
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator CREATOR;
field public static final int DEFAULT = 1; // 0x1
@@ -2003,6 +2060,8 @@
field public static final int FEEDBACK_HAPTIC = 2; // 0x2
field public static final int FEEDBACK_SPOKEN = 1; // 0x1
field public static final int FEEDBACK_VISUAL = 8; // 0x8
+ field public static final int FLAG_INCLUDE_NOT_IMPORTANT_VIEWS = 2; // 0x2
+ field public static final int FLAG_REQUEST_TOUCH_EXPLORATION_MODE = 4; // 0x4
field public int eventTypes;
field public int feedbackType;
field public int flags;
@@ -2279,15 +2338,19 @@
ctor public LayoutTransition();
method public void addChild(android.view.ViewGroup, android.view.View);
method public void addTransitionListener(android.animation.LayoutTransition.TransitionListener);
+ method public void disableTransitionType(int);
+ method public void enableTransitionType(int);
method public android.animation.Animator getAnimator(int);
method public long getDuration(int);
method public android.animation.TimeInterpolator getInterpolator(int);
method public long getStagger(int);
method public long getStartDelay(int);
method public java.util.List<android.animation.LayoutTransition.TransitionListener> getTransitionListeners();
- method public void hideChild(android.view.ViewGroup, android.view.View);
+ method public deprecated void hideChild(android.view.ViewGroup, android.view.View);
+ method public void hideChild(android.view.ViewGroup, android.view.View, int);
method public boolean isChangingLayout();
method public boolean isRunning();
+ method public boolean isTransitionTypeEnabled(int);
method public void removeChild(android.view.ViewGroup, android.view.View);
method public void removeTransitionListener(android.animation.LayoutTransition.TransitionListener);
method public void setAnimateParentHierarchy(boolean);
@@ -2297,10 +2360,12 @@
method public void setInterpolator(int, android.animation.TimeInterpolator);
method public void setStagger(int, long);
method public void setStartDelay(int, long);
- method public void showChild(android.view.ViewGroup, android.view.View);
+ method public deprecated void showChild(android.view.ViewGroup, android.view.View);
+ method public void showChild(android.view.ViewGroup, android.view.View, int);
field public static final int APPEARING = 2; // 0x2
field public static final int CHANGE_APPEARING = 0; // 0x0
field public static final int CHANGE_DISAPPEARING = 1; // 0x1
+ field public static final int CHANGING = 4; // 0x4
field public static final int DISAPPEARING = 3; // 0x3
}
@@ -2344,6 +2409,15 @@
method public void setPropertyName(java.lang.String);
}
+ public class TimeAnimator extends android.animation.ValueAnimator {
+ ctor public TimeAnimator();
+ method public void setTimeListener(android.animation.TimeAnimator.TimeListener);
+ }
+
+ public static abstract interface TimeAnimator.TimeListener {
+ method public abstract void onTimeUpdate(android.animation.TimeAnimator, long, long);
+ }
+
public abstract interface TimeInterpolator {
method public abstract float getInterpolation(float);
}
@@ -2397,6 +2471,16 @@
}
+package android.annotation {
+
+ public abstract class SuppressLint implements java.lang.annotation.Annotation {
+ }
+
+ public abstract class TargetApi implements java.lang.annotation.Annotation {
+ }
+
+}
+
package android.app {
public abstract class ActionBar {
@@ -2526,6 +2610,7 @@
method public void finish();
method public void finishActivity(int);
method public void finishActivityFromChild(android.app.Activity, int);
+ method public void finishAffinity();
method public void finishFromChild(android.app.Activity);
method public android.app.ActionBar getActionBar();
method public final android.app.Application getApplication();
@@ -2542,6 +2627,7 @@
method public java.lang.String getLocalClassName();
method public android.view.MenuInflater getMenuInflater();
method public final android.app.Activity getParent();
+ method public android.content.Intent getParentActivityIntent();
method public android.content.SharedPreferences getPreferences(int);
method public int getRequestedOrientation();
method public int getTaskId();
@@ -2558,6 +2644,8 @@
method public boolean isTaskRoot();
method public final deprecated android.database.Cursor managedQuery(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String);
method public boolean moveTaskToBack(boolean);
+ method public boolean navigateUpTo(android.content.Intent);
+ method public boolean navigateUpToFromChild(android.app.Activity, android.content.Intent);
method public void onActionModeFinished(android.view.ActionMode);
method public void onActionModeStarted(android.view.ActionMode);
method protected void onActivityResult(int, int, android.content.Intent);
@@ -2574,6 +2662,7 @@
method public java.lang.CharSequence onCreateDescription();
method protected deprecated android.app.Dialog onCreateDialog(int);
method protected deprecated android.app.Dialog onCreateDialog(int, android.os.Bundle);
+ method public void onCreateNavigateUpTaskStack(android.app.TaskStackBuilder);
method public boolean onCreateOptionsMenu(android.view.Menu);
method public boolean onCreatePanelMenu(int, android.view.Menu);
method public android.view.View onCreatePanelView(int);
@@ -2591,6 +2680,8 @@
method public void onLowMemory();
method public boolean onMenuItemSelected(int, android.view.MenuItem);
method public boolean onMenuOpened(int, android.view.Menu);
+ method public boolean onNavigateUp();
+ method public boolean onNavigateUpFromChild(android.app.Activity);
method protected void onNewIntent(android.content.Intent);
method public boolean onOptionsItemSelected(android.view.MenuItem);
method public void onOptionsMenuClosed(android.view.Menu);
@@ -2600,6 +2691,7 @@
method protected void onPostResume();
method protected deprecated void onPrepareDialog(int, android.app.Dialog);
method protected deprecated void onPrepareDialog(int, android.app.Dialog, android.os.Bundle);
+ method public void onPrepareNavigateUpTaskStack(android.app.TaskStackBuilder);
method public boolean onPrepareOptionsMenu(android.view.Menu);
method public boolean onPreparePanel(int, android.view.View, android.view.Menu);
method protected void onRestart();
@@ -2650,17 +2742,25 @@
method public void setTitleColor(int);
method public void setVisible(boolean);
method public final void setVolumeControlStream(int);
+ method public boolean shouldUpRecreateTask(android.content.Intent);
method public final deprecated void showDialog(int);
method public final deprecated boolean showDialog(int, android.os.Bundle);
method public android.view.ActionMode startActionMode(android.view.ActionMode.Callback);
method public void startActivityForResult(android.content.Intent, int);
+ method public void startActivityForResult(android.content.Intent, int, android.os.Bundle);
method public void startActivityFromChild(android.app.Activity, android.content.Intent, int);
+ method public void startActivityFromChild(android.app.Activity, android.content.Intent, int, android.os.Bundle);
method public void startActivityFromFragment(android.app.Fragment, android.content.Intent, int);
+ method public void startActivityFromFragment(android.app.Fragment, android.content.Intent, int, android.os.Bundle);
method public boolean startActivityIfNeeded(android.content.Intent, int);
+ method public boolean startActivityIfNeeded(android.content.Intent, int, android.os.Bundle);
method public void startIntentSenderForResult(android.content.IntentSender, int, android.content.Intent, int, int, int) throws android.content.IntentSender.SendIntentException;
+ method public void startIntentSenderForResult(android.content.IntentSender, int, android.content.Intent, int, int, int, android.os.Bundle) throws android.content.IntentSender.SendIntentException;
method public void startIntentSenderFromChild(android.app.Activity, android.content.IntentSender, int, android.content.Intent, int, int, int) throws android.content.IntentSender.SendIntentException;
+ method public void startIntentSenderFromChild(android.app.Activity, android.content.IntentSender, int, android.content.Intent, int, int, int, android.os.Bundle) throws android.content.IntentSender.SendIntentException;
method public deprecated void startManagingCursor(android.database.Cursor);
method public boolean startNextMatchingActivity(android.content.Intent);
+ method public boolean startNextMatchingActivity(android.content.Intent, android.os.Bundle);
method public void startSearch(java.lang.String, boolean, android.os.Bundle, boolean);
method public deprecated void stopManagingCursor(android.database.Cursor);
method public void takeKeyEvents(boolean);
@@ -2691,6 +2791,7 @@
method public int getLauncherLargeIconSize();
method public int getMemoryClass();
method public void getMemoryInfo(android.app.ActivityManager.MemoryInfo);
+ method public static void getMyMemoryState(android.app.ActivityManager.RunningAppProcessInfo);
method public android.os.Debug.MemoryInfo[] getProcessMemoryInfo(int[]);
method public java.util.List<android.app.ActivityManager.ProcessErrorStateInfo> getProcessesInErrorState();
method public java.util.List<android.app.ActivityManager.RecentTaskInfo> getRecentTasks(int, int) throws java.lang.SecurityException;
@@ -2702,6 +2803,7 @@
method public static boolean isUserAMonkey();
method public void killBackgroundProcesses(java.lang.String);
method public void moveTaskToFront(int, int);
+ method public void moveTaskToFront(int, int, android.os.Bundle);
method public deprecated void restartPackage(java.lang.String);
field public static final int MOVE_TASK_NO_USER_ACTION = 2; // 0x2
field public static final int MOVE_TASK_WITH_HOME = 1; // 0x1
@@ -2718,6 +2820,7 @@
field public long availMem;
field public boolean lowMemory;
field public long threshold;
+ field public long totalMem;
}
public static class ActivityManager.ProcessErrorStateInfo implements android.os.Parcelable {
@@ -2773,6 +2876,7 @@
field public int importanceReasonCode;
field public android.content.ComponentName importanceReasonComponent;
field public int importanceReasonPid;
+ field public int lastTrimLevel;
field public int lru;
field public int pid;
field public java.lang.String[] pkgList;
@@ -2821,6 +2925,14 @@
field public android.content.ComponentName topActivity;
}
+ public class ActivityOptions {
+ method public static android.app.ActivityOptions makeCustomAnimation(android.content.Context, int, int);
+ method public static android.app.ActivityOptions makeScaleUpAnimation(android.view.View, int, int, int, int);
+ method public static android.app.ActivityOptions makeThumbnailScaleUpAnimation(android.view.View, android.graphics.Bitmap, int, int);
+ method public android.os.Bundle toBundle();
+ method public void update(android.app.ActivityOptions);
+ }
+
public class AlarmManager {
method public void cancel(android.app.PendingIntent);
method public void set(int, long, android.app.PendingIntent);
@@ -3186,6 +3298,7 @@
method public android.app.DownloadManager.Request addRequestHeader(java.lang.String, java.lang.String);
method public void allowScanningByMediaScanner();
method public android.app.DownloadManager.Request setAllowedNetworkTypes(int);
+ method public android.app.DownloadManager.Request setAllowedOverMetered(boolean);
method public android.app.DownloadManager.Request setAllowedOverRoaming(boolean);
method public android.app.DownloadManager.Request setDescription(java.lang.CharSequence);
method public android.app.DownloadManager.Request setDestinationInExternalFilesDir(android.content.Context, java.lang.String, java.lang.String);
@@ -3235,6 +3348,7 @@
method public final android.app.Fragment getTargetFragment();
method public final int getTargetRequestCode();
method public final java.lang.CharSequence getText(int);
+ method public boolean getUserVisibleHint();
method public android.view.View getView();
method public final int hashCode();
method public static android.app.Fragment instantiate(android.content.Context, java.lang.String);
@@ -3281,8 +3395,11 @@
method public void setMenuVisibility(boolean);
method public void setRetainInstance(boolean);
method public void setTargetFragment(android.app.Fragment, int);
+ method public void setUserVisibleHint(boolean);
method public void startActivity(android.content.Intent);
+ method public void startActivity(android.content.Intent, android.os.Bundle);
method public void startActivityForResult(android.content.Intent, int);
+ method public void startActivityForResult(android.content.Intent, int, android.os.Bundle);
method public void unregisterForContextMenu(android.view.View);
}
@@ -3599,14 +3716,21 @@
field public static final int DEFAULT_VIBRATE = 2; // 0x2
field public static final int FLAG_AUTO_CANCEL = 16; // 0x10
field public static final int FLAG_FOREGROUND_SERVICE = 64; // 0x40
- field public static final int FLAG_HIGH_PRIORITY = 128; // 0x80
+ field public static final deprecated int FLAG_HIGH_PRIORITY = 128; // 0x80
field public static final int FLAG_INSISTENT = 4; // 0x4
field public static final int FLAG_NO_CLEAR = 32; // 0x20
field public static final int FLAG_ONGOING_EVENT = 2; // 0x2
field public static final int FLAG_ONLY_ALERT_ONCE = 8; // 0x8
field public static final int FLAG_SHOW_LIGHTS = 1; // 0x1
+ field public static final java.lang.String KIND_PROMO = "android.promo";
+ field public static final int PRIORITY_DEFAULT = 0; // 0x0
+ field public static final int PRIORITY_HIGH = 1; // 0x1
+ field public static final int PRIORITY_LOW = -1; // 0xffffffff
+ field public static final int PRIORITY_MAX = 2; // 0x2
+ field public static final int PRIORITY_MIN = -2; // 0xfffffffe
field public static final int STREAM_DEFAULT = -1; // 0xffffffff
field public int audioStreamType;
+ field public android.widget.RemoteViews bigContentView;
field public android.app.PendingIntent contentIntent;
field public android.widget.RemoteViews contentView;
field public int defaults;
@@ -3620,6 +3744,7 @@
field public int ledOffMS;
field public int ledOnMS;
field public int number;
+ field public int priority;
field public android.net.Uri sound;
field public java.lang.CharSequence tickerText;
field public android.widget.RemoteViews tickerView;
@@ -3627,9 +3752,29 @@
field public long when;
}
+ public static class Notification.BigPictureStyle extends android.app.Notification.Style {
+ ctor public Notification.BigPictureStyle();
+ ctor public Notification.BigPictureStyle(android.app.Notification.Builder);
+ method public android.app.Notification.BigPictureStyle bigPicture(android.graphics.Bitmap);
+ method public android.app.Notification build();
+ method public android.app.Notification.BigPictureStyle setBigContentTitle(java.lang.CharSequence);
+ method public android.app.Notification.BigPictureStyle setSummaryText(java.lang.CharSequence);
+ }
+
+ public static class Notification.BigTextStyle extends android.app.Notification.Style {
+ ctor public Notification.BigTextStyle();
+ ctor public Notification.BigTextStyle(android.app.Notification.Builder);
+ method public android.app.Notification.BigTextStyle bigText(java.lang.CharSequence);
+ method public android.app.Notification build();
+ method public android.app.Notification.BigTextStyle setBigContentTitle(java.lang.CharSequence);
+ method public android.app.Notification.BigTextStyle setSummaryText(java.lang.CharSequence);
+ }
+
public static class Notification.Builder {
ctor public Notification.Builder(android.content.Context);
- method public android.app.Notification getNotification();
+ method public android.app.Notification.Builder addAction(int, java.lang.CharSequence, android.app.PendingIntent);
+ method public android.app.Notification build();
+ method public deprecated android.app.Notification getNotification();
method public android.app.Notification.Builder setAutoCancel(boolean);
method public android.app.Notification.Builder setContent(android.widget.RemoteViews);
method public android.app.Notification.Builder setContentInfo(java.lang.CharSequence);
@@ -3644,17 +3789,41 @@
method public android.app.Notification.Builder setNumber(int);
method public android.app.Notification.Builder setOngoing(boolean);
method public android.app.Notification.Builder setOnlyAlertOnce(boolean);
+ method public android.app.Notification.Builder setPriority(int);
method public android.app.Notification.Builder setProgress(int, int, boolean);
method public android.app.Notification.Builder setSmallIcon(int);
method public android.app.Notification.Builder setSmallIcon(int, int);
method public android.app.Notification.Builder setSound(android.net.Uri);
method public android.app.Notification.Builder setSound(android.net.Uri, int);
+ method public android.app.Notification.Builder setStyle(android.app.Notification.Style);
+ method public android.app.Notification.Builder setSubText(java.lang.CharSequence);
method public android.app.Notification.Builder setTicker(java.lang.CharSequence);
method public android.app.Notification.Builder setTicker(java.lang.CharSequence, android.widget.RemoteViews);
+ method public android.app.Notification.Builder setUsesChronometer(boolean);
method public android.app.Notification.Builder setVibrate(long[]);
method public android.app.Notification.Builder setWhen(long);
}
+ public static class Notification.InboxStyle extends android.app.Notification.Style {
+ ctor public Notification.InboxStyle();
+ ctor public Notification.InboxStyle(android.app.Notification.Builder);
+ method public android.app.Notification.InboxStyle addLine(java.lang.CharSequence);
+ method public android.app.Notification build();
+ method public android.app.Notification.InboxStyle setBigContentTitle(java.lang.CharSequence);
+ method public android.app.Notification.InboxStyle setSummaryText(java.lang.CharSequence);
+ }
+
+ public static abstract class Notification.Style {
+ ctor public Notification.Style();
+ method public abstract android.app.Notification build();
+ method protected void checkBuilder();
+ method protected android.widget.RemoteViews getStandardView(int);
+ method protected void internalSetBigContentTitle(java.lang.CharSequence);
+ method protected void internalSetSummaryText(java.lang.CharSequence);
+ method public void setBuilder(android.app.Notification.Builder);
+ field protected android.app.Notification.Builder mBuilder;
+ }
+
public class NotificationManager {
method public void cancel(int);
method public void cancel(java.lang.String, int);
@@ -3667,7 +3836,9 @@
method public void cancel();
method public int describeContents();
method public static android.app.PendingIntent getActivities(android.content.Context, int, android.content.Intent[], int);
+ method public static android.app.PendingIntent getActivities(android.content.Context, int, android.content.Intent[], int, android.os.Bundle);
method public static android.app.PendingIntent getActivity(android.content.Context, int, android.content.Intent, int);
+ method public static android.app.PendingIntent getActivity(android.content.Context, int, android.content.Intent, int, android.os.Bundle);
method public static android.app.PendingIntent getBroadcast(android.content.Context, int, android.content.Intent, int);
method public android.content.IntentSender getIntentSender();
method public static android.app.PendingIntent getService(android.content.Context, int, android.content.Intent, int);
@@ -3726,6 +3897,7 @@
}
public class SearchManager implements android.content.DialogInterface.OnCancelListener android.content.DialogInterface.OnDismissListener {
+ method public android.content.ComponentName getGlobalSearchActivity();
method public android.app.SearchableInfo getSearchableInfo(android.content.ComponentName);
method public java.util.List<android.app.SearchableInfo> getSearchablesInGlobalSearch();
method public deprecated void onCancel(android.content.DialogInterface);
@@ -3749,6 +3921,7 @@
field public static final java.lang.String INTENT_ACTION_SEARCH_SETTINGS = "android.search.action.SEARCH_SETTINGS";
field public static final java.lang.String INTENT_ACTION_SEARCH_SETTINGS_CHANGED = "android.search.action.SETTINGS_CHANGED";
field public static final java.lang.String INTENT_ACTION_WEB_SEARCH_SETTINGS = "android.search.action.WEB_SEARCH_SETTINGS";
+ field public static final java.lang.String INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED = "android.search.action.GLOBAL_SEARCH_ACTIVITY_CHANGED";
field public static final char MENU_KEY = 115; // 0x0073 's'
field public static final int MENU_KEYCODE = 47; // 0x2f
field public static final java.lang.String QUERY = "query";
@@ -3851,6 +4024,22 @@
method public void setDefaultTab(int);
}
+ public class TaskStackBuilder {
+ method public android.app.TaskStackBuilder addNextIntent(android.content.Intent);
+ method public android.app.TaskStackBuilder addNextIntentWithParentStack(android.content.Intent);
+ method public android.app.TaskStackBuilder addParentStack(android.app.Activity);
+ method public android.app.TaskStackBuilder addParentStack(java.lang.Class<?>);
+ method public android.app.TaskStackBuilder addParentStack(android.content.ComponentName);
+ method public static android.app.TaskStackBuilder create(android.content.Context);
+ method public android.content.Intent editIntentAt(int);
+ method public int getIntentCount();
+ method public android.content.Intent[] getIntents();
+ method public android.app.PendingIntent getPendingIntent(int, int);
+ method public android.app.PendingIntent getPendingIntent(int, int, android.os.Bundle);
+ method public void startActivities();
+ method public void startActivities(android.os.Bundle);
+ }
+
public class TimePickerDialog extends android.app.AlertDialog implements android.content.DialogInterface.OnClickListener android.widget.TimePicker.OnTimeChangedListener {
ctor public TimePickerDialog(android.content.Context, android.app.TimePickerDialog.OnTimeSetListener, int, int, boolean);
ctor public TimePickerDialog(android.content.Context, int, android.app.TimePickerDialog.OnTimeSetListener, int, int, boolean);
@@ -3917,10 +4106,12 @@
method public void setWallpaperOffsetSteps(float, float);
method public void setWallpaperOffsets(android.os.IBinder, float, float);
method public void suggestDesiredDimensions(int, int);
+ field public static final java.lang.String ACTION_CHANGE_LIVE_WALLPAPER = "android.service.wallpaper.CHANGE_LIVE_WALLPAPER";
field public static final java.lang.String ACTION_LIVE_WALLPAPER_CHOOSER = "android.service.wallpaper.LIVE_WALLPAPER_CHOOSER";
field public static final java.lang.String COMMAND_DROP = "android.home.drop";
field public static final java.lang.String COMMAND_SECONDARY_TAP = "android.wallpaper.secondaryTap";
field public static final java.lang.String COMMAND_TAP = "android.wallpaper.tap";
+ field public static final java.lang.String EXTRA_LIVE_WALLPAPER_COMPONENT = "android.service.wallpaper.extra.LIVE_WALLPAPER_COMPONENT";
field public static final java.lang.String WALLPAPER_PREVIEW_META_DATA = "android.wallpaper.preview";
}
@@ -4143,16 +4334,21 @@
ctor public AppWidgetHostView(android.content.Context, int, int);
method public int getAppWidgetId();
method public android.appwidget.AppWidgetProviderInfo getAppWidgetInfo();
+ method public static android.graphics.Rect getDefaultPaddingForWidget(android.content.Context, android.content.ComponentName, android.graphics.Rect);
method protected android.view.View getDefaultView();
method protected android.view.View getErrorView();
method protected void prepareView(android.view.View);
method public void setAppWidget(int, android.appwidget.AppWidgetProviderInfo);
method public void updateAppWidget(android.widget.RemoteViews);
+ method public void updateAppWidgetOptions(android.os.Bundle);
+ method public void updateAppWidgetSize(android.os.Bundle, int, int, int, int);
}
public class AppWidgetManager {
+ method public boolean bindAppWidgetIdIfAllowed(int, android.content.ComponentName);
method public int[] getAppWidgetIds(android.content.ComponentName);
method public android.appwidget.AppWidgetProviderInfo getAppWidgetInfo(int);
+ method public android.os.Bundle getAppWidgetOptions(int);
method public java.util.List<android.appwidget.AppWidgetProviderInfo> getInstalledProviders();
method public static android.appwidget.AppWidgetManager getInstance(android.content.Context);
method public void notifyAppWidgetViewDataChanged(int[], int);
@@ -4162,22 +4358,32 @@
method public void updateAppWidget(int[], android.widget.RemoteViews);
method public void updateAppWidget(int, android.widget.RemoteViews);
method public void updateAppWidget(android.content.ComponentName, android.widget.RemoteViews);
+ method public void updateAppWidgetOptions(int, android.os.Bundle);
+ field public static final java.lang.String ACTION_APPWIDGET_BIND = "android.appwidget.action.APPWIDGET_BIND";
field public static final java.lang.String ACTION_APPWIDGET_CONFIGURE = "android.appwidget.action.APPWIDGET_CONFIGURE";
field public static final java.lang.String ACTION_APPWIDGET_DELETED = "android.appwidget.action.APPWIDGET_DELETED";
field public static final java.lang.String ACTION_APPWIDGET_DISABLED = "android.appwidget.action.APPWIDGET_DISABLED";
field public static final java.lang.String ACTION_APPWIDGET_ENABLED = "android.appwidget.action.APPWIDGET_ENABLED";
+ field public static final java.lang.String ACTION_APPWIDGET_OPTIONS_CHANGED = "android.appwidget.action.APPWIDGET_UPDATE_OPTIONS";
field public static final java.lang.String ACTION_APPWIDGET_PICK = "android.appwidget.action.APPWIDGET_PICK";
field public static final java.lang.String ACTION_APPWIDGET_UPDATE = "android.appwidget.action.APPWIDGET_UPDATE";
field public static final java.lang.String EXTRA_APPWIDGET_ID = "appWidgetId";
field public static final java.lang.String EXTRA_APPWIDGET_IDS = "appWidgetIds";
+ field public static final java.lang.String EXTRA_APPWIDGET_OPTIONS = "appWidgetOptions";
+ field public static final java.lang.String EXTRA_APPWIDGET_PROVIDER = "appWidgetProvider";
field public static final java.lang.String EXTRA_CUSTOM_EXTRAS = "customExtras";
field public static final java.lang.String EXTRA_CUSTOM_INFO = "customInfo";
field public static final int INVALID_APPWIDGET_ID = 0; // 0x0
field public static final java.lang.String META_DATA_APPWIDGET_PROVIDER = "android.appwidget.provider";
+ field public static final java.lang.String OPTION_APPWIDGET_MAX_HEIGHT = "appWidgetMaxHeight";
+ field public static final java.lang.String OPTION_APPWIDGET_MAX_WIDTH = "appWidgetMaxWidth";
+ field public static final java.lang.String OPTION_APPWIDGET_MIN_HEIGHT = "appWidgetMinHeight";
+ field public static final java.lang.String OPTION_APPWIDGET_MIN_WIDTH = "appWidgetMinWidth";
}
public class AppWidgetProvider extends android.content.BroadcastReceiver {
ctor public AppWidgetProvider();
+ method public void onAppWidgetOptionsChanged(android.content.Context, android.appwidget.AppWidgetManager, int, android.os.Bundle);
method public void onDeleted(android.content.Context, int[]);
method public void onDisabled(android.content.Context);
method public void onEnabled(android.content.Context);
@@ -4238,6 +4444,7 @@
method public int getProfileConnectionState(int);
method public boolean getProfileProxy(android.content.Context, android.bluetooth.BluetoothProfile.ServiceListener, int);
method public android.bluetooth.BluetoothDevice getRemoteDevice(java.lang.String);
+ method public android.bluetooth.BluetoothDevice getRemoteDevice(byte[]);
method public int getScanMode();
method public int getState();
method public boolean isDiscovering();
@@ -4471,10 +4678,12 @@
method public android.bluetooth.BluetoothSocket createInsecureRfcommSocketToServiceRecord(java.util.UUID) throws java.io.IOException;
method public android.bluetooth.BluetoothSocket createRfcommSocketToServiceRecord(java.util.UUID) throws java.io.IOException;
method public int describeContents();
+ method public boolean fetchUuidsWithSdp();
method public java.lang.String getAddress();
method public android.bluetooth.BluetoothClass getBluetoothClass();
method public int getBondState();
method public java.lang.String getName();
+ method public android.os.ParcelUuid[] getUuids();
method public void writeToParcel(android.os.Parcel, int);
field public static final java.lang.String ACTION_ACL_CONNECTED = "android.bluetooth.device.action.ACL_CONNECTED";
field public static final java.lang.String ACTION_ACL_DISCONNECTED = "android.bluetooth.device.action.ACL_DISCONNECTED";
@@ -4483,6 +4692,7 @@
field public static final java.lang.String ACTION_CLASS_CHANGED = "android.bluetooth.device.action.CLASS_CHANGED";
field public static final java.lang.String ACTION_FOUND = "android.bluetooth.device.action.FOUND";
field public static final java.lang.String ACTION_NAME_CHANGED = "android.bluetooth.device.action.NAME_CHANGED";
+ field public static final java.lang.String ACTION_UUID = "android.bluetooth.device.action.UUID";
field public static final int BOND_BONDED = 12; // 0xc
field public static final int BOND_BONDING = 11; // 0xb
field public static final int BOND_NONE = 10; // 0xa
@@ -4494,6 +4704,7 @@
field public static final java.lang.String EXTRA_NAME = "android.bluetooth.device.extra.NAME";
field public static final java.lang.String EXTRA_PREVIOUS_BOND_STATE = "android.bluetooth.device.extra.PREVIOUS_BOND_STATE";
field public static final java.lang.String EXTRA_RSSI = "android.bluetooth.device.extra.RSSI";
+ field public static final java.lang.String EXTRA_UUID = "android.bluetooth.device.extra.UUID";
}
public final class BluetoothHeadset implements android.bluetooth.BluetoothProfile {
@@ -4646,7 +4857,8 @@
public abstract class AsyncTaskLoader extends android.content.Loader {
ctor public AsyncTaskLoader(android.content.Context);
- method public boolean cancelLoad();
+ method public void cancelLoadInBackground();
+ method public boolean isLoadInBackgroundCanceled();
method public abstract D loadInBackground();
method public void onCanceled(D);
method protected D onLoadInBackground();
@@ -4692,11 +4904,13 @@
public class ClipData implements android.os.Parcelable {
ctor public ClipData(java.lang.CharSequence, java.lang.String[], android.content.ClipData.Item);
ctor public ClipData(android.content.ClipDescription, android.content.ClipData.Item);
+ ctor public ClipData(android.content.ClipData);
method public void addItem(android.content.ClipData.Item);
method public int describeContents();
method public android.content.ClipDescription getDescription();
method public android.content.ClipData.Item getItemAt(int);
method public int getItemCount();
+ method public static android.content.ClipData newHtmlText(java.lang.CharSequence, java.lang.CharSequence, java.lang.String);
method public static android.content.ClipData newIntent(java.lang.CharSequence, android.content.Intent);
method public static android.content.ClipData newPlainText(java.lang.CharSequence, java.lang.CharSequence);
method public static android.content.ClipData newRawUri(java.lang.CharSequence, android.net.Uri);
@@ -4707,10 +4921,15 @@
public static class ClipData.Item {
ctor public ClipData.Item(java.lang.CharSequence);
+ ctor public ClipData.Item(java.lang.CharSequence, java.lang.String);
ctor public ClipData.Item(android.content.Intent);
ctor public ClipData.Item(android.net.Uri);
ctor public ClipData.Item(java.lang.CharSequence, android.content.Intent, android.net.Uri);
+ ctor public ClipData.Item(java.lang.CharSequence, java.lang.String, android.content.Intent, android.net.Uri);
+ method public java.lang.String coerceToHtmlText(android.content.Context);
+ method public java.lang.CharSequence coerceToStyledText(android.content.Context);
method public java.lang.CharSequence coerceToText(android.content.Context);
+ method public java.lang.String getHtmlText();
method public android.content.Intent getIntent();
method public java.lang.CharSequence getText();
method public android.net.Uri getUri();
@@ -4728,6 +4947,7 @@
method public boolean hasMimeType(java.lang.String);
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator CREATOR;
+ field public static final java.lang.String MIMETYPE_TEXT_HTML = "text/html";
field public static final java.lang.String MIMETYPE_TEXT_INTENT = "text/vnd.android.intent";
field public static final java.lang.String MIMETYPE_TEXT_PLAIN = "text/plain";
field public static final java.lang.String MIMETYPE_TEXT_URILIST = "text/uri-list";
@@ -4759,6 +4979,9 @@
field public static final int TRIM_MEMORY_BACKGROUND = 40; // 0x28
field public static final int TRIM_MEMORY_COMPLETE = 80; // 0x50
field public static final int TRIM_MEMORY_MODERATE = 60; // 0x3c
+ field public static final int TRIM_MEMORY_RUNNING_CRITICAL = 15; // 0xf
+ field public static final int TRIM_MEMORY_RUNNING_LOW = 10; // 0xa
+ field public static final int TRIM_MEMORY_RUNNING_MODERATE = 5; // 0x5
field public static final int TRIM_MEMORY_UI_HIDDEN = 20; // 0x14
}
@@ -4808,6 +5031,7 @@
method public android.os.ParcelFileDescriptor openPipeHelper(android.net.Uri, java.lang.String, android.os.Bundle, T, android.content.ContentProvider.PipeDataWriter<T>) throws java.io.FileNotFoundException;
method public android.content.res.AssetFileDescriptor openTypedAssetFile(android.net.Uri, java.lang.String, android.os.Bundle) throws java.io.FileNotFoundException;
method public abstract android.database.Cursor query(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String);
+ method public android.database.Cursor query(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String, android.os.CancellationSignal);
method protected final void setPathPermissions(android.content.pm.PathPermission[]);
method protected final void setReadPermission(java.lang.String);
method protected final void setWritePermission(java.lang.String);
@@ -4831,6 +5055,7 @@
method public android.os.ParcelFileDescriptor openFile(android.net.Uri, java.lang.String) throws java.io.FileNotFoundException, android.os.RemoteException;
method public final android.content.res.AssetFileDescriptor openTypedAssetFileDescriptor(android.net.Uri, java.lang.String, android.os.Bundle) throws java.io.FileNotFoundException, android.os.RemoteException;
method public android.database.Cursor query(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String) throws android.os.RemoteException;
+ method public android.database.Cursor query(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String, android.os.CancellationSignal) throws android.os.RemoteException;
method public boolean release();
method public int update(android.net.Uri, android.content.ContentValues, java.lang.String, java.lang.String[]) throws android.os.RemoteException;
}
@@ -4888,6 +5113,8 @@
ctor public ContentResolver(android.content.Context);
method public final android.content.ContentProviderClient acquireContentProviderClient(android.net.Uri);
method public final android.content.ContentProviderClient acquireContentProviderClient(java.lang.String);
+ method public final android.content.ContentProviderClient acquireUnstableContentProviderClient(android.net.Uri);
+ method public final android.content.ContentProviderClient acquireUnstableContentProviderClient(java.lang.String);
method public static void addPeriodicSync(android.accounts.Account, java.lang.String, android.os.Bundle, long);
method public static java.lang.Object addStatusChangeListener(int, android.content.SyncStatusObserver);
method public android.content.ContentProviderResult[] applyBatch(java.lang.String, java.util.ArrayList<android.content.ContentProviderOperation>) throws android.content.OperationApplicationException, android.os.RemoteException;
@@ -4917,6 +5144,7 @@
method public final java.io.OutputStream openOutputStream(android.net.Uri, java.lang.String) throws java.io.FileNotFoundException;
method public final android.content.res.AssetFileDescriptor openTypedAssetFileDescriptor(android.net.Uri, java.lang.String, android.os.Bundle) throws java.io.FileNotFoundException;
method public final android.database.Cursor query(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String);
+ method public final android.database.Cursor query(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String, android.os.CancellationSignal);
method public final void registerContentObserver(android.net.Uri, boolean, android.database.ContentObserver);
method public static void removePeriodicSync(android.accounts.Account, java.lang.String, android.os.Bundle);
method public static void removeStatusChangeListener(java.lang.Object);
@@ -5070,9 +5298,12 @@
method public abstract deprecated void setWallpaper(android.graphics.Bitmap) throws java.io.IOException;
method public abstract deprecated void setWallpaper(java.io.InputStream) throws java.io.IOException;
method public abstract void startActivities(android.content.Intent[]);
+ method public abstract void startActivities(android.content.Intent[], android.os.Bundle);
method public abstract void startActivity(android.content.Intent);
+ method public abstract void startActivity(android.content.Intent, android.os.Bundle);
method public abstract boolean startInstrumentation(android.content.ComponentName, java.lang.String, android.os.Bundle);
method public abstract void startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int) throws android.content.IntentSender.SendIntentException;
+ method public abstract void startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int, android.os.Bundle) throws android.content.IntentSender.SendIntentException;
method public abstract android.content.ComponentName startService(android.content.Intent);
method public abstract boolean stopService(android.content.Intent);
method public abstract void unbindService(android.content.ServiceConnection);
@@ -5100,16 +5331,19 @@
field public static final java.lang.String DOWNLOAD_SERVICE = "download";
field public static final java.lang.String DROPBOX_SERVICE = "dropbox";
field public static final java.lang.String INPUT_METHOD_SERVICE = "input_method";
+ field public static final java.lang.String INPUT_SERVICE = "input";
field public static final java.lang.String KEYGUARD_SERVICE = "keyguard";
field public static final java.lang.String LAYOUT_INFLATER_SERVICE = "layout_inflater";
field public static final java.lang.String LOCATION_SERVICE = "location";
field public static final int MODE_APPEND = 32768; // 0x8000
+ field public static final int MODE_ENABLE_WRITE_AHEAD_LOGGING = 8; // 0x8
field public static final int MODE_MULTI_PROCESS = 4; // 0x4
field public static final int MODE_PRIVATE = 0; // 0x0
field public static final int MODE_WORLD_READABLE = 1; // 0x1
field public static final int MODE_WORLD_WRITEABLE = 2; // 0x2
field public static final java.lang.String NFC_SERVICE = "nfc";
field public static final java.lang.String NOTIFICATION_SERVICE = "notification";
+ field public static final java.lang.String NSD_SERVICE = "servicediscovery";
field public static final java.lang.String POWER_SERVICE = "power";
field public static final java.lang.String SEARCH_SERVICE = "search";
field public static final java.lang.String SENSOR_SERVICE = "sensor";
@@ -5195,9 +5429,12 @@
method public void setWallpaper(android.graphics.Bitmap) throws java.io.IOException;
method public void setWallpaper(java.io.InputStream) throws java.io.IOException;
method public void startActivities(android.content.Intent[]);
+ method public void startActivities(android.content.Intent[], android.os.Bundle);
method public void startActivity(android.content.Intent);
+ method public void startActivity(android.content.Intent, android.os.Bundle);
method public boolean startInstrumentation(android.content.ComponentName, java.lang.String, android.os.Bundle);
method public void startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int) throws android.content.IntentSender.SendIntentException;
+ method public void startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int, android.os.Bundle) throws android.content.IntentSender.SendIntentException;
method public android.content.ComponentName startService(android.content.Intent);
method public boolean stopService(android.content.Intent);
method public void unbindService(android.content.ServiceConnection);
@@ -5303,6 +5540,7 @@
method public java.lang.CharSequence[] getCharSequenceArrayExtra(java.lang.String);
method public java.util.ArrayList<java.lang.CharSequence> getCharSequenceArrayListExtra(java.lang.String);
method public java.lang.CharSequence getCharSequenceExtra(java.lang.String);
+ method public android.content.ClipData getClipData();
method public android.content.ComponentName getComponent();
method public android.net.Uri getData();
method public java.lang.String getDataString();
@@ -5324,6 +5562,7 @@
method public java.util.ArrayList<T> getParcelableArrayListExtra(java.lang.String);
method public T getParcelableExtra(java.lang.String);
method public java.lang.String getScheme();
+ method public android.content.Intent getSelector();
method public java.io.Serializable getSerializableExtra(java.lang.String);
method public short[] getShortArrayExtra(java.lang.String);
method public short getShortExtra(java.lang.String, short);
@@ -5336,7 +5575,9 @@
method public boolean hasExtra(java.lang.String);
method public boolean hasFileDescriptors();
method public static android.content.Intent makeMainActivity(android.content.ComponentName);
+ method public static android.content.Intent makeMainSelectorActivity(java.lang.String, java.lang.String);
method public static android.content.Intent makeRestartActivityTask(android.content.ComponentName);
+ method public static java.lang.String normalizeMimeType(java.lang.String);
method public static android.content.Intent parseIntent(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
method public static android.content.Intent parseUri(java.lang.String, int) throws java.net.URISyntaxException;
method public android.content.Intent putCharSequenceArrayListExtra(java.lang.String, java.util.ArrayList<java.lang.CharSequence>);
@@ -5383,14 +5624,19 @@
method public android.content.Intent setClass(android.content.Context, java.lang.Class<?>);
method public android.content.Intent setClassName(android.content.Context, java.lang.String);
method public android.content.Intent setClassName(java.lang.String, java.lang.String);
+ method public void setClipData(android.content.ClipData);
method public android.content.Intent setComponent(android.content.ComponentName);
method public android.content.Intent setData(android.net.Uri);
+ method public android.content.Intent setDataAndNormalize(android.net.Uri);
method public android.content.Intent setDataAndType(android.net.Uri, java.lang.String);
+ method public android.content.Intent setDataAndTypeAndNormalize(android.net.Uri, java.lang.String);
method public void setExtrasClassLoader(java.lang.ClassLoader);
method public android.content.Intent setFlags(int);
method public android.content.Intent setPackage(java.lang.String);
+ method public void setSelector(android.content.Intent);
method public void setSourceBounds(android.graphics.Rect);
method public android.content.Intent setType(java.lang.String);
+ method public android.content.Intent setTypeAndNormalize(java.lang.String);
method public deprecated java.lang.String toURI();
method public java.lang.String toUri(int);
method public void writeToParcel(android.os.Parcel, int);
@@ -5398,6 +5644,7 @@
field public static final java.lang.String ACTION_ALL_APPS = "android.intent.action.ALL_APPS";
field public static final java.lang.String ACTION_ANSWER = "android.intent.action.ANSWER";
field public static final java.lang.String ACTION_APP_ERROR = "android.intent.action.APP_ERROR";
+ field public static final java.lang.String ACTION_ASSIST = "android.intent.action.ASSIST";
field public static final java.lang.String ACTION_ATTACH_DATA = "android.intent.action.ATTACH_DATA";
field public static final java.lang.String ACTION_BATTERY_CHANGED = "android.intent.action.BATTERY_CHANGED";
field public static final java.lang.String ACTION_BATTERY_LOW = "android.intent.action.BATTERY_LOW";
@@ -5489,10 +5736,19 @@
field public static final java.lang.String ACTION_USER_PRESENT = "android.intent.action.USER_PRESENT";
field public static final java.lang.String ACTION_VIEW = "android.intent.action.VIEW";
field public static final java.lang.String ACTION_VOICE_COMMAND = "android.intent.action.VOICE_COMMAND";
- field public static final java.lang.String ACTION_WALLPAPER_CHANGED = "android.intent.action.WALLPAPER_CHANGED";
+ field public static final deprecated java.lang.String ACTION_WALLPAPER_CHANGED = "android.intent.action.WALLPAPER_CHANGED";
field public static final java.lang.String ACTION_WEB_SEARCH = "android.intent.action.WEB_SEARCH";
field public static final java.lang.String CATEGORY_ALTERNATIVE = "android.intent.category.ALTERNATIVE";
+ field public static final java.lang.String CATEGORY_APP_BROWSER = "android.intent.category.APP_BROWSER";
+ field public static final java.lang.String CATEGORY_APP_CALCULATOR = "android.intent.category.APP_CALCULATOR";
+ field public static final java.lang.String CATEGORY_APP_CALENDAR = "android.intent.category.APP_CALENDAR";
+ field public static final java.lang.String CATEGORY_APP_CONTACTS = "android.intent.category.APP_CONTACTS";
+ field public static final java.lang.String CATEGORY_APP_EMAIL = "android.intent.category.APP_EMAIL";
+ field public static final java.lang.String CATEGORY_APP_GALLERY = "android.intent.category.APP_GALLERY";
+ field public static final java.lang.String CATEGORY_APP_MAPS = "android.intent.category.APP_MAPS";
field public static final java.lang.String CATEGORY_APP_MARKET = "android.intent.category.APP_MARKET";
+ field public static final java.lang.String CATEGORY_APP_MESSAGING = "android.intent.category.APP_MESSAGING";
+ field public static final java.lang.String CATEGORY_APP_MUSIC = "android.intent.category.APP_MUSIC";
field public static final java.lang.String CATEGORY_BROWSABLE = "android.intent.category.BROWSABLE";
field public static final java.lang.String CATEGORY_CAR_DOCK = "android.intent.category.CAR_DOCK";
field public static final java.lang.String CATEGORY_CAR_MODE = "android.intent.category.CAR_MODE";
@@ -5516,7 +5772,7 @@
field public static final java.lang.String CATEGORY_UNIT_TEST = "android.intent.category.UNIT_TEST";
field public static final android.os.Parcelable.Creator CREATOR;
field public static final java.lang.String EXTRA_ALARM_COUNT = "android.intent.extra.ALARM_COUNT";
- field public static final java.lang.String EXTRA_ALLOW_REPLACE = "android.intent.extra.ALLOW_REPLACE";
+ field public static final deprecated java.lang.String EXTRA_ALLOW_REPLACE = "android.intent.extra.ALLOW_REPLACE";
field public static final java.lang.String EXTRA_BCC = "android.intent.extra.BCC";
field public static final java.lang.String EXTRA_BUG_REPORT = "android.intent.extra.BUG_REPORT";
field public static final java.lang.String EXTRA_CC = "android.intent.extra.CC";
@@ -5533,6 +5789,7 @@
field public static final int EXTRA_DOCK_STATE_UNDOCKED = 0; // 0x0
field public static final java.lang.String EXTRA_DONT_KILL_APP = "android.intent.extra.DONT_KILL_APP";
field public static final java.lang.String EXTRA_EMAIL = "android.intent.extra.EMAIL";
+ field public static final java.lang.String EXTRA_HTML_TEXT = "android.intent.extra.HTML_TEXT";
field public static final java.lang.String EXTRA_INITIAL_INTENTS = "android.intent.extra.INITIAL_INTENTS";
field public static final java.lang.String EXTRA_INSTALLER_PACKAGE_NAME = "android.intent.extra.INSTALLER_PACKAGE_NAME";
field public static final java.lang.String EXTRA_INTENT = "android.intent.extra.INTENT";
@@ -5555,9 +5812,11 @@
field public static final java.lang.String EXTRA_UID = "android.intent.extra.UID";
field public static final int FILL_IN_ACTION = 1; // 0x1
field public static final int FILL_IN_CATEGORIES = 4; // 0x4
+ field public static final int FILL_IN_CLIP_DATA = 128; // 0x80
field public static final int FILL_IN_COMPONENT = 8; // 0x8
field public static final int FILL_IN_DATA = 2; // 0x2
field public static final int FILL_IN_PACKAGE = 16; // 0x10
+ field public static final int FILL_IN_SELECTOR = 64; // 0x40
field public static final int FILL_IN_SOURCE_BOUNDS = 32; // 0x20
field public static final int FLAG_ACTIVITY_BROUGHT_TO_FRONT = 4194304; // 0x400000
field public static final int FLAG_ACTIVITY_CLEAR_TASK = 32768; // 0x8000
@@ -5582,6 +5841,7 @@
field public static final int FLAG_GRANT_READ_URI_PERMISSION = 1; // 0x1
field public static final int FLAG_GRANT_WRITE_URI_PERMISSION = 2; // 0x2
field public static final int FLAG_INCLUDE_STOPPED_PACKAGES = 32; // 0x20
+ field public static final int FLAG_RECEIVER_FOREGROUND = 268435456; // 0x10000000
field public static final int FLAG_RECEIVER_REGISTERED_ONLY = 1073741824; // 0x40000000
field public static final int FLAG_RECEIVER_REPLACE_PENDING = 536870912; // 0x20000000
field public static final java.lang.String METADATA_DOCK_HOME = "android.dock_home";
@@ -5706,7 +5966,9 @@
public class Loader {
ctor public Loader(android.content.Context);
method public void abandon();
+ method public boolean cancelLoad();
method public java.lang.String dataToString(D);
+ method public void deliverCancellation();
method public void deliverResult(D);
method public void dump(java.lang.String, java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]);
method public void forceLoad();
@@ -5716,23 +5978,30 @@
method public boolean isReset();
method public boolean isStarted();
method protected void onAbandon();
+ method protected boolean onCancelLoad();
method public void onContentChanged();
method protected void onForceLoad();
method protected void onReset();
method protected void onStartLoading();
method protected void onStopLoading();
method public void registerListener(int, android.content.Loader.OnLoadCompleteListener<D>);
+ method public void registerOnLoadCanceledListener(android.content.Loader.OnLoadCanceledListener<D>);
method public void reset();
method public final void startLoading();
method public void stopLoading();
method public boolean takeContentChanged();
method public void unregisterListener(android.content.Loader.OnLoadCompleteListener<D>);
+ method public void unregisterOnLoadCanceledListener(android.content.Loader.OnLoadCanceledListener<D>);
}
public final class Loader.ForceLoadContentObserver extends android.database.ContentObserver {
ctor public Loader.ForceLoadContentObserver();
}
+ public static abstract interface Loader.OnLoadCanceledListener {
+ method public abstract void onLoadCanceled(android.content.Loader<D>);
+ }
+
public static abstract interface Loader.OnLoadCompleteListener {
method public abstract void onLoadComplete(android.content.Loader<D>, D);
}
@@ -5952,6 +6221,7 @@
field public int configChanges;
field public int flags;
field public int launchMode;
+ field public java.lang.String parentActivityName;
field public java.lang.String permission;
field public int screenOrientation;
field public int softInputMode;
@@ -6094,6 +6364,8 @@
method public int describeContents();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator CREATOR;
+ field public static final int REQUESTED_PERMISSION_GRANTED = 2; // 0x2
+ field public static final int REQUESTED_PERMISSION_REQUIRED = 1; // 0x1
field public android.content.pm.ActivityInfo[] activities;
field public android.content.pm.ApplicationInfo applicationInfo;
field public android.content.pm.ConfigurationInfo[] configPreferences;
@@ -6107,6 +6379,7 @@
field public android.content.pm.ActivityInfo[] receivers;
field public android.content.pm.FeatureInfo[] reqFeatures;
field public java.lang.String[] requestedPermissions;
+ field public int[] requestedPermissionsFlags;
field public android.content.pm.ServiceInfo[] services;
field public java.lang.String sharedUserId;
field public int sharedUserLabel;
@@ -6318,8 +6591,11 @@
method public int describeContents();
method public java.lang.CharSequence loadDescription(android.content.pm.PackageManager);
field public static final android.os.Parcelable.Creator CREATOR;
+ field public static final int FLAG_PERSONAL_INFO = 1; // 0x1
field public int descriptionRes;
+ field public int flags;
field public java.lang.CharSequence nonLocalizedDescription;
+ field public int priority;
}
public class PermissionInfo extends android.content.pm.PackageItemInfo implements android.os.Parcelable {
@@ -6329,6 +6605,10 @@
method public java.lang.CharSequence loadDescription(android.content.pm.PackageManager);
field public static final android.os.Parcelable.Creator CREATOR;
field public static final int PROTECTION_DANGEROUS = 1; // 0x1
+ field public static final int PROTECTION_FLAG_DEVELOPMENT = 32; // 0x20
+ field public static final int PROTECTION_FLAG_SYSTEM = 16; // 0x10
+ field public static final int PROTECTION_MASK_BASE = 15; // 0xf
+ field public static final int PROTECTION_MASK_FLAGS = 240; // 0xf0
field public static final int PROTECTION_NORMAL = 0; // 0x0
field public static final int PROTECTION_SIGNATURE = 2; // 0x2
field public static final int PROTECTION_SIGNATURE_OR_SYSTEM = 3; // 0x3
@@ -6388,6 +6668,7 @@
method public int describeContents();
method public void dump(android.util.Printer, java.lang.String);
field public static final android.os.Parcelable.Creator CREATOR;
+ field public static final int FLAG_ISOLATED_PROCESS = 2; // 0x2
field public static final int FLAG_STOP_WITH_TASK = 1; // 0x1
field public int flags;
field public java.lang.String permission;
@@ -6534,6 +6815,7 @@
field public static final int UI_MODE_NIGHT_NO = 16; // 0x10
field public static final int UI_MODE_NIGHT_UNDEFINED = 0; // 0x0
field public static final int UI_MODE_NIGHT_YES = 32; // 0x20
+ field public static final int UI_MODE_TYPE_APPLIANCE = 5; // 0x5
field public static final int UI_MODE_TYPE_CAR = 3; // 0x3
field public static final int UI_MODE_TYPE_DESK = 2; // 0x2
field public static final int UI_MODE_TYPE_MASK = 15; // 0xf
@@ -6588,6 +6870,7 @@
method public int getDimensionPixelSize(int) throws android.content.res.Resources.NotFoundException;
method public android.util.DisplayMetrics getDisplayMetrics();
method public android.graphics.drawable.Drawable getDrawable(int) throws android.content.res.Resources.NotFoundException;
+ method public android.graphics.drawable.Drawable getDrawableForDensity(int, int) throws android.content.res.Resources.NotFoundException;
method public float getFraction(int, int, int);
method public int getIdentifier(java.lang.String, java.lang.String, java.lang.String);
method public int[] getIntArray(int) throws android.content.res.Resources.NotFoundException;
@@ -6610,6 +6893,7 @@
method public java.lang.CharSequence[] getTextArray(int) throws android.content.res.Resources.NotFoundException;
method public void getValue(int, android.util.TypedValue, boolean) throws android.content.res.Resources.NotFoundException;
method public void getValue(java.lang.String, android.util.TypedValue, boolean) throws android.content.res.Resources.NotFoundException;
+ method public void getValueForDensity(int, int, android.util.TypedValue, boolean) throws android.content.res.Resources.NotFoundException;
method public android.content.res.XmlResourceParser getXml(int) throws android.content.res.Resources.NotFoundException;
method public final android.content.res.Resources.Theme newTheme();
method public android.content.res.TypedArray obtainAttributes(android.util.AttributeSet, int[]);
@@ -6726,9 +7010,9 @@
method public void unregisterDataSetObserver(android.database.DataSetObserver);
field protected boolean mClosed;
field protected android.content.ContentResolver mContentResolver;
- field protected java.lang.Long mCurrentRowID;
+ field protected deprecated java.lang.Long mCurrentRowID;
field protected int mPos;
- field protected int mRowIdColumnIndex;
+ field protected deprecated int mRowIdColumnIndex;
field protected deprecated java.util.HashMap mUpdatedRows;
}
@@ -6763,16 +7047,19 @@
public class ContentObservable extends android.database.Observable {
ctor public ContentObservable();
- method public void dispatchChange(boolean);
- method public void notifyChange(boolean);
+ method public deprecated void dispatchChange(boolean);
+ method public void dispatchChange(boolean, android.net.Uri);
+ method public deprecated void notifyChange(boolean);
method public void registerObserver(android.database.ContentObserver);
}
public abstract class ContentObserver {
ctor public ContentObserver(android.os.Handler);
method public boolean deliverSelfNotifications();
- method public final void dispatchChange(boolean);
+ method public final deprecated void dispatchChange(boolean);
+ method public final void dispatchChange(boolean, android.net.Uri);
method public void onChange(boolean);
+ method public void onChange(boolean, android.net.Uri);
}
public abstract interface CrossProcessCursor implements android.database.Cursor {
@@ -6781,10 +7068,17 @@
method public abstract boolean onMove(int, int);
}
- public abstract interface Cursor {
+ public class CrossProcessCursorWrapper extends android.database.CursorWrapper implements android.database.CrossProcessCursor {
+ ctor public CrossProcessCursorWrapper(android.database.Cursor);
+ method public void fillWindow(int, android.database.CursorWindow);
+ method public android.database.CursorWindow getWindow();
+ method public boolean onMove(int, int);
+ }
+
+ public abstract interface Cursor implements java.io.Closeable {
method public abstract void close();
method public abstract void copyStringToBuffer(int, android.database.CharArrayBuffer);
- method public abstract void deactivate();
+ method public abstract deprecated void deactivate();
method public abstract byte[] getBlob(int);
method public abstract int getColumnCount();
method public abstract int getColumnIndex(java.lang.String);
@@ -6850,10 +7144,10 @@
}
public class CursorWindow extends android.database.sqlite.SQLiteClosable implements android.os.Parcelable {
- ctor public CursorWindow(boolean);
+ ctor public CursorWindow(java.lang.String);
+ ctor public deprecated CursorWindow(boolean);
method public boolean allocRow();
method public void clear();
- method public void close();
method public void copyStringToBuffer(int, int, android.database.CharArrayBuffer);
method public int describeContents();
method public void freeLastRow();
@@ -7076,6 +7370,7 @@
public class SQLException extends java.lang.RuntimeException {
ctor public SQLException();
ctor public SQLException(java.lang.String);
+ ctor public SQLException(java.lang.String, java.lang.Throwable);
}
public class StaleDataException extends java.lang.RuntimeException {
@@ -7112,13 +7407,14 @@
ctor public SQLiteCantOpenDatabaseException(java.lang.String);
}
- public abstract class SQLiteClosable {
+ public abstract class SQLiteClosable implements java.io.Closeable {
ctor public SQLiteClosable();
method public void acquireReference();
+ method public void close();
method protected abstract void onAllReferencesReleased();
- method protected void onAllReferencesReleasedFromContainer();
+ method protected deprecated void onAllReferencesReleasedFromContainer();
method public void releaseReference();
- method public void releaseReferenceFromContainer();
+ method public deprecated void releaseReferenceFromContainer();
}
public class SQLiteConstraintException extends android.database.sqlite.SQLiteException {
@@ -7148,10 +7444,11 @@
method public void beginTransactionNonExclusive();
method public void beginTransactionWithListener(android.database.sqlite.SQLiteTransactionListener);
method public void beginTransactionWithListenerNonExclusive(android.database.sqlite.SQLiteTransactionListener);
- method public void close();
method public android.database.sqlite.SQLiteStatement compileStatement(java.lang.String) throws android.database.SQLException;
method public static android.database.sqlite.SQLiteDatabase create(android.database.sqlite.SQLiteDatabase.CursorFactory);
method public int delete(java.lang.String, java.lang.String, java.lang.String[]);
+ method public static boolean deleteDatabase(java.io.File);
+ method public void disableWriteAheadLogging();
method public boolean enableWriteAheadLogging();
method public void endTransaction();
method public void execSQL(java.lang.String) throws android.database.SQLException;
@@ -7169,9 +7466,10 @@
method public long insertWithOnConflict(java.lang.String, java.lang.String, android.content.ContentValues, int);
method public boolean isDatabaseIntegrityOk();
method public boolean isDbLockedByCurrentThread();
- method public boolean isDbLockedByOtherThreads();
+ method public deprecated boolean isDbLockedByOtherThreads();
method public boolean isOpen();
method public boolean isReadOnly();
+ method public boolean isWriteAheadLoggingEnabled();
method public deprecated void markTableSyncable(java.lang.String, java.lang.String);
method public deprecated void markTableSyncable(java.lang.String, java.lang.String, java.lang.String);
method public boolean needUpgrade(int);
@@ -7182,16 +7480,21 @@
method public static android.database.sqlite.SQLiteDatabase openOrCreateDatabase(java.lang.String, android.database.sqlite.SQLiteDatabase.CursorFactory);
method public static android.database.sqlite.SQLiteDatabase openOrCreateDatabase(java.lang.String, android.database.sqlite.SQLiteDatabase.CursorFactory, android.database.DatabaseErrorHandler);
method public android.database.Cursor query(boolean, java.lang.String, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.lang.String, java.lang.String);
+ method public android.database.Cursor query(boolean, java.lang.String, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.lang.String, java.lang.String, android.os.CancellationSignal);
method public android.database.Cursor query(java.lang.String, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.lang.String);
method public android.database.Cursor query(java.lang.String, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.lang.String, java.lang.String);
method public android.database.Cursor queryWithFactory(android.database.sqlite.SQLiteDatabase.CursorFactory, boolean, java.lang.String, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.lang.String, java.lang.String);
+ method public android.database.Cursor queryWithFactory(android.database.sqlite.SQLiteDatabase.CursorFactory, boolean, java.lang.String, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.lang.String, java.lang.String, android.os.CancellationSignal);
method public android.database.Cursor rawQuery(java.lang.String, java.lang.String[]);
+ method public android.database.Cursor rawQuery(java.lang.String, java.lang.String[], android.os.CancellationSignal);
method public android.database.Cursor rawQueryWithFactory(android.database.sqlite.SQLiteDatabase.CursorFactory, java.lang.String, java.lang.String[], java.lang.String);
+ method public android.database.Cursor rawQueryWithFactory(android.database.sqlite.SQLiteDatabase.CursorFactory, java.lang.String, java.lang.String[], java.lang.String, android.os.CancellationSignal);
method public static int releaseMemory();
method public long replace(java.lang.String, java.lang.String, android.content.ContentValues);
method public long replaceOrThrow(java.lang.String, java.lang.String, android.content.ContentValues) throws android.database.SQLException;
+ method public void setForeignKeyConstraintsEnabled(boolean);
method public void setLocale(java.util.Locale);
- method public void setLockingEnabled(boolean);
+ method public deprecated void setLockingEnabled(boolean);
method public void setMaxSqlCacheSize(int);
method public long setMaximumSize(long);
method public void setPageSize(long);
@@ -7209,6 +7512,7 @@
field public static final int CONFLICT_REPLACE = 5; // 0x5
field public static final int CONFLICT_ROLLBACK = 1; // 0x1
field public static final int CREATE_IF_NECESSARY = 268435456; // 0x10000000
+ field public static final int ENABLE_WRITE_AHEAD_LOGGING = 536870912; // 0x20000000
field public static final int MAX_SQL_CACHE_SIZE = 100; // 0x64
field public static final int NO_LOCALIZED_COLLATORS = 16; // 0x10
field public static final int OPEN_READONLY = 1; // 0x1
@@ -7248,6 +7552,7 @@
public class SQLiteException extends android.database.SQLException {
ctor public SQLiteException();
ctor public SQLiteException(java.lang.String);
+ ctor public SQLiteException(java.lang.String, java.lang.Throwable);
}
public class SQLiteFullException extends android.database.sqlite.SQLiteException {
@@ -7265,12 +7570,14 @@
ctor public SQLiteOpenHelper(android.content.Context, java.lang.String, android.database.sqlite.SQLiteDatabase.CursorFactory, int, android.database.DatabaseErrorHandler);
method public synchronized void close();
method public java.lang.String getDatabaseName();
- method public synchronized android.database.sqlite.SQLiteDatabase getReadableDatabase();
- method public synchronized android.database.sqlite.SQLiteDatabase getWritableDatabase();
+ method public android.database.sqlite.SQLiteDatabase getReadableDatabase();
+ method public android.database.sqlite.SQLiteDatabase getWritableDatabase();
+ method public void onConfigure(android.database.sqlite.SQLiteDatabase);
method public abstract void onCreate(android.database.sqlite.SQLiteDatabase);
method public void onDowngrade(android.database.sqlite.SQLiteDatabase, int, int);
method public void onOpen(android.database.sqlite.SQLiteDatabase);
method public abstract void onUpgrade(android.database.sqlite.SQLiteDatabase, int, int);
+ method public void setWriteAheadLoggingEnabled(boolean);
}
public class SQLiteOutOfMemoryException extends android.database.sqlite.SQLiteException {
@@ -7286,7 +7593,6 @@
method public void bindNull(int);
method public void bindString(int, java.lang.String);
method public void clearBindings();
- method public void close();
method public final deprecated int getUniqueId();
method protected void onAllReferencesReleased();
}
@@ -7308,6 +7614,7 @@
method public java.lang.String getTables();
method public android.database.Cursor query(android.database.sqlite.SQLiteDatabase, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.lang.String);
method public android.database.Cursor query(android.database.sqlite.SQLiteDatabase, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.lang.String, java.lang.String);
+ method public android.database.Cursor query(android.database.sqlite.SQLiteDatabase, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.lang.String, java.lang.String, android.os.CancellationSignal);
method public void setCursorFactory(android.database.sqlite.SQLiteDatabase.CursorFactory);
method public void setDistinct(boolean);
method public void setProjectionMap(java.util.Map<java.lang.String, java.lang.String>);
@@ -7452,6 +7759,7 @@
method public java.lang.String getOriginalMimeType(android.net.Uri);
method public int openConvertSession(java.lang.String);
method public int processDrmInfo(android.drm.DrmInfo);
+ method public void release();
method public int removeAllRights();
method public int removeRights(java.lang.String);
method public int removeRights(android.net.Uri);
@@ -7488,11 +7796,11 @@
}
public class DrmStore {
- ctor public DrmStore();
+ ctor public deprecated DrmStore();
}
public static class DrmStore.Action {
- ctor public DrmStore.Action();
+ ctor public deprecated DrmStore.Action();
field public static final int DEFAULT = 0; // 0x0
field public static final int DISPLAY = 7; // 0x7
field public static final int EXECUTE = 6; // 0x6
@@ -7513,7 +7821,7 @@
}
public static class DrmStore.DrmObjectType {
- ctor public DrmStore.DrmObjectType();
+ ctor public deprecated DrmStore.DrmObjectType();
field public static final int CONTENT = 1; // 0x1
field public static final int RIGHTS_OBJECT = 2; // 0x2
field public static final int TRIGGER_OBJECT = 3; // 0x3
@@ -7521,7 +7829,7 @@
}
public static class DrmStore.Playback {
- ctor public DrmStore.Playback();
+ ctor public deprecated DrmStore.Playback();
field public static final int PAUSE = 2; // 0x2
field public static final int RESUME = 3; // 0x3
field public static final int START = 0; // 0x0
@@ -7529,7 +7837,7 @@
}
public static class DrmStore.RightsStatus {
- ctor public DrmStore.RightsStatus();
+ ctor public deprecated DrmStore.RightsStatus();
field public static final int RIGHTS_EXPIRED = 2; // 0x2
field public static final int RIGHTS_INVALID = 1; // 0x1
field public static final int RIGHTS_NOT_ACQUIRED = 3; // 0x3
@@ -7540,7 +7848,8 @@
ctor public DrmSupportInfo();
method public void addFileSuffix(java.lang.String);
method public void addMimeType(java.lang.String);
- method public java.lang.String getDescriprition();
+ method public deprecated java.lang.String getDescriprition();
+ method public java.lang.String getDescription();
method public java.util.Iterator<java.lang.String> getFileSuffixIterator();
method public java.util.Iterator<java.lang.String> getMimeTypeIterator();
method public void setDescription(java.lang.String);
@@ -7749,7 +8058,7 @@
package android.graphics {
- public class AvoidXfermode extends android.graphics.Xfermode {
+ public deprecated class AvoidXfermode extends android.graphics.Xfermode {
ctor public AvoidXfermode(int, int, android.graphics.AvoidXfermode.Mode);
}
@@ -7895,6 +8204,9 @@
ctor public Camera();
method public void applyToCanvas(android.graphics.Canvas);
method public float dotWithNormal(float, float, float);
+ method public float getLocationX();
+ method public float getLocationY();
+ method public float getLocationZ();
method public void getMatrix(android.graphics.Matrix);
method public void restore();
method public void rotate(float, float, float);
@@ -7945,8 +8257,8 @@
method public void drawPoint(float, float, android.graphics.Paint);
method public void drawPoints(float[], int, int, android.graphics.Paint);
method public void drawPoints(float[], android.graphics.Paint);
- method public void drawPosText(char[], int, int, float[], android.graphics.Paint);
- method public void drawPosText(java.lang.String, float[], android.graphics.Paint);
+ method public deprecated void drawPosText(char[], int, int, float[], android.graphics.Paint);
+ method public deprecated void drawPosText(java.lang.String, float[], android.graphics.Paint);
method public void drawRGB(int, int, int);
method public void drawRect(android.graphics.RectF, android.graphics.Paint);
method public void drawRect(android.graphics.Rect, android.graphics.Paint);
@@ -7964,8 +8276,8 @@
method public int getDensity();
method public android.graphics.DrawFilter getDrawFilter();
method public int getHeight();
- method public void getMatrix(android.graphics.Matrix);
- method public final android.graphics.Matrix getMatrix();
+ method public deprecated void getMatrix(android.graphics.Matrix);
+ method public final deprecated android.graphics.Matrix getMatrix();
method public int getMaximumBitmapHeight();
method public int getMaximumBitmapWidth();
method public int getSaveCount();
@@ -8295,7 +8607,7 @@
method public final boolean isDither();
method public final boolean isFakeBoldText();
method public final boolean isFilterBitmap();
- method public final boolean isLinearText();
+ method public final deprecated boolean isLinearText();
method public final boolean isStrikeThruText();
method public final boolean isSubpixelText();
method public final boolean isUnderlineText();
@@ -8315,7 +8627,7 @@
method public void setFilterBitmap(boolean);
method public void setFlags(int);
method public void setHinting(int);
- method public void setLinearText(boolean);
+ method public deprecated void setLinearText(boolean);
method public android.graphics.MaskFilter setMaskFilter(android.graphics.MaskFilter);
method public android.graphics.PathEffect setPathEffect(android.graphics.PathEffect);
method public android.graphics.Rasterizer setRasterizer(android.graphics.Rasterizer);
@@ -8508,14 +8820,14 @@
method public static void getPixelFormatInfo(int, android.graphics.PixelFormat);
field public static final int A_8 = 8; // 0x8
field public static final deprecated int JPEG = 256; // 0x100
- field public static final int LA_88 = 10; // 0xa
+ field public static final deprecated int LA_88 = 10; // 0xa
field public static final int L_8 = 9; // 0x9
field public static final int OPAQUE = -1; // 0xffffffff
- field public static final int RGBA_4444 = 7; // 0x7
- field public static final int RGBA_5551 = 6; // 0x6
+ field public static final deprecated int RGBA_4444 = 7; // 0x7
+ field public static final deprecated int RGBA_5551 = 6; // 0x6
field public static final int RGBA_8888 = 1; // 0x1
field public static final int RGBX_8888 = 2; // 0x2
- field public static final int RGB_332 = 11; // 0xb
+ field public static final deprecated int RGB_332 = 11; // 0xb
field public static final int RGB_565 = 4; // 0x4
field public static final int RGB_888 = 3; // 0x3
field public static final int TRANSLUCENT = -3; // 0xfffffffd
@@ -8528,7 +8840,7 @@
field public int bytesPerPixel;
}
- public class PixelXorXfermode extends android.graphics.Xfermode {
+ public deprecated class PixelXorXfermode extends android.graphics.Xfermode {
ctor public PixelXorXfermode(int);
}
@@ -8767,9 +9079,12 @@
public class SurfaceTexture {
ctor public SurfaceTexture(int);
+ method public void attachToGLContext(int);
+ method public void detachFromGLContext();
method public long getTimestamp();
method public void getTransformMatrix(float[]);
method public void release();
+ method public void setDefaultBufferSize(int, int);
method public void setOnFrameAvailableListener(android.graphics.SurfaceTexture.OnFrameAvailableListener);
method public void updateTexImage();
}
@@ -8925,6 +9240,7 @@
method public int getMinimumWidth();
method public abstract int getOpacity();
method public boolean getPadding(android.graphics.Rect);
+ method public int getResolvedLayoutDirectionSelf();
method public int[] getState();
method public android.graphics.Region getTransparentRegion();
method public void inflate(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
@@ -9010,14 +9326,17 @@
ctor public GradientDrawable(android.graphics.drawable.GradientDrawable.Orientation, int[]);
method public void draw(android.graphics.Canvas);
method public int getOpacity();
+ method public android.graphics.drawable.GradientDrawable.Orientation getOrientation();
method public void setAlpha(int);
method public void setColor(int);
method public void setColorFilter(android.graphics.ColorFilter);
+ method public void setColors(int[]);
method public void setCornerRadii(float[]);
method public void setCornerRadius(float);
method public void setGradientCenter(float, float);
method public void setGradientRadius(float);
method public void setGradientType(int);
+ method public void setOrientation(android.graphics.drawable.GradientDrawable.Orientation);
method public void setShape(int);
method public void setSize(int, int);
method public void setStroke(int, int);
@@ -9230,6 +9549,7 @@
method public static android.hardware.Camera open();
method public final void reconnect() throws java.io.IOException;
method public final void release();
+ method public void setAutoFocusMoveCallback(android.hardware.Camera.AutoFocusMoveCallback);
method public final void setDisplayOrientation(int);
method public final void setErrorCallback(android.hardware.Camera.ErrorCallback);
method public final void setFaceDetectionListener(android.hardware.Camera.FaceDetectionListener);
@@ -9265,6 +9585,10 @@
method public abstract void onAutoFocus(boolean, android.hardware.Camera);
}
+ public static abstract interface Camera.AutoFocusMoveCallback {
+ method public abstract void onAutoFocusMoving(boolean, android.hardware.Camera);
+ }
+
public static class Camera.CameraInfo {
ctor public Camera.CameraInfo();
field public static final int CAMERA_FACING_BACK = 0; // 0x0
@@ -9344,6 +9668,7 @@
method public java.util.List<android.hardware.Camera.Size> getSupportedVideoSizes();
method public java.util.List<java.lang.String> getSupportedWhiteBalance();
method public float getVerticalViewAngle();
+ method public boolean getVideoStabilization();
method public java.lang.String getWhiteBalance();
method public int getZoom();
method public java.util.List<java.lang.Integer> getZoomRatios();
@@ -9351,6 +9676,7 @@
method public boolean isAutoWhiteBalanceLockSupported();
method public boolean isSmoothZoomSupported();
method public boolean isVideoSnapshotSupported();
+ method public boolean isVideoStabilizationSupported();
method public boolean isZoomSupported();
method public void remove(java.lang.String);
method public void removeGpsData();
@@ -9382,6 +9708,7 @@
method public void setRecordingHint(boolean);
method public void setRotation(int);
method public void setSceneMode(java.lang.String);
+ method public void setVideoStabilization(boolean);
method public void setWhiteBalance(java.lang.String);
method public void setZoom(int);
method public void unflatten(java.lang.String);
@@ -9528,8 +9855,8 @@
method public boolean registerListener(android.hardware.SensorEventListener, android.hardware.Sensor, int);
method public boolean registerListener(android.hardware.SensorEventListener, android.hardware.Sensor, int, android.os.Handler);
method public static boolean remapCoordinateSystem(float[], int, int, float[]);
- method public deprecated void unregisterListener(android.hardware.SensorListener, int);
method public deprecated void unregisterListener(android.hardware.SensorListener);
+ method public deprecated void unregisterListener(android.hardware.SensorListener, int);
method public void unregisterListener(android.hardware.SensorEventListener, android.hardware.Sensor);
method public void unregisterListener(android.hardware.SensorEventListener);
field public static final int AXIS_MINUS_X = 129; // 0x81
@@ -9593,6 +9920,25 @@
}
+package android.hardware.input {
+
+ public final class InputManager {
+ method public android.view.InputDevice getInputDevice(int);
+ method public int[] getInputDeviceIds();
+ method public void registerInputDeviceListener(android.hardware.input.InputManager.InputDeviceListener, android.os.Handler);
+ method public void unregisterInputDeviceListener(android.hardware.input.InputManager.InputDeviceListener);
+ field public static final java.lang.String ACTION_QUERY_KEYBOARD_LAYOUTS = "android.hardware.input.action.QUERY_KEYBOARD_LAYOUTS";
+ field public static final java.lang.String META_DATA_KEYBOARD_LAYOUTS = "android.hardware.input.metadata.KEYBOARD_LAYOUTS";
+ }
+
+ public static abstract interface InputManager.InputDeviceListener {
+ method public abstract void onInputDeviceAdded(int);
+ method public abstract void onInputDeviceChanged(int);
+ method public abstract void onInputDeviceRemoved(int);
+ }
+
+}
+
package android.hardware.usb {
public class UsbAccessory implements android.os.Parcelable {
@@ -10302,7 +10648,7 @@
method public deprecated int getRouting(int);
method public int getStreamMaxVolume(int);
method public int getStreamVolume(int);
- method public int getVibrateSetting(int);
+ method public deprecated int getVibrateSetting(int);
method public boolean isBluetoothA2dpOn();
method public boolean isBluetoothScoAvailableOffCall();
method public boolean isBluetoothScoOn();
@@ -10327,9 +10673,9 @@
method public void setStreamMute(int, boolean);
method public void setStreamSolo(int, boolean);
method public void setStreamVolume(int, int, int);
- method public void setVibrateSetting(int, int);
+ method public deprecated void setVibrateSetting(int, int);
method public deprecated void setWiredHeadsetOn(boolean);
- method public boolean shouldVibrate(int);
+ method public deprecated boolean shouldVibrate(int);
method public void startBluetoothSco();
method public void stopBluetoothSco();
method public void unloadSoundEffects();
@@ -10352,8 +10698,8 @@
field public static final java.lang.String EXTRA_RINGER_MODE = "android.media.EXTRA_RINGER_MODE";
field public static final java.lang.String EXTRA_SCO_AUDIO_PREVIOUS_STATE = "android.media.extra.SCO_AUDIO_PREVIOUS_STATE";
field public static final java.lang.String EXTRA_SCO_AUDIO_STATE = "android.media.extra.SCO_AUDIO_STATE";
- field public static final java.lang.String EXTRA_VIBRATE_SETTING = "android.media.EXTRA_VIBRATE_SETTING";
- field public static final java.lang.String EXTRA_VIBRATE_TYPE = "android.media.EXTRA_VIBRATE_TYPE";
+ field public static final deprecated java.lang.String EXTRA_VIBRATE_SETTING = "android.media.EXTRA_VIBRATE_SETTING";
+ field public static final deprecated java.lang.String EXTRA_VIBRATE_TYPE = "android.media.EXTRA_VIBRATE_TYPE";
field public static final int FLAG_ALLOW_RINGER_MODES = 2; // 0x2
field public static final int FLAG_PLAY_SOUND = 4; // 0x4
field public static final int FLAG_REMOVE_SOUND_AND_VIBRATE = 8; // 0x8
@@ -10398,12 +10744,12 @@
field public static final int STREAM_SYSTEM = 1; // 0x1
field public static final int STREAM_VOICE_CALL = 0; // 0x0
field public static final int USE_DEFAULT_STREAM_TYPE = -2147483648; // 0x80000000
- field public static final java.lang.String VIBRATE_SETTING_CHANGED_ACTION = "android.media.VIBRATE_SETTING_CHANGED";
- field public static final int VIBRATE_SETTING_OFF = 0; // 0x0
- field public static final int VIBRATE_SETTING_ON = 1; // 0x1
- field public static final int VIBRATE_SETTING_ONLY_SILENT = 2; // 0x2
- field public static final int VIBRATE_TYPE_NOTIFICATION = 1; // 0x1
- field public static final int VIBRATE_TYPE_RINGER = 0; // 0x0
+ field public static final deprecated java.lang.String VIBRATE_SETTING_CHANGED_ACTION = "android.media.VIBRATE_SETTING_CHANGED";
+ field public static final deprecated int VIBRATE_SETTING_OFF = 0; // 0x0
+ field public static final deprecated int VIBRATE_SETTING_ON = 1; // 0x1
+ field public static final deprecated int VIBRATE_SETTING_ONLY_SILENT = 2; // 0x2
+ field public static final deprecated int VIBRATE_TYPE_NOTIFICATION = 1; // 0x1
+ field public static final deprecated int VIBRATE_TYPE_RINGER = 0; // 0x0
}
public static abstract interface AudioManager.OnAudioFocusChangeListener {
@@ -10413,6 +10759,7 @@
public class AudioRecord {
ctor public AudioRecord(int, int, int, int, int) throws java.lang.IllegalArgumentException;
method public int getAudioFormat();
+ method public int getAudioSessionId();
method public int getAudioSource();
method public int getChannelConfiguration();
method public int getChannelCount();
@@ -10431,6 +10778,7 @@
method public void setRecordPositionUpdateListener(android.media.AudioRecord.OnRecordPositionUpdateListener);
method public void setRecordPositionUpdateListener(android.media.AudioRecord.OnRecordPositionUpdateListener, android.os.Handler);
method public void startRecording() throws java.lang.IllegalStateException;
+ method public void startRecording(android.media.MediaSyncEvent) throws java.lang.IllegalStateException;
method public void stop() throws java.lang.IllegalStateException;
field public static final int ERROR = -1; // 0xffffffff
field public static final int ERROR_BAD_VALUE = -2; // 0xfffffffe
@@ -10517,6 +10865,7 @@
field public static final int QUALITY_HIGH = 1; // 0x1
field public static final int QUALITY_LOW = 0; // 0x0
field public static final int QUALITY_QCIF = 2; // 0x2
+ field public static final int QUALITY_QVGA = 7; // 0x7
field public static final int QUALITY_TIME_LAPSE_1080P = 1006; // 0x3ee
field public static final int QUALITY_TIME_LAPSE_480P = 1004; // 0x3ec
field public static final int QUALITY_TIME_LAPSE_720P = 1005; // 0x3ed
@@ -10524,6 +10873,7 @@
field public static final int QUALITY_TIME_LAPSE_HIGH = 1001; // 0x3e9
field public static final int QUALITY_TIME_LAPSE_LOW = 1000; // 0x3e8
field public static final int QUALITY_TIME_LAPSE_QCIF = 1002; // 0x3ea
+ field public static final int QUALITY_TIME_LAPSE_QVGA = 1007; // 0x3ef
field public int audioBitRate;
field public int audioChannels;
field public int audioCodec;
@@ -10636,6 +10986,287 @@
method public abstract void onJetUserIdUpdate(android.media.JetPlayer, int, int);
}
+ public class MediaActionSound {
+ ctor public MediaActionSound();
+ method public synchronized void load(int);
+ method public synchronized void play(int);
+ method public void release();
+ field public static final int FOCUS_COMPLETE = 1; // 0x1
+ field public static final int SHUTTER_CLICK = 0; // 0x0
+ field public static final int START_VIDEO_RECORDING = 2; // 0x2
+ field public static final int STOP_VIDEO_RECORDING = 3; // 0x3
+ }
+
+ public final class MediaCodec {
+ method public void configure(android.media.MediaFormat, android.view.Surface, android.media.MediaCrypto, int);
+ method public static android.media.MediaCodec createByCodecName(java.lang.String);
+ method public static android.media.MediaCodec createDecoderByType(java.lang.String);
+ method public static android.media.MediaCodec createEncoderByType(java.lang.String);
+ method public final int dequeueInputBuffer(long);
+ method public final int dequeueOutputBuffer(android.media.MediaCodec.BufferInfo, long);
+ method public final void flush();
+ method public java.nio.ByteBuffer[] getInputBuffers();
+ method public java.nio.ByteBuffer[] getOutputBuffers();
+ method public final android.media.MediaFormat getOutputFormat();
+ method public final void queueInputBuffer(int, int, int, long, int) throws android.media.MediaCodec.CryptoException;
+ method public final void queueSecureInputBuffer(int, int, android.media.MediaCodec.CryptoInfo, long, int) throws android.media.MediaCodec.CryptoException;
+ method public final void release();
+ method public final void releaseOutputBuffer(int, boolean);
+ method public final void setVideoScalingMode(int);
+ method public final void start();
+ method public final void stop();
+ field public static final int BUFFER_FLAG_CODEC_CONFIG = 2; // 0x2
+ field public static final int BUFFER_FLAG_END_OF_STREAM = 4; // 0x4
+ field public static final int BUFFER_FLAG_SYNC_FRAME = 1; // 0x1
+ field public static final int CONFIGURE_FLAG_ENCODE = 1; // 0x1
+ field public static final int CRYPTO_MODE_AES_CTR = 1; // 0x1
+ field public static final int CRYPTO_MODE_UNENCRYPTED = 0; // 0x0
+ field public static final int INFO_OUTPUT_BUFFERS_CHANGED = -3; // 0xfffffffd
+ field public static final int INFO_OUTPUT_FORMAT_CHANGED = -2; // 0xfffffffe
+ field public static final int INFO_TRY_AGAIN_LATER = -1; // 0xffffffff
+ field public static final int VIDEO_SCALING_MODE_SCALE_TO_FIT = 1; // 0x1
+ field public static final int VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING = 2; // 0x2
+ }
+
+ public static final class MediaCodec.BufferInfo {
+ ctor public MediaCodec.BufferInfo();
+ method public void set(int, int, long, int);
+ field public int flags;
+ field public int offset;
+ field public long presentationTimeUs;
+ field public int size;
+ }
+
+ public static final class MediaCodec.CryptoException extends java.lang.RuntimeException {
+ ctor public MediaCodec.CryptoException(int, java.lang.String);
+ method public int getErrorCode();
+ }
+
+ public static final class MediaCodec.CryptoInfo {
+ ctor public MediaCodec.CryptoInfo();
+ method public void set(int, int[], int[], byte[], byte[], int);
+ field public byte[] iv;
+ field public byte[] key;
+ field public int mode;
+ field public int[] numBytesOfClearData;
+ field public int[] numBytesOfEncryptedData;
+ field public int numSubSamples;
+ }
+
+ public final class MediaCodecInfo {
+ method public final android.media.MediaCodecInfo.CodecCapabilities getCapabilitiesForType(java.lang.String);
+ method public final java.lang.String getName();
+ method public final java.lang.String[] getSupportedTypes();
+ method public final boolean isEncoder();
+ }
+
+ public static final class MediaCodecInfo.CodecCapabilities {
+ ctor public MediaCodecInfo.CodecCapabilities();
+ field public static final int COLOR_Format12bitRGB444 = 3; // 0x3
+ field public static final int COLOR_Format16bitARGB1555 = 5; // 0x5
+ field public static final int COLOR_Format16bitARGB4444 = 4; // 0x4
+ field public static final int COLOR_Format16bitBGR565 = 7; // 0x7
+ field public static final int COLOR_Format16bitRGB565 = 6; // 0x6
+ field public static final int COLOR_Format18BitBGR666 = 41; // 0x29
+ field public static final int COLOR_Format18bitARGB1665 = 9; // 0x9
+ field public static final int COLOR_Format18bitRGB666 = 8; // 0x8
+ field public static final int COLOR_Format19bitARGB1666 = 10; // 0xa
+ field public static final int COLOR_Format24BitABGR6666 = 43; // 0x2b
+ field public static final int COLOR_Format24BitARGB6666 = 42; // 0x2a
+ field public static final int COLOR_Format24bitARGB1887 = 13; // 0xd
+ field public static final int COLOR_Format24bitBGR888 = 12; // 0xc
+ field public static final int COLOR_Format24bitRGB888 = 11; // 0xb
+ field public static final int COLOR_Format25bitARGB1888 = 14; // 0xe
+ field public static final int COLOR_Format32bitARGB8888 = 16; // 0x10
+ field public static final int COLOR_Format32bitBGRA8888 = 15; // 0xf
+ field public static final int COLOR_Format8bitRGB332 = 2; // 0x2
+ field public static final int COLOR_FormatCbYCrY = 27; // 0x1b
+ field public static final int COLOR_FormatCrYCbY = 28; // 0x1c
+ field public static final int COLOR_FormatL16 = 36; // 0x24
+ field public static final int COLOR_FormatL2 = 33; // 0x21
+ field public static final int COLOR_FormatL24 = 37; // 0x25
+ field public static final int COLOR_FormatL32 = 38; // 0x26
+ field public static final int COLOR_FormatL4 = 34; // 0x22
+ field public static final int COLOR_FormatL8 = 35; // 0x23
+ field public static final int COLOR_FormatMonochrome = 1; // 0x1
+ field public static final int COLOR_FormatRawBayer10bit = 31; // 0x1f
+ field public static final int COLOR_FormatRawBayer8bit = 30; // 0x1e
+ field public static final int COLOR_FormatRawBayer8bitcompressed = 32; // 0x20
+ field public static final int COLOR_FormatYCbYCr = 25; // 0x19
+ field public static final int COLOR_FormatYCrYCb = 26; // 0x1a
+ field public static final int COLOR_FormatYUV411PackedPlanar = 18; // 0x12
+ field public static final int COLOR_FormatYUV411Planar = 17; // 0x11
+ field public static final int COLOR_FormatYUV420PackedPlanar = 20; // 0x14
+ field public static final int COLOR_FormatYUV420PackedSemiPlanar = 39; // 0x27
+ field public static final int COLOR_FormatYUV420Planar = 19; // 0x13
+ field public static final int COLOR_FormatYUV420SemiPlanar = 21; // 0x15
+ field public static final int COLOR_FormatYUV422PackedPlanar = 23; // 0x17
+ field public static final int COLOR_FormatYUV422PackedSemiPlanar = 40; // 0x28
+ field public static final int COLOR_FormatYUV422Planar = 22; // 0x16
+ field public static final int COLOR_FormatYUV422SemiPlanar = 24; // 0x18
+ field public static final int COLOR_FormatYUV444Interleaved = 29; // 0x1d
+ field public static final int COLOR_QCOM_FormatYUV420SemiPlanar = 2141391872; // 0x7fa30c00
+ field public static final int COLOR_TI_FormatYUV420PackedSemiPlanar = 2130706688; // 0x7f000100
+ field public int[] colorFormats;
+ field public android.media.MediaCodecInfo.CodecProfileLevel[] profileLevels;
+ }
+
+ public static final class MediaCodecInfo.CodecProfileLevel {
+ ctor public MediaCodecInfo.CodecProfileLevel();
+ field public static final int AACObjectELD = 39; // 0x27
+ field public static final int AACObjectERLC = 17; // 0x11
+ field public static final int AACObjectHE = 5; // 0x5
+ field public static final int AACObjectHE_PS = 29; // 0x1d
+ field public static final int AACObjectLC = 2; // 0x2
+ field public static final int AACObjectLD = 23; // 0x17
+ field public static final int AACObjectLTP = 4; // 0x4
+ field public static final int AACObjectMain = 1; // 0x1
+ field public static final int AACObjectSSR = 3; // 0x3
+ field public static final int AACObjectScalable = 6; // 0x6
+ field public static final int AVCLevel1 = 1; // 0x1
+ field public static final int AVCLevel11 = 4; // 0x4
+ field public static final int AVCLevel12 = 8; // 0x8
+ field public static final int AVCLevel13 = 16; // 0x10
+ field public static final int AVCLevel1b = 2; // 0x2
+ field public static final int AVCLevel2 = 32; // 0x20
+ field public static final int AVCLevel21 = 64; // 0x40
+ field public static final int AVCLevel22 = 128; // 0x80
+ field public static final int AVCLevel3 = 256; // 0x100
+ field public static final int AVCLevel31 = 512; // 0x200
+ field public static final int AVCLevel32 = 1024; // 0x400
+ field public static final int AVCLevel4 = 2048; // 0x800
+ field public static final int AVCLevel41 = 4096; // 0x1000
+ field public static final int AVCLevel42 = 8192; // 0x2000
+ field public static final int AVCLevel5 = 16384; // 0x4000
+ field public static final int AVCLevel51 = 32768; // 0x8000
+ field public static final int AVCProfileBaseline = 1; // 0x1
+ field public static final int AVCProfileExtended = 4; // 0x4
+ field public static final int AVCProfileHigh = 8; // 0x8
+ field public static final int AVCProfileHigh10 = 16; // 0x10
+ field public static final int AVCProfileHigh422 = 32; // 0x20
+ field public static final int AVCProfileHigh444 = 64; // 0x40
+ field public static final int AVCProfileMain = 2; // 0x2
+ field public static final int H263Level10 = 1; // 0x1
+ field public static final int H263Level20 = 2; // 0x2
+ field public static final int H263Level30 = 4; // 0x4
+ field public static final int H263Level40 = 8; // 0x8
+ field public static final int H263Level45 = 16; // 0x10
+ field public static final int H263Level50 = 32; // 0x20
+ field public static final int H263Level60 = 64; // 0x40
+ field public static final int H263Level70 = 128; // 0x80
+ field public static final int H263ProfileBackwardCompatible = 4; // 0x4
+ field public static final int H263ProfileBaseline = 1; // 0x1
+ field public static final int H263ProfileH320Coding = 2; // 0x2
+ field public static final int H263ProfileHighCompression = 32; // 0x20
+ field public static final int H263ProfileHighLatency = 256; // 0x100
+ field public static final int H263ProfileISWV2 = 8; // 0x8
+ field public static final int H263ProfileISWV3 = 16; // 0x10
+ field public static final int H263ProfileInterlace = 128; // 0x80
+ field public static final int H263ProfileInternet = 64; // 0x40
+ field public static final int MPEG4Level0 = 1; // 0x1
+ field public static final int MPEG4Level0b = 2; // 0x2
+ field public static final int MPEG4Level1 = 4; // 0x4
+ field public static final int MPEG4Level2 = 8; // 0x8
+ field public static final int MPEG4Level3 = 16; // 0x10
+ field public static final int MPEG4Level4 = 32; // 0x20
+ field public static final int MPEG4Level4a = 64; // 0x40
+ field public static final int MPEG4Level5 = 128; // 0x80
+ field public static final int MPEG4ProfileAdvancedCoding = 4096; // 0x1000
+ field public static final int MPEG4ProfileAdvancedCore = 8192; // 0x2000
+ field public static final int MPEG4ProfileAdvancedRealTime = 1024; // 0x400
+ field public static final int MPEG4ProfileAdvancedScalable = 16384; // 0x4000
+ field public static final int MPEG4ProfileAdvancedSimple = 32768; // 0x8000
+ field public static final int MPEG4ProfileBasicAnimated = 256; // 0x100
+ field public static final int MPEG4ProfileCore = 4; // 0x4
+ field public static final int MPEG4ProfileCoreScalable = 2048; // 0x800
+ field public static final int MPEG4ProfileHybrid = 512; // 0x200
+ field public static final int MPEG4ProfileMain = 8; // 0x8
+ field public static final int MPEG4ProfileNbit = 16; // 0x10
+ field public static final int MPEG4ProfileScalableTexture = 32; // 0x20
+ field public static final int MPEG4ProfileSimple = 1; // 0x1
+ field public static final int MPEG4ProfileSimpleFBA = 128; // 0x80
+ field public static final int MPEG4ProfileSimpleFace = 64; // 0x40
+ field public static final int MPEG4ProfileSimpleScalable = 2; // 0x2
+ field public int level;
+ field public int profile;
+ }
+
+ public final class MediaCodecList {
+ method public static final int getCodecCount();
+ method public static final android.media.MediaCodecInfo getCodecInfoAt(int);
+ }
+
+ public final class MediaCrypto {
+ ctor public MediaCrypto(java.util.UUID, byte[]) throws android.media.MediaCryptoException;
+ method public static final boolean isCryptoSchemeSupported(java.util.UUID);
+ method public final void release();
+ method public final boolean requiresSecureDecoderComponent(java.lang.String);
+ }
+
+ public final class MediaCryptoException extends java.lang.Exception {
+ ctor public MediaCryptoException(java.lang.String);
+ }
+
+ public final class MediaExtractor {
+ ctor public MediaExtractor();
+ method public boolean advance();
+ method public long getCachedDuration();
+ method public boolean getSampleCryptoInfo(android.media.MediaCodec.CryptoInfo);
+ method public int getSampleFlags();
+ method public long getSampleTime();
+ method public int getSampleTrackIndex();
+ method public final int getTrackCount();
+ method public android.media.MediaFormat getTrackFormat(int);
+ method public boolean hasCacheReachedEndOfStream();
+ method public int readSampleData(java.nio.ByteBuffer, int);
+ method public final void release();
+ method public void seekTo(long, int);
+ method public void selectTrack(int);
+ method public final void setDataSource(android.content.Context, android.net.Uri, java.util.Map<java.lang.String, java.lang.String>) throws java.io.IOException;
+ method public final void setDataSource(java.lang.String, java.util.Map<java.lang.String, java.lang.String>);
+ method public final void setDataSource(java.lang.String);
+ method public final void setDataSource(java.io.FileDescriptor);
+ method public final void setDataSource(java.io.FileDescriptor, long, long);
+ method public void unselectTrack(int);
+ field public static final int SAMPLE_FLAG_ENCRYPTED = 2; // 0x2
+ field public static final int SAMPLE_FLAG_SYNC = 1; // 0x1
+ field public static final int SEEK_TO_CLOSEST_SYNC = 2; // 0x2
+ field public static final int SEEK_TO_NEXT_SYNC = 1; // 0x1
+ field public static final int SEEK_TO_PREVIOUS_SYNC = 0; // 0x0
+ }
+
+ public final class MediaFormat {
+ ctor public MediaFormat();
+ method public final boolean containsKey(java.lang.String);
+ method public static final android.media.MediaFormat createAudioFormat(java.lang.String, int, int);
+ method public static final android.media.MediaFormat createVideoFormat(java.lang.String, int, int);
+ method public final java.nio.ByteBuffer getByteBuffer(java.lang.String);
+ method public final float getFloat(java.lang.String);
+ method public final int getInteger(java.lang.String);
+ method public final long getLong(java.lang.String);
+ method public final java.lang.String getString(java.lang.String);
+ method public final void setByteBuffer(java.lang.String, java.nio.ByteBuffer);
+ method public final void setFloat(java.lang.String, float);
+ method public final void setInteger(java.lang.String, int);
+ method public final void setLong(java.lang.String, long);
+ method public final void setString(java.lang.String, java.lang.String);
+ field public static final java.lang.String KEY_AAC_PROFILE = "aac-profile";
+ field public static final java.lang.String KEY_BIT_RATE = "bitrate";
+ field public static final java.lang.String KEY_CHANNEL_COUNT = "channel-count";
+ field public static final java.lang.String KEY_CHANNEL_MASK = "channel-mask";
+ field public static final java.lang.String KEY_COLOR_FORMAT = "color-format";
+ field public static final java.lang.String KEY_DURATION = "durationUs";
+ field public static final java.lang.String KEY_FLAC_COMPRESSION_LEVEL = "flac-compression-level";
+ field public static final java.lang.String KEY_FRAME_RATE = "frame-rate";
+ field public static final java.lang.String KEY_HEIGHT = "height";
+ field public static final java.lang.String KEY_IS_ADTS = "is-adts";
+ field public static final java.lang.String KEY_I_FRAME_INTERVAL = "i-frame-interval";
+ field public static final java.lang.String KEY_MAX_INPUT_SIZE = "max-input-size";
+ field public static final java.lang.String KEY_MIME = "mime";
+ field public static final java.lang.String KEY_SAMPLE_RATE = "sample-rate";
+ field public static final java.lang.String KEY_WIDTH = "width";
+ }
+
public class MediaMetadataRetriever {
ctor public MediaMetadataRetriever();
method public java.lang.String extractMetadata(int);
@@ -10663,6 +11294,7 @@
field public static final int METADATA_KEY_GENRE = 6; // 0x6
field public static final int METADATA_KEY_HAS_AUDIO = 16; // 0x10
field public static final int METADATA_KEY_HAS_VIDEO = 17; // 0x11
+ field public static final int METADATA_KEY_LOCATION = 23; // 0x17
field public static final int METADATA_KEY_MIMETYPE = 12; // 0xc
field public static final int METADATA_KEY_NUM_TRACKS = 10; // 0xa
field public static final int METADATA_KEY_TITLE = 7; // 0x7
@@ -10678,13 +11310,19 @@
public class MediaPlayer {
ctor public MediaPlayer();
+ method public void addTimedTextSource(java.lang.String, java.lang.String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
+ method public void addTimedTextSource(android.content.Context, android.net.Uri, java.lang.String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
+ method public void addTimedTextSource(java.io.FileDescriptor, java.lang.String) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException;
+ method public void addTimedTextSource(java.io.FileDescriptor, long, long, java.lang.String) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException;
method public void attachAuxEffect(int);
method public static android.media.MediaPlayer create(android.content.Context, android.net.Uri);
method public static android.media.MediaPlayer create(android.content.Context, android.net.Uri, android.view.SurfaceHolder);
method public static android.media.MediaPlayer create(android.content.Context, int);
+ method public void deselectTrack(int) throws java.lang.IllegalStateException;
method public int getAudioSessionId();
method public int getCurrentPosition();
method public int getDuration();
+ method public android.media.MediaPlayer.TrackInfo[] getTrackInfo() throws java.lang.IllegalStateException;
method public int getVideoHeight();
method public int getVideoWidth();
method public boolean isLooping();
@@ -10695,6 +11333,7 @@
method public void release();
method public void reset();
method public void seekTo(int) throws java.lang.IllegalStateException;
+ method public void selectTrack(int) throws java.lang.IllegalStateException;
method public void setAudioSessionId(int) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException;
method public void setAudioStreamType(int);
method public void setAuxEffectSendLevel(float);
@@ -10705,15 +11344,18 @@
method public void setDataSource(java.io.FileDescriptor, long, long) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
method public void setDisplay(android.view.SurfaceHolder);
method public void setLooping(boolean);
+ method public void setNextMediaPlayer(android.media.MediaPlayer);
method public void setOnBufferingUpdateListener(android.media.MediaPlayer.OnBufferingUpdateListener);
method public void setOnCompletionListener(android.media.MediaPlayer.OnCompletionListener);
method public void setOnErrorListener(android.media.MediaPlayer.OnErrorListener);
method public void setOnInfoListener(android.media.MediaPlayer.OnInfoListener);
method public void setOnPreparedListener(android.media.MediaPlayer.OnPreparedListener);
method public void setOnSeekCompleteListener(android.media.MediaPlayer.OnSeekCompleteListener);
+ method public void setOnTimedTextListener(android.media.MediaPlayer.OnTimedTextListener);
method public void setOnVideoSizeChangedListener(android.media.MediaPlayer.OnVideoSizeChangedListener);
method public void setScreenOnWhilePlaying(boolean);
method public void setSurface(android.view.Surface);
+ method public void setVideoScalingMode(int);
method public void setVolume(float, float);
method public void setWakeMode(android.content.Context, int);
method public void start() throws java.lang.IllegalStateException;
@@ -10728,6 +11370,9 @@
field public static final int MEDIA_INFO_NOT_SEEKABLE = 801; // 0x321
field public static final int MEDIA_INFO_UNKNOWN = 1; // 0x1
field public static final int MEDIA_INFO_VIDEO_TRACK_LAGGING = 700; // 0x2bc
+ field public static final java.lang.String MEDIA_MIMETYPE_TEXT_SUBRIP = "application/x-subrip";
+ field public static final int VIDEO_SCALING_MODE_SCALE_TO_FIT = 1; // 0x1
+ field public static final int VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING = 2; // 0x2
}
public static abstract interface MediaPlayer.OnBufferingUpdateListener {
@@ -10754,10 +11399,25 @@
method public abstract void onSeekComplete(android.media.MediaPlayer);
}
+ public static abstract interface MediaPlayer.OnTimedTextListener {
+ method public abstract void onTimedText(android.media.MediaPlayer, android.media.TimedText);
+ }
+
public static abstract interface MediaPlayer.OnVideoSizeChangedListener {
method public abstract void onVideoSizeChanged(android.media.MediaPlayer, int, int);
}
+ public static class MediaPlayer.TrackInfo implements android.os.Parcelable {
+ method public int describeContents();
+ method public java.lang.String getLanguage();
+ method public int getTrackType();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final int MEDIA_TRACK_TYPE_AUDIO = 2; // 0x2
+ field public static final int MEDIA_TRACK_TYPE_TIMEDTEXT = 3; // 0x3
+ field public static final int MEDIA_TRACK_TYPE_UNKNOWN = 0; // 0x0
+ field public static final int MEDIA_TRACK_TYPE_VIDEO = 1; // 0x1
+ }
+
public class MediaRecorder {
ctor public MediaRecorder();
method public static final int getAudioSourceMax();
@@ -10798,9 +11458,11 @@
public final class MediaRecorder.AudioEncoder {
field public static final int AAC = 3; // 0x3
+ field public static final int AAC_ELD = 5; // 0x5
field public static final int AMR_NB = 1; // 0x1
field public static final int AMR_WB = 2; // 0x2
field public static final int DEFAULT = 0; // 0x0
+ field public static final int HE_AAC = 4; // 0x4
}
public final class MediaRecorder.AudioSource {
@@ -10823,11 +11485,12 @@
}
public final class MediaRecorder.OutputFormat {
+ field public static final int AAC_ADTS = 6; // 0x6
field public static final int AMR_NB = 3; // 0x3
field public static final int AMR_WB = 4; // 0x4
field public static final int DEFAULT = 0; // 0x0
field public static final int MPEG_4 = 2; // 0x2
- field public static final int RAW_AMR = 3; // 0x3
+ field public static final deprecated int RAW_AMR = 3; // 0x3
field public static final int THREE_GPP = 1; // 0x1
}
@@ -10863,6 +11526,15 @@
method public abstract void onScanCompleted(java.lang.String, android.net.Uri);
}
+ public class MediaSyncEvent {
+ method public static android.media.MediaSyncEvent createEvent(int) throws java.lang.IllegalArgumentException;
+ method public int getAudioSessionId();
+ method public int getType();
+ method public android.media.MediaSyncEvent setAudioSessionId(int) throws java.lang.IllegalArgumentException;
+ field public static final int SYNC_EVENT_NONE = 0; // 0x0
+ field public static final int SYNC_EVENT_PRESENTATION_COMPLETE = 1; // 0x1
+ }
+
public class RemoteControlClient {
ctor public RemoteControlClient(android.app.PendingIntent);
ctor public RemoteControlClient(android.app.PendingIntent, android.os.Looper);
@@ -10978,8 +11650,14 @@
field public static final int OPTIONS_RECYCLE_INPUT = 2; // 0x2
}
+ public final class TimedText {
+ method public android.graphics.Rect getBounds();
+ method public java.lang.String getText();
+ }
+
public class ToneGenerator {
ctor public ToneGenerator(int, int);
+ method public final int getAudioSessionId();
method public void release();
method public boolean startTone(int);
method public boolean startTone(int, int);
@@ -11091,6 +11769,11 @@
package android.media.audiofx {
+ public class AcousticEchoCanceler extends android.media.audiofx.AudioEffect {
+ method public static android.media.audiofx.AcousticEchoCanceler create(int);
+ method public static boolean isAvailable();
+ }
+
public class AudioEffect {
method public android.media.audiofx.AudioEffect.Descriptor getDescriptor() throws java.lang.IllegalStateException;
method public boolean getEnabled() throws java.lang.IllegalStateException;
@@ -11141,6 +11824,11 @@
method public abstract void onEnableStatusChange(android.media.audiofx.AudioEffect, boolean);
}
+ public class AutomaticGainControl extends android.media.audiofx.AudioEffect {
+ method public static android.media.audiofx.AutomaticGainControl create(int);
+ method public static boolean isAvailable();
+ }
+
public class BassBoost extends android.media.audiofx.AudioEffect {
ctor public BassBoost(int, int) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.RuntimeException, java.lang.UnsupportedOperationException;
method public android.media.audiofx.BassBoost.Settings getProperties() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
@@ -11259,6 +11947,11 @@
field public short numBands;
}
+ public class NoiseSuppressor extends android.media.audiofx.AudioEffect {
+ method public static android.media.audiofx.NoiseSuppressor create(int);
+ method public static boolean isAvailable();
+ }
+
public class PresetReverb extends android.media.audiofx.AudioEffect {
ctor public PresetReverb(int, int) throws java.lang.IllegalArgumentException, java.lang.RuntimeException, java.lang.UnsupportedOperationException;
method public short getPreset() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
@@ -11316,11 +12009,13 @@
method public int getFft(byte[]) throws java.lang.IllegalStateException;
method public static int getMaxCaptureRate();
method public int getSamplingRate() throws java.lang.IllegalStateException;
+ method public int getScalingMode() throws java.lang.IllegalStateException;
method public int getWaveForm(byte[]) throws java.lang.IllegalStateException;
method public void release();
method public int setCaptureSize(int) throws java.lang.IllegalStateException;
method public int setDataCaptureListener(android.media.audiofx.Visualizer.OnDataCaptureListener, int, boolean, boolean);
method public int setEnabled(boolean) throws java.lang.IllegalStateException;
+ method public int setScalingMode(int) throws java.lang.IllegalStateException;
field public static final int ALREADY_EXISTS = -2; // 0xfffffffe
field public static final int ERROR = -1; // 0xffffffff
field public static final int ERROR_BAD_VALUE = -4; // 0xfffffffc
@@ -11328,6 +12023,8 @@
field public static final int ERROR_INVALID_OPERATION = -5; // 0xfffffffb
field public static final int ERROR_NO_INIT = -3; // 0xfffffffd
field public static final int ERROR_NO_MEMORY = -6; // 0xfffffffa
+ field public static final int SCALING_MODE_AS_PLAYED = 1; // 0x1
+ field public static final int SCALING_MODE_NORMALIZED = 0; // 0x0
field public static final int STATE_ENABLED = 2; // 0x2
field public static final int STATE_INITIALIZED = 1; // 0x1
field public static final int STATE_UNINITIALIZED = 0; // 0x0
@@ -11531,12 +12228,13 @@
method public deprecated boolean getBackgroundDataSetting();
method public android.net.NetworkInfo getNetworkInfo(int);
method public int getNetworkPreference();
+ method public boolean isActiveNetworkMetered();
method public static boolean isNetworkTypeValid(int);
method public boolean requestRouteToHost(int, int);
method public void setNetworkPreference(int);
method public int startUsingNetworkFeature(int, java.lang.String);
method public int stopUsingNetworkFeature(int, java.lang.String);
- field public static final java.lang.String ACTION_BACKGROUND_DATA_SETTING_CHANGED = "android.net.conn.BACKGROUND_DATA_SETTING_CHANGED";
+ field public static final deprecated java.lang.String ACTION_BACKGROUND_DATA_SETTING_CHANGED = "android.net.conn.BACKGROUND_DATA_SETTING_CHANGED";
field public static final java.lang.String CONNECTIVITY_ACTION = "android.net.conn.CONNECTIVITY_CHANGE";
field public static final int DEFAULT_NETWORK_PREFERENCE = 1; // 0x1
field public static final java.lang.String EXTRA_EXTRA_INFO = "extraInfo";
@@ -11673,6 +12371,7 @@
enum_constant public static final android.net.NetworkInfo.DetailedState OBTAINING_IPADDR;
enum_constant public static final android.net.NetworkInfo.DetailedState SCANNING;
enum_constant public static final android.net.NetworkInfo.DetailedState SUSPENDED;
+ enum_constant public static final android.net.NetworkInfo.DetailedState VERIFYING_POOR_LINK;
}
public static final class NetworkInfo.State extends java.lang.Enum {
@@ -11711,8 +12410,10 @@
method public java.lang.String[] getDefaultCipherSuites();
method public static org.apache.http.conn.ssl.SSLSocketFactory getHttpSocketFactory(int, android.net.SSLSessionCache);
method public static javax.net.ssl.SSLSocketFactory getInsecure(int, android.net.SSLSessionCache);
+ method public byte[] getNpnSelectedProtocol(java.net.Socket);
method public java.lang.String[] getSupportedCipherSuites();
method public void setKeyManagers(javax.net.ssl.KeyManager[]);
+ method public void setNpnProtocols(byte[][]);
method public void setTrustManagers(javax.net.ssl.TrustManager[]);
}
@@ -11786,6 +12487,7 @@
method public abstract boolean isHierarchical();
method public boolean isOpaque();
method public abstract boolean isRelative();
+ method public android.net.Uri normalizeScheme();
method public static android.net.Uri parse(java.lang.String);
method public abstract java.lang.String toString();
method public static android.net.Uri withAppendedPath(android.net.Uri, java.lang.String);
@@ -11999,6 +12701,62 @@
}
+package android.net.nsd {
+
+ public final class NsdManager {
+ method public void discoverServices(java.lang.String, int, android.net.nsd.NsdManager.DiscoveryListener);
+ method public void registerService(android.net.nsd.NsdServiceInfo, int, android.net.nsd.NsdManager.RegistrationListener);
+ method public void resolveService(android.net.nsd.NsdServiceInfo, android.net.nsd.NsdManager.ResolveListener);
+ method public void stopServiceDiscovery(android.net.nsd.NsdManager.DiscoveryListener);
+ method public void unregisterService(android.net.nsd.NsdManager.RegistrationListener);
+ field public static final java.lang.String ACTION_NSD_STATE_CHANGED = "android.net.nsd.STATE_CHANGED";
+ field public static final java.lang.String EXTRA_NSD_STATE = "nsd_state";
+ field public static final int FAILURE_ALREADY_ACTIVE = 3; // 0x3
+ field public static final int FAILURE_INTERNAL_ERROR = 0; // 0x0
+ field public static final int FAILURE_MAX_LIMIT = 4; // 0x4
+ field public static final int NSD_STATE_DISABLED = 1; // 0x1
+ field public static final int NSD_STATE_ENABLED = 2; // 0x2
+ field public static final int PROTOCOL_DNS_SD = 1; // 0x1
+ }
+
+ public static abstract interface NsdManager.DiscoveryListener {
+ method public abstract void onDiscoveryStarted(java.lang.String);
+ method public abstract void onDiscoveryStopped(java.lang.String);
+ method public abstract void onServiceFound(android.net.nsd.NsdServiceInfo);
+ method public abstract void onServiceLost(android.net.nsd.NsdServiceInfo);
+ method public abstract void onStartDiscoveryFailed(java.lang.String, int);
+ method public abstract void onStopDiscoveryFailed(java.lang.String, int);
+ }
+
+ public static abstract interface NsdManager.RegistrationListener {
+ method public abstract void onRegistrationFailed(android.net.nsd.NsdServiceInfo, int);
+ method public abstract void onServiceRegistered(android.net.nsd.NsdServiceInfo);
+ method public abstract void onServiceUnregistered(android.net.nsd.NsdServiceInfo);
+ method public abstract void onUnregistrationFailed(android.net.nsd.NsdServiceInfo, int);
+ }
+
+ public static abstract interface NsdManager.ResolveListener {
+ method public abstract void onResolveFailed(android.net.nsd.NsdServiceInfo, int);
+ method public abstract void onServiceResolved(android.net.nsd.NsdServiceInfo);
+ }
+
+ public final class NsdServiceInfo implements android.os.Parcelable {
+ ctor public NsdServiceInfo();
+ method public int describeContents();
+ method public java.net.InetAddress getHost();
+ method public int getPort();
+ method public java.lang.String getServiceName();
+ method public java.lang.String getServiceType();
+ method public void setHost(java.net.InetAddress);
+ method public void setPort(int);
+ method public void setServiceName(java.lang.String);
+ method public void setServiceType(java.lang.String);
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator CREATOR;
+ }
+
+}
+
package android.net.rtp {
public class AudioCodec {
@@ -12505,23 +13263,39 @@
}
public class WifiP2pManager {
+ method public void addLocalService(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.nsd.WifiP2pServiceInfo, android.net.wifi.p2p.WifiP2pManager.ActionListener);
+ method public void addServiceRequest(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.nsd.WifiP2pServiceRequest, android.net.wifi.p2p.WifiP2pManager.ActionListener);
method public void cancelConnect(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
+ method public void clearLocalServices(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
+ method public void clearServiceRequests(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
method public void connect(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pConfig, android.net.wifi.p2p.WifiP2pManager.ActionListener);
method public void createGroup(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
method public void discoverPeers(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
+ method public void discoverServices(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
method public android.net.wifi.p2p.WifiP2pManager.Channel initialize(android.content.Context, android.os.Looper, android.net.wifi.p2p.WifiP2pManager.ChannelListener);
method public void removeGroup(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
+ method public void removeLocalService(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.nsd.WifiP2pServiceInfo, android.net.wifi.p2p.WifiP2pManager.ActionListener);
+ method public void removeServiceRequest(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.nsd.WifiP2pServiceRequest, android.net.wifi.p2p.WifiP2pManager.ActionListener);
method public void requestConnectionInfo(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ConnectionInfoListener);
method public void requestGroupInfo(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.GroupInfoListener);
method public void requestPeers(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.PeerListListener);
+ method public void setDnsSdResponseListeners(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.DnsSdServiceResponseListener, android.net.wifi.p2p.WifiP2pManager.DnsSdTxtRecordListener);
+ method public void setServiceResponseListener(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ServiceResponseListener);
+ method public void setUpnpServiceResponseListener(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.UpnpServiceResponseListener);
+ method public void stopPeerDiscovery(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
field public static final int BUSY = 2; // 0x2
field public static final int ERROR = 0; // 0x0
+ field public static final java.lang.String EXTRA_DISCOVERY_STATE = "discoveryState";
field public static final java.lang.String EXTRA_NETWORK_INFO = "networkInfo";
field public static final java.lang.String EXTRA_WIFI_P2P_DEVICE = "wifiP2pDevice";
field public static final java.lang.String EXTRA_WIFI_P2P_INFO = "wifiP2pInfo";
field public static final java.lang.String EXTRA_WIFI_STATE = "wifi_p2p_state";
+ field public static final int NO_SERVICE_REQUESTS = 3; // 0x3
field public static final int P2P_UNSUPPORTED = 1; // 0x1
field public static final java.lang.String WIFI_P2P_CONNECTION_CHANGED_ACTION = "android.net.wifi.p2p.CONNECTION_STATE_CHANGE";
+ field public static final java.lang.String WIFI_P2P_DISCOVERY_CHANGED_ACTION = "android.net.wifi.p2p.DISCOVERY_STATE_CHANGE";
+ field public static final int WIFI_P2P_DISCOVERY_STARTED = 2; // 0x2
+ field public static final int WIFI_P2P_DISCOVERY_STOPPED = 1; // 0x1
field public static final java.lang.String WIFI_P2P_PEERS_CHANGED_ACTION = "android.net.wifi.p2p.PEERS_CHANGED";
field public static final java.lang.String WIFI_P2P_STATE_CHANGED_ACTION = "android.net.wifi.p2p.STATE_CHANGED";
field public static final int WIFI_P2P_STATE_DISABLED = 1; // 0x1
@@ -12545,6 +13319,14 @@
method public abstract void onConnectionInfoAvailable(android.net.wifi.p2p.WifiP2pInfo);
}
+ public static abstract interface WifiP2pManager.DnsSdServiceResponseListener {
+ method public abstract void onDnsSdServiceAvailable(java.lang.String, java.lang.String, android.net.wifi.p2p.WifiP2pDevice);
+ }
+
+ public static abstract interface WifiP2pManager.DnsSdTxtRecordListener {
+ method public abstract void onDnsSdTxtRecordAvailable(java.lang.String, java.util.Map<java.lang.String, java.lang.String>, android.net.wifi.p2p.WifiP2pDevice);
+ }
+
public static abstract interface WifiP2pManager.GroupInfoListener {
method public abstract void onGroupInfoAvailable(android.net.wifi.p2p.WifiP2pGroup);
}
@@ -12553,6 +13335,53 @@
method public abstract void onPeersAvailable(android.net.wifi.p2p.WifiP2pDeviceList);
}
+ public static abstract interface WifiP2pManager.ServiceResponseListener {
+ method public abstract void onServiceAvailable(int, byte[], android.net.wifi.p2p.WifiP2pDevice);
+ }
+
+ public static abstract interface WifiP2pManager.UpnpServiceResponseListener {
+ method public abstract void onUpnpServiceAvailable(java.util.List<java.lang.String>, android.net.wifi.p2p.WifiP2pDevice);
+ }
+
+}
+
+package android.net.wifi.p2p.nsd {
+
+ public class WifiP2pDnsSdServiceInfo extends android.net.wifi.p2p.nsd.WifiP2pServiceInfo {
+ method public static android.net.wifi.p2p.nsd.WifiP2pDnsSdServiceInfo newInstance(java.lang.String, java.lang.String, java.util.Map<java.lang.String, java.lang.String>);
+ }
+
+ public class WifiP2pDnsSdServiceRequest extends android.net.wifi.p2p.nsd.WifiP2pServiceRequest {
+ method public static android.net.wifi.p2p.nsd.WifiP2pDnsSdServiceRequest newInstance();
+ method public static android.net.wifi.p2p.nsd.WifiP2pDnsSdServiceRequest newInstance(java.lang.String);
+ method public static android.net.wifi.p2p.nsd.WifiP2pDnsSdServiceRequest newInstance(java.lang.String, java.lang.String);
+ }
+
+ public class WifiP2pServiceInfo implements android.os.Parcelable {
+ method public int describeContents();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final int SERVICE_TYPE_ALL = 0; // 0x0
+ field public static final int SERVICE_TYPE_BONJOUR = 1; // 0x1
+ field public static final int SERVICE_TYPE_UPNP = 2; // 0x2
+ field public static final int SERVICE_TYPE_VENDOR_SPECIFIC = 255; // 0xff
+ }
+
+ public class WifiP2pServiceRequest implements android.os.Parcelable {
+ method public int describeContents();
+ method public static android.net.wifi.p2p.nsd.WifiP2pServiceRequest newInstance(int, java.lang.String);
+ method public static android.net.wifi.p2p.nsd.WifiP2pServiceRequest newInstance(int);
+ method public void writeToParcel(android.os.Parcel, int);
+ }
+
+ public class WifiP2pUpnpServiceInfo extends android.net.wifi.p2p.nsd.WifiP2pServiceInfo {
+ method public static android.net.wifi.p2p.nsd.WifiP2pUpnpServiceInfo newInstance(java.lang.String, java.lang.String, java.util.List<java.lang.String>);
+ }
+
+ public class WifiP2pUpnpServiceRequest extends android.net.wifi.p2p.nsd.WifiP2pServiceRequest {
+ method public static android.net.wifi.p2p.nsd.WifiP2pUpnpServiceRequest newInstance();
+ method public static android.net.wifi.p2p.nsd.WifiP2pUpnpServiceRequest newInstance(java.lang.String);
+ }
+
}
package android.nfc {
@@ -12560,12 +13389,15 @@
public class FormatException extends java.lang.Exception {
ctor public FormatException();
ctor public FormatException(java.lang.String);
+ ctor public FormatException(java.lang.String, java.lang.Throwable);
}
public final class NdefMessage implements android.os.Parcelable {
ctor public NdefMessage(byte[]) throws android.nfc.FormatException;
+ ctor public NdefMessage(android.nfc.NdefRecord, android.nfc.NdefRecord...);
ctor public NdefMessage(android.nfc.NdefRecord[]);
method public int describeContents();
+ method public int getByteArrayLength();
method public android.nfc.NdefRecord[] getRecords();
method public byte[] toByteArray();
method public void writeToParcel(android.os.Parcel, int);
@@ -12574,8 +13406,10 @@
public final class NdefRecord implements android.os.Parcelable {
ctor public NdefRecord(short, byte[], byte[], byte[]);
- ctor public NdefRecord(byte[]) throws android.nfc.FormatException;
+ ctor public deprecated NdefRecord(byte[]) throws android.nfc.FormatException;
method public static android.nfc.NdefRecord createApplicationRecord(java.lang.String);
+ method public static android.nfc.NdefRecord createExternal(java.lang.String, java.lang.String, byte[]);
+ method public static android.nfc.NdefRecord createMime(java.lang.String, byte[]);
method public static android.nfc.NdefRecord createUri(android.net.Uri);
method public static android.nfc.NdefRecord createUri(java.lang.String);
method public int describeContents();
@@ -12583,7 +13417,9 @@
method public byte[] getPayload();
method public short getTnf();
method public byte[] getType();
- method public byte[] toByteArray();
+ method public deprecated byte[] toByteArray();
+ method public java.lang.String toMimeType();
+ method public android.net.Uri toUri();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator CREATOR;
field public static final byte[] RTD_ALTERNATIVE_CARRIER;
@@ -12609,6 +13445,9 @@
method public deprecated void enableForegroundNdefPush(android.app.Activity, android.nfc.NdefMessage);
method public static android.nfc.NfcAdapter getDefaultAdapter(android.content.Context);
method public boolean isEnabled();
+ method public boolean isNdefPushEnabled();
+ method public void setBeamPushUris(android.net.Uri[], android.app.Activity);
+ method public void setBeamPushUrisCallback(android.nfc.NfcAdapter.CreateBeamUrisCallback, android.app.Activity);
method public void setNdefPushMessage(android.nfc.NdefMessage, android.app.Activity, android.app.Activity...);
method public void setNdefPushMessageCallback(android.nfc.NfcAdapter.CreateNdefMessageCallback, android.app.Activity, android.app.Activity...);
method public void setOnNdefPushCompleteCallback(android.nfc.NfcAdapter.OnNdefPushCompleteCallback, android.app.Activity, android.app.Activity...);
@@ -12620,6 +13459,10 @@
field public static final java.lang.String EXTRA_TAG = "android.nfc.extra.TAG";
}
+ public static abstract interface NfcAdapter.CreateBeamUrisCallback {
+ method public abstract android.net.Uri[] createBeamUris(android.nfc.NfcEvent);
+ }
+
public static abstract interface NfcAdapter.CreateNdefMessageCallback {
method public abstract android.nfc.NdefMessage createNdefMessage(android.nfc.NfcEvent);
}
@@ -12666,6 +13509,7 @@
method public byte[] getHistoricalBytes();
method public int getMaxTransceiveLength();
method public int getTimeout();
+ method public boolean isExtendedLengthApduSupported();
method public void setTimeout(int);
method public byte[] transceive(byte[]) throws java.io.IOException;
}
@@ -13594,16 +14438,19 @@
field public static final int GL_RENDERBUFFER_RED_SIZE_OES = 36176; // 0x8d50
field public static final int GL_RENDERBUFFER_STENCIL_SIZE_OES = 36181; // 0x8d55
field public static final int GL_RENDERBUFFER_WIDTH_OES = 36162; // 0x8d42
+ field public static final int GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES = 36200; // 0x8d68
field public static final int GL_RGB565_OES = 36194; // 0x8d62
field public static final int GL_RGB5_A1_OES = 32855; // 0x8057
field public static final int GL_RGB8_OES = 32849; // 0x8051
field public static final int GL_RGBA4_OES = 32854; // 0x8056
field public static final int GL_RGBA8_OES = 32856; // 0x8058
+ field public static final int GL_SAMPLER_EXTERNAL_OES = 36198; // 0x8d66
field public static final int GL_STENCIL_ATTACHMENT_OES = 36128; // 0x8d20
field public static final int GL_STENCIL_INDEX1_OES = 36166; // 0x8d46
field public static final int GL_STENCIL_INDEX4_OES = 36167; // 0x8d47
field public static final int GL_STENCIL_INDEX8_OES = 36168; // 0x8d48
field public static final int GL_TEXTURE_BINDING_CUBE_MAP_OES = 34068; // 0x8514
+ field public static final int GL_TEXTURE_BINDING_EXTERNAL_OES = 36199; // 0x8d67
field public static final int GL_TEXTURE_CROP_RECT_OES = 35741; // 0x8b9d
field public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES = 34070; // 0x8516
field public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES = 34072; // 0x8518
@@ -13612,6 +14459,7 @@
field public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES = 34069; // 0x8515
field public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES = 34071; // 0x8517
field public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES = 34073; // 0x8519
+ field public static final int GL_TEXTURE_EXTERNAL_OES = 36197; // 0x8d65
field public static final int GL_TEXTURE_GEN_MODE_OES = 9472; // 0x2500
field public static final int GL_TEXTURE_GEN_STR_OES = 36192; // 0x8d60
field public static final int GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES = 35215; // 0x898f
@@ -14369,6 +15217,8 @@
field public static final int HONEYCOMB_MR1 = 12; // 0xc
field public static final int HONEYCOMB_MR2 = 13; // 0xd
field public static final int ICE_CREAM_SANDWICH = 14; // 0xe
+ field public static final int ICE_CREAM_SANDWICH_MR1 = 15; // 0xf
+ field public static final int JELLY_BEAN = 16; // 0x10
}
public final class Bundle implements java.lang.Cloneable android.os.Parcelable {
@@ -14463,6 +15313,18 @@
field public static final android.os.Bundle EMPTY;
}
+ public final class CancellationSignal {
+ ctor public CancellationSignal();
+ method public void cancel();
+ method public boolean isCanceled();
+ method public void setOnCancelListener(android.os.CancellationSignal.OnCancelListener);
+ method public void throwIfCanceled();
+ }
+
+ public static abstract interface CancellationSignal.OnCancelListener {
+ method public abstract void onCancel();
+ }
+
public class ConditionVariable {
ctor public ConditionVariable();
ctor public ConditionVariable(boolean);
@@ -14734,6 +15596,7 @@
field public static final int FLAG_ONEWAY = 1; // 0x1
field public static final int INTERFACE_TRANSACTION = 1598968902; // 0x5f4e5446
field public static final int LAST_CALL_TRANSACTION = 16777215; // 0xffffff
+ field public static final int LIKE_TRANSACTION = 1598835019; // 0x5f4c494b
field public static final int PING_TRANSACTION = 1599098439; // 0x5f504e47
field public static final int TWEET_TRANSACTION = 1599362900; // 0x5f545754
}
@@ -14748,7 +15611,7 @@
public class Looper {
method public void dump(android.util.Printer, java.lang.String);
- method public static synchronized android.os.Looper getMainLooper();
+ method public static android.os.Looper getMainLooper();
method public java.lang.Thread getThread();
method public static void loop();
method public static android.os.Looper myLooper();
@@ -14826,6 +15689,11 @@
ctor public NetworkOnMainThreadException();
}
+ public class OperationCanceledException extends java.lang.RuntimeException {
+ ctor public OperationCanceledException();
+ ctor public OperationCanceledException(java.lang.String);
+ }
+
public final class Parcel {
method public final void appendFrom(android.os.Parcel, int, int);
method public final android.os.IBinder[] createBinderArray();
@@ -14930,7 +15798,7 @@
field public static final android.os.Parcelable.Creator STRING_CREATOR;
}
- public class ParcelFileDescriptor implements android.os.Parcelable {
+ public class ParcelFileDescriptor implements java.io.Closeable android.os.Parcelable {
ctor public ParcelFileDescriptor(android.os.ParcelFileDescriptor);
method public static android.os.ParcelFileDescriptor adoptFd(int);
method public void close() throws java.io.IOException;
@@ -15049,7 +15917,7 @@
method public static final deprecated boolean supportsProcesses();
field public static final int BLUETOOTH_GID = 2000; // 0x7d0
field public static final int FIRST_APPLICATION_UID = 10000; // 0x2710
- field public static final int LAST_APPLICATION_UID = 19999; // 0x1869f
+ field public static final int LAST_APPLICATION_UID = 19999; // 0x4e1f
field public static final int PHONE_UID = 1001; // 0x3e9
field public static final int SIGNAL_KILL = 9; // 0x9
field public static final int SIGNAL_QUIT = 3; // 0x3
@@ -15095,6 +15963,7 @@
public class RemoteException extends android.util.AndroidException {
ctor public RemoteException();
+ ctor public RemoteException(java.lang.String);
}
public class ResultReceiver implements android.os.Parcelable {
@@ -15163,6 +16032,7 @@
method public android.os.StrictMode.VmPolicy.Builder detectActivityLeaks();
method public android.os.StrictMode.VmPolicy.Builder detectAll();
method public android.os.StrictMode.VmPolicy.Builder detectLeakedClosableObjects();
+ method public android.os.StrictMode.VmPolicy.Builder detectLeakedRegistrationObjects();
method public android.os.StrictMode.VmPolicy.Builder detectLeakedSqlLiteObjects();
method public android.os.StrictMode.VmPolicy.Builder penaltyDeath();
method public android.os.StrictMode.VmPolicy.Builder penaltyDropBox();
@@ -15184,11 +16054,16 @@
method public abstract void acquired();
method public void cleanup(android.os.IBinder, boolean);
method public void dump();
+ method public void dump(java.io.PrintWriter);
method public boolean isAcquired();
method public void release(android.os.IBinder);
method public abstract void released();
}
+ public class TransactionTooLargeException extends android.os.RemoteException {
+ ctor public TransactionTooLargeException();
+ }
+
public abstract class Vibrator {
method public abstract void cancel();
method public abstract boolean hasVibrator();
@@ -15672,9 +16547,11 @@
public final class CalendarContract {
field public static final java.lang.String ACCOUNT_TYPE_LOCAL = "LOCAL";
field public static final java.lang.String ACTION_EVENT_REMINDER = "android.intent.action.EVENT_REMINDER";
+ field public static final java.lang.String ACTION_HANDLE_CUSTOM_EVENT = "android.provider.calendar.action.HANDLE_CUSTOM_EVENT";
field public static final java.lang.String AUTHORITY = "com.android.calendar";
field public static final java.lang.String CALLER_IS_SYNCADAPTER = "caller_is_syncadapter";
field public static final android.net.Uri CONTENT_URI;
+ field public static final java.lang.String EXTRA_CUSTOM_APP_URI = "customAppUri";
field public static final java.lang.String EXTRA_EVENT_ALL_DAY = "allDay";
field public static final java.lang.String EXTRA_EVENT_BEGIN_TIME = "beginTime";
field public static final java.lang.String EXTRA_EVENT_END_TIME = "endTime";
@@ -15687,6 +16564,8 @@
protected static abstract interface CalendarContract.AttendeesColumns {
field public static final java.lang.String ATTENDEE_EMAIL = "attendeeEmail";
+ field public static final java.lang.String ATTENDEE_IDENTITY = "attendeeIdentity";
+ field public static final java.lang.String ATTENDEE_ID_NAMESPACE = "attendeeIdNamespace";
field public static final java.lang.String ATTENDEE_NAME = "attendeeName";
field public static final java.lang.String ATTENDEE_RELATIONSHIP = "attendeeRelationship";
field public static final java.lang.String ATTENDEE_STATUS = "attendeeStatus";
@@ -15705,6 +16584,7 @@
field public static final int TYPE_NONE = 0; // 0x0
field public static final int TYPE_OPTIONAL = 2; // 0x2
field public static final int TYPE_REQUIRED = 1; // 0x1
+ field public static final int TYPE_RESOURCE = 3; // 0x3
}
public static final class CalendarContract.CalendarAlerts implements android.provider.BaseColumns android.provider.CalendarContract.CalendarAlertsColumns android.provider.CalendarContract.CalendarColumns android.provider.CalendarContract.EventsColumns {
@@ -15743,9 +16623,12 @@
}
protected static abstract interface CalendarContract.CalendarColumns {
+ field public static final java.lang.String ALLOWED_ATTENDEE_TYPES = "allowedAttendeeTypes";
+ field public static final java.lang.String ALLOWED_AVAILABILITY = "allowedAvailability";
field public static final java.lang.String ALLOWED_REMINDERS = "allowedReminders";
field public static final java.lang.String CALENDAR_ACCESS_LEVEL = "calendar_access_level";
field public static final java.lang.String CALENDAR_COLOR = "calendar_color";
+ field public static final java.lang.String CALENDAR_COLOR_KEY = "calendar_color_index";
field public static final java.lang.String CALENDAR_DISPLAY_NAME = "calendar_displayName";
field public static final java.lang.String CALENDAR_TIME_ZONE = "calendar_timezone";
field public static final int CAL_ACCESS_CONTRIBUTOR = 500; // 0x1f4
@@ -15790,6 +16673,18 @@
field public static final java.lang.String NAME = "name";
}
+ public static final class CalendarContract.Colors implements android.provider.CalendarContract.ColorsColumns {
+ field public static final android.net.Uri CONTENT_URI;
+ }
+
+ protected static abstract interface CalendarContract.ColorsColumns implements android.provider.SyncStateContract.Columns {
+ field public static final java.lang.String COLOR = "color";
+ field public static final java.lang.String COLOR_KEY = "color_index";
+ field public static final java.lang.String COLOR_TYPE = "color_type";
+ field public static final int TYPE_CALENDAR = 0; // 0x0
+ field public static final int TYPE_EVENT = 1; // 0x1
+ }
+
public static final class CalendarContract.EventDays implements android.provider.CalendarContract.EventDaysColumns {
method public static final android.database.Cursor query(android.content.ContentResolver, int, int, java.lang.String[]);
field public static final android.net.Uri CONTENT_URI;
@@ -15815,13 +16710,18 @@
field public static final java.lang.String AVAILABILITY = "availability";
field public static final int AVAILABILITY_BUSY = 0; // 0x0
field public static final int AVAILABILITY_FREE = 1; // 0x1
+ field public static final int AVAILABILITY_TENTATIVE = 2; // 0x2
field public static final java.lang.String CALENDAR_ID = "calendar_id";
field public static final java.lang.String CAN_INVITE_OTHERS = "canInviteOthers";
+ field public static final java.lang.String CUSTOM_APP_PACKAGE = "customAppPackage";
+ field public static final java.lang.String CUSTOM_APP_URI = "customAppUri";
field public static final java.lang.String DESCRIPTION = "description";
+ field public static final java.lang.String DISPLAY_COLOR = "displayColor";
field public static final java.lang.String DTEND = "dtend";
field public static final java.lang.String DTSTART = "dtstart";
field public static final java.lang.String DURATION = "duration";
field public static final java.lang.String EVENT_COLOR = "eventColor";
+ field public static final java.lang.String EVENT_COLOR_KEY = "eventColor_index";
field public static final java.lang.String EVENT_END_TIMEZONE = "eventEndTimezone";
field public static final java.lang.String EVENT_LOCATION = "eventLocation";
field public static final java.lang.String EVENT_TIMEZONE = "eventTimezone";
@@ -15900,6 +16800,7 @@
protected static abstract interface CalendarContract.RemindersColumns {
field public static final java.lang.String EVENT_ID = "event_id";
field public static final java.lang.String METHOD = "method";
+ field public static final int METHOD_ALARM = 4; // 0x4
field public static final int METHOD_ALERT = 1; // 0x1
field public static final int METHOD_DEFAULT = 0; // 0x0
field public static final int METHOD_EMAIL = 2; // 0x2
@@ -16385,6 +17286,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 java.lang.String NORMALIZED_NUMBER = "data4";
field public static final java.lang.String NUMBER = "data1";
field public static final int TYPE_ASSISTANT = 19; // 0x13
field public static final int TYPE_CALLBACK = 8; // 0x8
@@ -16521,7 +17423,7 @@
method public static android.net.Uri getLookupUri(android.content.ContentResolver, android.net.Uri);
method public static android.net.Uri getLookupUri(long, java.lang.String);
method public static android.net.Uri lookupContact(android.content.ContentResolver, android.net.Uri);
- method public static void markAsContacted(android.content.ContentResolver, long);
+ method public static deprecated void markAsContacted(android.content.ContentResolver, long);
method public static java.io.InputStream openContactPhotoInputStream(android.content.ContentResolver, android.net.Uri, boolean);
method public static java.io.InputStream openContactPhotoInputStream(android.content.ContentResolver, android.net.Uri);
field public static final android.net.Uri CONTENT_FILTER_URI;
@@ -16557,6 +17459,10 @@
field public static final java.lang.String PHOTO_FILE_ID = "data14";
}
+ public static final class ContactsContract.Contacts.StreamItems implements android.provider.ContactsContract.StreamItemsColumns {
+ field public static final java.lang.String CONTENT_DIRECTORY = "stream_items";
+ }
+
protected static abstract interface ContactsContract.ContactsColumns {
field public static final java.lang.String DISPLAY_NAME = "display_name";
field public static final java.lang.String HAS_PHONE_NUMBER = "has_phone_number";
@@ -16608,6 +17514,7 @@
public static final class ContactsContract.DataUsageFeedback {
ctor public ContactsContract.DataUsageFeedback();
+ field public static final android.net.Uri DELETE_USAGE_URI;
field public static final android.net.Uri FEEDBACK_URI;
field public static final java.lang.String USAGE_TYPE = "type";
field public static final java.lang.String USAGE_TYPE_CALL = "call";
@@ -16741,6 +17648,7 @@
protected static abstract interface ContactsContract.PhoneLookupColumns {
field public static final java.lang.String LABEL = "label";
+ field public static final java.lang.String NORMALIZED_NUMBER = "normalized_number";
field public static final java.lang.String NUMBER = "number";
field public static final java.lang.String TYPE = "type";
}
@@ -16814,6 +17722,10 @@
field public static final java.lang.String DATA_ID = "data_id";
}
+ public static final class ContactsContract.RawContacts.StreamItems implements android.provider.BaseColumns android.provider.ContactsContract.StreamItemsColumns {
+ field public static final java.lang.String CONTENT_DIRECTORY = "stream_items";
+ }
+
protected static abstract interface ContactsContract.RawContactsColumns {
field public static final java.lang.String AGGREGATION_MODE = "aggregation_mode";
field public static final java.lang.String CONTACT_ID = "contact_id";
@@ -16877,6 +17789,56 @@
field public static final android.net.Uri PROFILE_CONTENT_URI;
}
+ public static final class ContactsContract.StreamItemPhotos implements android.provider.BaseColumns android.provider.ContactsContract.StreamItemPhotosColumns {
+ field public static final java.lang.String PHOTO = "photo";
+ }
+
+ protected static abstract interface ContactsContract.StreamItemPhotosColumns {
+ field public static final java.lang.String PHOTO_FILE_ID = "photo_file_id";
+ field public static final java.lang.String PHOTO_URI = "photo_uri";
+ field public static final java.lang.String SORT_INDEX = "sort_index";
+ field public static final java.lang.String STREAM_ITEM_ID = "stream_item_id";
+ field public static final java.lang.String SYNC1 = "stream_item_photo_sync1";
+ field public static final java.lang.String SYNC2 = "stream_item_photo_sync2";
+ field public static final java.lang.String SYNC3 = "stream_item_photo_sync3";
+ field public static final java.lang.String SYNC4 = "stream_item_photo_sync4";
+ }
+
+ public static final class ContactsContract.StreamItems implements android.provider.BaseColumns android.provider.ContactsContract.StreamItemsColumns {
+ field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/stream_item";
+ field public static final android.net.Uri CONTENT_LIMIT_URI;
+ field public static final android.net.Uri CONTENT_PHOTO_URI;
+ field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/stream_item";
+ field public static final android.net.Uri CONTENT_URI;
+ field public static final java.lang.String MAX_ITEMS = "max_items";
+ }
+
+ public static final class ContactsContract.StreamItems.StreamItemPhotos implements android.provider.BaseColumns android.provider.ContactsContract.StreamItemPhotosColumns {
+ field public static final java.lang.String CONTENT_DIRECTORY = "photo";
+ field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/stream_item_photo";
+ field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/stream_item_photo";
+ }
+
+ protected static abstract interface ContactsContract.StreamItemsColumns {
+ field public static final java.lang.String ACCOUNT_NAME = "account_name";
+ field public static final java.lang.String ACCOUNT_TYPE = "account_type";
+ field public static final java.lang.String COMMENTS = "comments";
+ field public static final java.lang.String CONTACT_ID = "contact_id";
+ field public static final java.lang.String CONTACT_LOOKUP_KEY = "contact_lookup";
+ field public static final java.lang.String DATA_SET = "data_set";
+ field public static final java.lang.String RAW_CONTACT_ID = "raw_contact_id";
+ field public static final java.lang.String RAW_CONTACT_SOURCE_ID = "raw_contact_source_id";
+ field public static final java.lang.String RES_ICON = "icon";
+ field public static final java.lang.String RES_LABEL = "label";
+ field public static final java.lang.String RES_PACKAGE = "res_package";
+ field public static final java.lang.String SYNC1 = "stream_item_sync1";
+ field public static final java.lang.String SYNC2 = "stream_item_sync2";
+ field public static final java.lang.String SYNC3 = "stream_item_sync3";
+ field public static final java.lang.String SYNC4 = "stream_item_sync4";
+ field public static final java.lang.String TEXT = "text";
+ field public static final java.lang.String TIMESTAMP = "timestamp";
+ }
+
protected static abstract interface ContactsContract.SyncColumns implements android.provider.ContactsContract.BaseSyncColumns {
field public static final java.lang.String ACCOUNT_NAME = "account_name";
field public static final java.lang.String ACCOUNT_TYPE = "account_type";
@@ -16931,7 +17893,7 @@
field public static final java.lang.String EXTRA_VIDEO_QUALITY = "android.intent.extra.videoQuality";
field public static final java.lang.String INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH = "android.media.action.MEDIA_PLAY_FROM_SEARCH";
field public static final java.lang.String INTENT_ACTION_MEDIA_SEARCH = "android.intent.action.MEDIA_SEARCH";
- field public static final java.lang.String INTENT_ACTION_MUSIC_PLAYER = "android.intent.action.MUSIC_PLAYER";
+ field public static final deprecated java.lang.String INTENT_ACTION_MUSIC_PLAYER = "android.intent.action.MUSIC_PLAYER";
field public static final java.lang.String INTENT_ACTION_STILL_IMAGE_CAMERA = "android.media.action.STILL_IMAGE_CAMERA";
field public static final java.lang.String INTENT_ACTION_VIDEO_CAMERA = "android.media.action.VIDEO_CAMERA";
field public static final java.lang.String MEDIA_IGNORE_FILENAME = ".nomedia";
@@ -17152,9 +18114,11 @@
field public static final java.lang.String DATE_ADDED = "date_added";
field public static final java.lang.String DATE_MODIFIED = "date_modified";
field public static final java.lang.String DISPLAY_NAME = "_display_name";
+ field public static final java.lang.String HEIGHT = "height";
field public static final java.lang.String MIME_TYPE = "mime_type";
field public static final java.lang.String SIZE = "_size";
field public static final java.lang.String TITLE = "title";
+ field public static final java.lang.String WIDTH = "width";
}
public static final class MediaStore.Video {
@@ -17253,6 +18217,7 @@
field public static final java.lang.String ACTION_MEMORY_CARD_SETTINGS = "android.settings.MEMORY_CARD_SETTINGS";
field public static final java.lang.String ACTION_NETWORK_OPERATOR_SETTINGS = "android.settings.NETWORK_OPERATOR_SETTINGS";
field public static final java.lang.String ACTION_NFCSHARING_SETTINGS = "android.settings.NFCSHARING_SETTINGS";
+ field public static final java.lang.String ACTION_NFC_SETTINGS = "android.settings.NFC_SETTINGS";
field public static final java.lang.String ACTION_PRIVACY_SETTINGS = "android.settings.PRIVACY_SETTINGS";
field public static final java.lang.String ACTION_QUICK_LAUNCH_SETTINGS = "android.settings.QUICK_LAUNCH_SETTINGS";
field public static final java.lang.String ACTION_SEARCH_SETTINGS = "android.search.action.SEARCH_SETTINGS";
@@ -17294,6 +18259,7 @@
method public static boolean putString(android.content.ContentResolver, java.lang.String, java.lang.String);
method public static final void setLocationProviderEnabled(android.content.ContentResolver, java.lang.String, boolean);
field public static final java.lang.String ACCESSIBILITY_ENABLED = "accessibility_enabled";
+ field public static final java.lang.String ACCESSIBILITY_SPEAK_PASSWORD = "speak_password";
field public static final java.lang.String ADB_ENABLED = "adb_enabled";
field public static final java.lang.String ALLOWED_GEOLOCATION_ORIGINS = "allowed_geolocation_origins";
field public static final java.lang.String ALLOW_MOCK_LOCATION = "mock_location";
@@ -17303,6 +18269,7 @@
field public static final android.net.Uri CONTENT_URI;
field public static final java.lang.String DATA_ROAMING = "data_roaming";
field public static final java.lang.String DEFAULT_INPUT_METHOD = "default_input_method";
+ field public static final java.lang.String DEVELOPMENT_SETTINGS_ENABLED = "development_settings_enabled";
field public static final java.lang.String DEVICE_PROVISIONED = "device_provisioned";
field public static final java.lang.String ENABLED_ACCESSIBILITY_SERVICES = "enabled_accessibility_services";
field public static final java.lang.String ENABLED_INPUT_METHODS = "enabled_input_methods";
@@ -17381,6 +18348,7 @@
field public static final java.lang.String ALARM_ALERT = "alarm_alert";
field public static final java.lang.String ALWAYS_FINISH_ACTIVITIES = "always_finish_activities";
field public static final deprecated java.lang.String ANDROID_ID = "android_id";
+ field public static final java.lang.String ANIMATOR_DURATION_SCALE = "animator_duration_scale";
field public static final java.lang.String APPEND_FOR_LAST_AUDIBLE = "_last_audible";
field public static final java.lang.String AUTO_TIME = "auto_time";
field public static final java.lang.String AUTO_TIME_ZONE = "auto_time_zone";
@@ -17518,7 +18486,8 @@
public static class UserDictionary.Words implements android.provider.BaseColumns {
ctor public UserDictionary.Words();
- method public static void addWord(android.content.Context, java.lang.String, int, int);
+ method public static deprecated void addWord(android.content.Context, java.lang.String, int, int);
+ method public static void addWord(android.content.Context, java.lang.String, int, java.lang.String, java.util.Locale);
field public static final java.lang.String APP_ID = "appid";
field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.google.userword";
field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.google.userword";
@@ -17526,8 +18495,9 @@
field public static final java.lang.String DEFAULT_SORT_ORDER = "frequency DESC";
field public static final java.lang.String FREQUENCY = "frequency";
field public static final java.lang.String LOCALE = "locale";
- field public static final int LOCALE_TYPE_ALL = 0; // 0x0
- field public static final int LOCALE_TYPE_CURRENT = 1; // 0x1
+ field public static final deprecated int LOCALE_TYPE_ALL = 0; // 0x0
+ field public static final deprecated int LOCALE_TYPE_CURRENT = 1; // 0x1
+ field public static final java.lang.String SHORTCUT = "shortcut";
field public static final java.lang.String WORD = "word";
field public static final java.lang.String _ID = "_id";
}
@@ -17626,15 +18596,24 @@
method public static android.renderscript.Allocation createTyped(android.renderscript.RenderScript, android.renderscript.Type, int);
method public static android.renderscript.Allocation createTyped(android.renderscript.RenderScript, android.renderscript.Type);
method public void generateMipmaps();
+ method public int getBytesSize();
+ method public android.renderscript.Element getElement();
+ method public android.view.Surface getSurface();
method public android.renderscript.Type getType();
+ method public int getUsage();
+ method public void ioReceive();
+ method public void ioSend();
method public synchronized void resize(int);
method public void setFromFieldPacker(int, android.renderscript.FieldPacker);
method public void setFromFieldPacker(int, int, android.renderscript.FieldPacker);
+ method public void setSurface(android.view.Surface);
method public void syncAll(int);
field public static final int USAGE_GRAPHICS_CONSTANTS = 8; // 0x8
field public static final int USAGE_GRAPHICS_RENDER_TARGET = 16; // 0x10
field public static final int USAGE_GRAPHICS_TEXTURE = 2; // 0x2
field public static final int USAGE_GRAPHICS_VERTEX = 4; // 0x4
+ field public static final int USAGE_IO_INPUT = 32; // 0x20
+ field public static final int USAGE_IO_OUTPUT = 64; // 0x40
field public static final int USAGE_SCRIPT = 1; // 0x1
}
@@ -17722,6 +18701,7 @@
method public static android.renderscript.Element F64_2(android.renderscript.RenderScript);
method public static android.renderscript.Element F64_3(android.renderscript.RenderScript);
method public static android.renderscript.Element F64_4(android.renderscript.RenderScript);
+ method public static android.renderscript.Element FONT(android.renderscript.RenderScript);
method public static android.renderscript.Element I16(android.renderscript.RenderScript);
method public static android.renderscript.Element I16_2(android.renderscript.RenderScript);
method public static android.renderscript.Element I16_3(android.renderscript.RenderScript);
@@ -17738,7 +18718,7 @@
method public static android.renderscript.Element I8_2(android.renderscript.RenderScript);
method public static android.renderscript.Element I8_3(android.renderscript.RenderScript);
method public static android.renderscript.Element I8_4(android.renderscript.RenderScript);
- method public static android.renderscript.Element MATRIX4X4(android.renderscript.RenderScript);
+ method public static deprecated android.renderscript.Element MATRIX4X4(android.renderscript.RenderScript);
method public static android.renderscript.Element MATRIX_2X2(android.renderscript.RenderScript);
method public static android.renderscript.Element MATRIX_3X3(android.renderscript.RenderScript);
method public static android.renderscript.Element MATRIX_4X4(android.renderscript.RenderScript);
@@ -17773,6 +18753,15 @@
method public static android.renderscript.Element U8_4(android.renderscript.RenderScript);
method public static android.renderscript.Element createPixel(android.renderscript.RenderScript, android.renderscript.Element.DataType, android.renderscript.Element.DataKind);
method public static android.renderscript.Element createVector(android.renderscript.RenderScript, android.renderscript.Element.DataType, int);
+ method public int getBytesSize();
+ method public android.renderscript.Element.DataKind getDataKind();
+ method public android.renderscript.Element.DataType getDataType();
+ method public android.renderscript.Element getSubElement(int);
+ method public int getSubElementArraySize(int);
+ method public int getSubElementCount();
+ method public java.lang.String getSubElementName(int);
+ method public int getSubElementOffsetBytes(int);
+ method public int getVectorSize();
method public boolean isCompatible(android.renderscript.Element);
method public boolean isComplex();
}
@@ -17805,8 +18794,10 @@
enum_constant public static final android.renderscript.Element.DataType MATRIX_2X2;
enum_constant public static final android.renderscript.Element.DataType MATRIX_3X3;
enum_constant public static final android.renderscript.Element.DataType MATRIX_4X4;
+ enum_constant public static final android.renderscript.Element.DataType NONE;
enum_constant public static final android.renderscript.Element.DataType RS_ALLOCATION;
enum_constant public static final android.renderscript.Element.DataType RS_ELEMENT;
+ enum_constant public static final android.renderscript.Element.DataType RS_FONT;
enum_constant public static final android.renderscript.Element.DataType RS_MESH;
enum_constant public static final android.renderscript.Element.DataType RS_PROGRAM_FRAGMENT;
enum_constant public static final android.renderscript.Element.DataType RS_PROGRAM_RASTER;
@@ -17882,27 +18873,27 @@
method public void skip(int);
}
- public class FileA3D extends android.renderscript.BaseObj {
- method public static android.renderscript.FileA3D createFromAsset(android.renderscript.RenderScript, android.content.res.AssetManager, java.lang.String);
- method public static android.renderscript.FileA3D createFromFile(android.renderscript.RenderScript, java.lang.String);
- method public static android.renderscript.FileA3D createFromFile(android.renderscript.RenderScript, java.io.File);
- method public static android.renderscript.FileA3D createFromResource(android.renderscript.RenderScript, android.content.res.Resources, int);
- method public android.renderscript.FileA3D.IndexEntry getIndexEntry(int);
- method public int getIndexEntryCount();
+ public deprecated class FileA3D extends android.renderscript.BaseObj {
+ method public static deprecated android.renderscript.FileA3D createFromAsset(android.renderscript.RenderScript, android.content.res.AssetManager, java.lang.String);
+ method public static deprecated android.renderscript.FileA3D createFromFile(android.renderscript.RenderScript, java.lang.String);
+ method public static deprecated android.renderscript.FileA3D createFromFile(android.renderscript.RenderScript, java.io.File);
+ method public static deprecated android.renderscript.FileA3D createFromResource(android.renderscript.RenderScript, android.content.res.Resources, int);
+ method public deprecated android.renderscript.FileA3D.IndexEntry getIndexEntry(int);
+ method public deprecated int getIndexEntryCount();
}
- public static final class FileA3D.EntryType extends java.lang.Enum {
+ public static final deprecated class FileA3D.EntryType extends java.lang.Enum {
method public static android.renderscript.FileA3D.EntryType valueOf(java.lang.String);
method public static final android.renderscript.FileA3D.EntryType[] values();
- enum_constant public static final android.renderscript.FileA3D.EntryType MESH;
- enum_constant public static final android.renderscript.FileA3D.EntryType UNKNOWN;
+ enum_constant public static final deprecated android.renderscript.FileA3D.EntryType MESH;
+ enum_constant public static final deprecated android.renderscript.FileA3D.EntryType UNKNOWN;
}
- public static class FileA3D.IndexEntry {
- method public android.renderscript.FileA3D.EntryType getEntryType();
- method public android.renderscript.Mesh getMesh();
- method public java.lang.String getName();
- method public android.renderscript.BaseObj getObject();
+ public static deprecated class FileA3D.IndexEntry {
+ method public deprecated android.renderscript.FileA3D.EntryType getEntryType();
+ method public deprecated android.renderscript.Mesh getMesh();
+ method public deprecated java.lang.String getName();
+ method public deprecated android.renderscript.BaseObj getObject();
}
public class Float2 {
@@ -17929,21 +18920,21 @@
field public float z;
}
- public class Font extends android.renderscript.BaseObj {
- method public static android.renderscript.Font create(android.renderscript.RenderScript, android.content.res.Resources, java.lang.String, android.renderscript.Font.Style, float);
- method public static android.renderscript.Font createFromAsset(android.renderscript.RenderScript, android.content.res.Resources, java.lang.String, float);
- method public static android.renderscript.Font createFromFile(android.renderscript.RenderScript, android.content.res.Resources, java.lang.String, float);
- method public static android.renderscript.Font createFromFile(android.renderscript.RenderScript, android.content.res.Resources, java.io.File, float);
- method public static android.renderscript.Font createFromResource(android.renderscript.RenderScript, android.content.res.Resources, int, float);
+ public deprecated class Font extends android.renderscript.BaseObj {
+ method public static deprecated android.renderscript.Font create(android.renderscript.RenderScript, android.content.res.Resources, java.lang.String, android.renderscript.Font.Style, float);
+ method public static deprecated android.renderscript.Font createFromAsset(android.renderscript.RenderScript, android.content.res.Resources, java.lang.String, float);
+ method public static deprecated android.renderscript.Font createFromFile(android.renderscript.RenderScript, android.content.res.Resources, java.lang.String, float);
+ method public static deprecated android.renderscript.Font createFromFile(android.renderscript.RenderScript, android.content.res.Resources, java.io.File, float);
+ method public static deprecated android.renderscript.Font createFromResource(android.renderscript.RenderScript, android.content.res.Resources, int, float);
}
- public static final class Font.Style extends java.lang.Enum {
+ public static final deprecated class Font.Style extends java.lang.Enum {
method public static android.renderscript.Font.Style valueOf(java.lang.String);
method public static final android.renderscript.Font.Style[] values();
- enum_constant public static final android.renderscript.Font.Style BOLD;
- enum_constant public static final android.renderscript.Font.Style BOLD_ITALIC;
- enum_constant public static final android.renderscript.Font.Style ITALIC;
- enum_constant public static final android.renderscript.Font.Style NORMAL;
+ enum_constant public static final deprecated android.renderscript.Font.Style BOLD;
+ enum_constant public static final deprecated android.renderscript.Font.Style BOLD_ITALIC;
+ enum_constant public static final deprecated android.renderscript.Font.Style ITALIC;
+ enum_constant public static final deprecated android.renderscript.Font.Style NORMAL;
}
public class Int2 {
@@ -18060,71 +19051,77 @@
method public void transpose();
}
- public class Mesh extends android.renderscript.BaseObj {
- method public android.renderscript.Allocation getIndexSetAllocation(int);
- method public android.renderscript.Mesh.Primitive getPrimitive(int);
- method public int getPrimitiveCount();
- method public android.renderscript.Allocation getVertexAllocation(int);
- method public int getVertexAllocationCount();
+ public deprecated class Mesh extends android.renderscript.BaseObj {
+ method public deprecated android.renderscript.Allocation getIndexSetAllocation(int);
+ method public deprecated android.renderscript.Mesh.Primitive getPrimitive(int);
+ method public deprecated int getPrimitiveCount();
+ method public deprecated android.renderscript.Allocation getVertexAllocation(int);
+ method public deprecated int getVertexAllocationCount();
}
- public static class Mesh.AllocationBuilder {
- ctor public Mesh.AllocationBuilder(android.renderscript.RenderScript);
- method public android.renderscript.Mesh.AllocationBuilder addIndexSetAllocation(android.renderscript.Allocation, android.renderscript.Mesh.Primitive);
- method public android.renderscript.Mesh.AllocationBuilder addIndexSetType(android.renderscript.Mesh.Primitive);
- method public android.renderscript.Mesh.AllocationBuilder addVertexAllocation(android.renderscript.Allocation) throws java.lang.IllegalStateException;
- method public android.renderscript.Mesh create();
- method public int getCurrentIndexSetIndex();
- method public int getCurrentVertexTypeIndex();
+ public static deprecated class Mesh.AllocationBuilder {
+ ctor public deprecated Mesh.AllocationBuilder(android.renderscript.RenderScript);
+ method public deprecated android.renderscript.Mesh.AllocationBuilder addIndexSetAllocation(android.renderscript.Allocation, android.renderscript.Mesh.Primitive);
+ method public deprecated android.renderscript.Mesh.AllocationBuilder addIndexSetType(android.renderscript.Mesh.Primitive);
+ method public deprecated android.renderscript.Mesh.AllocationBuilder addVertexAllocation(android.renderscript.Allocation) throws java.lang.IllegalStateException;
+ method public deprecated android.renderscript.Mesh create();
+ method public deprecated int getCurrentIndexSetIndex();
+ method public deprecated int getCurrentVertexTypeIndex();
}
- public static class Mesh.Builder {
- ctor public Mesh.Builder(android.renderscript.RenderScript, int);
- method public android.renderscript.Mesh.Builder addIndexSetType(android.renderscript.Type, android.renderscript.Mesh.Primitive);
- method public android.renderscript.Mesh.Builder addIndexSetType(android.renderscript.Mesh.Primitive);
- method public android.renderscript.Mesh.Builder addIndexSetType(android.renderscript.Element, int, android.renderscript.Mesh.Primitive);
- method public android.renderscript.Mesh.Builder addVertexType(android.renderscript.Type) throws java.lang.IllegalStateException;
- method public android.renderscript.Mesh.Builder addVertexType(android.renderscript.Element, int) throws java.lang.IllegalStateException;
- method public android.renderscript.Mesh create();
- method public int getCurrentIndexSetIndex();
- method public int getCurrentVertexTypeIndex();
+ public static deprecated class Mesh.Builder {
+ ctor public deprecated Mesh.Builder(android.renderscript.RenderScript, int);
+ method public deprecated android.renderscript.Mesh.Builder addIndexSetType(android.renderscript.Type, android.renderscript.Mesh.Primitive);
+ method public deprecated android.renderscript.Mesh.Builder addIndexSetType(android.renderscript.Mesh.Primitive);
+ method public deprecated android.renderscript.Mesh.Builder addIndexSetType(android.renderscript.Element, int, android.renderscript.Mesh.Primitive);
+ method public deprecated android.renderscript.Mesh.Builder addVertexType(android.renderscript.Type) throws java.lang.IllegalStateException;
+ method public deprecated android.renderscript.Mesh.Builder addVertexType(android.renderscript.Element, int) throws java.lang.IllegalStateException;
+ method public deprecated android.renderscript.Mesh create();
+ method public deprecated int getCurrentIndexSetIndex();
+ method public deprecated int getCurrentVertexTypeIndex();
}
- public static final class Mesh.Primitive extends java.lang.Enum {
+ public static final deprecated class Mesh.Primitive extends java.lang.Enum {
method public static android.renderscript.Mesh.Primitive valueOf(java.lang.String);
method public static final android.renderscript.Mesh.Primitive[] values();
- enum_constant public static final android.renderscript.Mesh.Primitive LINE;
- enum_constant public static final android.renderscript.Mesh.Primitive LINE_STRIP;
- enum_constant public static final android.renderscript.Mesh.Primitive POINT;
- enum_constant public static final android.renderscript.Mesh.Primitive TRIANGLE;
- enum_constant public static final android.renderscript.Mesh.Primitive TRIANGLE_FAN;
- enum_constant public static final android.renderscript.Mesh.Primitive TRIANGLE_STRIP;
+ enum_constant public static final deprecated android.renderscript.Mesh.Primitive LINE;
+ enum_constant public static final deprecated android.renderscript.Mesh.Primitive LINE_STRIP;
+ enum_constant public static final deprecated android.renderscript.Mesh.Primitive POINT;
+ enum_constant public static final deprecated android.renderscript.Mesh.Primitive TRIANGLE;
+ enum_constant public static final deprecated android.renderscript.Mesh.Primitive TRIANGLE_FAN;
+ enum_constant public static final deprecated android.renderscript.Mesh.Primitive TRIANGLE_STRIP;
}
- public static class Mesh.TriangleMeshBuilder {
- ctor public Mesh.TriangleMeshBuilder(android.renderscript.RenderScript, int, int);
- method public android.renderscript.Mesh.TriangleMeshBuilder addTriangle(int, int, int);
- method public android.renderscript.Mesh.TriangleMeshBuilder addVertex(float, float);
- method public android.renderscript.Mesh.TriangleMeshBuilder addVertex(float, float, float);
- method public android.renderscript.Mesh create(boolean);
- method public android.renderscript.Mesh.TriangleMeshBuilder setColor(float, float, float, float);
- method public android.renderscript.Mesh.TriangleMeshBuilder setNormal(float, float, float);
- method public android.renderscript.Mesh.TriangleMeshBuilder setTexture(float, float);
- field public static final int COLOR = 1; // 0x1
- field public static final int NORMAL = 2; // 0x2
- field public static final int TEXTURE_0 = 256; // 0x100
+ public static deprecated class Mesh.TriangleMeshBuilder {
+ ctor public deprecated Mesh.TriangleMeshBuilder(android.renderscript.RenderScript, int, int);
+ method public deprecated android.renderscript.Mesh.TriangleMeshBuilder addTriangle(int, int, int);
+ method public deprecated android.renderscript.Mesh.TriangleMeshBuilder addVertex(float, float);
+ method public deprecated android.renderscript.Mesh.TriangleMeshBuilder addVertex(float, float, float);
+ method public deprecated android.renderscript.Mesh create(boolean);
+ method public deprecated android.renderscript.Mesh.TriangleMeshBuilder setColor(float, float, float, float);
+ method public deprecated android.renderscript.Mesh.TriangleMeshBuilder setNormal(float, float, float);
+ method public deprecated android.renderscript.Mesh.TriangleMeshBuilder setTexture(float, float);
+ field public static final deprecated int COLOR = 1; // 0x1
+ field public static final deprecated int NORMAL = 2; // 0x2
+ field public static final deprecated int TEXTURE_0 = 256; // 0x100
}
public class Program extends android.renderscript.BaseObj {
method public void bindConstants(android.renderscript.Allocation, int);
method public void bindSampler(android.renderscript.Sampler, int) throws java.lang.IllegalArgumentException;
method public void bindTexture(android.renderscript.Allocation, int) throws java.lang.IllegalArgumentException;
+ method public android.renderscript.Type getConstant(int);
+ method public int getConstantCount();
+ method public int getTextureCount();
+ method public java.lang.String getTextureName(int);
+ method public android.renderscript.Program.TextureType getTextureType(int);
}
public static class Program.BaseProgramBuilder {
ctor protected Program.BaseProgramBuilder(android.renderscript.RenderScript);
method public android.renderscript.Program.BaseProgramBuilder addConstant(android.renderscript.Type) throws java.lang.IllegalStateException;
method public android.renderscript.Program.BaseProgramBuilder addTexture(android.renderscript.Program.TextureType) throws java.lang.IllegalArgumentException;
+ method public android.renderscript.Program.BaseProgramBuilder addTexture(android.renderscript.Program.TextureType, java.lang.String) throws java.lang.IllegalArgumentException;
method public int getCurrentConstantIndex();
method public int getCurrentTextureIndex();
method protected void initProgram(android.renderscript.Program);
@@ -18139,62 +19136,64 @@
enum_constant public static final android.renderscript.Program.TextureType TEXTURE_CUBE;
}
- public class ProgramFragment extends android.renderscript.Program {
+ public deprecated class ProgramFragment extends android.renderscript.Program {
}
- public static class ProgramFragment.Builder extends android.renderscript.Program.BaseProgramBuilder {
- ctor public ProgramFragment.Builder(android.renderscript.RenderScript);
- method public android.renderscript.ProgramFragment create();
+ public static deprecated class ProgramFragment.Builder extends android.renderscript.Program.BaseProgramBuilder {
+ ctor public deprecated ProgramFragment.Builder(android.renderscript.RenderScript);
+ method public deprecated android.renderscript.ProgramFragment create();
}
- public class ProgramFragmentFixedFunction extends android.renderscript.ProgramFragment {
+ public deprecated class ProgramFragmentFixedFunction extends android.renderscript.ProgramFragment {
}
- public static class ProgramFragmentFixedFunction.Builder {
- ctor public ProgramFragmentFixedFunction.Builder(android.renderscript.RenderScript);
- method public android.renderscript.ProgramFragmentFixedFunction create();
- method public android.renderscript.ProgramFragmentFixedFunction.Builder setPointSpriteTexCoordinateReplacement(boolean);
- method public android.renderscript.ProgramFragmentFixedFunction.Builder setTexture(android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode, android.renderscript.ProgramFragmentFixedFunction.Builder.Format, int) throws java.lang.IllegalArgumentException;
- method public android.renderscript.ProgramFragmentFixedFunction.Builder setVaryingColor(boolean);
- field public static final int MAX_TEXTURE = 2; // 0x2
+ public static deprecated class ProgramFragmentFixedFunction.Builder {
+ ctor public deprecated ProgramFragmentFixedFunction.Builder(android.renderscript.RenderScript);
+ method public deprecated android.renderscript.ProgramFragmentFixedFunction create();
+ method public deprecated android.renderscript.ProgramFragmentFixedFunction.Builder setPointSpriteTexCoordinateReplacement(boolean);
+ method public deprecated android.renderscript.ProgramFragmentFixedFunction.Builder setTexture(android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode, android.renderscript.ProgramFragmentFixedFunction.Builder.Format, int) throws java.lang.IllegalArgumentException;
+ method public deprecated android.renderscript.ProgramFragmentFixedFunction.Builder setVaryingColor(boolean);
+ field public static final deprecated int MAX_TEXTURE = 2; // 0x2
}
- public static final class ProgramFragmentFixedFunction.Builder.EnvMode extends java.lang.Enum {
+ public static final deprecated class ProgramFragmentFixedFunction.Builder.EnvMode extends java.lang.Enum {
method public static android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode valueOf(java.lang.String);
method public static final android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode[] values();
- enum_constant public static final android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode DECAL;
- enum_constant public static final android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode MODULATE;
- enum_constant public static final android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode REPLACE;
+ enum_constant public static final deprecated android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode DECAL;
+ enum_constant public static final deprecated android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode MODULATE;
+ enum_constant public static final deprecated android.renderscript.ProgramFragmentFixedFunction.Builder.EnvMode REPLACE;
}
- public static final class ProgramFragmentFixedFunction.Builder.Format extends java.lang.Enum {
+ public static final deprecated class ProgramFragmentFixedFunction.Builder.Format extends java.lang.Enum {
method public static android.renderscript.ProgramFragmentFixedFunction.Builder.Format valueOf(java.lang.String);
method public static final android.renderscript.ProgramFragmentFixedFunction.Builder.Format[] values();
- enum_constant public static final android.renderscript.ProgramFragmentFixedFunction.Builder.Format ALPHA;
- enum_constant public static final android.renderscript.ProgramFragmentFixedFunction.Builder.Format LUMINANCE_ALPHA;
- enum_constant public static final android.renderscript.ProgramFragmentFixedFunction.Builder.Format RGB;
- enum_constant public static final android.renderscript.ProgramFragmentFixedFunction.Builder.Format RGBA;
+ enum_constant public static final deprecated android.renderscript.ProgramFragmentFixedFunction.Builder.Format ALPHA;
+ enum_constant public static final deprecated android.renderscript.ProgramFragmentFixedFunction.Builder.Format LUMINANCE_ALPHA;
+ enum_constant public static final deprecated android.renderscript.ProgramFragmentFixedFunction.Builder.Format RGB;
+ enum_constant public static final deprecated android.renderscript.ProgramFragmentFixedFunction.Builder.Format RGBA;
}
- public class ProgramRaster extends android.renderscript.BaseObj {
- method public static android.renderscript.ProgramRaster CULL_BACK(android.renderscript.RenderScript);
- method public static android.renderscript.ProgramRaster CULL_FRONT(android.renderscript.RenderScript);
- method public static android.renderscript.ProgramRaster CULL_NONE(android.renderscript.RenderScript);
+ public deprecated class ProgramRaster extends android.renderscript.BaseObj {
+ method public static deprecated android.renderscript.ProgramRaster CULL_BACK(android.renderscript.RenderScript);
+ method public static deprecated android.renderscript.ProgramRaster CULL_FRONT(android.renderscript.RenderScript);
+ method public static deprecated android.renderscript.ProgramRaster CULL_NONE(android.renderscript.RenderScript);
+ method public deprecated android.renderscript.ProgramRaster.CullMode getCullMode();
+ method public deprecated boolean isPointSpriteEnabled();
}
- public static class ProgramRaster.Builder {
- ctor public ProgramRaster.Builder(android.renderscript.RenderScript);
- method public android.renderscript.ProgramRaster create();
- method public android.renderscript.ProgramRaster.Builder setCullMode(android.renderscript.ProgramRaster.CullMode);
- method public android.renderscript.ProgramRaster.Builder setPointSpriteEnabled(boolean);
+ public static deprecated class ProgramRaster.Builder {
+ ctor public deprecated ProgramRaster.Builder(android.renderscript.RenderScript);
+ method public deprecated android.renderscript.ProgramRaster create();
+ method public deprecated android.renderscript.ProgramRaster.Builder setCullMode(android.renderscript.ProgramRaster.CullMode);
+ method public deprecated android.renderscript.ProgramRaster.Builder setPointSpriteEnabled(boolean);
}
- public static final class ProgramRaster.CullMode extends java.lang.Enum {
+ public static final deprecated class ProgramRaster.CullMode extends java.lang.Enum {
method public static android.renderscript.ProgramRaster.CullMode valueOf(java.lang.String);
method public static final android.renderscript.ProgramRaster.CullMode[] values();
- enum_constant public static final android.renderscript.ProgramRaster.CullMode BACK;
- enum_constant public static final android.renderscript.ProgramRaster.CullMode FRONT;
- enum_constant public static final android.renderscript.ProgramRaster.CullMode NONE;
+ enum_constant public static final deprecated android.renderscript.ProgramRaster.CullMode BACK;
+ enum_constant public static final deprecated android.renderscript.ProgramRaster.CullMode FRONT;
+ enum_constant public static final deprecated android.renderscript.ProgramRaster.CullMode NONE;
}
public class ProgramStore extends android.renderscript.BaseObj {
@@ -18202,6 +19201,15 @@
method public static android.renderscript.ProgramStore BLEND_ALPHA_DEPTH_TEST(android.renderscript.RenderScript);
method public static android.renderscript.ProgramStore BLEND_NONE_DEPTH_NONE(android.renderscript.RenderScript);
method public static android.renderscript.ProgramStore BLEND_NONE_DEPTH_TEST(android.renderscript.RenderScript);
+ method public android.renderscript.ProgramStore.BlendDstFunc getBlendDstFunc();
+ method public android.renderscript.ProgramStore.BlendSrcFunc getBlendSrcFunc();
+ method public android.renderscript.ProgramStore.DepthFunc getDepthFunc();
+ method public boolean isColorMaskAlphaEnabled();
+ method public boolean isColorMaskBlueEnabled();
+ method public boolean isColorMaskGreenEnabled();
+ method public boolean isColorMaskRedEnabled();
+ method public boolean isDepthMaskEnabled();
+ method public boolean isDitherEnabled();
}
public static final class ProgramStore.BlendDstFunc extends java.lang.Enum {
@@ -18253,31 +19261,33 @@
enum_constant public static final android.renderscript.ProgramStore.DepthFunc NOT_EQUAL;
}
- public class ProgramVertex extends android.renderscript.Program {
+ public deprecated class ProgramVertex extends android.renderscript.Program {
+ method public deprecated android.renderscript.Element getInput(int);
+ method public deprecated int getInputCount();
}
- public static class ProgramVertex.Builder extends android.renderscript.Program.BaseProgramBuilder {
- ctor public ProgramVertex.Builder(android.renderscript.RenderScript);
- method public android.renderscript.ProgramVertex.Builder addInput(android.renderscript.Element) throws java.lang.IllegalStateException;
- method public android.renderscript.ProgramVertex create();
+ public static deprecated class ProgramVertex.Builder extends android.renderscript.Program.BaseProgramBuilder {
+ ctor public deprecated ProgramVertex.Builder(android.renderscript.RenderScript);
+ method public deprecated android.renderscript.ProgramVertex.Builder addInput(android.renderscript.Element) throws java.lang.IllegalStateException;
+ method public deprecated android.renderscript.ProgramVertex create();
}
- public class ProgramVertexFixedFunction extends android.renderscript.ProgramVertex {
- method public void bindConstants(android.renderscript.ProgramVertexFixedFunction.Constants);
+ public deprecated class ProgramVertexFixedFunction extends android.renderscript.ProgramVertex {
+ method public deprecated void bindConstants(android.renderscript.ProgramVertexFixedFunction.Constants);
}
- public static class ProgramVertexFixedFunction.Builder {
- ctor public ProgramVertexFixedFunction.Builder(android.renderscript.RenderScript);
- method public android.renderscript.ProgramVertexFixedFunction create();
- method public android.renderscript.ProgramVertexFixedFunction.Builder setTextureMatrixEnable(boolean);
+ public static deprecated class ProgramVertexFixedFunction.Builder {
+ ctor public deprecated ProgramVertexFixedFunction.Builder(android.renderscript.RenderScript);
+ method public deprecated android.renderscript.ProgramVertexFixedFunction create();
+ method public deprecated android.renderscript.ProgramVertexFixedFunction.Builder setTextureMatrixEnable(boolean);
}
- public static class ProgramVertexFixedFunction.Constants {
- ctor public ProgramVertexFixedFunction.Constants(android.renderscript.RenderScript);
- method public void destroy();
- method public void setModelview(android.renderscript.Matrix4f);
- method public void setProjection(android.renderscript.Matrix4f);
- method public void setTexture(android.renderscript.Matrix4f);
+ public static deprecated class ProgramVertexFixedFunction.Constants {
+ ctor public deprecated ProgramVertexFixedFunction.Constants(android.renderscript.RenderScript);
+ method public deprecated void destroy();
+ method public deprecated void setModelview(android.renderscript.Matrix4f);
+ method public deprecated void setProjection(android.renderscript.Matrix4f);
+ method public deprecated void setTexture(android.renderscript.Matrix4f);
}
public class RSDriverException extends android.renderscript.RSRuntimeException {
@@ -18296,33 +19306,33 @@
ctor public RSRuntimeException(java.lang.String);
}
- public class RSSurfaceView extends android.view.SurfaceView implements android.view.SurfaceHolder.Callback {
- ctor public RSSurfaceView(android.content.Context);
- ctor public RSSurfaceView(android.content.Context, android.util.AttributeSet);
- method public android.renderscript.RenderScriptGL createRenderScriptGL(android.renderscript.RenderScriptGL.SurfaceConfig);
- method public void destroyRenderScriptGL();
- method public android.renderscript.RenderScriptGL getRenderScriptGL();
- method public void pause();
- method public void resume();
- method public void setRenderScriptGL(android.renderscript.RenderScriptGL);
- method public void surfaceChanged(android.view.SurfaceHolder, int, int, int);
- method public void surfaceCreated(android.view.SurfaceHolder);
- method public void surfaceDestroyed(android.view.SurfaceHolder);
+ public deprecated class RSSurfaceView extends android.view.SurfaceView implements android.view.SurfaceHolder.Callback {
+ ctor public deprecated RSSurfaceView(android.content.Context);
+ ctor public deprecated RSSurfaceView(android.content.Context, android.util.AttributeSet);
+ method public deprecated android.renderscript.RenderScriptGL createRenderScriptGL(android.renderscript.RenderScriptGL.SurfaceConfig);
+ method public deprecated void destroyRenderScriptGL();
+ method public deprecated android.renderscript.RenderScriptGL getRenderScriptGL();
+ method public deprecated void pause();
+ method public deprecated void resume();
+ method public deprecated void setRenderScriptGL(android.renderscript.RenderScriptGL);
+ method public deprecated void surfaceChanged(android.view.SurfaceHolder, int, int, int);
+ method public deprecated void surfaceCreated(android.view.SurfaceHolder);
+ method public deprecated void surfaceDestroyed(android.view.SurfaceHolder);
}
- public class RSTextureView extends android.view.TextureView implements android.view.TextureView.SurfaceTextureListener {
- ctor public RSTextureView(android.content.Context);
- ctor public RSTextureView(android.content.Context, android.util.AttributeSet);
- method public android.renderscript.RenderScriptGL createRenderScriptGL(android.renderscript.RenderScriptGL.SurfaceConfig);
- method public void destroyRenderScriptGL();
- method public android.renderscript.RenderScriptGL getRenderScriptGL();
- method public void onSurfaceTextureAvailable(android.graphics.SurfaceTexture, int, int);
- method public boolean onSurfaceTextureDestroyed(android.graphics.SurfaceTexture);
- method public void onSurfaceTextureSizeChanged(android.graphics.SurfaceTexture, int, int);
- method public void onSurfaceTextureUpdated(android.graphics.SurfaceTexture);
- method public void pause();
- method public void resume();
- method public void setRenderScriptGL(android.renderscript.RenderScriptGL);
+ public deprecated class RSTextureView extends android.view.TextureView implements android.view.TextureView.SurfaceTextureListener {
+ ctor public deprecated RSTextureView(android.content.Context);
+ ctor public deprecated RSTextureView(android.content.Context, android.util.AttributeSet);
+ method public deprecated android.renderscript.RenderScriptGL createRenderScriptGL(android.renderscript.RenderScriptGL.SurfaceConfig);
+ method public deprecated void destroyRenderScriptGL();
+ method public deprecated android.renderscript.RenderScriptGL getRenderScriptGL();
+ method public deprecated void onSurfaceTextureAvailable(android.graphics.SurfaceTexture, int, int);
+ method public deprecated boolean onSurfaceTextureDestroyed(android.graphics.SurfaceTexture);
+ method public deprecated void onSurfaceTextureSizeChanged(android.graphics.SurfaceTexture, int, int);
+ method public deprecated void onSurfaceTextureUpdated(android.graphics.SurfaceTexture);
+ method public deprecated void pause();
+ method public deprecated void resume();
+ method public deprecated void setRenderScriptGL(android.renderscript.RenderScriptGL);
}
public class RenderScript {
@@ -18360,28 +19370,28 @@
field protected int mLength;
}
- public class RenderScriptGL extends android.renderscript.RenderScript {
- ctor public RenderScriptGL(android.content.Context, android.renderscript.RenderScriptGL.SurfaceConfig);
- method public void bindProgramFragment(android.renderscript.ProgramFragment);
- method public void bindProgramRaster(android.renderscript.ProgramRaster);
- method public void bindProgramStore(android.renderscript.ProgramStore);
- method public void bindProgramVertex(android.renderscript.ProgramVertex);
- method public void bindRootScript(android.renderscript.Script);
- method public int getHeight();
- method public int getWidth();
- method public void pause();
- method public void resume();
- method public void setSurface(android.view.SurfaceHolder, int, int);
- method public void setSurfaceTexture(android.graphics.SurfaceTexture, int, int);
+ public deprecated class RenderScriptGL extends android.renderscript.RenderScript {
+ ctor public deprecated RenderScriptGL(android.content.Context, android.renderscript.RenderScriptGL.SurfaceConfig);
+ method public deprecated void bindProgramFragment(android.renderscript.ProgramFragment);
+ method public deprecated void bindProgramRaster(android.renderscript.ProgramRaster);
+ method public deprecated void bindProgramStore(android.renderscript.ProgramStore);
+ method public deprecated void bindProgramVertex(android.renderscript.ProgramVertex);
+ method public deprecated void bindRootScript(android.renderscript.Script);
+ method public deprecated int getHeight();
+ method public deprecated int getWidth();
+ method public deprecated void pause();
+ method public deprecated void resume();
+ method public deprecated void setSurface(android.view.SurfaceHolder, int, int);
+ method public deprecated void setSurfaceTexture(android.graphics.SurfaceTexture, int, int);
}
- public static class RenderScriptGL.SurfaceConfig {
- ctor public RenderScriptGL.SurfaceConfig();
- ctor public RenderScriptGL.SurfaceConfig(android.renderscript.RenderScriptGL.SurfaceConfig);
- method public void setAlpha(int, int);
- method public void setColor(int, int);
- method public void setDepth(int, int);
- method public void setSamples(int, int, float);
+ public static deprecated class RenderScriptGL.SurfaceConfig {
+ ctor public deprecated RenderScriptGL.SurfaceConfig();
+ ctor public deprecated RenderScriptGL.SurfaceConfig(android.renderscript.RenderScriptGL.SurfaceConfig);
+ method public deprecated void setAlpha(int, int);
+ method public deprecated void setColor(int, int);
+ method public deprecated void setDepth(int, int);
+ method public deprecated void setSamples(int, int, float);
}
public class Sampler extends android.renderscript.BaseObj {
@@ -18391,6 +19401,11 @@
method public static android.renderscript.Sampler WRAP_LINEAR(android.renderscript.RenderScript);
method public static android.renderscript.Sampler WRAP_LINEAR_MIP_LINEAR(android.renderscript.RenderScript);
method public static android.renderscript.Sampler WRAP_NEAREST(android.renderscript.RenderScript);
+ method public float getAnisotropy();
+ method public android.renderscript.Sampler.Value getMagnification();
+ method public android.renderscript.Sampler.Value getMinification();
+ method public android.renderscript.Sampler.Value getWrapS();
+ method public android.renderscript.Sampler.Value getWrapT();
}
public static class Sampler.Builder {
@@ -18427,6 +19442,7 @@
method public void setVar(int, boolean);
method public void setVar(int, android.renderscript.BaseObj);
method public void setVar(int, android.renderscript.FieldPacker);
+ method public void setVar(int, android.renderscript.FieldPacker, android.renderscript.Element, int[]);
}
public static class Script.Builder {
@@ -18556,6 +19572,7 @@
method public static android.content.Intent createInstallIntent();
method public static java.security.cert.X509Certificate[] getCertificateChain(android.content.Context, java.lang.String) throws java.lang.InterruptedException, android.security.KeyChainException;
method public static java.security.PrivateKey getPrivateKey(android.content.Context, java.lang.String) throws java.lang.InterruptedException, android.security.KeyChainException;
+ field public static final java.lang.String ACTION_STORAGE_CHANGED = "android.security.STORAGE_CHANGED";
field public static final java.lang.String EXTRA_CERTIFICATE = "CERT";
field public static final java.lang.String EXTRA_NAME = "name";
field public static final java.lang.String EXTRA_PKCS12 = "PKCS12";
@@ -18588,7 +19605,9 @@
method public android.os.Bundle getBundle();
method public java.lang.String getLocale();
method public void onCancel();
+ method public void onClose();
method public abstract void onCreate();
+ method public android.view.textservice.SentenceSuggestionsInfo[] onGetSentenceSuggestionsMultiple(android.view.textservice.TextInfo[], int);
method public abstract android.view.textservice.SuggestionsInfo onGetSuggestions(android.view.textservice.TextInfo, int);
method public android.view.textservice.SuggestionsInfo[] onGetSuggestionsMultiple(android.view.textservice.TextInfo[], int, boolean);
}
@@ -18624,6 +19643,7 @@
method public void onSurfaceRedrawNeeded(android.view.SurfaceHolder);
method public void onTouchEvent(android.view.MotionEvent);
method public void onVisibilityChanged(boolean);
+ method public void setOffsetNotificationsEnabled(boolean);
method public void setTouchEventsEnabled(boolean);
}
@@ -18762,6 +19782,7 @@
method public boolean areDefaultsEnforced();
method public java.lang.String getDefaultEngine();
method public java.util.List<android.speech.tts.TextToSpeech.EngineInfo> getEngines();
+ method public java.util.Set<java.lang.String> getFeatures(java.util.Locale);
method public java.util.Locale getLanguage();
method public int isLanguageAvailable(java.util.Locale);
method public boolean isSpeaking();
@@ -18769,7 +19790,8 @@
method public int playSilence(long, int, java.util.HashMap<java.lang.String, java.lang.String>);
method public deprecated int setEngineByPackageName(java.lang.String);
method public int setLanguage(java.util.Locale);
- method public int setOnUtteranceCompletedListener(android.speech.tts.TextToSpeech.OnUtteranceCompletedListener);
+ method public deprecated int setOnUtteranceCompletedListener(android.speech.tts.TextToSpeech.OnUtteranceCompletedListener);
+ method public int setOnUtteranceProgressListener(android.speech.tts.UtteranceProgressListener);
method public int setPitch(float);
method public int setSpeechRate(float);
method public void shutdown();
@@ -18807,6 +19829,8 @@
field public static final java.lang.String EXTRA_VOICE_DATA_FILES_INFO = "dataFilesInfo";
field public static final java.lang.String EXTRA_VOICE_DATA_ROOT_DIRECTORY = "dataRoot";
field public static final java.lang.String INTENT_ACTION_TTS_SERVICE = "android.intent.action.TTS_SERVICE";
+ field public static final java.lang.String KEY_FEATURE_EMBEDDED_SYNTHESIS = "embeddedTts";
+ field public static final java.lang.String KEY_FEATURE_NETWORK_SYNTHESIS = "networkTts";
field public static final java.lang.String KEY_PARAM_PAN = "pan";
field public static final java.lang.String KEY_PARAM_STREAM = "streamType";
field public static final java.lang.String KEY_PARAM_UTTERANCE_ID = "utteranceId";
@@ -18832,6 +19856,7 @@
public abstract class TextToSpeechService extends android.app.Service {
ctor public TextToSpeechService();
method public android.os.IBinder onBind(android.content.Intent);
+ method protected java.util.Set<java.lang.String> onGetFeaturesForLanguage(java.lang.String, java.lang.String, java.lang.String);
method protected abstract java.lang.String[] onGetLanguage();
method protected abstract int onIsLanguageAvailable(java.lang.String, java.lang.String, java.lang.String);
method protected abstract int onLoadLanguage(java.lang.String, java.lang.String, java.lang.String);
@@ -18839,6 +19864,13 @@
method protected abstract void onSynthesizeText(android.speech.tts.SynthesisRequest, android.speech.tts.SynthesisCallback);
}
+ public abstract class UtteranceProgressListener {
+ ctor public UtteranceProgressListener();
+ method public abstract void onDone(java.lang.String);
+ method public abstract void onError(java.lang.String);
+ method public abstract void onStart(java.lang.String);
+ }
+
}
package android.telephony {
@@ -19314,12 +20346,12 @@
method public final void testApplicationTestCaseSetUpProperly() throws java.lang.Exception;
}
- public class AssertionFailedError extends java.lang.Error {
+ public deprecated class AssertionFailedError extends java.lang.Error {
ctor public AssertionFailedError();
ctor public AssertionFailedError(java.lang.String);
}
- public class ComparisonFailure extends android.test.AssertionFailedError {
+ public deprecated class ComparisonFailure extends android.test.AssertionFailedError {
ctor public ComparisonFailure(java.lang.String, java.lang.String, java.lang.String);
}
@@ -19361,6 +20393,7 @@
ctor public InstrumentationTestSuite(android.app.Instrumentation);
ctor public InstrumentationTestSuite(java.lang.String, android.app.Instrumentation);
ctor public InstrumentationTestSuite(java.lang.Class, android.app.Instrumentation);
+ method public void addTestSuite(java.lang.Class);
}
public class IsolatedContext extends android.content.ContextWrapper {
@@ -19631,9 +20664,12 @@
method public void setWallpaper(android.graphics.Bitmap) throws java.io.IOException;
method public void setWallpaper(java.io.InputStream) throws java.io.IOException;
method public void startActivities(android.content.Intent[]);
+ method public void startActivities(android.content.Intent[], android.os.Bundle);
method public void startActivity(android.content.Intent);
+ method public void startActivity(android.content.Intent, android.os.Bundle);
method public boolean startInstrumentation(android.content.ComponentName, java.lang.String, android.os.Bundle);
method public void startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int) throws android.content.IntentSender.SendIntentException;
+ method public void startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int, android.os.Bundle) throws android.content.IntentSender.SendIntentException;
method public android.content.ComponentName startService(android.content.Intent);
method public boolean stopService(android.content.Intent);
method public void unbindService(android.content.ServiceConnection);
@@ -19936,6 +20972,7 @@
}
public class Html {
+ method public static java.lang.String escapeHtml(java.lang.CharSequence);
method public static android.text.Spanned fromHtml(java.lang.String);
method public static android.text.Spanned fromHtml(java.lang.String, android.text.Html.ImageGetter, android.text.Html.TagHandler);
method public static java.lang.String toHtml(android.text.Spanned);
@@ -21003,6 +22040,7 @@
method public void writeToParcel(android.os.Parcel, int);
field public static final java.lang.String ACTION_SUGGESTION_PICKED = "android.text.style.SUGGESTION_PICKED";
field public static final android.os.Parcelable.Creator CREATOR;
+ field public static final int FLAG_AUTO_CORRECTION = 4; // 0x4
field public static final int FLAG_EASY_CORRECT = 1; // 0x1
field public static final int FLAG_MISSPELLED = 2; // 0x2
field public static final int SUGGESTIONS_MAX_SIZE = 5; // 0x5
@@ -21231,6 +22269,7 @@
field public static final int DENSITY_MEDIUM = 160; // 0xa0
field public static final int DENSITY_TV = 213; // 0xd5
field public static final int DENSITY_XHIGH = 320; // 0x140
+ field public static final int DENSITY_XXHIGH = 480; // 0x1e0
field public float density;
field public int densityDpi;
field public int heightPixels;
@@ -21365,6 +22404,26 @@
method public void println(java.lang.String);
}
+ public class LongSparseArray implements java.lang.Cloneable {
+ ctor public LongSparseArray();
+ ctor public LongSparseArray(int);
+ method public void append(long, E);
+ method public void clear();
+ method public android.util.LongSparseArray<E> clone();
+ method public void delete(long);
+ method public E get(long);
+ method public E get(long, E);
+ method public int indexOfKey(long);
+ method public int indexOfValue(E);
+ method public long keyAt(int);
+ method public void put(long, E);
+ method public void remove(long);
+ method public void removeAt(int);
+ method public void setValueAt(int, E);
+ method public int size();
+ method public E valueAt(int);
+ }
+
public class LruCache {
ctor public LruCache(int);
method protected V create(K);
@@ -21647,13 +22706,16 @@
method public abstract java.lang.CharSequence getSubtitle();
method public java.lang.Object getTag();
method public abstract java.lang.CharSequence getTitle();
+ method public boolean getTitleOptionalHint();
method public abstract void invalidate();
+ method public boolean isTitleOptional();
method public abstract void setCustomView(android.view.View);
method public abstract void setSubtitle(java.lang.CharSequence);
method public abstract void setSubtitle(int);
method public void setTag(java.lang.Object);
method public abstract void setTitle(java.lang.CharSequence);
method public abstract void setTitle(int);
+ method public void setTitleOptionalHint(boolean);
}
public static abstract interface ActionMode.Callback {
@@ -21695,6 +22757,7 @@
}
public class Display {
+ method public void getCurrentSizeRange(android.graphics.Point, android.graphics.Point);
method public int getDisplayId();
method public deprecated int getHeight();
method public void getMetrics(android.util.DisplayMetrics);
@@ -21827,6 +22890,7 @@
public final class InputDevice implements android.os.Parcelable {
method public int describeContents();
+ method public java.lang.String getDescriptor();
method public static android.view.InputDevice getDevice(int);
method public static int[] getDeviceIds();
method public int getId();
@@ -21837,6 +22901,8 @@
method public java.util.List<android.view.InputDevice.MotionRange> getMotionRanges();
method public java.lang.String getName();
method public int getSources();
+ method public android.os.Vibrator getVibrator();
+ method public boolean isVirtual();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator CREATOR;
field public static final int KEYBOARD_TYPE_ALPHABETIC = 2; // 0x2
@@ -21884,6 +22950,7 @@
method public int describeContents();
method public final android.view.InputDevice getDevice();
method public abstract int getDeviceId();
+ method public abstract long getEventTime();
method public abstract int getSource();
field public static final android.os.Parcelable.Creator CREATOR;
}
@@ -21896,7 +22963,8 @@
method public abstract void onInputQueueDestroyed(android.view.InputQueue);
}
- public class KeyCharacterMap {
+ public class KeyCharacterMap implements android.os.Parcelable {
+ method public int describeContents();
method public static boolean deviceHasKey(int);
method public static boolean[] deviceHasKeys(int[]);
method public int get(int, int);
@@ -21911,10 +22979,12 @@
method public char getNumber(int);
method public boolean isPrintingKey(int);
method public static android.view.KeyCharacterMap load(int);
+ method public void writeToParcel(android.os.Parcel, int);
field public static final int ALPHA = 3; // 0x3
field public static final deprecated int BUILT_IN_KEYBOARD = 0; // 0x0
field public static final int COMBINING_ACCENT = -2147483648; // 0x80000000
field public static final int COMBINING_ACCENT_MASK = 2147483647; // 0x7fffffff
+ field public static final android.os.Parcelable.Creator CREATOR;
field public static final int FULL = 4; // 0x4
field public static final char HEX_INPUT = 61184; // 0xef00 '\uef00'
field public static final int MODIFIER_BEHAVIOR_CHORDED = 0; // 0x0
@@ -22074,6 +23144,8 @@
field public static final int KEYCODE_BUTTON_Y = 100; // 0x64
field public static final int KEYCODE_BUTTON_Z = 101; // 0x65
field public static final int KEYCODE_C = 31; // 0x1f
+ field public static final int KEYCODE_CALCULATOR = 210; // 0xd2
+ field public static final int KEYCODE_CALENDAR = 208; // 0xd0
field public static final int KEYCODE_CALL = 5; // 0x5
field public static final int KEYCODE_CAMERA = 27; // 0x1b
field public static final int KEYCODE_CAPS_LOCK = 115; // 0x73
@@ -22082,6 +23154,7 @@
field public static final int KEYCODE_CHANNEL_UP = 166; // 0xa6
field public static final int KEYCODE_CLEAR = 28; // 0x1c
field public static final int KEYCODE_COMMA = 55; // 0x37
+ field public static final int KEYCODE_CONTACTS = 207; // 0xcf
field public static final int KEYCODE_CTRL_LEFT = 113; // 0x71
field public static final int KEYCODE_CTRL_RIGHT = 114; // 0x72
field public static final int KEYCODE_D = 32; // 0x20
@@ -22093,6 +23166,7 @@
field public static final int KEYCODE_DPAD_UP = 19; // 0x13
field public static final int KEYCODE_DVR = 173; // 0xad
field public static final int KEYCODE_E = 33; // 0x21
+ field public static final int KEYCODE_EISU = 212; // 0xd4
field public static final int KEYCODE_ENDCALL = 6; // 0x6
field public static final int KEYCODE_ENTER = 66; // 0x42
field public static final int KEYCODE_ENVELOPE = 65; // 0x41
@@ -22121,12 +23195,15 @@
field public static final int KEYCODE_GUIDE = 172; // 0xac
field public static final int KEYCODE_H = 36; // 0x24
field public static final int KEYCODE_HEADSETHOOK = 79; // 0x4f
+ field public static final int KEYCODE_HENKAN = 214; // 0xd6
field public static final int KEYCODE_HOME = 3; // 0x3
field public static final int KEYCODE_I = 37; // 0x25
field public static final int KEYCODE_INFO = 165; // 0xa5
field public static final int KEYCODE_INSERT = 124; // 0x7c
field public static final int KEYCODE_J = 38; // 0x26
field public static final int KEYCODE_K = 39; // 0x27
+ field public static final int KEYCODE_KANA = 218; // 0xda
+ field public static final int KEYCODE_KATAKANA_HIRAGANA = 215; // 0xd7
field public static final int KEYCODE_L = 40; // 0x28
field public static final int KEYCODE_LANGUAGE_SWITCH = 204; // 0xcc
field public static final int KEYCODE_LEFT_BRACKET = 71; // 0x47
@@ -22149,6 +23226,8 @@
field public static final int KEYCODE_MINUS = 69; // 0x45
field public static final int KEYCODE_MOVE_END = 123; // 0x7b
field public static final int KEYCODE_MOVE_HOME = 122; // 0x7a
+ field public static final int KEYCODE_MUHENKAN = 213; // 0xd5
+ field public static final int KEYCODE_MUSIC = 209; // 0xd1
field public static final int KEYCODE_MUTE = 91; // 0x5b
field public static final int KEYCODE_N = 42; // 0x2a
field public static final int KEYCODE_NOTIFICATION = 83; // 0x53
@@ -22190,6 +23269,7 @@
field public static final int KEYCODE_Q = 45; // 0x2d
field public static final int KEYCODE_R = 46; // 0x2e
field public static final int KEYCODE_RIGHT_BRACKET = 72; // 0x48
+ field public static final int KEYCODE_RO = 217; // 0xd9
field public static final int KEYCODE_S = 47; // 0x2f
field public static final int KEYCODE_SCROLL_LOCK = 116; // 0x74
field public static final int KEYCODE_SEARCH = 84; // 0x54
@@ -22222,7 +23302,9 @@
field public static final int KEYCODE_WINDOW = 171; // 0xab
field public static final int KEYCODE_X = 52; // 0x34
field public static final int KEYCODE_Y = 53; // 0x35
+ field public static final int KEYCODE_YEN = 216; // 0xd8
field public static final int KEYCODE_Z = 54; // 0x36
+ field public static final int KEYCODE_ZENKAKU_HANKAKU = 211; // 0xd3
field public static final int KEYCODE_ZOOM_IN = 168; // 0xa8
field public static final int KEYCODE_ZOOM_OUT = 169; // 0xa9
field public static final deprecated int MAX_KEYCODE = 84; // 0x54
@@ -22747,6 +23829,7 @@
method public android.graphics.Canvas lockCanvas(android.graphics.Rect);
method protected final void onDraw(android.graphics.Canvas);
method public void setOpaque(boolean);
+ method public void setSurfaceTexture(android.graphics.SurfaceTexture);
method public void setSurfaceTextureListener(android.view.TextureView.SurfaceTextureListener);
method public void setTransform(android.graphics.Matrix);
method public void unlockCanvasAndPost(android.graphics.Canvas);
@@ -22785,12 +23868,14 @@
ctor public View(android.content.Context);
ctor public View(android.content.Context, android.util.AttributeSet);
ctor public View(android.content.Context, android.util.AttributeSet, int);
+ method public void addChildrenForAccessibility(java.util.ArrayList<android.view.View>);
method public void addFocusables(java.util.ArrayList<android.view.View>, int);
method public void addFocusables(java.util.ArrayList<android.view.View>, int, int);
method public void addOnAttachStateChangeListener(android.view.View.OnAttachStateChangeListener);
method public void addOnLayoutChangeListener(android.view.View.OnLayoutChangeListener);
method public void addTouchables(java.util.ArrayList<android.view.View>);
method public android.view.ViewPropertyAnimator animate();
+ method public void announceForAccessibility(java.lang.CharSequence);
method protected boolean awakenScrollBars();
method protected boolean awakenScrollBars(int);
method protected boolean awakenScrollBars(int, boolean);
@@ -22798,6 +23883,7 @@
method public void buildDrawingCache();
method public void buildDrawingCache(boolean);
method public void buildLayer();
+ method public boolean callOnClick();
method public boolean canScrollHorizontally(int);
method public boolean canScrollVertically(int);
method public void cancelLongPress();
@@ -22838,6 +23924,7 @@
method public boolean dispatchUnhandledMove(android.view.View, int);
method protected void dispatchVisibilityChanged(android.view.View, int);
method public void dispatchWindowFocusChanged(boolean);
+ method public void dispatchWindowSystemUiVisiblityChanged(int);
method public void dispatchWindowVisibilityChanged(int);
method public void draw(android.graphics.Canvas);
method protected void drawableStateChanged();
@@ -22848,6 +23935,7 @@
method protected boolean fitSystemWindows(android.graphics.Rect);
method public android.view.View focusSearch(int);
method public void forceLayout();
+ method public android.view.accessibility.AccessibilityNodeProvider getAccessibilityNodeProvider();
method public float getAlpha();
method public android.view.animation.Animation getAnimation();
method public android.os.IBinder getApplicationWindowToken();
@@ -22856,6 +23944,7 @@
method public final int getBottom();
method protected float getBottomFadingEdgeStrength();
method protected int getBottomPaddingOffset();
+ method public float getCameraDistance();
method public java.lang.CharSequence getContentDescription();
method public final android.content.Context getContext();
method protected android.view.ContextMenu.ContextMenuInfo getContextMenuInfo();
@@ -22868,6 +23957,7 @@
method public void getDrawingRect(android.graphics.Rect);
method public long getDrawingTime();
method public boolean getFilterTouchesWhenObscured();
+ method public boolean getFitsSystemWindows();
method public java.util.ArrayList<android.view.View> getFocusables(int);
method public void getFocusedRect(android.graphics.Rect);
method public boolean getGlobalVisibleRect(android.graphics.Rect, android.graphics.Point);
@@ -22878,6 +23968,7 @@
method public int getHorizontalFadingEdgeLength();
method protected int getHorizontalScrollbarHeight();
method public int getId();
+ method public int getImportantForAccessibility();
method public boolean getKeepScreenOn();
method public android.view.KeyEvent.DispatcherState getKeyDispatcherState();
method public int getLayerType();
@@ -22894,6 +23985,8 @@
method public final int getMeasuredState();
method public final int getMeasuredWidth();
method public final int getMeasuredWidthAndState();
+ method public int getMinimumHeight();
+ method public int getMinimumWidth();
method public int getNextFocusDownId();
method public int getNextFocusForwardId();
method public int getNextFocusLeftId();
@@ -22906,6 +23999,7 @@
method public int getPaddingRight();
method public int getPaddingTop();
method public final android.view.ViewParent getParent();
+ method public android.view.ViewParent getParentForAccessibility();
method public float getPivotX();
method public float getPivotY();
method public android.content.res.Resources getResources();
@@ -22918,6 +24012,9 @@
method public float getRotationY();
method public float getScaleX();
method public float getScaleY();
+ method public int getScrollBarDefaultDelayBeforeFade();
+ method public int getScrollBarFadeDuration();
+ method public int getScrollBarSize();
method public int getScrollBarStyle();
method public final int getScrollX();
method public final int getScrollY();
@@ -22941,6 +24038,7 @@
method public int getVisibility();
method public final int getWidth();
method protected int getWindowAttachCount();
+ method public int getWindowSystemUiVisibility();
method public android.os.IBinder getWindowToken();
method public int getWindowVisibility();
method public void getWindowVisibleDisplayFrame(android.graphics.Rect);
@@ -22948,6 +24046,9 @@
method public float getY();
method public boolean hasFocus();
method public boolean hasFocusable();
+ method public boolean hasOnClickListeners();
+ method public boolean hasOverlappingRendering();
+ method public boolean hasTransientState();
method public boolean hasWindowFocus();
method public static android.view.View inflate(android.content.Context, int, android.view.ViewGroup);
method protected void initializeFadingEdge(android.content.res.TypedArray);
@@ -22979,6 +24080,7 @@
method public boolean isPressed();
method public boolean isSaveEnabled();
method public boolean isSaveFromParentEnabled();
+ method public boolean isScrollContainer();
method public boolean isScrollbarFadingEnabled();
method public boolean isSelected();
method public boolean isShown();
@@ -23025,6 +24127,7 @@
method public void onPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent);
method protected void onRestoreInstanceState(android.os.Parcelable);
method protected android.os.Parcelable onSaveInstanceState();
+ method public void onScreenStateChanged(int);
method protected void onScrollChanged(int, int, int, int);
method protected boolean onSetAlpha(int);
method protected void onSizeChanged(int, int, int, int);
@@ -23033,8 +24136,10 @@
method public boolean onTrackballEvent(android.view.MotionEvent);
method protected void onVisibilityChanged(android.view.View, int);
method public void onWindowFocusChanged(boolean);
+ method public void onWindowSystemUiVisibilityChanged(int);
method protected void onWindowVisibilityChanged(int);
method protected boolean overScrollBy(int, int, int, int, int, int, int, int, boolean);
+ method public boolean performAccessibilityAction(int, android.os.Bundle);
method public boolean performClick();
method public boolean performHapticFeedback(int);
method public boolean performHapticFeedback(int, int);
@@ -23046,10 +24151,15 @@
method public void postInvalidate(int, int, int, int);
method public void postInvalidateDelayed(long);
method public void postInvalidateDelayed(long, int, int, int, int);
+ method public void postInvalidateOnAnimation();
+ method public void postInvalidateOnAnimation(int, int, int, int);
+ method public void postOnAnimation(java.lang.Runnable);
+ method public void postOnAnimationDelayed(java.lang.Runnable, long);
method public void refreshDrawableState();
method public boolean removeCallbacks(java.lang.Runnable);
method public void removeOnAttachStateChangeListener(android.view.View.OnAttachStateChangeListener);
method public void removeOnLayoutChangeListener(android.view.View.OnLayoutChangeListener);
+ method public void requestFitSystemWindows();
method public final boolean requestFocus();
method public final boolean requestFocus(int);
method public boolean requestFocus(int, android.graphics.Rect);
@@ -23070,8 +24180,9 @@
method public void setActivated(boolean);
method public void setAlpha(float);
method public void setAnimation(android.view.animation.Animation);
+ method public void setBackground(android.graphics.drawable.Drawable);
method public void setBackgroundColor(int);
- method public void setBackgroundDrawable(android.graphics.drawable.Drawable);
+ method public deprecated void setBackgroundDrawable(android.graphics.drawable.Drawable);
method public void setBackgroundResource(int);
method public final void setBottom(int);
method public void setCameraDistance(float);
@@ -23088,10 +24199,12 @@
method public void setFocusable(boolean);
method public void setFocusableInTouchMode(boolean);
method public void setHapticFeedbackEnabled(boolean);
+ method public void setHasTransientState(boolean);
method public void setHorizontalFadingEdgeEnabled(boolean);
method public void setHorizontalScrollBarEnabled(boolean);
method public void setHovered(boolean);
method public void setId(int);
+ method public void setImportantForAccessibility(int);
method public void setKeepScreenOn(boolean);
method public void setLayerType(int, android.graphics.Paint);
method public void setLayoutParams(android.view.ViewGroup.LayoutParams);
@@ -23128,6 +24241,9 @@
method public void setSaveFromParentEnabled(boolean);
method public void setScaleX(float);
method public void setScaleY(float);
+ method public void setScrollBarDefaultDelayBeforeFade(int);
+ method public void setScrollBarFadeDuration(int);
+ method public void setScrollBarSize(int);
method public void setScrollBarStyle(int);
method public void setScrollContainer(boolean);
method public void setScrollX(int);
@@ -23159,6 +24275,12 @@
method protected boolean verifyDrawable(android.graphics.drawable.Drawable);
method public boolean willNotCacheDrawing();
method public boolean willNotDraw();
+ field public static final int ACCESSIBILITY_FOCUS_BACKWARD = 4097; // 0x1001
+ field public static final int ACCESSIBILITY_FOCUS_DOWN = 4226; // 0x1082
+ field public static final int ACCESSIBILITY_FOCUS_FORWARD = 4098; // 0x1002
+ field public static final int ACCESSIBILITY_FOCUS_LEFT = 4113; // 0x1011
+ field public static final int ACCESSIBILITY_FOCUS_RIGHT = 4162; // 0x1042
+ field public static final int ACCESSIBILITY_FOCUS_UP = 4129; // 0x1021
field public static final android.util.Property ALPHA;
field public static final int DRAWING_CACHE_QUALITY_AUTO = 0; // 0x0
field public static final int DRAWING_CACHE_QUALITY_HIGH = 1048576; // 0x100000
@@ -23180,6 +24302,7 @@
field protected static final int[] FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET;
field protected static final int[] FOCUSED_STATE_SET;
field protected static final int[] FOCUSED_WINDOW_FOCUSED_STATE_SET;
+ field public static final int FOCUS_ACCESSIBILITY = 4096; // 0x1000
field public static final int FOCUS_BACKWARD = 1; // 0x1
field public static final int FOCUS_DOWN = 130; // 0x82
field public static final int FOCUS_FORWARD = 2; // 0x2
@@ -23188,6 +24311,9 @@
field public static final int FOCUS_UP = 33; // 0x21
field public static final int GONE = 8; // 0x8
field public static final int HAPTIC_FEEDBACK_ENABLED = 268435456; // 0x10000000
+ field public static final int IMPORTANT_FOR_ACCESSIBILITY_AUTO = 0; // 0x0
+ field public static final int IMPORTANT_FOR_ACCESSIBILITY_NO = 2; // 0x2
+ field public static final int IMPORTANT_FOR_ACCESSIBILITY_YES = 1; // 0x1
field public static final int INVISIBLE = 4; // 0x4
field public static final int KEEP_SCREEN_ON = 67108864; // 0x4000000
field public static final int LAYER_TYPE_HARDWARE = 2; // 0x2
@@ -23221,6 +24347,8 @@
field public static final android.util.Property ROTATION_Y;
field public static final android.util.Property SCALE_X;
field public static final android.util.Property SCALE_Y;
+ field public static final int SCREEN_STATE_OFF = 0; // 0x0
+ field public static final int SCREEN_STATE_ON = 1; // 0x1
field public static final int SCROLLBARS_INSIDE_INSET = 16777216; // 0x1000000
field public static final int SCROLLBARS_INSIDE_OVERLAY = 0; // 0x0
field public static final int SCROLLBARS_OUTSIDE_INSET = 50331648; // 0x3000000
@@ -23233,9 +24361,16 @@
field public static final int SOUND_EFFECTS_ENABLED = 134217728; // 0x8000000
field public static final deprecated int STATUS_BAR_HIDDEN = 1; // 0x1
field public static final deprecated int STATUS_BAR_VISIBLE = 0; // 0x0
+ field public static final int SYSTEM_UI_FLAG_FULLSCREEN = 4; // 0x4
field public static final int SYSTEM_UI_FLAG_HIDE_NAVIGATION = 2; // 0x2
+ field public static final int SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN = 1024; // 0x400
+ field public static final int SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION = 512; // 0x200
+ field public static final int SYSTEM_UI_FLAG_LAYOUT_STABLE = 256; // 0x100
field public static final int SYSTEM_UI_FLAG_LOW_PROFILE = 1; // 0x1
field public static final int SYSTEM_UI_FLAG_VISIBLE = 0; // 0x0
+ field public static final int SYSTEM_UI_LAYOUT_FLAGS = 1536; // 0x600
+ field public static final int TEXT_ALIGNMENT_INHERIT = 0; // 0x0
+ field public static final int TEXT_ALIGNMENT_RESOLVED_DEFAULT = 131072; // 0x20000
field public static final android.util.Property TRANSLATION_X;
field public static final android.util.Property TRANSLATION_Y;
field protected static final java.lang.String VIEW_LOG_TAG = "View";
@@ -23248,10 +24383,12 @@
public static class View.AccessibilityDelegate {
ctor public View.AccessibilityDelegate();
method public boolean dispatchPopulateAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent);
+ method public android.view.accessibility.AccessibilityNodeProvider getAccessibilityNodeProvider(android.view.View);
method public void onInitializeAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent);
method public void onInitializeAccessibilityNodeInfo(android.view.View, android.view.accessibility.AccessibilityNodeInfo);
method public void onPopulateAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent);
method public boolean onRequestSendAccessibilityEvent(android.view.ViewGroup, android.view.View, android.view.accessibility.AccessibilityEvent);
+ method public boolean performAccessibilityAction(android.view.View, int, android.os.Bundle);
method public void sendAccessibilityEvent(android.view.View, int);
method public void sendAccessibilityEventUnchecked(android.view.View, android.view.accessibility.AccessibilityEvent);
}
@@ -23578,6 +24715,7 @@
method public abstract void focusableViewAvailable(android.view.View);
method public abstract boolean getChildVisibleRect(android.view.View, android.graphics.Rect, android.graphics.Point);
method public abstract android.view.ViewParent getParent();
+ method public abstract android.view.ViewParent getParentForAccessibility();
method public abstract void invalidateChild(android.view.View, android.graphics.Rect);
method public abstract android.view.ViewParent invalidateChildInParent(int[], android.graphics.Rect);
method public abstract boolean isLayoutRequested();
@@ -23585,6 +24723,7 @@
method public abstract void requestChildFocus(android.view.View, android.view.View);
method public abstract boolean requestChildRectangleOnScreen(android.view.View, android.graphics.Rect, boolean);
method public abstract void requestDisallowInterceptTouchEvent(boolean);
+ method public abstract void requestFitSystemWindows();
method public abstract void requestLayout();
method public abstract boolean requestSendAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent);
method public abstract void requestTransparentRegion(android.view.View);
@@ -23617,6 +24756,9 @@
method public android.view.ViewPropertyAnimator translationXBy(float);
method public android.view.ViewPropertyAnimator translationY(float);
method public android.view.ViewPropertyAnimator translationYBy(float);
+ method public android.view.ViewPropertyAnimator withEndAction(java.lang.Runnable);
+ method public android.view.ViewPropertyAnimator withLayer();
+ method public android.view.ViewPropertyAnimator withStartAction(java.lang.Runnable);
method public android.view.ViewPropertyAnimator x(float);
method public android.view.ViewPropertyAnimator xBy(float);
method public android.view.ViewPropertyAnimator y(float);
@@ -23629,9 +24771,11 @@
ctor public ViewStub(android.content.Context, android.util.AttributeSet);
ctor public ViewStub(android.content.Context, android.util.AttributeSet, int);
method public int getInflatedId();
+ method public android.view.LayoutInflater getLayoutInflater();
method public int getLayoutResource();
method public android.view.View inflate();
method public void setInflatedId(int);
+ method public void setLayoutInflater(android.view.LayoutInflater);
method public void setLayoutResource(int);
method public void setOnInflateListener(android.view.ViewStub.OnInflateListener);
}
@@ -23641,21 +24785,29 @@
}
public final class ViewTreeObserver {
+ method public void addOnDrawListener(android.view.ViewTreeObserver.OnDrawListener);
method public void addOnGlobalFocusChangeListener(android.view.ViewTreeObserver.OnGlobalFocusChangeListener);
method public void addOnGlobalLayoutListener(android.view.ViewTreeObserver.OnGlobalLayoutListener);
method public void addOnPreDrawListener(android.view.ViewTreeObserver.OnPreDrawListener);
method public void addOnScrollChangedListener(android.view.ViewTreeObserver.OnScrollChangedListener);
method public void addOnTouchModeChangeListener(android.view.ViewTreeObserver.OnTouchModeChangeListener);
+ method public final void dispatchOnDraw();
method public final void dispatchOnGlobalLayout();
method public final boolean dispatchOnPreDraw();
method public boolean isAlive();
- method public void removeGlobalOnLayoutListener(android.view.ViewTreeObserver.OnGlobalLayoutListener);
+ method public deprecated void removeGlobalOnLayoutListener(android.view.ViewTreeObserver.OnGlobalLayoutListener);
+ method public void removeOnDrawListener(android.view.ViewTreeObserver.OnDrawListener);
method public void removeOnGlobalFocusChangeListener(android.view.ViewTreeObserver.OnGlobalFocusChangeListener);
+ method public void removeOnGlobalLayoutListener(android.view.ViewTreeObserver.OnGlobalLayoutListener);
method public void removeOnPreDrawListener(android.view.ViewTreeObserver.OnPreDrawListener);
method public void removeOnScrollChangedListener(android.view.ViewTreeObserver.OnScrollChangedListener);
method public void removeOnTouchModeChangeListener(android.view.ViewTreeObserver.OnTouchModeChangeListener);
}
+ public static abstract interface ViewTreeObserver.OnDrawListener {
+ method public abstract void onDraw();
+ }
+
public static abstract interface ViewTreeObserver.OnGlobalFocusChangeListener {
method public abstract void onGlobalFocusChanged(android.view.View, android.view.View);
}
@@ -23944,8 +25096,10 @@
method public void appendRecord(android.view.accessibility.AccessibilityRecord);
method public int describeContents();
method public static java.lang.String eventTypeToString(int);
+ method public int getAction();
method public long getEventTime();
method public int getEventType();
+ method public int getMovementGranularity();
method public java.lang.CharSequence getPackageName();
method public android.view.accessibility.AccessibilityRecord getRecord(int);
method public int getRecordCount();
@@ -23953,17 +25107,22 @@
method public static android.view.accessibility.AccessibilityEvent obtain(int);
method public static android.view.accessibility.AccessibilityEvent obtain(android.view.accessibility.AccessibilityEvent);
method public static android.view.accessibility.AccessibilityEvent obtain();
+ method public void setAction(int);
method public void setEventTime(long);
method public void setEventType(int);
+ method public void setMovementGranularity(int);
method public void setPackageName(java.lang.CharSequence);
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator CREATOR;
field public static final int INVALID_POSITION = -1; // 0xffffffff
field public static final deprecated int MAX_TEXT_LENGTH = 500; // 0x1f4
field public static final int TYPES_ALL_MASK = -1; // 0xffffffff
+ field public static final int TYPE_ANNOUNCEMENT = 16384; // 0x4000
field public static final int TYPE_NOTIFICATION_STATE_CHANGED = 64; // 0x40
field public static final int TYPE_TOUCH_EXPLORATION_GESTURE_END = 1024; // 0x400
field public static final int TYPE_TOUCH_EXPLORATION_GESTURE_START = 512; // 0x200
+ field public static final int TYPE_VIEW_ACCESSIBILITY_FOCUSED = 32768; // 0x8000
+ field public static final int TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED = 65536; // 0x10000
field public static final int TYPE_VIEW_CLICKED = 1; // 0x1
field public static final int TYPE_VIEW_FOCUSED = 8; // 0x8
field public static final int TYPE_VIEW_HOVER_ENTER = 128; // 0x80
@@ -23973,6 +25132,7 @@
field public static final int TYPE_VIEW_SELECTED = 4; // 0x4
field public static final int TYPE_VIEW_TEXT_CHANGED = 16; // 0x10
field public static final int TYPE_VIEW_TEXT_SELECTION_CHANGED = 8192; // 0x2000
+ field public static final int TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY = 131072; // 0x20000
field public static final int TYPE_WINDOW_CONTENT_CHANGED = 2048; // 0x800
field public static final int TYPE_WINDOW_STATE_CHANGED = 32; // 0x20
}
@@ -24001,8 +25161,11 @@
public class AccessibilityNodeInfo implements android.os.Parcelable {
method public void addAction(int);
method public void addChild(android.view.View);
+ method public void addChild(android.view.View, int);
method public int describeContents();
method public java.util.List<android.view.accessibility.AccessibilityNodeInfo> findAccessibilityNodeInfosByText(java.lang.String);
+ method public android.view.accessibility.AccessibilityNodeInfo findFocus(int);
+ method public android.view.accessibility.AccessibilityNodeInfo focusSearch(int);
method public int getActions();
method public void getBoundsInParent(android.graphics.Rect);
method public void getBoundsInScreen(android.graphics.Rect);
@@ -24010,10 +25173,12 @@
method public int getChildCount();
method public java.lang.CharSequence getClassName();
method public java.lang.CharSequence getContentDescription();
+ method public int getMovementGranularities();
method public java.lang.CharSequence getPackageName();
method public android.view.accessibility.AccessibilityNodeInfo getParent();
method public java.lang.CharSequence getText();
method public int getWindowId();
+ method public boolean isAccessibilityFocused();
method public boolean isCheckable();
method public boolean isChecked();
method public boolean isClickable();
@@ -24024,11 +25189,15 @@
method public boolean isPassword();
method public boolean isScrollable();
method public boolean isSelected();
+ method public boolean isVisibleToUser();
method public static android.view.accessibility.AccessibilityNodeInfo obtain(android.view.View);
+ method public static android.view.accessibility.AccessibilityNodeInfo obtain(android.view.View, int);
method public static android.view.accessibility.AccessibilityNodeInfo obtain();
method public static android.view.accessibility.AccessibilityNodeInfo obtain(android.view.accessibility.AccessibilityNodeInfo);
method public boolean performAction(int);
+ method public boolean performAction(int, android.os.Bundle);
method public void recycle();
+ method public void setAccessibilityFocused(boolean);
method public void setBoundsInParent(android.graphics.Rect);
method public void setBoundsInScreen(android.graphics.Rect);
method public void setCheckable(boolean);
@@ -24040,19 +25209,51 @@
method public void setFocusable(boolean);
method public void setFocused(boolean);
method public void setLongClickable(boolean);
+ method public void setMovementGranularities(int);
method public void setPackageName(java.lang.CharSequence);
method public void setParent(android.view.View);
+ method public void setParent(android.view.View, int);
method public void setPassword(boolean);
method public void setScrollable(boolean);
method public void setSelected(boolean);
method public void setSource(android.view.View);
+ method public void setSource(android.view.View, int);
method public void setText(java.lang.CharSequence);
+ method public void setVisibleToUser(boolean);
method public void writeToParcel(android.os.Parcel, int);
+ field public static final int ACTION_ACCESSIBILITY_FOCUS = 64; // 0x40
+ field public static final java.lang.String ACTION_ARGUMENT_HTML_ELEMENT_STRING = "ACTION_ARGUMENT_HTML_ELEMENT_STRING";
+ field public static final java.lang.String ACTION_ARGUMENT_MOVEMENT_GRANULARITY_INT = "ACTION_ARGUMENT_MOVEMENT_GRANULARITY_INT";
+ field public static final int ACTION_CLEAR_ACCESSIBILITY_FOCUS = 128; // 0x80
field public static final int ACTION_CLEAR_FOCUS = 2; // 0x2
field public static final int ACTION_CLEAR_SELECTION = 8; // 0x8
+ field public static final int ACTION_CLICK = 16; // 0x10
field public static final int ACTION_FOCUS = 1; // 0x1
+ field public static final int ACTION_LONG_CLICK = 32; // 0x20
+ field public static final int ACTION_NEXT_AT_MOVEMENT_GRANULARITY = 256; // 0x100
+ field public static final int ACTION_NEXT_HTML_ELEMENT = 1024; // 0x400
+ field public static final int ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY = 512; // 0x200
+ field public static final int ACTION_PREVIOUS_HTML_ELEMENT = 2048; // 0x800
+ field public static final int ACTION_SCROLL_BACKWARD = 8192; // 0x2000
+ field public static final int ACTION_SCROLL_FORWARD = 4096; // 0x1000
field public static final int ACTION_SELECT = 4; // 0x4
field public static final android.os.Parcelable.Creator CREATOR;
+ field public static final int FOCUS_ACCESSIBILITY = 2; // 0x2
+ field public static final int FOCUS_INPUT = 1; // 0x1
+ field public static final int MOVEMENT_GRANULARITY_CHARACTER = 1; // 0x1
+ field public static final int MOVEMENT_GRANULARITY_LINE = 4; // 0x4
+ field public static final int MOVEMENT_GRANULARITY_PAGE = 16; // 0x10
+ field public static final int MOVEMENT_GRANULARITY_PARAGRAPH = 8; // 0x8
+ field public static final int MOVEMENT_GRANULARITY_WORD = 2; // 0x2
+ }
+
+ public abstract class AccessibilityNodeProvider {
+ ctor public AccessibilityNodeProvider();
+ method public android.view.accessibility.AccessibilityNodeInfo accessibilityFocusSearch(int, int);
+ method public android.view.accessibility.AccessibilityNodeInfo createAccessibilityNodeInfo(int);
+ method public android.view.accessibility.AccessibilityNodeInfo findAccessibilityFocus(int);
+ method public java.util.List<android.view.accessibility.AccessibilityNodeInfo> findAccessibilityNodeInfosByText(java.lang.String, int);
+ method public boolean performAction(int, int, android.os.Bundle);
}
public class AccessibilityRecord {
@@ -24063,6 +25264,8 @@
method public int getCurrentItemIndex();
method public int getFromIndex();
method public int getItemCount();
+ method public int getMaxScrollX();
+ method public int getMaxScrollY();
method public android.os.Parcelable getParcelableData();
method public int getRemovedCount();
method public int getScrollX();
@@ -24089,6 +25292,8 @@
method public void setFromIndex(int);
method public void setFullScreen(boolean);
method public void setItemCount(int);
+ method public void setMaxScrollX(int);
+ method public void setMaxScrollY(int);
method public void setParcelableData(android.os.Parcelable);
method public void setPassword(boolean);
method public void setRemovedCount(int);
@@ -24096,6 +25301,7 @@
method public void setScrollY(int);
method public void setScrollable(boolean);
method public void setSource(android.view.View);
+ method public void setSource(android.view.View, int);
method public void setToIndex(int);
}
@@ -24437,6 +25643,7 @@
field public static final int IME_ACTION_SEARCH = 3; // 0x3
field public static final int IME_ACTION_SEND = 4; // 0x4
field public static final int IME_ACTION_UNSPECIFIED = 0; // 0x0
+ field public static final int IME_FLAG_FORCE_ASCII = -2147483648; // 0x80000000
field public static final int IME_FLAG_NAVIGATE_NEXT = 134217728; // 0x8000000
field public static final int IME_FLAG_NAVIGATE_PREVIOUS = 67108864; // 0x4000000
field public static final int IME_FLAG_NO_ACCESSORY_ACTION = 536870912; // 0x20000000
@@ -24624,6 +25831,7 @@
method public void showSoftInputFromInputMethod(android.os.IBinder, int);
method public void showStatusIcon(android.os.IBinder, java.lang.String, int);
method public boolean switchToLastInputMethod(android.os.IBinder);
+ method public boolean switchToNextInputMethod(android.os.IBinder, boolean);
method public void toggleSoftInput(int, int);
method public void toggleSoftInputFromWindow(android.os.IBinder, int, int);
method public void updateCursor(android.view.View, int, int, int, int);
@@ -24678,6 +25886,18 @@
package android.view.textservice {
+ public final class SentenceSuggestionsInfo implements android.os.Parcelable {
+ ctor public SentenceSuggestionsInfo(android.view.textservice.SuggestionsInfo[], int[], int[]);
+ ctor public SentenceSuggestionsInfo(android.os.Parcel);
+ method public int describeContents();
+ method public int getLengthAt(int);
+ method public int getOffsetAt(int);
+ method public int getSuggestionsCount();
+ method public android.view.textservice.SuggestionsInfo getSuggestionsInfoAt(int);
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator CREATOR;
+ }
+
public final class SpellCheckerInfo implements android.os.Parcelable {
method public int describeContents();
method public android.content.ComponentName getComponent();
@@ -24694,23 +25914,28 @@
}
public class SpellCheckerSession {
+ method public void cancel();
method public void close();
+ method public void getSentenceSuggestions(android.view.textservice.TextInfo[], int);
method public android.view.textservice.SpellCheckerInfo getSpellChecker();
- method public void getSuggestions(android.view.textservice.TextInfo, int);
- method public void getSuggestions(android.view.textservice.TextInfo[], int, boolean);
+ method public deprecated void getSuggestions(android.view.textservice.TextInfo, int);
+ method public deprecated void getSuggestions(android.view.textservice.TextInfo[], int, boolean);
method public boolean isSessionDisconnected();
field public static final java.lang.String SERVICE_META_DATA = "android.view.textservice.scs";
}
public static abstract interface SpellCheckerSession.SpellCheckerSessionListener {
+ method public abstract void onGetSentenceSuggestions(android.view.textservice.SentenceSuggestionsInfo[]);
method public abstract void onGetSuggestions(android.view.textservice.SuggestionsInfo[]);
}
public final class SpellCheckerSubtype implements android.os.Parcelable {
ctor public SpellCheckerSubtype(int, java.lang.String, java.lang.String);
+ method public boolean containsExtraValueKey(java.lang.String);
method public int describeContents();
method public java.lang.CharSequence getDisplayName(android.content.Context, java.lang.String, android.content.pm.ApplicationInfo);
method public java.lang.String getExtraValue();
+ method public java.lang.String getExtraValueOf(java.lang.String);
method public java.lang.String getLocale();
method public int getNameResId();
method public void writeToParcel(android.os.Parcel, int);
@@ -24730,6 +25955,7 @@
method public void setCookieAndSequence(int, int);
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator CREATOR;
+ field public static final int RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS = 4; // 0x4
field public static final int RESULT_ATTR_IN_THE_DICTIONARY = 1; // 0x1
field public static final int RESULT_ATTR_LOOKS_LIKE_TYPO = 2; // 0x2
}
@@ -24979,6 +26205,8 @@
method public boolean enableSmoothTransition();
method public boolean getAllowContentAccess();
method public boolean getAllowFileAccess();
+ method public abstract boolean getAllowFileAccessFromFileURLs();
+ method public abstract boolean getAllowUniversalAccessFromFileURLs();
method public synchronized boolean getBlockNetworkImage();
method public synchronized boolean getBlockNetworkLoads();
method public boolean getBuiltInZoomControls();
@@ -24996,7 +26224,7 @@
method public synchronized java.lang.String getFixedFontFamily();
method public synchronized boolean getJavaScriptCanOpenWindowsAutomatically();
method public synchronized boolean getJavaScriptEnabled();
- method public deprecated synchronized android.webkit.WebSettings.LayoutAlgorithm getLayoutAlgorithm();
+ method public synchronized android.webkit.WebSettings.LayoutAlgorithm getLayoutAlgorithm();
method public boolean getLightTouchEnabled();
method public boolean getLoadWithOverviewMode();
method public synchronized boolean getLoadsImagesAutomatically();
@@ -25020,6 +26248,8 @@
method public synchronized java.lang.String getUserAgentString();
method public void setAllowContentAccess(boolean);
method public void setAllowFileAccess(boolean);
+ method public abstract void setAllowFileAccessFromFileURLs(boolean);
+ method public abstract void setAllowUniversalAccessFromFileURLs(boolean);
method public synchronized void setAppCacheEnabled(boolean);
method public synchronized void setAppCacheMaxSize(long);
method public synchronized void setAppCachePath(java.lang.String);
@@ -25043,7 +26273,7 @@
method public synchronized void setGeolocationEnabled(boolean);
method public synchronized void setJavaScriptCanOpenWindowsAutomatically(boolean);
method public synchronized void setJavaScriptEnabled(boolean);
- method public deprecated synchronized void setLayoutAlgorithm(android.webkit.WebSettings.LayoutAlgorithm);
+ method public synchronized void setLayoutAlgorithm(android.webkit.WebSettings.LayoutAlgorithm);
method public void setLightTouchEnabled(boolean);
method public void setLoadWithOverviewMode(boolean);
method public synchronized void setLoadsImagesAutomatically(boolean);
@@ -25078,12 +26308,12 @@
field public static final int LOAD_NO_CACHE = 2; // 0x2
}
- public static final deprecated class WebSettings.LayoutAlgorithm extends java.lang.Enum {
+ public static final class WebSettings.LayoutAlgorithm extends java.lang.Enum {
method public static android.webkit.WebSettings.LayoutAlgorithm valueOf(java.lang.String);
method public static final android.webkit.WebSettings.LayoutAlgorithm[] values();
enum_constant public static final android.webkit.WebSettings.LayoutAlgorithm NARROW_COLUMNS;
enum_constant public static final android.webkit.WebSettings.LayoutAlgorithm NORMAL;
- enum_constant public static final android.webkit.WebSettings.LayoutAlgorithm SINGLE_COLUMN;
+ enum_constant public static final deprecated android.webkit.WebSettings.LayoutAlgorithm SINGLE_COLUMN;
}
public static final class WebSettings.PluginState extends java.lang.Enum {
@@ -25179,7 +26409,8 @@
method public deprecated void emulateShiftHeld();
method public static deprecated void enablePlatformNotifications();
method public static java.lang.String findAddress(java.lang.String);
- method public int findAll(java.lang.String);
+ method public deprecated int findAll(java.lang.String);
+ method public void findAllAsync(java.lang.String);
method public void findNext(boolean);
method public void flingScroll(int, int);
method public void freeMemory();
@@ -25229,6 +26460,7 @@
method public void saveWebArchive(java.lang.String, boolean, android.webkit.ValueCallback<java.lang.String>);
method public void setCertificate(android.net.http.SslCertificate);
method public void setDownloadListener(android.webkit.DownloadListener);
+ method public void setFindListener(android.webkit.WebView.FindListener);
method public void setHorizontalScrollbarOverlay(boolean);
method public void setHttpAuthUsernamePassword(java.lang.String, java.lang.String, java.lang.String, java.lang.String);
method public void setInitialScale(int);
@@ -25247,6 +26479,10 @@
field public static final java.lang.String SCHEME_TEL = "tel:";
}
+ public static abstract interface WebView.FindListener {
+ method public abstract void onFindResultReceived(int, int, boolean);
+ }
+
public static class WebView.HitTestResult {
method public java.lang.String getExtra();
method public int getType();
@@ -25441,6 +26677,7 @@
ctor public AbsSeekBar(android.content.Context, android.util.AttributeSet);
ctor public AbsSeekBar(android.content.Context, android.util.AttributeSet, int);
method public int getKeyProgressIncrement();
+ method public android.graphics.drawable.Drawable getThumb();
method public int getThumbOffset();
method public void setKeyProgressIncrement(int);
method public void setThumb(android.graphics.drawable.Drawable);
@@ -25545,7 +26782,7 @@
method public abstract void onNothingSelected(android.widget.AdapterView<?>);
}
- public abstract class AdapterViewAnimator extends android.widget.AdapterView {
+ public abstract class AdapterViewAnimator extends android.widget.AdapterView implements android.widget.Advanceable {
ctor public AdapterViewAnimator(android.content.Context);
ctor public AdapterViewAnimator(android.content.Context, android.util.AttributeSet);
ctor public AdapterViewAnimator(android.content.Context, android.util.AttributeSet, int);
@@ -25578,6 +26815,7 @@
public class AdapterViewFlipper extends android.widget.AdapterViewAnimator {
ctor public AdapterViewFlipper(android.content.Context);
ctor public AdapterViewFlipper(android.content.Context, android.util.AttributeSet);
+ method public int getFlipInterval();
method public boolean isAutoStart();
method public boolean isFlipping();
method public void setAutoStart(boolean);
@@ -25586,6 +26824,11 @@
method public void stopFlipping();
}
+ public abstract interface Advanceable {
+ method public abstract void advance();
+ method public abstract void fyiWillBeAdvancedByHostKThx();
+ }
+
public class AlphabetIndexer extends android.database.DataSetObserver implements android.widget.SectionIndexer {
ctor public AlphabetIndexer(android.database.Cursor, int, java.lang.CharSequence);
method protected int compare(java.lang.String, java.lang.String);
@@ -25639,6 +26882,7 @@
method public void dismissDropDown();
method public boolean enoughToFilter();
method public android.widget.ListAdapter getAdapter();
+ method public java.lang.CharSequence getCompletionHint();
method public int getDropDownAnchor();
method public android.graphics.drawable.Drawable getDropDownBackground();
method public int getDropDownHeight();
@@ -25726,17 +26970,36 @@
ctor public CalendarView(android.content.Context, android.util.AttributeSet);
ctor public CalendarView(android.content.Context, android.util.AttributeSet, int);
method public long getDate();
+ method public int getDateTextAppearance();
method public int getFirstDayOfWeek();
+ method public int getFocusedMonthDateColor();
method public long getMaxDate();
method public long getMinDate();
+ method public android.graphics.drawable.Drawable getSelectedDateVerticalBar();
+ method public int getSelectedWeekBackgroundColor();
method public boolean getShowWeekNumber();
+ method public int getShownWeekCount();
+ method public int getUnfocusedMonthDateColor();
+ method public int getWeekDayTextAppearance();
+ method public int getWeekNumberColor();
+ method public int getWeekSeparatorLineColor();
method public void setDate(long);
method public void setDate(long, boolean, boolean);
+ method public void setDateTextAppearance(int);
method public void setFirstDayOfWeek(int);
+ method public void setFocusedMonthDateColor(int);
method public void setMaxDate(long);
method public void setMinDate(long);
method public void setOnDateChangeListener(android.widget.CalendarView.OnDateChangeListener);
+ method public void setSelectedDateVerticalBar(int);
+ method public void setSelectedDateVerticalBar(android.graphics.drawable.Drawable);
+ method public void setSelectedWeekBackgroundColor(int);
method public void setShowWeekNumber(boolean);
+ method public void setShownWeekCount(int);
+ method public void setUnfocusedMonthDateColor(int);
+ method public void setWeekDayTextAppearance(int);
+ method public void setWeekNumberColor(int);
+ method public void setWeekSeparatorLineColor(int);
}
public static abstract interface CalendarView.OnDateChangeListener {
@@ -25759,7 +27022,9 @@
ctor public CheckedTextView(android.content.Context);
ctor public CheckedTextView(android.content.Context, android.util.AttributeSet);
ctor public CheckedTextView(android.content.Context, android.util.AttributeSet, int);
+ method public android.graphics.drawable.Drawable getCheckMarkDrawable();
method public boolean isChecked();
+ method public void onPaddingChanged(int);
method public void setCheckMarkDrawable(int);
method public void setCheckMarkDrawable(android.graphics.drawable.Drawable);
method public void setChecked(boolean);
@@ -26042,6 +27307,7 @@
ctor public FrameLayout(android.content.Context, android.util.AttributeSet, int);
method public deprecated boolean getConsiderGoneChildrenWhenMeasuring();
method public android.graphics.drawable.Drawable getForeground();
+ method public int getForegroundGravity();
method public boolean getMeasureAllChildren();
method protected void onLayout(boolean, int, int, int, int);
method public void setForeground(android.graphics.drawable.Drawable);
@@ -26109,10 +27375,12 @@
field public static final android.widget.GridLayout.Alignment BASELINE;
field public static final android.widget.GridLayout.Alignment BOTTOM;
field public static final android.widget.GridLayout.Alignment CENTER;
+ field public static final android.widget.GridLayout.Alignment END;
field public static final android.widget.GridLayout.Alignment FILL;
field public static final int HORIZONTAL = 0; // 0x0
field public static final android.widget.GridLayout.Alignment LEFT;
field public static final android.widget.GridLayout.Alignment RIGHT;
+ field public static final android.widget.GridLayout.Alignment START;
field public static final android.widget.GridLayout.Alignment TOP;
field public static final int UNDEFINED = -2147483648; // 0x80000000
field public static final int VERTICAL = 1; // 0x1
@@ -26141,8 +27409,14 @@
ctor public GridView(android.content.Context, android.util.AttributeSet);
ctor public GridView(android.content.Context, android.util.AttributeSet, int);
method public android.widget.ListAdapter getAdapter();
+ method public int getColumnWidth();
+ method public int getGravity();
+ method public int getHorizontalSpacing();
method public int getNumColumns();
+ method public int getRequestedColumnWidth();
+ method public int getRequestedHorizontalSpacing();
method public int getStretchMode();
+ method public int getVerticalSpacing();
method public void setColumnWidth(int);
method public void setGravity(int);
method public void setHorizontalSpacing(int);
@@ -26225,19 +27499,27 @@
ctor public ImageView(android.content.Context, android.util.AttributeSet);
ctor public ImageView(android.content.Context, android.util.AttributeSet, int);
method public final void clearColorFilter();
+ method public boolean getAdjustViewBounds();
method public boolean getBaselineAlignBottom();
+ method public android.graphics.ColorFilter getColorFilter();
+ method public boolean getCropToPadding();
method public android.graphics.drawable.Drawable getDrawable();
+ method public int getImageAlpha();
method public android.graphics.Matrix getImageMatrix();
+ method public int getMaxHeight();
+ method public int getMaxWidth();
method public android.widget.ImageView.ScaleType getScaleType();
method public int[] onCreateDrawableState(int);
method public void setAdjustViewBounds(boolean);
- method public void setAlpha(int);
+ method public deprecated void setAlpha(int);
method public void setBaseline(int);
method public void setBaselineAlignBottom(boolean);
method public final void setColorFilter(int, android.graphics.PorterDuff.Mode);
method public final void setColorFilter(int);
method public void setColorFilter(android.graphics.ColorFilter);
+ method public void setCropToPadding(boolean);
method protected boolean setFrame(int, int, int, int);
+ method public void setImageAlpha(int);
method public void setImageBitmap(android.graphics.Bitmap);
method public void setImageDrawable(android.graphics.drawable.Drawable);
method public void setImageLevel(int);
@@ -26268,6 +27550,7 @@
ctor public LinearLayout(android.content.Context, android.util.AttributeSet);
ctor public LinearLayout(android.content.Context, android.util.AttributeSet, int);
method public int getBaselineAlignedChildIndex();
+ method public android.graphics.drawable.Drawable getDividerDrawable();
method public int getDividerPadding();
method public int getOrientation();
method public int getShowDividers();
@@ -26691,6 +27974,7 @@
ctor public RelativeLayout(android.content.Context);
ctor public RelativeLayout(android.content.Context, android.util.AttributeSet);
ctor public RelativeLayout(android.content.Context, android.util.AttributeSet, int);
+ method public int getGravity();
method protected void onLayout(boolean, int, int, int, int);
method public void setGravity(int);
method public void setHorizontalGravity(int);
@@ -26729,6 +28013,7 @@
public class RemoteViews implements android.view.LayoutInflater.Filter android.os.Parcelable {
ctor public RemoteViews(java.lang.String, int);
+ ctor public RemoteViews(android.widget.RemoteViews, android.widget.RemoteViews);
ctor public RemoteViews(android.os.Parcel);
method public void addView(int, android.widget.RemoteViews);
method public android.view.View apply(android.content.Context, android.view.ViewGroup);
@@ -26746,6 +28031,7 @@
method public void setChar(int, java.lang.String, char);
method public void setCharSequence(int, java.lang.String, java.lang.CharSequence);
method public void setChronometer(int, long, java.lang.String, boolean);
+ method public void setContentDescription(int, java.lang.CharSequence);
method public void setDisplayedChild(int, int);
method public void setDouble(int, java.lang.String, double);
method public void setEmptyView(int, int);
@@ -26767,6 +28053,7 @@
method public void setShort(int, java.lang.String, short);
method public void setString(int, java.lang.String, java.lang.String);
method public void setTextColor(int, int);
+ method public void setTextViewCompoundDrawables(int, int, int, int, int);
method public void setTextViewText(int, java.lang.CharSequence);
method public void setUri(int, java.lang.String, android.net.Uri);
method public void setViewVisibility(int, int);
@@ -26867,7 +28154,11 @@
public class SearchView extends android.widget.LinearLayout implements android.view.CollapsibleActionView {
ctor public SearchView(android.content.Context);
ctor public SearchView(android.content.Context, android.util.AttributeSet);
+ method public int getImeOptions();
+ method public int getInputType();
+ method public int getMaxWidth();
method public java.lang.CharSequence getQuery();
+ method public java.lang.CharSequence getQueryHint();
method public android.widget.CursorAdapter getSuggestionsAdapter();
method public boolean isIconfiedByDefault();
method public boolean isIconified();
@@ -27063,9 +28354,19 @@
ctor public Spinner(android.content.Context, android.util.AttributeSet);
ctor public Spinner(android.content.Context, android.util.AttributeSet, int);
ctor public Spinner(android.content.Context, android.util.AttributeSet, int, int);
+ method public int getDropDownHorizontalOffset();
+ method public int getDropDownVerticalOffset();
+ method public int getDropDownWidth();
+ method public int getGravity();
+ method public android.graphics.drawable.Drawable getPopupBackground();
method public java.lang.CharSequence getPrompt();
method public void onClick(android.content.DialogInterface, int);
+ method public void setDropDownHorizontalOffset(int);
+ method public void setDropDownVerticalOffset(int);
+ method public void setDropDownWidth(int);
method public void setGravity(int);
+ method public void setPopupBackgroundDrawable(android.graphics.drawable.Drawable);
+ method public void setPopupBackgroundResource(int);
method public void setPrompt(java.lang.CharSequence);
method public void setPromptId(int);
field public static final int MODE_DIALOG = 0; // 0x0
@@ -27086,14 +28387,26 @@
ctor public Switch(android.content.Context);
ctor public Switch(android.content.Context, android.util.AttributeSet);
ctor public Switch(android.content.Context, android.util.AttributeSet, int);
+ method public int getSwitchMinWidth();
+ method public int getSwitchPadding();
method public java.lang.CharSequence getTextOff();
method public java.lang.CharSequence getTextOn();
+ method public android.graphics.drawable.Drawable getThumbDrawable();
+ method public int getThumbTextPadding();
+ method public android.graphics.drawable.Drawable getTrackDrawable();
method public void onMeasure(int, int);
+ method public void setSwitchMinWidth(int);
+ method public void setSwitchPadding(int);
method public void setSwitchTextAppearance(android.content.Context, int);
method public void setSwitchTypeface(android.graphics.Typeface, int);
method public void setSwitchTypeface(android.graphics.Typeface);
method public void setTextOff(java.lang.CharSequence);
method public void setTextOn(java.lang.CharSequence);
+ method public void setThumbDrawable(android.graphics.drawable.Drawable);
+ method public void setThumbResource(int);
+ method public void setThumbTextPadding(int);
+ method public void setTrackDrawable(android.graphics.drawable.Drawable);
+ method public void setTrackResource(int);
}
public class TabHost extends android.widget.FrameLayout implements android.view.ViewTreeObserver.OnTouchModeChangeListener {
@@ -27237,11 +28550,13 @@
method public android.text.InputFilter[] getFilters();
method public boolean getFreezesText();
method public int getGravity();
+ method public int getHighlightColor();
method public java.lang.CharSequence getHint();
method public final android.content.res.ColorStateList getHintTextColors();
method public int getImeActionId();
method public java.lang.CharSequence getImeActionLabel();
method public int getImeOptions();
+ method public boolean getIncludeFontPadding();
method public android.os.Bundle getInputExtras(boolean);
method public int getInputType();
method public final android.text.method.KeyListener getKeyListener();
@@ -27249,8 +28564,19 @@
method public int getLineBounds(int, android.graphics.Rect);
method public int getLineCount();
method public int getLineHeight();
+ method public float getLineSpacingExtra();
+ method public float getLineSpacingMultiplier();
method public final android.content.res.ColorStateList getLinkTextColors();
method public final boolean getLinksClickable();
+ method public int getMarqueeRepeatLimit();
+ method public int getMaxEms();
+ method public int getMaxHeight();
+ method public int getMaxLines();
+ method public int getMaxWidth();
+ method public int getMinEms();
+ method public int getMinHeight();
+ method public int getMinLines();
+ method public int getMinWidth();
method public final android.text.method.MovementMethod getMovementMethod();
method public int getOffsetForPosition(float, float);
method public android.text.TextPaint getPaint();
@@ -27258,6 +28584,10 @@
method public java.lang.String getPrivateImeOptions();
method public int getSelectionEnd();
method public int getSelectionStart();
+ method public int getShadowColor();
+ method public float getShadowDx();
+ method public float getShadowDy();
+ method public float getShadowRadius();
method public java.lang.CharSequence getText();
method public static int getTextColor(android.content.Context, android.content.res.TypedArray, int);
method public final android.content.res.ColorStateList getTextColors();
@@ -27272,6 +28602,7 @@
method public android.graphics.Typeface getTypeface();
method public android.text.style.URLSpan[] getUrls();
method public boolean hasSelection();
+ method public boolean isCursorVisible();
method public boolean isInputMethodTarget();
method public boolean isSuggestionsEnabled();
method public boolean isTextSelectable();
@@ -27284,6 +28615,8 @@
method public void onEndBatchEdit();
method public boolean onPreDraw();
method public boolean onPrivateIMECommand(java.lang.String, android.os.Bundle);
+ method public void onResolvedLayoutDirectionReset();
+ method public void onResolvedTextDirectionChanged();
method public void onRestoreInstanceState(android.os.Parcelable);
method public android.os.Parcelable onSaveInstanceState();
method protected void onSelectionChanged(int, int);
@@ -27339,6 +28672,7 @@
method public void setMinWidth(int);
method public final void setMovementMethod(android.text.method.MovementMethod);
method public void setOnEditorActionListener(android.widget.TextView.OnEditorActionListener);
+ method public void setPaddingRelative(int, int, int, int);
method public void setPaintFlags(int);
method public void setPrivateImeOptions(java.lang.String);
method public void setRawInputType(int);
@@ -41819,6 +43153,10 @@
method public static void assertTrue(boolean);
method public static void fail(java.lang.String);
method public static void fail();
+ method public static void failNotEquals(java.lang.String, java.lang.Object, java.lang.Object);
+ method public static void failNotSame(java.lang.String, java.lang.Object, java.lang.Object);
+ method public static void failSame(java.lang.String);
+ method public static java.lang.String format(java.lang.String, java.lang.Object, java.lang.Object);
}
public class AssertionFailedError extends java.lang.AssertionError {
@@ -41828,6 +43166,8 @@
public class ComparisonFailure extends junit.framework.AssertionFailedError {
ctor public ComparisonFailure(java.lang.String, java.lang.String, java.lang.String);
+ method public java.lang.String getActual();
+ method public java.lang.String getExpected();
}
public abstract interface Protectable {
@@ -41901,18 +43241,21 @@
ctor public TestSuite(java.lang.Class<?>);
ctor public TestSuite(java.lang.Class<? extends junit.framework.TestCase>, java.lang.String);
ctor public TestSuite(java.lang.String);
+ ctor public TestSuite(java.lang.Class<?>...);
+ ctor public TestSuite(java.lang.Class<? extends junit.framework.TestCase>[], java.lang.String);
method public void addTest(junit.framework.Test);
method public void addTestSuite(java.lang.Class<? extends junit.framework.TestCase>);
method public int countTestCases();
method public static junit.framework.Test createTest(java.lang.Class<?>, java.lang.String);
method public java.lang.String getName();
- method public static java.lang.reflect.Constructor<?> getTestConstructor(java.lang.Class) throws java.lang.NoSuchMethodException;
+ method public static java.lang.reflect.Constructor<?> getTestConstructor(java.lang.Class<?>) throws java.lang.NoSuchMethodException;
method public void run(junit.framework.TestResult);
method public void runTest(junit.framework.Test, junit.framework.TestResult);
method public void setName(java.lang.String);
method public junit.framework.Test testAt(int);
method public int testCount();
method public java.util.Enumeration<junit.framework.Test> tests();
+ method public static junit.framework.Test warning(java.lang.String);
}
}
@@ -41929,12 +43272,12 @@
method public java.lang.String extractClassName(java.lang.String);
method public static java.lang.String getFilteredTrace(java.lang.Throwable);
method public static java.lang.String getFilteredTrace(java.lang.String);
- method public junit.runner.TestSuiteLoader getLoader();
+ method public deprecated junit.runner.TestSuiteLoader getLoader();
method public static java.lang.String getPreference(java.lang.String);
method public static int getPreference(java.lang.String, int);
method protected static java.util.Properties getPreferences();
method public junit.framework.Test getTest(java.lang.String);
- method public static boolean inVAJava();
+ method public static deprecated boolean inVAJava();
method protected java.lang.Class<?> loadSuiteClass(java.lang.String) throws java.lang.ClassNotFoundException;
method protected java.lang.String processArguments(java.lang.String[]);
method protected abstract void runFailed(java.lang.String);
diff --git a/api/current.txt b/api/current.txt
index 68e1734..8402f31 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -485,6 +485,7 @@
field public static final int focusable = 16842970; // 0x10100da
field public static final int focusableInTouchMode = 16842971; // 0x10100db
field public static final int focusedMonthDateColor = 16843587; // 0x1010343
+ field public static final int fontFamily = 16843692; // 0x10103ac
field public static final int footerDividersEnabled = 16843311; // 0x101022f
field public static final int foreground = 16843017; // 0x1010109
field public static final int foregroundGravity = 16843264; // 0x1010200
@@ -588,12 +589,11 @@
field public static final int isRepeatable = 16843336; // 0x1010248
field public static final int isScrollContainer = 16843342; // 0x101024e
field public static final int isSticky = 16843335; // 0x1010247
- field public static final int isolatedProcess = 16843687; // 0x10103a7
+ field public static final int isolatedProcess = 16843689; // 0x10103a9
field public static final int itemBackground = 16843056; // 0x1010130
field public static final int itemIconDisabledAlpha = 16843057; // 0x1010131
field public static final int itemPadding = 16843565; // 0x101032d
field public static final int itemTextAppearance = 16843052; // 0x101012c
- field public static final int kcm = 16843688; // 0x10103a8
field public static final int keepScreenOn = 16843286; // 0x1010216
field public static final int key = 16843240; // 0x10101e8
field public static final int keyBackground = 16843315; // 0x1010233
@@ -608,6 +608,7 @@
field public static final int keyTextColor = 16843318; // 0x1010236
field public static final int keyTextSize = 16843316; // 0x1010234
field public static final int keyWidth = 16843325; // 0x101023d
+ field public static final int keyboardLayout = 16843691; // 0x10103ab
field public static final int keyboardMode = 16843341; // 0x101024d
field public static final int keycode = 16842949; // 0x10100c5
field public static final int killAfterRestore = 16843420; // 0x101029c
@@ -746,14 +747,14 @@
field public static final int panelColorForeground = 16842848; // 0x1010060
field public static final int panelFullBackground = 16842847; // 0x101005f
field public static final int panelTextAppearance = 16842850; // 0x1010062
- field public static final int parentActivityName = 16843689; // 0x10103a9
+ field public static final int parentActivityName = 16843687; // 0x10103a7
field public static final deprecated int password = 16843100; // 0x101015c
field public static final int path = 16842794; // 0x101002a
field public static final int pathPattern = 16842796; // 0x101002c
field public static final int pathPrefix = 16842795; // 0x101002b
field public static final int permission = 16842758; // 0x1010006
field public static final int permissionGroup = 16842762; // 0x101000a
- field public static final int permissionGroupFlags = 16843691; // 0x10103ab
+ field public static final int permissionGroupFlags = 16843688; // 0x10103a8
field public static final int persistent = 16842765; // 0x101000d
field public static final int persistentDrawingCache = 16842990; // 0x10100ee
field public static final deprecated int phoneNumber = 16843111; // 0x1010167
@@ -15218,7 +15219,7 @@
field public static final int HONEYCOMB_MR2 = 13; // 0xd
field public static final int ICE_CREAM_SANDWICH = 14; // 0xe
field public static final int ICE_CREAM_SANDWICH_MR1 = 15; // 0xf
- field public static final int JELLY_BEAN = 10000; // 0x2710
+ field public static final int JELLY_BEAN = 16; // 0x10
}
public final class Bundle implements java.lang.Cloneable android.os.Parcelable {
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index a48924e..2baad62 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -23,7 +23,6 @@
import android.content.Intent;
import android.content.IntentFilter;
import android.content.IntentSender;
-import android.content.pm.ManifestDigest;
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
import android.graphics.drawable.Drawable;
@@ -1090,10 +1089,6 @@
public static final String EXTRA_VERIFICATION_INSTALL_FLAGS
= "android.content.pm.extra.VERIFICATION_INSTALL_FLAGS";
- /** {@hide} */
- // TODO: enable this for userdebug and eng builds; see 6389556
- public static final boolean DEFAULT_ENFORCE_READ_EXTERNAL_STORAGE = false;
-
/**
* Retrieve overall information about an application package that is
* installed on the system.
diff --git a/core/java/android/database/sqlite/SQLiteGlobal.java b/core/java/android/database/sqlite/SQLiteGlobal.java
index 5d8f80e..5ff199a 100644
--- a/core/java/android/database/sqlite/SQLiteGlobal.java
+++ b/core/java/android/database/sqlite/SQLiteGlobal.java
@@ -18,6 +18,7 @@
import android.content.res.Resources;
import android.os.StatFs;
+import android.os.SystemProperties;
/**
* Provides access to SQLite functions that affect all database connection,
@@ -62,7 +63,7 @@
if (sDefaultPageSize == 0) {
sDefaultPageSize = new StatFs("/data").getBlockSize();
}
- return sDefaultPageSize;
+ return SystemProperties.getInt("debug.sqlite.pagesize", sDefaultPageSize);
}
}
@@ -70,47 +71,55 @@
* Gets the default journal mode when WAL is not in use.
*/
public static String getDefaultJournalMode() {
- return Resources.getSystem().getString(
- com.android.internal.R.string.db_default_journal_mode);
+ return SystemProperties.get("debug.sqlite.journalmode",
+ Resources.getSystem().getString(
+ com.android.internal.R.string.db_default_journal_mode));
}
/**
* Gets the journal size limit in bytes.
*/
public static int getJournalSizeLimit() {
- return Resources.getSystem().getInteger(
- com.android.internal.R.integer.db_journal_size_limit);
+ return SystemProperties.getInt("debug.sqlite.journalsizelimit",
+ Resources.getSystem().getInteger(
+ com.android.internal.R.integer.db_journal_size_limit));
}
/**
* Gets the default database synchronization mode when WAL is not in use.
*/
public static String getDefaultSyncMode() {
- return Resources.getSystem().getString(
- com.android.internal.R.string.db_default_sync_mode);
+ return SystemProperties.get("debug.sqlite.syncmode",
+ Resources.getSystem().getString(
+ com.android.internal.R.string.db_default_sync_mode));
}
/**
* Gets the database synchronization mode when in WAL mode.
*/
public static String getWALSyncMode() {
- return Resources.getSystem().getString(
- com.android.internal.R.string.db_wal_sync_mode);
+ return SystemProperties.get("debug.sqlite.wal.syncmode",
+ Resources.getSystem().getString(
+ com.android.internal.R.string.db_wal_sync_mode));
}
/**
* Gets the WAL auto-checkpoint integer in database pages.
*/
public static int getWALAutoCheckpoint() {
- return Math.max(1, Resources.getSystem().getInteger(
+ int value = SystemProperties.getInt("debug.sqlite.wal.autocheckpoint",
+ Resources.getSystem().getInteger(
com.android.internal.R.integer.db_wal_autocheckpoint));
+ return Math.max(1, value);
}
/**
* Gets the connection pool size when in WAL mode.
*/
public static int getWALConnectionPoolSize() {
- return Math.max(2, Resources.getSystem().getInteger(
+ int value = SystemProperties.getInt("debug.sqlite.wal.poolsize",
+ Resources.getSystem().getInteger(
com.android.internal.R.integer.db_connection_pool_size));
+ return Math.max(2, value);
}
}
diff --git a/core/java/android/hardware/input/InputManager.java b/core/java/android/hardware/input/InputManager.java
index 5ba1850..6448b55 100755
--- a/core/java/android/hardware/input/InputManager.java
+++ b/core/java/android/hardware/input/InputManager.java
@@ -96,14 +96,14 @@
* <keyboard-layouts xmlns:android="http://schemas.android.com/apk/res/android">
* <keyboard-layout android:name="keyboard_layout_english_us"
* android:label="@string/keyboard_layout_english_us_label"
- * android:kcm="@raw/keyboard_layout_english_us" />
+ * android:keyboardLayout="@raw/keyboard_layout_english_us" />
* </keyboard-layouts>
* </p><p>
* The <code>android:name</code> attribute specifies an identifier by which
* the keyboard layout will be known in the package.
* The <code>android:label</code> attributes specifies a human-readable descriptive
* label to describe the keyboard layout in the user interface, such as "English (US)".
- * The <code>android:kcm</code> attribute refers to a
+ * The <code>android:keyboardLayout</code> attribute refers to a
* <a href="http://source.android.com/tech/input/key-character-map-files.html">
* key character map</a> resource that defines the keyboard layout.
* </p>
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index 63275cf..2d5b625 100644
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -370,7 +370,7 @@
public static final int ICE_CREAM_SANDWICH_MR1 = 15;
/**
- * Next up on Android!
+ * Android 4.1.
*
* <p>Applications targeting this or a later release will get these
* new changes in behavior:</p>
@@ -381,7 +381,7 @@
* exist in the application's manifest.
* </ul>
*/
- public static final int JELLY_BEAN = CUR_DEVELOPMENT;
+ public static final int JELLY_BEAN = 16;
}
/** The type of build, like "user" or "eng". */
diff --git a/core/java/android/os/Power.java b/core/java/android/os/Power.java
deleted file mode 100644
index 58df940..0000000
--- a/core/java/android/os/Power.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.os;
-
-import java.io.IOException;
-import android.os.ServiceManager;
-
-/**
- * Class that provides access to some of the power management functions.
- *
- * {@hide}
- */
-public class Power
-{
- // can't instantiate this class
- private Power()
- {
- }
-
- /**
- * Wake lock that ensures that the CPU is running. The screen might
- * not be on.
- */
- public static final int PARTIAL_WAKE_LOCK = 1;
-
- /**
- * Wake lock that ensures that the screen is on.
- */
- public static final int FULL_WAKE_LOCK = 2;
-
- public static native void acquireWakeLock(int lock, String id);
- public static native void releaseWakeLock(String id);
-
- /**
- * Brightness value for fully off
- */
- public static final int BRIGHTNESS_OFF = 0;
-
- /**
- * Brightness value for dim backlight
- */
- public static final int BRIGHTNESS_DIM = 20;
-
- /**
- * Brightness value for fully on
- */
- public static final int BRIGHTNESS_ON = 255;
-
- /**
- * Brightness value to use when battery is low
- */
- public static final int BRIGHTNESS_LOW_BATTERY = 10;
-
- /**
- * Threshold for BRIGHTNESS_LOW_BATTERY (percentage)
- * Screen will stay dim if battery level is <= LOW_BATTERY_THRESHOLD
- */
- public static final int LOW_BATTERY_THRESHOLD = 10;
-
- /**
- * Turn the screen on or off
- *
- * @param on Whether you want the screen on or off
- */
- public static native int setScreenState(boolean on);
-
- public static native int setLastUserActivityTimeout(long ms);
-
- /**
- * Low-level function turn the device off immediately, without trying
- * to be clean. Most people should use
- * {@link android.internal.app.ShutdownThread} for a clean shutdown.
- *
- * @deprecated
- * @hide
- */
- @Deprecated
- public static native void shutdown();
-
- /**
- * Reboot the device.
- * @param reason code to pass to the kernel (e.g. "recovery"), or null.
- *
- * @throws IOException if reboot fails for some reason (eg, lack of
- * permission)
- */
- public static void reboot(String reason) throws IOException
- {
- rebootNative(reason);
- }
-
- private static native void rebootNative(String reason) throws IOException ;
-
- public static native int powerInitNative();
-}
diff --git a/core/java/android/os/PowerManager.java b/core/java/android/os/PowerManager.java
index 21373ec..903c8b3 100644
--- a/core/java/android/os/PowerManager.java
+++ b/core/java/android/os/PowerManager.java
@@ -197,7 +197,31 @@
* Does not work with PARTIAL_WAKE_LOCKs.
*/
public static final int ON_AFTER_RELEASE = 0x20000000;
-
+
+ /**
+ * Brightness value to use when battery is low.
+ * @hide
+ */
+ public static final int BRIGHTNESS_LOW_BATTERY = 10;
+
+ /**
+ * Brightness value for fully on.
+ * @hide
+ */
+ public static final int BRIGHTNESS_ON = 255;
+
+ /**
+ * Brightness value for dim backlight.
+ * @hide
+ */
+ public static final int BRIGHTNESS_DIM = 20;
+
+ /**
+ * Brightness value for fully off.
+ * @hide
+ */
+ public static final int BRIGHTNESS_OFF = 0;
+
/**
* Class lets you say that you need to have the device on.
* <p>
diff --git a/core/java/android/os/Trace.java b/core/java/android/os/Trace.java
index 911183d..c0240fe 100644
--- a/core/java/android/os/Trace.java
+++ b/core/java/android/os/Trace.java
@@ -38,6 +38,7 @@
public static final long TRACE_TAG_ACTIVITY_MANAGER = 1L << 6;
public static final long TRACE_TAG_SYNC_MANAGER = 1L << 7;
public static final long TRACE_TAG_AUDIO = 1L << 8;
+ public static final long TRACE_TAG_VIDEO = 1L << 9;
public static final int TRACE_FLAGS_START_BIT = 1;
public static final String[] TRACE_TAGS = {
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 497e66e8..ea3cab4 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -4253,6 +4253,10 @@
/** Timeout for package verification. {@hide} */
public static final String PACKAGE_VERIFIER_TIMEOUT = "verifier_timeout";
+ /** {@hide} */
+ public static final String
+ READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT = "read_external_storage_enforced_default";
+
/**
* Duration in milliseconds before pre-authorized URIs for the contacts
* provider should expire.
diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java
index 9d36677..3e0942c 100644
--- a/core/java/android/service/wallpaper/WallpaperService.java
+++ b/core/java/android/service/wallpaper/WallpaperService.java
@@ -154,7 +154,6 @@
int mCurWindowPrivateFlags = mWindowPrivateFlags;
final Rect mVisibleInsets = new Rect();
final Rect mWinFrame = new Rect();
- final Rect mSystemInsets = new Rect();
final Rect mContentInsets = new Rect();
final Configuration mConfiguration = new Configuration();
@@ -254,7 +253,7 @@
final BaseIWindow mWindow = new BaseIWindow() {
@Override
- public void resized(int w, int h, Rect systemInsets, Rect contentInsets,
+ public void resized(int w, int h, Rect contentInsets,
Rect visibleInsets, boolean reportDraw, Configuration newConfig) {
Message msg = mCaller.obtainMessageI(MSG_WINDOW_RESIZED,
reportDraw ? 1 : 0);
@@ -621,7 +620,7 @@
final int relayoutResult = mSession.relayout(
mWindow, mWindow.mSeq, mLayout, mWidth, mHeight,
- View.VISIBLE, 0, mWinFrame, mSystemInsets, mContentInsets,
+ View.VISIBLE, 0, mWinFrame, mContentInsets,
mVisibleInsets, mConfiguration, mSurfaceHolder.mSurface);
if (DEBUG) Log.v(TAG, "New surface: " + mSurfaceHolder.mSurface
diff --git a/core/java/android/text/DynamicLayout.java b/core/java/android/text/DynamicLayout.java
index dc58ef2..d909362 100644
--- a/core/java/android/text/DynamicLayout.java
+++ b/core/java/android/text/DynamicLayout.java
@@ -35,6 +35,7 @@
public class DynamicLayout extends Layout
{
private static final int PRIORITY = 128;
+ private static final int BLOCK_MINIMUM_CHARACTER_LENGTH = 400;
/**
* Make a layout for the specified text that will be updated as
@@ -117,10 +118,6 @@
mObjects = new PackedObjectVector<Directions>(1);
- mBlockEndLines = new int[] { 0 };
- mBlockIndices = new int[] { INVALID_BLOCK_INDEX };
- mNumberOfBlocks = 1;
-
mIncludePad = includepad;
/*
@@ -170,7 +167,6 @@
mObjects.insertAt(0, dirs);
// Update from 0 characters to whatever the real text is
-
reflow(base, 0, 0, base.length());
if (base instanceof Spannable) {
@@ -295,14 +291,12 @@
// the very end of the buffer, then we already have a line that
// starts there, so disregard the blank line.
- if (where + after != len &&
- reflowed.getLineStart(n - 1) == where + after)
+ if (where + after != len && reflowed.getLineStart(n - 1) == where + after)
n--;
// remove affected lines from old layout
mInts.deleteAt(startline, endline - startline);
mObjects.deleteAt(startline, endline - startline);
- updateBlocks(startline, endline - 1, n);
// adjust offsets in layout for new height and offsets
@@ -362,6 +356,8 @@
mObjects.insertAt(startline + i, objects);
}
+ updateBlocks(startline, endline - 1, n);
+
synchronized (sLock) {
sStaticLayout = reflowed;
reflowed.finish();
@@ -369,6 +365,62 @@
}
/**
+ * Create the initial block structure, cutting the text into blocks of at least
+ * BLOCK_MINIMUM_CHARACTER_SIZE characters, aligned on the ends of paragraphs.
+ */
+ private void createBlocks() {
+ int offset = BLOCK_MINIMUM_CHARACTER_LENGTH;
+ mNumberOfBlocks = 0;
+ final CharSequence text = mDisplay;
+
+ while (true) {
+ offset = TextUtils.indexOf(text, '\n', offset);
+ if (offset < 0) {
+ addBlockAtOffset(text.length());
+ break;
+ } else {
+ addBlockAtOffset(offset);
+ offset += BLOCK_MINIMUM_CHARACTER_LENGTH;
+ }
+ }
+
+ // mBlockIndices and mBlockEndLines should have the same length
+ mBlockIndices = new int[mBlockEndLines.length];
+ for (int i = 0; i < mBlockEndLines.length; i++) {
+ mBlockIndices[i] = INVALID_BLOCK_INDEX;
+ }
+ }
+
+ /**
+ * Create a new block, ending at the specified character offset.
+ * A block will actually be created only if has at least one line, i.e. this offset is
+ * not on the end line of the previous block.
+ */
+ private void addBlockAtOffset(int offset) {
+ final int line = getLineForOffset(offset);
+
+ if (mBlockEndLines == null) {
+ // Initial creation of the array, no test on previous block ending line
+ mBlockEndLines = new int[ArrayUtils.idealIntArraySize(1)];
+ mBlockEndLines[mNumberOfBlocks] = line;
+ mNumberOfBlocks++;
+ return;
+ }
+
+ final int previousBlockEndLine = mBlockEndLines[mNumberOfBlocks - 1];
+ if (line > previousBlockEndLine) {
+ if (mNumberOfBlocks == mBlockEndLines.length) {
+ // Grow the array if needed
+ int[] blockEndLines = new int[ArrayUtils.idealIntArraySize(mNumberOfBlocks + 1)];
+ System.arraycopy(mBlockEndLines, 0, blockEndLines, 0, mNumberOfBlocks);
+ mBlockEndLines = blockEndLines;
+ }
+ mBlockEndLines[mNumberOfBlocks] = line;
+ mNumberOfBlocks++;
+ }
+ }
+
+ /**
* This method is called every time the layout is reflowed after an edition.
* It updates the internal block data structure. The text is split in blocks
* of contiguous lines, with at least one block for the entire text.
@@ -388,6 +440,11 @@
* @hide
*/
void updateBlocks(int startLine, int endLine, int newLineCount) {
+ if (mBlockEndLines == null) {
+ createBlocks();
+ return;
+ }
+
int firstBlock = -1;
int lastBlock = -1;
for (int i = 0; i < mNumberOfBlocks; i++) {
diff --git a/core/java/android/text/style/TextAppearanceSpan.java b/core/java/android/text/style/TextAppearanceSpan.java
index 5fd7c57..ecbf4bc 100644
--- a/core/java/android/text/style/TextAppearanceSpan.java
+++ b/core/java/android/text/style/TextAppearanceSpan.java
@@ -68,24 +68,29 @@
TextAppearance_textSize, -1);
mStyle = a.getInt(com.android.internal.R.styleable.TextAppearance_textStyle, 0);
- int tf = a.getInt(com.android.internal.R.styleable.TextAppearance_typeface, 0);
+ String family = a.getString(com.android.internal.R.styleable.TextAppearance_fontFamily);
+ if (family != null) {
+ mTypeface = family;
+ } else {
+ int tf = a.getInt(com.android.internal.R.styleable.TextAppearance_typeface, 0);
- switch (tf) {
- case 1:
- mTypeface = "sans";
- break;
+ switch (tf) {
+ case 1:
+ mTypeface = "sans";
+ break;
- case 2:
- mTypeface = "serif";
- break;
+ case 2:
+ mTypeface = "serif";
+ break;
- case 3:
- mTypeface = "monospace";
- break;
-
- default:
- mTypeface = null;
- break;
+ case 3:
+ mTypeface = "monospace";
+ break;
+
+ default:
+ mTypeface = null;
+ break;
+ }
}
a.recycle();
diff --git a/core/java/android/util/TimeUtils.java b/core/java/android/util/TimeUtils.java
index 2883eca..c4ebec4 100644
--- a/core/java/android/util/TimeUtils.java
+++ b/core/java/android/util/TimeUtils.java
@@ -26,6 +26,7 @@
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
+import java.util.Calendar;
import java.util.Collection;
import java.util.TimeZone;
import java.util.Date;
@@ -381,4 +382,22 @@
}
formatDuration(time-now, pw, 0);
}
+
+ /**
+ * Convert a System.currentTimeMillis() value to a time of day value like
+ * that printed in logs. MM-DD HH:MM:SS.MMM
+ *
+ * @param millis since the epoch (1/1/1970)
+ * @return String representation of the time.
+ * @hide
+ */
+ public static String logTimeOfDay(long millis) {
+ Calendar c = Calendar.getInstance();
+ if (millis >= 0) {
+ c.setTimeInMillis(millis);
+ return String.format("%tm-%td %tH:%tM:%tS.%tL", c, c, c, c, c, c);
+ } else {
+ return Long.toString(millis);
+ }
+ }
}
diff --git a/core/java/android/view/GLES20DisplayList.java b/core/java/android/view/GLES20DisplayList.java
index f3618eb..0154556d 100644
--- a/core/java/android/view/GLES20DisplayList.java
+++ b/core/java/android/view/GLES20DisplayList.java
@@ -131,7 +131,8 @@
@Override
public void setAnimationMatrix(Matrix matrix) {
try {
- nSetAnimationMatrix(getNativeDisplayList(), matrix.native_instance);
+ nSetAnimationMatrix(getNativeDisplayList(),
+ (matrix != null) ? matrix.native_instance : 0);
} catch (IllegalStateException e) {
// invalid DisplayList okay: we'll set current values the next time we render to it
}
diff --git a/core/java/android/view/IWindow.aidl b/core/java/android/view/IWindow.aidl
index 555f306..b4caad3 100644
--- a/core/java/android/view/IWindow.aidl
+++ b/core/java/android/view/IWindow.aidl
@@ -45,7 +45,7 @@
*/
void executeCommand(String command, String parameters, in ParcelFileDescriptor descriptor);
- void resized(int w, int h, in Rect systemInsets, in Rect contentInsets,
+ void resized(int w, int h, in Rect contentInsets,
in Rect visibleInsets, boolean reportDraw, in Configuration newConfig);
void dispatchAppVisibility(boolean visible);
void dispatchGetNewSurface();
diff --git a/core/java/android/view/IWindowSession.aidl b/core/java/android/view/IWindowSession.aidl
index f26d5e1..d4a03ce 100644
--- a/core/java/android/view/IWindowSession.aidl
+++ b/core/java/android/view/IWindowSession.aidl
@@ -58,10 +58,6 @@
* {@link WindowManagerImpl#RELAYOUT_DEFER_SURFACE_DESTROY}.
* @param outFrame Rect in which is placed the new position/size on
* screen.
- * @param outSystemInsets Rect in which is placed the offsets from
- * <var>outFrame</var> over which any core system UI elements are
- * currently covering the window. This is not generally used for
- * layout, but just to know where the window is obscured.
* @param outContentInsets Rect in which is placed the offsets from
* <var>outFrame</var> in which the content of the window should be
* placed. This can be used to modify the window layout to ensure its
@@ -83,7 +79,7 @@
*/
int relayout(IWindow window, int seq, in WindowManager.LayoutParams attrs,
int requestedWidth, int requestedHeight, int viewVisibility,
- int flags, out Rect outFrame, out Rect outSystemInsets,
+ int flags, out Rect outFrame,
out Rect outContentInsets, out Rect outVisibleInsets,
out Configuration outConfig, out Surface outSurface);
diff --git a/core/java/android/view/Surface.java b/core/java/android/view/Surface.java
index 1011d7a..a968768 100644
--- a/core/java/android/view/Surface.java
+++ b/core/java/android/view/Surface.java
@@ -511,7 +511,7 @@
/** @hide */
public native void setFlags(int flags, int mask);
/** @hide */
- public native void setActiveRect(Rect activeRect);
+ public native void setWindowCrop(Rect crop);
diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java
index ee322f8..f4ca9d2 100644
--- a/core/java/android/view/SurfaceView.java
+++ b/core/java/android/view/SurfaceView.java
@@ -98,7 +98,6 @@
MyWindow mWindow;
final Rect mVisibleInsets = new Rect();
final Rect mWinFrame = new Rect();
- final Rect mSystemInsets = new Rect();
final Rect mContentInsets = new Rect();
final Configuration mConfiguration = new Configuration();
@@ -472,7 +471,7 @@
mWindow, mWindow.mSeq, mLayout, mWidth, mHeight,
visible ? VISIBLE : GONE,
WindowManagerImpl.RELAYOUT_DEFER_SURFACE_DESTROY,
- mWinFrame, mSystemInsets, mContentInsets,
+ mWinFrame, mContentInsets,
mVisibleInsets, mConfiguration, mNewSurface);
if ((relayoutResult&WindowManagerImpl.RELAYOUT_RES_FIRST_TIME) != 0) {
mReportDrawNeeded = true;
@@ -606,7 +605,7 @@
mSurfaceView = new WeakReference<SurfaceView>(surfaceView);
}
- public void resized(int w, int h, Rect systemInsets, Rect contentInsets,
+ public void resized(int w, int h, Rect contentInsets,
Rect visibleInsets, boolean reportDraw, Configuration newConfig) {
SurfaceView surfaceView = mSurfaceView.get();
if (surfaceView != null) {
diff --git a/core/java/android/view/TextureView.java b/core/java/android/view/TextureView.java
index 651be2e..2048de2 100644
--- a/core/java/android/view/TextureView.java
+++ b/core/java/android/view/TextureView.java
@@ -561,7 +561,17 @@
applyUpdate();
applyTransformMatrix();
- mLayer.copyInto(bitmap);
+ // This case can happen if the app invokes setSurfaceTexture() before
+ // we are able to create the hardware layer. We can safely initialize
+ // the layer here thanks to the validate() call at the beginning of
+ // this method
+ if (mLayer == null && mUpdateSurface) {
+ getHardwareLayer();
+ }
+
+ if (mLayer != null) {
+ mLayer.copyInto(bitmap);
+ }
}
return bitmap;
}
diff --git a/core/java/android/view/VelocityTracker.java b/core/java/android/view/VelocityTracker.java
index 1c35e31..f703e34 100644
--- a/core/java/android/view/VelocityTracker.java
+++ b/core/java/android/view/VelocityTracker.java
@@ -298,6 +298,24 @@
return estimate(time, yCoeff);
}
+ /**
+ * Gets the X coefficient with the specified index.
+ * @param index The index of the coefficient to return.
+ * @return The X coefficient, or 0 if the index is greater than the degree.
+ */
+ public float getXCoeff(int index) {
+ return index <= degree ? xCoeff[index] : 0;
+ }
+
+ /**
+ * Gets the Y coefficient with the specified index.
+ * @param index The index of the coefficient to return.
+ * @return The Y coefficient, or 0 if the index is greater than the degree.
+ */
+ public float getYCoeff(int index) {
+ return index <= degree ? yCoeff[index] : 0;
+ }
+
private float estimate(float time, float[] c) {
float a = 0;
float scale = 1;
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index bf7d037..501cf29 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -666,7 +666,7 @@
protected static final String VIEW_LOG_TAG = "View";
/**
- * When set to true, apps will draw debugging information about their layouts.
+ * When set to true, apps will draw debugging information about their layouts.
*
* @hide
*/
@@ -2128,6 +2128,20 @@
*/
static final int ACCESSIBILITY_STATE_CHANGED = 0x00000080 << IMPORTANT_FOR_ACCESSIBILITY_SHIFT;
+ /**
+ * Flag indicating that view has an animation set on it. This is used to track whether an
+ * animation is cleared between successive frames, in order to tell the associated
+ * DisplayList to clear its animation matrix.
+ */
+ static final int VIEW_IS_ANIMATING_TRANSFORM = 0x10000000;
+
+ /**
+ * Flag indicating whether a view failed the quickReject() check in draw(). This condition
+ * is used to check whether later changes to the view's transform should invalidate the
+ * view to force the quickReject test to run again.
+ */
+ static final int VIEW_QUICK_REJECTED = 0x20000000;
+
/* End of masks for mPrivateFlags2 */
static final int DRAG_MASK = DRAG_CAN_ACCEPT | DRAG_HOVERED;
@@ -4787,17 +4801,46 @@
* entirely by its predecessors, and has an alpha greater than zero.
*
* @return Whether the view is visible on the screen.
+ *
+ * @hide
*/
- private boolean isVisibleToUser() {
+ protected boolean isVisibleToUser() {
+ return isVisibleToUser(null);
+ }
+
+ /**
+ * Computes whether the given portion of this view is visible to the user. Such a view is
+ * attached, visible, all its predecessors are visible, has an alpha greater than zero, and
+ * the specified portion is not clipped entirely by its predecessors.
+ *
+ * @param boundInView the portion of the view to test; coordinates should be relative; may be
+ * <code>null</code>, and the entire view will be tested in this case.
+ * When <code>true</code> is returned by the function, the actual visible
+ * region will be stored in this parameter; that is, if boundInView is fully
+ * contained within the view, no modification will be made, otherwise regions
+ * outside of the visible area of the view will be clipped.
+ *
+ * @return Whether the specified portion of the view is visible on the screen.
+ *
+ * @hide
+ */
+ protected boolean isVisibleToUser(Rect boundInView) {
+ Rect visibleRect = mAttachInfo.mTmpInvalRect;
+ Point offset = mAttachInfo.mPoint;
// The first two checks are made also made by isShown() which
// however traverses the tree up to the parent to catch that.
// Therefore, we do some fail fast check to minimize the up
// tree traversal.
- return (mAttachInfo != null
- && mAttachInfo.mWindowVisibility == View.VISIBLE
- && getAlpha() > 0
- && isShown()
- && getGlobalVisibleRect(mAttachInfo.mTmpInvalRect));
+ boolean isVisible = mAttachInfo != null
+ && mAttachInfo.mWindowVisibility == View.VISIBLE
+ && getAlpha() > 0
+ && isShown()
+ && getGlobalVisibleRect(visibleRect, offset);
+ if (isVisible && boundInView != null) {
+ visibleRect.offset(-offset.x, -offset.y);
+ isVisible &= boundInView.intersect(visibleRect);
+ }
+ return isVisible;
}
/**
@@ -5570,7 +5613,7 @@
"unmatched pair of setHasTransientState calls");
}
if ((hasTransientState && mTransientStateCount == 1) ||
- (hasTransientState && mTransientStateCount == 0)) {
+ (!hasTransientState && mTransientStateCount == 0)) {
// update flag if we've just incremented up from 0 or decremented down to 0
mPrivateFlags2 = (mPrivateFlags2 & ~HAS_TRANSIENT_STATE) |
(hasTransientState ? HAS_TRANSIENT_STATE : 0);
@@ -8560,6 +8603,10 @@
if (mDisplayList != null) {
mDisplayList.setCameraDistance(-Math.abs(distance) / dpi);
}
+ if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
+ // View was rejected last time it was drawn by its parent; this may have changed
+ invalidateParentIfNeeded();
+ }
}
/**
@@ -8602,6 +8649,10 @@
if (mDisplayList != null) {
mDisplayList.setRotation(rotation);
}
+ if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
+ // View was rejected last time it was drawn by its parent; this may have changed
+ invalidateParentIfNeeded();
+ }
}
}
@@ -8649,6 +8700,10 @@
if (mDisplayList != null) {
mDisplayList.setRotationY(rotationY);
}
+ if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
+ // View was rejected last time it was drawn by its parent; this may have changed
+ invalidateParentIfNeeded();
+ }
}
}
@@ -8696,6 +8751,10 @@
if (mDisplayList != null) {
mDisplayList.setRotationX(rotationX);
}
+ if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
+ // View was rejected last time it was drawn by its parent; this may have changed
+ invalidateParentIfNeeded();
+ }
}
}
@@ -8735,6 +8794,10 @@
if (mDisplayList != null) {
mDisplayList.setScaleX(scaleX);
}
+ if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
+ // View was rejected last time it was drawn by its parent; this may have changed
+ invalidateParentIfNeeded();
+ }
}
}
@@ -8774,6 +8837,10 @@
if (mDisplayList != null) {
mDisplayList.setScaleY(scaleY);
}
+ if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
+ // View was rejected last time it was drawn by its parent; this may have changed
+ invalidateParentIfNeeded();
+ }
}
}
@@ -8821,6 +8888,10 @@
if (mDisplayList != null) {
mDisplayList.setPivotX(pivotX);
}
+ if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
+ // View was rejected last time it was drawn by its parent; this may have changed
+ invalidateParentIfNeeded();
+ }
}
}
@@ -8867,6 +8938,10 @@
if (mDisplayList != null) {
mDisplayList.setPivotY(pivotY);
}
+ if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
+ // View was rejected last time it was drawn by its parent; this may have changed
+ invalidateParentIfNeeded();
+ }
}
}
@@ -9025,6 +9100,10 @@
}
mBackgroundSizeChanged = true;
invalidateParentIfNeeded();
+ if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
+ // View was rejected last time it was drawn by its parent; this may have changed
+ invalidateParentIfNeeded();
+ }
}
}
@@ -9094,6 +9173,10 @@
}
mBackgroundSizeChanged = true;
invalidateParentIfNeeded();
+ if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
+ // View was rejected last time it was drawn by its parent; this may have changed
+ invalidateParentIfNeeded();
+ }
}
}
@@ -9157,6 +9240,10 @@
}
mBackgroundSizeChanged = true;
invalidateParentIfNeeded();
+ if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
+ // View was rejected last time it was drawn by its parent; this may have changed
+ invalidateParentIfNeeded();
+ }
}
}
@@ -9217,6 +9304,10 @@
}
mBackgroundSizeChanged = true;
invalidateParentIfNeeded();
+ if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
+ // View was rejected last time it was drawn by its parent; this may have changed
+ invalidateParentIfNeeded();
+ }
}
}
@@ -9301,6 +9392,10 @@
if (mDisplayList != null) {
mDisplayList.setTranslationX(translationX);
}
+ if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
+ // View was rejected last time it was drawn by its parent; this may have changed
+ invalidateParentIfNeeded();
+ }
}
}
@@ -9338,6 +9433,10 @@
if (mDisplayList != null) {
mDisplayList.setTranslationY(translationY);
}
+ if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
+ // View was rejected last time it was drawn by its parent; this may have changed
+ invalidateParentIfNeeded();
+ }
}
}
@@ -12777,16 +12876,27 @@
if (a != null) {
more = drawAnimation(parent, drawingTime, a, scalingRequired);
concatMatrix = a.willChangeTransformationMatrix();
+ if (concatMatrix) {
+ mPrivateFlags2 |= VIEW_IS_ANIMATING_TRANSFORM;
+ }
transformToApply = parent.mChildTransformation;
- } else if (!useDisplayListProperties &&
- (flags & ViewGroup.FLAG_SUPPORT_STATIC_TRANSFORMATIONS) != 0) {
- final boolean hasTransform =
- parent.getChildStaticTransformation(this, parent.mChildTransformation);
- if (hasTransform) {
- final int transformType = parent.mChildTransformation.getTransformationType();
- transformToApply = transformType != Transformation.TYPE_IDENTITY ?
- parent.mChildTransformation : null;
- concatMatrix = (transformType & Transformation.TYPE_MATRIX) != 0;
+ } else {
+ if ((mPrivateFlags2 & VIEW_IS_ANIMATING_TRANSFORM) == VIEW_IS_ANIMATING_TRANSFORM &&
+ mDisplayList != null) {
+ // No longer animating: clear out old animation matrix
+ mDisplayList.setAnimationMatrix(null);
+ mPrivateFlags2 &= ~VIEW_IS_ANIMATING_TRANSFORM;
+ }
+ if (!useDisplayListProperties &&
+ (flags & ViewGroup.FLAG_SUPPORT_STATIC_TRANSFORMATIONS) != 0) {
+ final boolean hasTransform =
+ parent.getChildStaticTransformation(this, parent.mChildTransformation);
+ if (hasTransform) {
+ final int transformType = parent.mChildTransformation.getTransformationType();
+ transformToApply = transformType != Transformation.TYPE_IDENTITY ?
+ parent.mChildTransformation : null;
+ concatMatrix = (transformType & Transformation.TYPE_MATRIX) != 0;
+ }
}
}
@@ -12798,8 +12908,10 @@
if (!concatMatrix && canvas.quickReject(mLeft, mTop, mRight, mBottom, Canvas.EdgeType.BW) &&
(mPrivateFlags & DRAW_ANIMATION) == 0) {
+ mPrivateFlags2 |= VIEW_QUICK_REJECTED;
return more;
}
+ mPrivateFlags2 &= ~VIEW_QUICK_REJECTED;
if (hardwareAccelerated) {
// Clear INVALIDATED flag to allow invalidation to occur during rendering, but
@@ -17078,12 +17190,6 @@
boolean mUse32BitDrawingCache;
/**
- * Describes the parts of the window that are currently completely
- * obscured by system UI elements.
- */
- final Rect mSystemInsets = new Rect();
-
- /**
* For windows that are full-screen but using insets to layout inside
* of the screen decorations, these are the current insets for the
* content of the window.
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 1fcb2c3..90e6034 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -262,8 +262,6 @@
final Rect mPendingVisibleInsets = new Rect();
final Rect mPendingContentInsets = new Rect();
- final Rect mPendingSystemInsets = new Rect();
- final Rect mActiveRect = new Rect();
final ViewTreeObserver.InternalInsetsInfo mLastGivenInsets
= new ViewTreeObserver.InternalInsetsInfo();
@@ -273,7 +271,6 @@
final Configuration mPendingConfiguration = new Configuration();
class ResizedInfo {
- Rect systemInsets;
Rect contentInsets;
Rect visibleInsets;
Configuration newConfig;
@@ -569,7 +566,6 @@
if (mTranslator != null) {
mTranslator.translateRectInScreenToAppWindow(mAttachInfo.mContentInsets);
}
- mPendingSystemInsets.set(0, 0, 0, 0);
mPendingContentInsets.set(mAttachInfo.mContentInsets);
mPendingVisibleInsets.set(0, 0, 0, 0);
if (DEBUG_LAYOUT) Log.v(TAG, "Added window " + mWindow);
@@ -1236,7 +1232,6 @@
getRunQueue().executeActions(attachInfo.mHandler);
boolean insetsChanged = false;
- boolean activeRectChanged = false;
boolean layoutRequested = mLayoutRequested && !mStopped;
if (layoutRequested) {
@@ -1248,12 +1243,7 @@
// to opposite of the added touch mode.
mAttachInfo.mInTouchMode = !mAddedTouchMode;
ensureTouchModeLocally(mAddedTouchMode);
- activeRectChanged = true;
} else {
- if (!mPendingSystemInsets.equals(mAttachInfo.mSystemInsets)) {
- mAttachInfo.mSystemInsets.set(mPendingSystemInsets);
- activeRectChanged = true;
- }
if (!mPendingContentInsets.equals(mAttachInfo.mContentInsets)) {
insetsChanged = true;
}
@@ -1407,10 +1397,6 @@
mPendingConfiguration.seq = 0;
}
- if (!mPendingSystemInsets.equals(mAttachInfo.mSystemInsets)) {
- activeRectChanged = true;
- mAttachInfo.mSystemInsets.set(mPendingSystemInsets);
- }
contentInsetsChanged = !mPendingContentInsets.equals(
mAttachInfo.mContentInsets);
visibleInsetsChanged = !mPendingVisibleInsets.equals(
@@ -1513,7 +1499,6 @@
// before actually drawing them, so it can display then
// all at once.
newSurface = true;
- activeRectChanged = true;
mFullRedrawNeeded = true;
mPreviousTransparentRegion.setEmpty();
@@ -1579,7 +1564,6 @@
// window size we asked for. We should avoid this by getting a maximum size from
// the window session beforehand.
if (mWidth != frame.width() || mHeight != frame.height()) {
- activeRectChanged = true;
mWidth = frame.width();
mHeight = frame.height();
}
@@ -1698,14 +1682,6 @@
}
}
- if (activeRectChanged && mSurface.isValid()) {
- mActiveRect.set(attachInfo.mSystemInsets.left, attachInfo.mSystemInsets.top,
- mWidth - attachInfo.mSystemInsets.right,
- mHeight - attachInfo.mSystemInsets.bottom);
- //Log.i(TAG, "Active rect " + mWindowAttributes.getTitle() + ": " + mActiveRect);
- mSurface.setActiveRect(mActiveRect);
- }
-
final boolean didLayout = layoutRequested && !mStopped;
boolean triggerGlobalLayoutListener = didLayout
|| attachInfo.mRecomputeGlobalAttributes;
@@ -2823,7 +2799,6 @@
ResizedInfo ri = (ResizedInfo)msg.obj;
if (mWinFrame.width() == msg.arg1 && mWinFrame.height() == msg.arg2
- && mPendingSystemInsets.equals(ri.systemInsets)
&& mPendingContentInsets.equals(ri.contentInsets)
&& mPendingVisibleInsets.equals(ri.visibleInsets)
&& ((ResizedInfo)msg.obj).newConfig == null) {
@@ -2840,7 +2815,6 @@
mWinFrame.right = msg.arg1;
mWinFrame.top = 0;
mWinFrame.bottom = msg.arg2;
- mPendingSystemInsets.set(((ResizedInfo)msg.obj).systemInsets);
mPendingContentInsets.set(((ResizedInfo)msg.obj).contentInsets);
mPendingVisibleInsets.set(((ResizedInfo)msg.obj).visibleInsets);
if (msg.what == MSG_RESIZED_REPORT) {
@@ -3875,7 +3849,7 @@
(int) (mView.getMeasuredWidth() * appScale + 0.5f),
(int) (mView.getMeasuredHeight() * appScale + 0.5f),
viewVisibility, insetsPending ? WindowManagerImpl.RELAYOUT_INSETS_PENDING : 0,
- mWinFrame, mPendingSystemInsets, mPendingContentInsets, mPendingVisibleInsets,
+ mWinFrame, mPendingContentInsets, mPendingVisibleInsets,
mPendingConfiguration, mSurface);
//Log.d(TAG, "<<<<<< BACK FROM relayout");
if (restore) {
@@ -4071,11 +4045,10 @@
mHandler.sendMessage(msg);
}
- public void dispatchResized(int w, int h, Rect systemInsets, Rect contentInsets,
+ public void dispatchResized(int w, int h, Rect contentInsets,
Rect visibleInsets, boolean reportDraw, Configuration newConfig) {
if (DEBUG_LAYOUT) Log.v(TAG, "Resizing " + this + ": w=" + w
- + " h=" + h + " systemInsets=" + systemInsets.toShortString()
- + " contentInsets=" + contentInsets.toShortString()
+ + " h=" + h + " contentInsets=" + contentInsets.toShortString()
+ " visibleInsets=" + visibleInsets.toShortString()
+ " reportDraw=" + reportDraw);
Message msg = mHandler.obtainMessage(reportDraw ? MSG_RESIZED_REPORT :MSG_RESIZED);
@@ -4088,7 +4061,6 @@
msg.arg1 = w;
msg.arg2 = h;
ResizedInfo ri = new ResizedInfo();
- ri.systemInsets = new Rect(systemInsets);
ri.contentInsets = new Rect(contentInsets);
ri.visibleInsets = new Rect(visibleInsets);
ri.newConfig = newConfig;
@@ -4744,11 +4716,11 @@
mViewAncestor = new WeakReference<ViewRootImpl>(viewAncestor);
}
- public void resized(int w, int h, Rect systemInsets, Rect contentInsets,
+ public void resized(int w, int h, Rect contentInsets,
Rect visibleInsets, boolean reportDraw, Configuration newConfig) {
final ViewRootImpl viewAncestor = mViewAncestor.get();
if (viewAncestor != null) {
- viewAncestor.dispatchResized(w, h, systemInsets, contentInsets,
+ viewAncestor.dispatchResized(w, h, contentInsets,
visibleInsets, reportDraw, newConfig);
}
}
diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java
index 388cfb3..0c5d6ea 100644
--- a/core/java/android/view/WindowManagerPolicy.java
+++ b/core/java/android/view/WindowManagerPolicy.java
@@ -145,10 +145,6 @@
* @param displayFrame The frame of the overall display in which this
* window can appear, used for constraining the overall dimensions
* of the window.
- * @param systemFrame The frame within the display that any system
- * elements are currently covering. These indicate which parts of
- * the window should be considered completely obscured by the screen
- * decorations.
* @param contentFrame The frame within the display in which we would
* like active content to appear. This will cause windows behind to
* be resized to match the given content frame.
@@ -160,7 +156,7 @@
* are visible.
*/
public void computeFrameLw(Rect parentFrame, Rect displayFrame,
- Rect systemFrame, Rect contentFrame, Rect visibleFrame);
+ Rect contentFrame, Rect visibleFrame);
/**
* Retrieve the current frame of the window that has been assigned by
@@ -188,14 +184,6 @@
public Rect getDisplayFrameLw();
/**
- * Retrieve the frame of the system elements that last covered the window.
- * Must be called with the window manager lock held.
- *
- * @return Rect The rectangle holding the system frame.
- */
- public Rect getSystemFrameLw();
-
- /**
* Retrieve the frame of the content area that this window was last
* laid out in. This is the area in which the content of the window
* should be placed. It will be smaller than the display frame to
@@ -397,6 +385,9 @@
* Creates an input channel that will receive all input from the input dispatcher.
*/
public InputChannel monitorInput(String name);
+
+ public void shutdown();
+ public void rebootSafeMode();
}
/**
@@ -770,6 +761,21 @@
public void beginLayoutLw(int displayWidth, int displayHeight, int displayRotation);
/**
+ * Return the rectangle of the screen currently covered by system decorations.
+ * This will be called immediately after {@link #layoutWindowLw}. It can
+ * fill in the rectangle to indicate any part of the screen that it knows
+ * for sure is covered by system decor such as the status bar. The rectangle
+ * is initially set to the actual size of the screen, indicating nothing is
+ * covered.
+ *
+ * @param systemRect The rectangle of the screen that is not covered by
+ * system decoration.
+ * @return Returns the layer above which the system rectangle should
+ * not be applied.
+ */
+ public int getSystemDecorRectLw(Rect systemRect);
+
+ /**
* Called for each window attached to the window manager as layout is
* proceeding. The implementation of this function must take care of
* setting the window's frame, either here or in finishLayout().
@@ -794,7 +800,7 @@
*
*/
public void getContentInsetHintLw(WindowManager.LayoutParams attrs, Rect contentInset);
-
+
/**
* Called when layout of the windows is finished. After this function has
* returned, all windows given to layoutWindow() <em>must</em> have had a
diff --git a/core/java/android/webkit/HTML5VideoFullScreen.java b/core/java/android/webkit/HTML5VideoFullScreen.java
index 730ad08..62bc502 100644
--- a/core/java/android/webkit/HTML5VideoFullScreen.java
+++ b/core/java/android/webkit/HTML5VideoFullScreen.java
@@ -104,7 +104,9 @@
// After we return from this we can't use the surface any more.
// The current Video View will be destroy when we play a new video.
pauseAndDispatch(mProxy);
+ // TODO: handle full screen->inline mode transition without a reload.
mPlayer.release();
+ mPlayer = null;
mSurfaceHolder = null;
if (mMediaController != null) {
mMediaController.hide();
@@ -128,12 +130,12 @@
return mVideoSurfaceView;
}
- HTML5VideoFullScreen(Context context, int videoLayerId, int position) {
+ HTML5VideoFullScreen(Context context, int videoLayerId, int position, boolean skipPrepare) {
mVideoSurfaceView = new VideoSurfaceView(context);
mFullScreenMode = FULLSCREEN_OFF;
mVideoWidth = 0;
mVideoHeight = 0;
- init(videoLayerId, position);
+ init(videoLayerId, position, skipPrepare);
}
private void setMediaController(MediaController m) {
@@ -156,8 +158,6 @@
}
private void prepareForFullScreen() {
- // So in full screen, we reset the MediaPlayer
- mPlayer.reset();
MediaController mc = new FullScreenMediaController(mProxy.getContext(), mLayout);
mc.setSystemUiVisibility(mLayout.getSystemUiVisibility());
setMediaController(mc);
@@ -198,6 +198,7 @@
// after reading the MetaData
if (mMediaController != null) {
mMediaController.setEnabled(true);
+ mMediaController.show();
}
if (mProgressView != null) {
@@ -243,7 +244,7 @@
// Don't show the controller after exiting the full screen.
mMediaController = null;
- mCurrentState = STATE_RELEASED;
+ mCurrentState = STATE_RESETTED;
}
};
@@ -320,6 +321,13 @@
return 0;
}
+ @Override
+ public void showControllerInFullScreen() {
+ if (mMediaController != null) {
+ mMediaController.show(0);
+ }
+ }
+
// Other listeners functions:
private MediaPlayer.OnBufferingUpdateListener mBufferingUpdateListener =
new MediaPlayer.OnBufferingUpdateListener() {
diff --git a/core/java/android/webkit/HTML5VideoInline.java b/core/java/android/webkit/HTML5VideoInline.java
index 62e812e..2c7ea5d 100644
--- a/core/java/android/webkit/HTML5VideoInline.java
+++ b/core/java/android/webkit/HTML5VideoInline.java
@@ -21,7 +21,7 @@
// associated with the surface texture can be used for showing the screen
// shot when paused, so they are not singleton.
private static SurfaceTexture mSurfaceTexture = null;
- private int[] mTextureNames;
+ private static int[] mTextureNames = null;
// Every time when the VideoLayer Id change, we need to recreate the
// SurfaceTexture in order to delete the old video's decoder memory.
private static int mVideoLayerUsingSurfaceTexture = -1;
@@ -35,8 +35,7 @@
}
HTML5VideoInline(int videoLayerId, int position) {
- init(videoLayerId, position);
- mTextureNames = null;
+ init(videoLayerId, position, false);
}
@Override
@@ -69,15 +68,14 @@
// Inline Video specific FUNCTIONS:
- @Override
- public SurfaceTexture getSurfaceTexture(int videoLayerId) {
+ public static SurfaceTexture getSurfaceTexture(int videoLayerId) {
// Create the surface texture.
if (videoLayerId != mVideoLayerUsingSurfaceTexture
|| mSurfaceTexture == null
|| mTextureNames == null) {
- if (mTextureNames != null) {
- GLES20.glDeleteTextures(1, mTextureNames, 0);
- }
+ // The GL texture will store in the VideoLayerManager at native side.
+ // They will be clean up when requested.
+ // The reason we recreated GL texture name is for screen shot support.
mTextureNames = new int[1];
GLES20.glGenTextures(1, mTextureNames, 0);
mSurfaceTexture = new SurfaceTexture(mTextureNames[0]);
diff --git a/core/java/android/webkit/HTML5VideoView.java b/core/java/android/webkit/HTML5VideoView.java
index 0d3b755..371feea 100644
--- a/core/java/android/webkit/HTML5VideoView.java
+++ b/core/java/android/webkit/HTML5VideoView.java
@@ -31,11 +31,10 @@
// NOTE: these values are in sync with VideoLayerAndroid.h in webkit side.
// Please keep them in sync when changed.
static final int STATE_INITIALIZED = 0;
- static final int STATE_NOTPREPARED = 1;
+ static final int STATE_PREPARING = 1;
static final int STATE_PREPARED = 2;
static final int STATE_PLAYING = 3;
- static final int STATE_RELEASED = 4;
- protected int mCurrentState;
+ static final int STATE_RESETTED = 4;
protected HTML5VideoViewProxy mProxy;
@@ -46,11 +45,11 @@
// This is used to find the VideoLayer on the native side.
protected int mVideoLayerId;
- // Every video will have one MediaPlayer. Given the fact we only have one
- // SurfaceTexture, there is only one MediaPlayer in action. Every time we
- // switch videos, a new instance of MediaPlayer will be created in reset().
- // Switching between inline and full screen will also create a new instance.
- protected MediaPlayer mPlayer;
+ // Given the fact we only have one SurfaceTexture, we cannot support multiple
+ // player at the same time. We may recreate a new one and abandon the old
+ // one at transition time.
+ protected static MediaPlayer mPlayer = null;
+ protected static int mCurrentState = -1;
// We need to save such info.
protected Uri mUri;
@@ -60,10 +59,12 @@
// See http://www.whatwg.org/specs/web-apps/current-work/#event-media-timeupdate
protected static Timer mTimer;
+ protected boolean mPauseDuringPreparing;
+
// The spec says the timer should fire every 250 ms or less.
private static final int TIMEUPDATE_PERIOD = 250; // ms
+ private boolean mSkipPrepare = false;
- protected boolean mPauseDuringPreparing;
// common Video control FUNCTIONS:
public void start() {
if (mCurrentState == STATE_PREPARED) {
@@ -83,7 +84,7 @@
public void pause() {
if (isPlaying()) {
mPlayer.pause();
- } else if (mCurrentState == STATE_NOTPREPARED) {
+ } else if (mCurrentState == STATE_PREPARING) {
mPauseDuringPreparing = true;
}
// Delete the Timer to stop it since there is no stop call.
@@ -124,11 +125,11 @@
}
}
- public void release() {
- if (mCurrentState != STATE_RELEASED) {
- mPlayer.release();
+ public void reset() {
+ if (mCurrentState != STATE_RESETTED) {
+ mPlayer.reset();
}
- mCurrentState = STATE_RELEASED;
+ mCurrentState = STATE_RESETTED;
}
public void stopPlayback() {
@@ -142,9 +143,16 @@
}
// Every time we start a new Video, we create a VideoView and a MediaPlayer
- public void init(int videoLayerId, int position) {
- mPlayer = new MediaPlayer();
- mCurrentState = STATE_INITIALIZED;
+ public void init(int videoLayerId, int position, boolean skipPrepare) {
+ if (mPlayer == null) {
+ mPlayer = new MediaPlayer();
+ mCurrentState = STATE_INITIALIZED;
+ }
+ mSkipPrepare = skipPrepare;
+ // If we want to skip the prepare, then we keep the state.
+ if (!mSkipPrepare) {
+ mCurrentState = STATE_INITIALIZED;
+ }
mProxy = null;
mVideoLayerId = videoLayerId;
mSaveSeekTime = position;
@@ -195,17 +203,28 @@
}
public void prepareDataCommon(HTML5VideoViewProxy proxy) {
- try {
- mPlayer.setDataSource(proxy.getContext(), mUri, mHeaders);
- mPlayer.prepareAsync();
- } catch (IllegalArgumentException e) {
- e.printStackTrace();
- } catch (IllegalStateException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
+ if (!mSkipPrepare) {
+ try {
+ mPlayer.reset();
+ mPlayer.setDataSource(proxy.getContext(), mUri, mHeaders);
+ mPlayer.prepareAsync();
+ } catch (IllegalArgumentException e) {
+ e.printStackTrace();
+ } catch (IllegalStateException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ mCurrentState = STATE_PREPARING;
+ } else {
+ // If we skip prepare and the onPrepared happened in inline mode, we
+ // don't need to call prepare again, we just need to call onPrepared
+ // to refresh the state here.
+ if (mCurrentState >= STATE_PREPARED) {
+ onPrepared(mPlayer);
+ }
+ mSkipPrepare = false;
}
- mCurrentState = STATE_NOTPREPARED;
}
public void reprepareData(HTML5VideoViewProxy proxy) {
@@ -294,10 +313,6 @@
return false;
}
- public SurfaceTexture getSurfaceTexture(int videoLayerId) {
- return null;
- }
-
public void deleteSurfaceTexture() {
}
@@ -332,14 +347,17 @@
return false;
}
- private boolean m_startWhenPrepared = false;
+ private boolean mStartWhenPrepared = false;
public void setStartWhenPrepared(boolean willPlay) {
- m_startWhenPrepared = willPlay;
+ mStartWhenPrepared = willPlay;
}
public boolean getStartWhenPrepared() {
- return m_startWhenPrepared;
+ return mStartWhenPrepared;
+ }
+
+ public void showControllerInFullScreen() {
}
}
diff --git a/core/java/android/webkit/HTML5VideoViewProxy.java b/core/java/android/webkit/HTML5VideoViewProxy.java
index 5fa4bad..90db308 100644
--- a/core/java/android/webkit/HTML5VideoViewProxy.java
+++ b/core/java/android/webkit/HTML5VideoViewProxy.java
@@ -112,13 +112,14 @@
mBaseLayer = layer;
int currentVideoLayerId = mHTML5VideoView.getVideoLayerId();
- SurfaceTexture surfTexture = mHTML5VideoView.getSurfaceTexture(currentVideoLayerId);
+ SurfaceTexture surfTexture =
+ HTML5VideoInline.getSurfaceTexture(currentVideoLayerId);
int textureName = mHTML5VideoView.getTextureName();
if (layer != 0 && surfTexture != null && currentVideoLayerId != -1) {
int playerState = mHTML5VideoView.getCurrentState();
if (mHTML5VideoView.getPlayerBuffering())
- playerState = HTML5VideoView.STATE_NOTPREPARED;
+ playerState = HTML5VideoView.STATE_PREPARING;
boolean foundInTree = nativeSendSurfaceTexture(surfTexture,
layer, currentVideoLayerId, textureName,
playerState);
@@ -145,6 +146,7 @@
HTML5VideoViewProxy proxy, WebViewClassic webView) {
// Save the inline video info and inherit it in the full screen
int savePosition = 0;
+ boolean canSkipPrepare = false;
if (mHTML5VideoView != null) {
// We don't allow enter full screen mode while the previous
// full screen video hasn't finished yet.
@@ -156,15 +158,20 @@
// save the current position.
if (layerId == mHTML5VideoView.getVideoLayerId()) {
savePosition = mHTML5VideoView.getCurrentPosition();
+ int playerState = mHTML5VideoView.getCurrentState();
+ canSkipPrepare = (playerState == HTML5VideoView.STATE_PREPARING
+ || playerState == HTML5VideoView.STATE_PREPARED
+ || playerState == HTML5VideoView.STATE_PLAYING)
+ && !mHTML5VideoView.isFullScreenMode();
}
- mHTML5VideoView.release();
+ if (!canSkipPrepare) {
+ mHTML5VideoView.reset();
+ }
}
mHTML5VideoView = new HTML5VideoFullScreen(proxy.getContext(),
- layerId, savePosition);
+ layerId, savePosition, canSkipPrepare);
mCurrentProxy = proxy;
-
mHTML5VideoView.setVideoURI(url, mCurrentProxy);
-
mHTML5VideoView.enterFullScreenVideoState(layerId, proxy, webView);
}
@@ -217,8 +224,7 @@
if (!backFromFullScreenMode) {
mHTML5VideoView.pauseAndDispatch(mCurrentProxy);
}
- // release the media player to avoid finalize error
- mHTML5VideoView.release();
+ mHTML5VideoView.reset();
}
mCurrentProxy = proxy;
mHTML5VideoView = new HTML5VideoInline(videoLayerId, time);
@@ -273,6 +279,7 @@
}
public static void end() {
+ mHTML5VideoView.showControllerInFullScreen();
if (mCurrentProxy != null) {
if (isVideoSelfEnded)
mCurrentProxy.dispatchOnEnded();
diff --git a/core/java/android/webkit/WebViewClassic.java b/core/java/android/webkit/WebViewClassic.java
index 057c3d1..eb6b7e3 100644
--- a/core/java/android/webkit/WebViewClassic.java
+++ b/core/java/android/webkit/WebViewClassic.java
@@ -7452,18 +7452,12 @@
case SHOW_RECT_MSG_ID: {
WebViewCore.ShowRectData data = (WebViewCore.ShowRectData) msg.obj;
- int x = getScrollX();
int left = contentToViewX(data.mLeft);
int width = contentToViewDimension(data.mWidth);
int maxWidth = contentToViewDimension(data.mContentWidth);
int viewWidth = getViewWidth();
- if (width < viewWidth) {
- // center align
- x += left + width / 2 - getScrollX() - viewWidth / 2;
- } else {
- x += (int) (left + data.mXPercentInDoc * width
- - getScrollX() - data.mXPercentInView * viewWidth);
- }
+ int x = (int) (left + data.mXPercentInDoc * width -
+ data.mXPercentInView * viewWidth);
if (DebugFlags.WEB_VIEW) {
Log.v(LOGTAG, "showRectMsg=(left=" + left + ",width=" +
width + ",maxWidth=" + maxWidth +
diff --git a/core/java/android/webkit/WebViewInputDispatcher.java b/core/java/android/webkit/WebViewInputDispatcher.java
index 9541435..9328d8c 100644
--- a/core/java/android/webkit/WebViewInputDispatcher.java
+++ b/core/java/android/webkit/WebViewInputDispatcher.java
@@ -334,6 +334,7 @@
DispatchEvent d = obtainDispatchEventLocked(eventToEnqueue, eventType, 0,
webKitXOffset, webKitYOffset, webKitScale);
+ updateStateTrackersLocked(d, event);
enqueueEventLocked(d);
}
return true;
@@ -787,7 +788,6 @@
flags = d.mFlags;
- updateStateTrackersLocked(d, event);
if (event == d.mEvent) {
d.mEvent = null; // retain ownership of event, don't recycle it yet
}
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index c4e1bf5..3b4ec7d 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -6317,6 +6317,7 @@
if (mTransientStateViews == null) {
mTransientStateViews = new SparseArray<View>();
}
+ scrap.dispatchStartTemporaryDetach();
mTransientStateViews.put(position, scrap);
}
return;
diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java
index 4b7ec9a..16490e8 100644
--- a/core/java/android/widget/Editor.java
+++ b/core/java/android/widget/Editor.java
@@ -16,6 +16,9 @@
package android.widget;
+import com.android.internal.util.ArrayUtils;
+import com.android.internal.widget.EditableInputConnection;
+
import android.R;
import android.content.ClipData;
import android.content.ClipData.Item;
@@ -70,10 +73,10 @@
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
-import android.view.ViewConfiguration;
-import android.view.ViewGroup;
import android.view.View.DragShadowBuilder;
import android.view.View.OnClickListener;
+import android.view.ViewConfiguration;
+import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.view.ViewParent;
import android.view.ViewTreeObserver;
@@ -85,12 +88,12 @@
import android.view.inputmethod.InputConnection;
import android.view.inputmethod.InputMethodManager;
import android.widget.AdapterView.OnItemClickListener;
+import android.widget.Editor.InputContentType;
+import android.widget.Editor.InputMethodState;
+import android.widget.Editor.SelectionModifierCursorController;
import android.widget.TextView.Drawables;
import android.widget.TextView.OnEditorActionListener;
-import com.android.internal.util.ArrayUtils;
-import com.android.internal.widget.EditableInputConnection;
-
import java.text.BreakIterator;
import java.util.Arrays;
import java.util.Comparator;
@@ -102,6 +105,8 @@
* @hide
*/
public class Editor {
+ private static final String TAG = "Editor";
+
static final int BLINK = 500;
private static final float[] TEMP_POSITION = new float[2];
private static int DRAG_SHADOW_MAX_TEXT_LENGTH = 20;
@@ -151,6 +156,8 @@
boolean mInBatchEditControllers;
boolean mShowSoftInputOnFocus = true;
+ boolean mPreserveDetachedSelection;
+ boolean mTemporaryDetach;
SuggestionsPopupWindow mSuggestionsPopupWindow;
SuggestionRangeSpan mSuggestionRangeSpan;
@@ -190,6 +197,7 @@
showError();
mShowErrorAfterAttach = false;
}
+ mTemporaryDetach = false;
final ViewTreeObserver observer = mTextView.getViewTreeObserver();
// No need to create the controller.
@@ -198,10 +206,22 @@
observer.addOnTouchModeChangeListener(mInsertionPointCursorController);
}
if (mSelectionModifierCursorController != null) {
+ mSelectionModifierCursorController.resetTouchOffsets();
observer.addOnTouchModeChangeListener(mSelectionModifierCursorController);
}
updateSpellCheckSpans(0, mTextView.getText().length(),
true /* create the spell checker if needed */);
+
+ if (mTextView.hasTransientState() &&
+ mTextView.getSelectionStart() != mTextView.getSelectionEnd()) {
+ // Since transient state is reference counted make sure it stays matched
+ // with our own calls to it for managing selection.
+ // The action mode callback will set this back again when/if the action mode starts.
+ mTextView.setHasTransientState(false);
+
+ // We had an active selection from before, start the selection mode.
+ startSelectionActionMode();
+ }
}
void onDetachedFromWindow() {
@@ -234,7 +254,10 @@
mSpellChecker = null;
}
+ mPreserveDetachedSelection = true;
hideControllers();
+ mPreserveDetachedSelection = false;
+ mTemporaryDetach = false;
}
private void showError() {
@@ -877,7 +900,9 @@
hideControllers();
Selection.setSelection((Spannable) mTextView.getText(), selStart, selEnd);
} else {
+ if (mTemporaryDetach) mPreserveDetachedSelection = true;
hideControllers();
+ if (mTemporaryDetach) mPreserveDetachedSelection = false;
downgradeEasyCorrectionSpans();
}
@@ -2679,6 +2704,7 @@
if (menu.hasVisibleItems() || mode.getCustomView() != null) {
getSelectionController().show();
+ mTextView.setHasTransientState(true);
return true;
} else {
return false;
@@ -2707,7 +2733,17 @@
if (mCustomSelectionActionModeCallback != null) {
mCustomSelectionActionModeCallback.onDestroyActionMode(mode);
}
- Selection.setSelection((Spannable) mTextView.getText(), mTextView.getSelectionEnd());
+
+ /*
+ * If we're ending this mode because we're detaching from a window,
+ * we still have selection state to preserve. Don't clear it, we'll
+ * bring back the selection mode when (if) we get reattached.
+ */
+ if (!mPreserveDetachedSelection) {
+ Selection.setSelection((Spannable) mTextView.getText(),
+ mTextView.getSelectionEnd());
+ mTextView.setHasTransientState(false);
+ }
if (mSelectionModifierCursorController != null) {
mSelectionModifierCursorController.hide();
diff --git a/core/java/android/widget/NumberPicker.java b/core/java/android/widget/NumberPicker.java
index 6ff924b..7c809b3 100644
--- a/core/java/android/widget/NumberPicker.java
+++ b/core/java/android/widget/NumberPicker.java
@@ -2239,20 +2239,17 @@
info.setPackageName(mContext.getPackageName());
info.setSource(NumberPicker.this, virtualViewId);
info.setParent(NumberPicker.this);
- info.addChild(NumberPicker.this, VIRTUAL_VIEW_ID_DECREMENT);
- info.addChild(NumberPicker.this, VIRTUAL_VIEW_ID_INPUT);
- info.addChild(NumberPicker.this, VIRTUAL_VIEW_ID_INCREMENT);
info.setText(text);
info.setClickable(true);
info.setLongClickable(true);
info.setEnabled(NumberPicker.this.isEnabled());
Rect boundsInParent = mTempRect;
boundsInParent.set(left, top, right, bottom);
+ info.setVisibleToUser(isVisibleToUser(boundsInParent));
info.setBoundsInParent(boundsInParent);
Rect boundsInScreen = boundsInParent;
int[] locationOnScreen = mTempArray;
getLocationOnScreen(locationOnScreen);
- boundsInScreen.offsetTo(0, 0);
boundsInScreen.offset(locationOnScreen[0], locationOnScreen[1]);
info.setBoundsInScreen(boundsInScreen);
return info;
@@ -2261,19 +2258,22 @@
private AccessibilityNodeInfo createAccessibilityNodeInfoForNumberPicker(int left, int top,
int right, int bottom) {
AccessibilityNodeInfo info = AccessibilityNodeInfo.obtain();
- info.setClassName(Button.class.getName());
+ info.setClassName(NumberPicker.class.getName());
info.setPackageName(mContext.getPackageName());
info.setSource(NumberPicker.this);
+ info.addChild(NumberPicker.this, VIRTUAL_VIEW_ID_DECREMENT);
+ info.addChild(NumberPicker.this, VIRTUAL_VIEW_ID_INPUT);
+ info.addChild(NumberPicker.this, VIRTUAL_VIEW_ID_INCREMENT);
info.setParent((View) getParent());
info.setEnabled(NumberPicker.this.isEnabled());
info.setScrollable(true);
Rect boundsInParent = mTempRect;
boundsInParent.set(left, top, right, bottom);
info.setBoundsInParent(boundsInParent);
+ info.setVisibleToUser(isVisibleToUser());
Rect boundsInScreen = boundsInParent;
int[] locationOnScreen = mTempArray;
getLocationOnScreen(locationOnScreen);
- boundsInScreen.offsetTo(0, 0);
boundsInScreen.offset(locationOnScreen[0], locationOnScreen[1]);
info.setBoundsInScreen(boundsInScreen);
return info;
diff --git a/core/java/android/widget/SpellChecker.java b/core/java/android/widget/SpellChecker.java
index ebf8a4a..7ca02e1 100644
--- a/core/java/android/widget/SpellChecker.java
+++ b/core/java/android/widget/SpellChecker.java
@@ -343,6 +343,36 @@
if (!isInDictionary && looksLikeTypo) {
createMisspelledSuggestionSpan(
editable, suggestionsInfo, spellCheckSpan, offset, length);
+ } else {
+ // Valid word -- isInDictionary || !looksLikeTypo
+ if (mIsSentenceSpellCheckSupported) {
+ // Allow the spell checker to remove existing misspelled span by
+ // overwriting the span over the same place
+ final int spellCheckSpanStart = editable.getSpanStart(spellCheckSpan);
+ final int spellCheckSpanEnd = editable.getSpanEnd(spellCheckSpan);
+ final int start;
+ final int end;
+ if (offset != USE_SPAN_RANGE && length != USE_SPAN_RANGE) {
+ start = spellCheckSpanStart + offset;
+ end = start + length;
+ } else {
+ start = spellCheckSpanStart;
+ end = spellCheckSpanEnd;
+ }
+ if (spellCheckSpanStart >= 0 && spellCheckSpanEnd > spellCheckSpanStart
+ && end > start) {
+ final Long key = Long.valueOf(TextUtils.packRangeInLong(start, end));
+ final SuggestionSpan tempSuggestionSpan = mSuggestionSpanCache.get(key);
+ if (tempSuggestionSpan != null) {
+ if (DBG) {
+ Log.i(TAG, "Remove existing misspelled span. "
+ + editable.subSequence(start, end));
+ }
+ editable.removeSpan(tempSuggestionSpan);
+ mSuggestionSpanCache.remove(key);
+ }
+ }
+ }
}
return spellCheckSpan;
}
@@ -473,8 +503,16 @@
private Object mRange = new Object();
public void parse(int start, int end) {
- if (end > start) {
- setRangeSpan((Editable) mTextView.getText(), start, end);
+ final int max = mTextView.length();
+ final int parseEnd;
+ if (end > max) {
+ Log.w(TAG, "Parse invalid region, from " + start + " to " + end);
+ parseEnd = max;
+ } else {
+ parseEnd = end;
+ }
+ if (parseEnd > start) {
+ setRangeSpan((Editable) mTextView.getText(), start, parseEnd);
parse();
}
}
@@ -612,6 +650,8 @@
break;
}
if (spellCheckEnd <= spellCheckStart) {
+ Log.w(TAG, "Trying to spellcheck invalid region, from "
+ + start + " to " + end);
break;
}
if (createSpellCheckSpan) {
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 555c974..56eca01 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -154,6 +154,7 @@
* @attr ref android.R.styleable#TextView_textColorLink
* @attr ref android.R.styleable#TextView_textSize
* @attr ref android.R.styleable#TextView_textScaleX
+ * @attr ref android.R.styleable#TextView_fontFamily
* @attr ref android.R.styleable#TextView_typeface
* @attr ref android.R.styleable#TextView_textStyle
* @attr ref android.R.styleable#TextView_cursorVisible
@@ -464,6 +465,7 @@
ColorStateList textColorHint = null;
ColorStateList textColorLink = null;
int textSize = 15;
+ String fontFamily = null;
int typefaceIndex = -1;
int styleIndex = -1;
boolean allCaps = false;
@@ -516,6 +518,10 @@
typefaceIndex = appearance.getInt(attr, -1);
break;
+ case com.android.internal.R.styleable.TextAppearance_fontFamily:
+ fontFamily = appearance.getString(attr);
+ break;
+
case com.android.internal.R.styleable.TextAppearance_textStyle:
styleIndex = appearance.getInt(attr, -1);
break;
@@ -781,6 +787,10 @@
styleIndex = a.getInt(attr, styleIndex);
break;
+ case com.android.internal.R.styleable.TextView_fontFamily:
+ fontFamily = a.getString(attr);
+ break;
+
case com.android.internal.R.styleable.TextView_password:
password = a.getBoolean(attr, password);
break;
@@ -1051,7 +1061,7 @@
typefaceIndex = MONOSPACE;
}
- setTypefaceByIndex(typefaceIndex, styleIndex);
+ setTypefaceFromAttrs(fontFamily, typefaceIndex, styleIndex);
if (shadowcolor != 0) {
setShadowLayer(r, dx, dy, shadowcolor);
@@ -1111,8 +1121,15 @@
}
}
- private void setTypefaceByIndex(int typefaceIndex, int styleIndex) {
+ private void setTypefaceFromAttrs(String familyName, int typefaceIndex, int styleIndex) {
Typeface tf = null;
+ if (familyName != null) {
+ tf = Typeface.create(familyName, styleIndex);
+ if (tf != null) {
+ setTypeface(tf);
+ return;
+ }
+ }
switch (typefaceIndex) {
case SANS:
tf = Typeface.SANS_SERIF;
@@ -2160,14 +2177,17 @@
setLinkTextColor(colors);
}
+ String familyName;
int typefaceIndex, styleIndex;
+ familyName = appearance.getString(com.android.internal.R.styleable.
+ TextAppearance_fontFamily);
typefaceIndex = appearance.getInt(com.android.internal.R.styleable.
TextAppearance_typeface, -1);
styleIndex = appearance.getInt(com.android.internal.R.styleable.
TextAppearance_textStyle, -1);
- setTypefaceByIndex(typefaceIndex, styleIndex);
+ setTypefaceFromAttrs(familyName, typefaceIndex, styleIndex);
if (appearance.getBoolean(com.android.internal.R.styleable.TextAppearance_textAllCaps,
false)) {
@@ -2269,6 +2289,7 @@
*
* @see #getTypeface()
*
+ * @attr ref android.R.styleable#TextView_fontFamily
* @attr ref android.R.styleable#TextView_typeface
* @attr ref android.R.styleable#TextView_textStyle
*/
@@ -2290,6 +2311,7 @@
*
* @see #setTypeface(Typeface)
*
+ * @attr ref android.R.styleable#TextView_fontFamily
* @attr ref android.R.styleable#TextView_typeface
* @attr ref android.R.styleable#TextView_textStyle
*/
@@ -3690,15 +3712,15 @@
boolean forceUpdate = false;
if (isPassword) {
setTransformationMethod(PasswordTransformationMethod.getInstance());
- setTypefaceByIndex(MONOSPACE, 0);
+ setTypefaceFromAttrs(null /* fontFamily */, MONOSPACE, 0);
} else if (isVisiblePassword) {
if (mTransformation == PasswordTransformationMethod.getInstance()) {
forceUpdate = true;
}
- setTypefaceByIndex(MONOSPACE, 0);
+ setTypefaceFromAttrs(null /* fontFamily */, MONOSPACE, 0);
} else if (wasPassword || wasVisiblePassword) {
// not in password mode, clean up typeface and transformation
- setTypefaceByIndex(-1, -1);
+ setTypefaceFromAttrs(null /* fontFamily */, -1, -1);
if (mTransformation == PasswordTransformationMethod.getInstance()) {
forceUpdate = true;
}
@@ -7235,10 +7257,9 @@
// usually because this instance is an editable field in a list
if (!mDispatchTemporaryDetach) mTemporaryDetach = true;
- // Because of View recycling in ListView, there is no easy way to know when a TextView with
- // selection becomes visible again. Until a better solution is found, stop text selection
- // mode (if any) as soon as this TextView is recycled.
- if (mEditor != null) mEditor.hideControllers();
+ // Tell the editor that we are temporarily detached. It can use this to preserve
+ // selection state as needed.
+ if (mEditor != null) mEditor.mTemporaryDetach = true;
}
@Override
@@ -7247,6 +7268,7 @@
// Only track when onStartTemporaryDetach() is called directly,
// usually because this instance is an editable field in a list
if (!mDispatchTemporaryDetach) mTemporaryDetach = false;
+ if (mEditor != null) mEditor.mTemporaryDetach = false;
}
@Override
diff --git a/core/java/com/android/internal/view/BaseIWindow.java b/core/java/com/android/internal/view/BaseIWindow.java
index fbed4859..4c34d73 100644
--- a/core/java/com/android/internal/view/BaseIWindow.java
+++ b/core/java/com/android/internal/view/BaseIWindow.java
@@ -33,7 +33,7 @@
mSession = session;
}
- public void resized(int w, int h, Rect systemInsets, Rect contentInsets,
+ public void resized(int w, int h, Rect contentInsets,
Rect visibleInsets, boolean reportDraw, Configuration newConfig) {
if (reportDraw) {
try {
diff --git a/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java b/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java
index 1fb6041..60cd895 100644
--- a/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java
+++ b/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java
@@ -181,23 +181,37 @@
mAlwaysTrackFinger = a.getBoolean(R.styleable.MultiWaveView_alwaysTrackFinger, false);
mGravity = a.getInt(R.styleable.MultiWaveView_gravity, Gravity.TOP);
- // Read chevron animation drawables
- final int chevrons[] = { R.styleable.MultiWaveView_leftChevronDrawable,
- R.styleable.MultiWaveView_rightChevronDrawable,
- R.styleable.MultiWaveView_topChevronDrawable,
- R.styleable.MultiWaveView_bottomChevronDrawable
- };
+ // Read array of chevron drawables
+ TypedValue outValue = new TypedValue();
+ if (a.getValue(R.styleable.MultiWaveView_chevronDrawables, outValue)) {
+ ArrayList<TargetDrawable> chevrons = loadDrawableArray(outValue.resourceId);
+ for (int i = 0; i < chevrons.size(); i++) {
+ final TargetDrawable chevron = chevrons.get(i);
+ for (int k = 0; k < mFeedbackCount; k++) {
+ mChevronDrawables.add(chevron == null ? null : new TargetDrawable(chevron));
+ }
+ }
+ }
- for (int chevron : chevrons) {
- TypedValue typedValue = a.peekValue(chevron);
- for (int i = 0; i < mFeedbackCount; i++) {
- mChevronDrawables.add(
- typedValue != null ? new TargetDrawable(res, typedValue.resourceId) : null);
+ // Support old-style chevron specification if new specification not found
+ if (mChevronDrawables.size() == 0) {
+ final int chevronResIds[] = {
+ R.styleable.MultiWaveView_rightChevronDrawable,
+ R.styleable.MultiWaveView_topChevronDrawable,
+ R.styleable.MultiWaveView_leftChevronDrawable,
+ R.styleable.MultiWaveView_bottomChevronDrawable
+ };
+
+ for (int i = 0; i < chevronResIds.length; i++) {
+ TypedValue typedValue = a.peekValue(chevronResIds[i]);
+ for (int k = 0; k < mFeedbackCount; k++) {
+ mChevronDrawables.add(
+ typedValue != null ? new TargetDrawable(res, typedValue.resourceId) : null);
+ }
}
}
// Read array of target drawables
- TypedValue outValue = new TypedValue();
if (a.getValue(R.styleable.MultiWaveView_targetDrawables, outValue)) {
internalSetTargetResources(outValue.resourceId);
}
@@ -244,14 +258,14 @@
protected int getSuggestedMinimumWidth() {
// View should be large enough to contain the background + handle and
// target drawable on either edge.
- return mOuterRing.getWidth() + mMaxTargetWidth;
+ return (int) (Math.max(mOuterRing.getWidth(), 2 * mOuterRadius) + mMaxTargetWidth);
}
@Override
protected int getSuggestedMinimumHeight() {
// View should be large enough to contain the unlock ring + target and
// target drawable on either edge
- return mOuterRing.getHeight() + mMaxTargetHeight;
+ return (int) (Math.max(mOuterRing.getHeight(), 2 * mOuterRadius) + mMaxTargetHeight);
}
private int resolveMeasured(int measureSpec, int desired)
@@ -318,23 +332,24 @@
* mFeedbackCount items in the order: left, right, top, bottom.
*/
private void startChevronAnimation() {
- final float r = mHandleDrawable.getWidth() * 0.4f;
- final float chevronAnimationDistance = mOuterRadius * 0.9f / 2.0f;
- final float from[][] = {
- { -r, 0}, // left
- { +r, 0}, // right
- {0, -r}, // top
- {0, +r} }; // bottom
- final float to[][] = {
- { -chevronAnimationDistance, 0}, // left
- { chevronAnimationDistance, 0}, // right
- { 0, -chevronAnimationDistance}, // top
- { 0, +chevronAnimationDistance} }; // bottom
-
+ final float chevronStartDistance = mHandleDrawable.getWidth() * 0.8f;
+ final float chevronStopDistance = mOuterRadius * 0.9f / 2.0f;
mChevronAnimations.clear();
final float startScale = 0.5f;
final float endScale = 2.0f;
- for (int direction = 0; direction < 4; direction++) {
+
+ final int directionCount = mFeedbackCount > 0 ? mChevronDrawables.size()/mFeedbackCount : 0;
+
+ // Add an animation for all chevron drawables. There are mFeedbackCount drawables
+ // in each direction and directionCount directions.
+ for (int direction = 0; direction < directionCount; direction++) {
+ double angle = 2.0 * Math.PI * direction / directionCount;
+ final float sx = (float) Math.cos(angle);
+ final float sy = 0.0f - (float) Math.sin(angle);
+ final float[] xrange = new float[]
+ {sx * chevronStartDistance, sx * chevronStopDistance};
+ final float[] yrange = new float[]
+ {sy * chevronStartDistance, sy * chevronStopDistance};
for (int count = 0; count < mFeedbackCount; count++) {
int delay = count * CHEVRON_INCREMENTAL_DELAY;
final TargetDrawable icon = mChevronDrawables.get(direction*mFeedbackCount + count);
@@ -344,8 +359,8 @@
mChevronAnimations.add(Tweener.to(icon, CHEVRON_ANIMATION_DURATION,
"ease", mChevronAnimationInterpolator,
"delay", delay,
- "x", new float[] { from[direction][0], to[direction][0] },
- "y", new float[] { from[direction][1], to[direction][1] },
+ "x", xrange,
+ "y", yrange,
"alpha", new float[] {1.0f, 0.0f},
"scaleX", new float[] {startScale, endScale},
"scaleY", new float[] {startScale, endScale},
@@ -529,22 +544,31 @@
}
}
- private void internalSetTargetResources(int resourceId) {
+ private ArrayList<TargetDrawable> loadDrawableArray(int resourceId) {
Resources res = getContext().getResources();
TypedArray array = res.obtainTypedArray(resourceId);
- int count = array.length();
- ArrayList<TargetDrawable> targetDrawables = new ArrayList<TargetDrawable>(count);
+ final int count = array.length();
+ ArrayList<TargetDrawable> drawables = new ArrayList<TargetDrawable>(count);
+ for (int i = 0; i < count; i++) {
+ TypedValue value = array.peekValue(i);
+ TargetDrawable target = new TargetDrawable(res, value != null ? value.resourceId : 0);
+ drawables.add(target);
+ }
+ array.recycle();
+ return drawables;
+ }
+
+ private void internalSetTargetResources(int resourceId) {
+ mTargetDrawables = loadDrawableArray(resourceId);
+ mTargetResourceId = resourceId;
+ final int count = mTargetDrawables.size();
int maxWidth = mHandleDrawable.getWidth();
int maxHeight = mHandleDrawable.getHeight();
for (int i = 0; i < count; i++) {
- TypedValue value = array.peekValue(i);
- TargetDrawable target= new TargetDrawable(res, value != null ? value.resourceId : 0);
- targetDrawables.add(target);
+ TargetDrawable target = mTargetDrawables.get(i);
maxWidth = Math.max(maxWidth, target.getWidth());
maxHeight = Math.max(maxHeight, target.getHeight());
}
- mTargetResourceId = resourceId;
- mTargetDrawables = targetDrawables;
if (mMaxTargetWidth != maxWidth || mMaxTargetHeight != maxHeight) {
mMaxTargetWidth = maxWidth;
mMaxTargetHeight = maxHeight;
@@ -553,7 +577,6 @@
updateTargetPositions(mWaveCenterX, mWaveCenterY);
updateChevronPositions(mWaveCenterX, mWaveCenterY);
}
- array.recycle();
}
/**
@@ -918,10 +941,14 @@
super.onLayout(changed, left, top, right, bottom);
final int width = right - left;
final int height = bottom - top;
+ // Target placement width/height. This puts the targets on the greater of the ring
+ // width or the specified outer radius.
+ final float placementWidth = Math.max(mOuterRing.getWidth(), 2 * mOuterRadius);
+ final float placementHeight = Math.max(mOuterRing.getHeight(), 2 * mOuterRadius);
float newWaveCenterX = mHorizontalOffset + mHorizontalInset
- + Math.max(width, mMaxTargetWidth + mOuterRing.getWidth()) / 2;
+ + Math.max(width, mMaxTargetWidth + placementWidth) / 2;
float newWaveCenterY = mVerticalOffset + mVerticalInset
- + Math.max(height, + mMaxTargetHeight + mOuterRing.getHeight()) / 2;
+ + Math.max(height, + mMaxTargetHeight + placementHeight) / 2;
assignDefaultsIfNeeded(newWaveCenterX, newWaveCenterY);
diff --git a/core/java/com/android/internal/widget/multiwaveview/TargetDrawable.java b/core/java/com/android/internal/widget/multiwaveview/TargetDrawable.java
index 0269819b..6392093 100644
--- a/core/java/com/android/internal/widget/multiwaveview/TargetDrawable.java
+++ b/core/java/com/android/internal/widget/multiwaveview/TargetDrawable.java
@@ -85,6 +85,14 @@
setState(STATE_INACTIVE);
}
+ public TargetDrawable(TargetDrawable other) {
+ mResourceId = other.mResourceId;
+ // Mutate the drawable so we can animate shared drawable properties.
+ mDrawable = other.mDrawable != null ? other.mDrawable.mutate() : null;
+ resizeDrawables();
+ setState(STATE_INACTIVE);
+ }
+
public void setState(int [] state) {
if (mDrawable instanceof StateListDrawable) {
StateListDrawable d = (StateListDrawable) mDrawable;
diff --git a/core/jni/Android.mk b/core/jni/Android.mk
index cd0959b..c24f6c6 100644
--- a/core/jni/Android.mk
+++ b/core/jni/Android.mk
@@ -66,7 +66,6 @@
android_os_MessageQueue.cpp \
android_os_ParcelFileDescriptor.cpp \
android_os_Parcel.cpp \
- android_os_Power.cpp \
android_os_StatFs.cpp \
android_os_SystemClock.cpp \
android_os_SystemProperties.cpp \
@@ -217,8 +216,7 @@
libjpeg \
libusbhost \
libharfbuzz \
- libz \
- libsuspend \
+ libz
ifeq ($(USE_OPENGL_RENDERER),true)
LOCAL_SHARED_LIBRARIES += libhwui
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index b877071..241a905 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -133,7 +133,6 @@
extern int register_android_os_MessageQueue(JNIEnv* env);
extern int register_android_os_Parcel(JNIEnv* env);
extern int register_android_os_ParcelFileDescriptor(JNIEnv *env);
-extern int register_android_os_Power(JNIEnv *env);
extern int register_android_os_StatFs(JNIEnv *env);
extern int register_android_os_SystemProperties(JNIEnv *env);
extern int register_android_os_SystemClock(JNIEnv* env);
@@ -1147,7 +1146,6 @@
REG_JNI(register_android_os_FileUtils),
REG_JNI(register_android_os_MessageQueue),
REG_JNI(register_android_os_ParcelFileDescriptor),
- REG_JNI(register_android_os_Power),
REG_JNI(register_android_os_StatFs),
REG_JNI(register_android_os_Trace),
REG_JNI(register_android_os_UEventObserver),
diff --git a/core/jni/android_os_Parcel.cpp b/core/jni/android_os_Parcel.cpp
index 3dfaac3..858ec79 100644
--- a/core/jni/android_os_Parcel.cpp
+++ b/core/jni/android_os_Parcel.cpp
@@ -61,7 +61,10 @@
static struct parcel_offsets_t
{
+ jclass clazz;
jfieldID mNativePtr;
+ jmethodID obtain;
+ jmethodID recycle;
} gParcelOffsets;
Parcel* parcelForJavaObject(JNIEnv* env, jobject obj)
@@ -76,6 +79,16 @@
return NULL;
}
+jobject createJavaParcelObject(JNIEnv* env)
+{
+ return env->CallStaticObjectMethod(gParcelOffsets.clazz, gParcelOffsets.obtain);
+}
+
+void recycleJavaParcelObject(JNIEnv* env, jobject parcelObj)
+{
+ env->CallVoidMethod(parcelObj, gParcelOffsets.recycle);
+}
+
static jint android_os_Parcel_dataSize(JNIEnv* env, jclass clazz, jint nativePtr)
{
Parcel* parcel = reinterpret_cast<Parcel*>(nativePtr);
@@ -665,8 +678,11 @@
clazz = env->FindClass(kParcelPathName);
LOG_FATAL_IF(clazz == NULL, "Unable to find class android.os.Parcel");
- gParcelOffsets.mNativePtr
- = env->GetFieldID(clazz, "mNativePtr", "I");
+ gParcelOffsets.clazz = (jclass) env->NewGlobalRef(clazz);
+ gParcelOffsets.mNativePtr = env->GetFieldID(clazz, "mNativePtr", "I");
+ gParcelOffsets.obtain = env->GetStaticMethodID(clazz, "obtain",
+ "()Landroid/os/Parcel;");
+ gParcelOffsets.recycle = env->GetMethodID(clazz, "recycle", "()V");
return AndroidRuntime::registerNativeMethods(
env, kParcelPathName,
diff --git a/core/jni/android_os_Parcel.h b/core/jni/android_os_Parcel.h
index 65f3819e..1db523a 100644
--- a/core/jni/android_os_Parcel.h
+++ b/core/jni/android_os_Parcel.h
@@ -23,5 +23,7 @@
// Conversion from Java Parcel Object to C++ Parcel instance.
// Note: does not type checking; must guarantee jobject is a Java Parcel
extern Parcel* parcelForJavaObject(JNIEnv* env, jobject obj);
+extern jobject createJavaParcelObject(JNIEnv* env);
+extern void recycleJavaParcelObject(JNIEnv* env, jobject object);
}
diff --git a/core/jni/android_os_Power.cpp b/core/jni/android_os_Power.cpp
deleted file mode 100644
index 373abd4..0000000
--- a/core/jni/android_os_Power.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-/* //device/libs/android_runtime/android_os_Power.cpp
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
-
-#define LOG_TAG "Power-JNI"
-
-#include "JNIHelp.h"
-#include "jni.h"
-#include "android_runtime/AndroidRuntime.h"
-#include <utils/misc.h>
-#include <hardware/power.h>
-#include <hardware_legacy/power.h>
-#include <cutils/android_reboot.h>
-#include <suspend/autosuspend.h>
-
-static struct power_module *sPowerModule;
-
-namespace android
-{
-
-static void
-acquireWakeLock(JNIEnv *env, jobject clazz, jint lock, jstring idObj)
-{
- if (idObj == NULL) {
- jniThrowNullPointerException(env, "id is null");
- return ;
- }
-
- const char *id = env->GetStringUTFChars(idObj, NULL);
-
- acquire_wake_lock(lock, id);
-
- env->ReleaseStringUTFChars(idObj, id);
-}
-
-static void
-releaseWakeLock(JNIEnv *env, jobject clazz, jstring idObj)
-{
- if (idObj == NULL) {
- jniThrowNullPointerException(env, "id is null");
- return ;
- }
-
- const char *id = env->GetStringUTFChars(idObj, NULL);
-
- release_wake_lock(id);
-
- env->ReleaseStringUTFChars(idObj, id);
-
-}
-
-static int
-setLastUserActivityTimeout(JNIEnv *env, jobject clazz, jlong timeMS)
-{
- return set_last_user_activity_timeout(timeMS/1000);
-}
-
-static int
-setScreenState(JNIEnv *env, jobject clazz, jboolean on)
-{
- if (on) {
- autosuspend_disable();
- if (sPowerModule) {
- sPowerModule->setInteractive(sPowerModule, true);
- }
- } else {
- if (sPowerModule) {
- sPowerModule->setInteractive(sPowerModule, false);
- }
- autosuspend_enable();
- }
-
- return 0;
-}
-
-static void android_os_Power_shutdown(JNIEnv *env, jobject clazz)
-{
- android_reboot(ANDROID_RB_POWEROFF, 0, 0);
-}
-
-static void android_os_Power_reboot(JNIEnv *env, jobject clazz, jstring reason)
-{
- if (reason == NULL) {
- android_reboot(ANDROID_RB_RESTART, 0, 0);
- } else {
- const char *chars = env->GetStringUTFChars(reason, NULL);
- android_reboot(ANDROID_RB_RESTART2, 0, (char *) chars);
- env->ReleaseStringUTFChars(reason, chars); // In case it fails.
- }
- jniThrowIOException(env, errno);
-}
-
-static int android_os_Power_init(JNIEnv *env, jobject clazz)
-{
- status_t err = hw_get_module(POWER_HARDWARE_MODULE_ID,
- (hw_module_t const**)&sPowerModule);
- ALOGE_IF(err, "couldn't load %s module (%s)",
- POWER_HARDWARE_MODULE_ID, strerror(-err));
-
- if (!err)
- sPowerModule->init(sPowerModule);
-
- return err;
-}
-
-static JNINativeMethod method_table[] = {
- { "acquireWakeLock", "(ILjava/lang/String;)V", (void*)acquireWakeLock },
- { "releaseWakeLock", "(Ljava/lang/String;)V", (void*)releaseWakeLock },
- { "setLastUserActivityTimeout", "(J)I", (void*)setLastUserActivityTimeout },
- { "setScreenState", "(Z)I", (void*)setScreenState },
- { "shutdown", "()V", (void*)android_os_Power_shutdown },
- { "powerInitNative", "()I", (void*)android_os_Power_init },
- { "rebootNative", "(Ljava/lang/String;)V", (void*)android_os_Power_reboot },
-};
-
-int register_android_os_Power(JNIEnv *env)
-{
- return AndroidRuntime::registerNativeMethods(
- env, "android/os/Power",
- method_table, NELEM(method_table));
-}
-
-};
diff --git a/core/jni/android_view_Surface.cpp b/core/jni/android_view_Surface.cpp
index 8c4c42ab..5739cbe 100644
--- a/core/jni/android_view_Surface.cpp
+++ b/core/jni/android_view_Surface.cpp
@@ -345,32 +345,6 @@
}
}
-static void Surface_setActiveRect(JNIEnv* env, jobject thiz, jobject activeRect)
-{
- const sp<Surface>& surface(getSurface(env, thiz));
- if (!Surface::isValid(surface)) {
- doThrowIAE(env);
- return;
- }
-
- android_native_rect_t nativeRect;
- if (activeRect) {
- nativeRect.left = env->GetIntField(activeRect, ro.l);
- nativeRect.top = env->GetIntField(activeRect, ro.t);
- nativeRect.right = env->GetIntField(activeRect, ro.r);
- nativeRect.bottom= env->GetIntField(activeRect, ro.b);
- } else {
- doThrowIAE(env, "activeRect may not be null");
- return;
- }
-
- int err = native_window_set_active_rect(surface.get(), &nativeRect);
- if (err != NO_ERROR) {
- doThrowRE(env, String8::format(
- "Surface::setActiveRect returned an error: %d", err).string());
- }
-}
-
static jobject Surface_lockCanvas(JNIEnv* env, jobject clazz, jobject dirtyRect)
{
const sp<Surface>& surface(getSurface(env, clazz));
@@ -773,6 +747,28 @@
}
}
+static void Surface_setWindowCrop(JNIEnv* env, jobject thiz, jobject crop)
+{
+ const sp<SurfaceControl>& surface(getSurfaceControl(env, thiz));
+ if (surface == 0) return;
+
+ Rect nativeCrop;
+ if (crop) {
+ nativeCrop.left = env->GetIntField(crop, ro.l);
+ nativeCrop.top = env->GetIntField(crop, ro.t);
+ nativeCrop.right = env->GetIntField(crop, ro.r);
+ nativeCrop.bottom= env->GetIntField(crop, ro.b);
+ } else {
+ nativeCrop.left = nativeCrop.top = nativeCrop.right =
+ nativeCrop.bottom = 0;
+ }
+
+ status_t err = surface->setCrop(nativeCrop);
+ if (err<0 && err!=NO_INIT) {
+ doThrowIAE(env);
+ }
+}
+
// ----------------------------------------------------------------------------
static void Surface_copyFrom(
@@ -915,7 +911,7 @@
{"readFromParcel", "(Landroid/os/Parcel;)V", (void*)Surface_readFromParcel },
{"writeToParcel", "(Landroid/os/Parcel;I)V", (void*)Surface_writeToParcel },
{"isConsumerRunningBehind", "()Z", (void*)Surface_isConsumerRunningBehind },
- {"setActiveRect", "(Landroid/graphics/Rect;)V", (void*)Surface_setActiveRect },
+ {"setWindowCrop", "(Landroid/graphics/Rect;)V", (void*)Surface_setWindowCrop },
};
void nativeClassInit(JNIEnv* env, jclass clazz)
diff --git a/core/jni/android_view_VelocityTracker.cpp b/core/jni/android_view_VelocityTracker.cpp
index 668d3bb..04d1056 100644
--- a/core/jni/android_view_VelocityTracker.cpp
+++ b/core/jni/android_view_VelocityTracker.cpp
@@ -21,6 +21,7 @@
#include <android_runtime/AndroidRuntime.h>
#include <utils/Log.h>
#include <androidfw/Input.h>
+#include <androidfw/VelocityTracker.h>
#include "android_view_MotionEvent.h"
diff --git a/core/res/res/drawable-hdpi/progress_bg_holo_dark.9.png b/core/res/res/drawable-hdpi/progress_bg_holo_dark.9.png
index 310c368..877fd2b 100644
--- a/core/res/res/drawable-hdpi/progress_bg_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/progress_bg_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/progress_bg_holo_light.9.png b/core/res/res/drawable-hdpi/progress_bg_holo_light.9.png
index 70cb7fc..3f12166 100644
--- a/core/res/res/drawable-hdpi/progress_bg_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/progress_bg_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/progress_primary_holo_dark.9.png b/core/res/res/drawable-hdpi/progress_primary_holo_dark.9.png
index 1c26920..b73abba 100644
--- a/core/res/res/drawable-hdpi/progress_primary_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/progress_primary_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/progress_primary_holo_light.9.png b/core/res/res/drawable-hdpi/progress_primary_holo_light.9.png
index 1c26920..2f76a22 100644
--- a/core/res/res/drawable-hdpi/progress_primary_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/progress_primary_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/progress_secondary_holo_dark.9.png b/core/res/res/drawable-hdpi/progress_secondary_holo_dark.9.png
index 40d0d16..a75d0dd 100644
--- a/core/res/res/drawable-hdpi/progress_secondary_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/progress_secondary_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/progress_secondary_holo_light.9.png b/core/res/res/drawable-hdpi/progress_secondary_holo_light.9.png
index 40d0d16..955b708 100644
--- a/core/res/res/drawable-hdpi/progress_secondary_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/progress_secondary_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/scrubber_control_disabled_holo.png b/core/res/res/drawable-hdpi/scrubber_control_disabled_holo.png
index 167d7d3..370242a 100644
--- a/core/res/res/drawable-hdpi/scrubber_control_disabled_holo.png
+++ b/core/res/res/drawable-hdpi/scrubber_control_disabled_holo.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/scrubber_control_focused_holo.png b/core/res/res/drawable-hdpi/scrubber_control_focused_holo.png
index 4048260..eea2c3e 100644
--- a/core/res/res/drawable-hdpi/scrubber_control_focused_holo.png
+++ b/core/res/res/drawable-hdpi/scrubber_control_focused_holo.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/scrubber_control_normal_holo.png b/core/res/res/drawable-hdpi/scrubber_control_normal_holo.png
index 90e9c9c..3c98ee9 100644
--- a/core/res/res/drawable-hdpi/scrubber_control_normal_holo.png
+++ b/core/res/res/drawable-hdpi/scrubber_control_normal_holo.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/scrubber_control_pressed_holo.png b/core/res/res/drawable-hdpi/scrubber_control_pressed_holo.png
index 4a3e57c..4dc8999 100644
--- a/core/res/res/drawable-hdpi/scrubber_control_pressed_holo.png
+++ b/core/res/res/drawable-hdpi/scrubber_control_pressed_holo.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/scrubber_primary_holo.9.png b/core/res/res/drawable-hdpi/scrubber_primary_holo.9.png
index 0d13f71..260a0a5 100644
--- a/core/res/res/drawable-hdpi/scrubber_primary_holo.9.png
+++ b/core/res/res/drawable-hdpi/scrubber_primary_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/scrubber_secondary_holo.9.png b/core/res/res/drawable-hdpi/scrubber_secondary_holo.9.png
index b39d831..09f2d58 100644
--- a/core/res/res/drawable-hdpi/scrubber_secondary_holo.9.png
+++ b/core/res/res/drawable-hdpi/scrubber_secondary_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/scrubber_track_holo_dark.9.png b/core/res/res/drawable-hdpi/scrubber_track_holo_dark.9.png
index c997bf0..0c0ccda 100644
--- a/core/res/res/drawable-hdpi/scrubber_track_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/scrubber_track_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/scrubber_track_holo_light.9.png b/core/res/res/drawable-hdpi/scrubber_track_holo_light.9.png
index b2a22dc..90528b1 100644
--- a/core/res/res/drawable-hdpi/scrubber_track_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/scrubber_track_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/progress_bg_holo_dark.9.png b/core/res/res/drawable-mdpi/progress_bg_holo_dark.9.png
index 3d946e5..155e546 100644
--- a/core/res/res/drawable-mdpi/progress_bg_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/progress_bg_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/progress_bg_holo_light.9.png b/core/res/res/drawable-mdpi/progress_bg_holo_light.9.png
index 4bb22f0..780b4b2 100644
--- a/core/res/res/drawable-mdpi/progress_bg_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/progress_bg_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/progress_primary_holo_dark.9.png b/core/res/res/drawable-mdpi/progress_primary_holo_dark.9.png
index ab8ec69..b86f4b5 100644
--- a/core/res/res/drawable-mdpi/progress_primary_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/progress_primary_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/progress_primary_holo_light.9.png b/core/res/res/drawable-mdpi/progress_primary_holo_light.9.png
index ab8ec69..6fb9445 100644
--- a/core/res/res/drawable-mdpi/progress_primary_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/progress_primary_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/progress_secondary_holo_dark.9.png b/core/res/res/drawable-mdpi/progress_secondary_holo_dark.9.png
index 7274274..5651a7a 100644
--- a/core/res/res/drawable-mdpi/progress_secondary_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/progress_secondary_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/progress_secondary_holo_light.9.png b/core/res/res/drawable-mdpi/progress_secondary_holo_light.9.png
index 7274274..9104cf9 100644
--- a/core/res/res/drawable-mdpi/progress_secondary_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/progress_secondary_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/scrubber_control_disabled_holo.png b/core/res/res/drawable-mdpi/scrubber_control_disabled_holo.png
index 351d539..630a450 100644
--- a/core/res/res/drawable-mdpi/scrubber_control_disabled_holo.png
+++ b/core/res/res/drawable-mdpi/scrubber_control_disabled_holo.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/scrubber_control_focused_holo.png b/core/res/res/drawable-mdpi/scrubber_control_focused_holo.png
index e6072ee..c9e4796 100644
--- a/core/res/res/drawable-mdpi/scrubber_control_focused_holo.png
+++ b/core/res/res/drawable-mdpi/scrubber_control_focused_holo.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/scrubber_control_normal_holo.png b/core/res/res/drawable-mdpi/scrubber_control_normal_holo.png
index 79682c1..fb96f4b 100644
--- a/core/res/res/drawable-mdpi/scrubber_control_normal_holo.png
+++ b/core/res/res/drawable-mdpi/scrubber_control_normal_holo.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/scrubber_control_pressed_holo.png b/core/res/res/drawable-mdpi/scrubber_control_pressed_holo.png
index ba53c0b..30e18cd 100644
--- a/core/res/res/drawable-mdpi/scrubber_control_pressed_holo.png
+++ b/core/res/res/drawable-mdpi/scrubber_control_pressed_holo.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/scrubber_primary_holo.9.png b/core/res/res/drawable-mdpi/scrubber_primary_holo.9.png
index 7cbf2f2..a7910d6 100644
--- a/core/res/res/drawable-mdpi/scrubber_primary_holo.9.png
+++ b/core/res/res/drawable-mdpi/scrubber_primary_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/scrubber_secondary_holo.9.png b/core/res/res/drawable-mdpi/scrubber_secondary_holo.9.png
index 81772a8..985b62e 100644
--- a/core/res/res/drawable-mdpi/scrubber_secondary_holo.9.png
+++ b/core/res/res/drawable-mdpi/scrubber_secondary_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/scrubber_track_holo_dark.9.png b/core/res/res/drawable-mdpi/scrubber_track_holo_dark.9.png
index b8037a3..b91a4ee 100644
--- a/core/res/res/drawable-mdpi/scrubber_track_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/scrubber_track_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/scrubber_track_holo_light.9.png b/core/res/res/drawable-mdpi/scrubber_track_holo_light.9.png
index 76df16f..359ae4a 100644
--- a/core/res/res/drawable-mdpi/scrubber_track_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/scrubber_track_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/progress_bg_holo_dark.9.png b/core/res/res/drawable-xhdpi/progress_bg_holo_dark.9.png
index 345f5d3..c8b87d7 100644
--- a/core/res/res/drawable-xhdpi/progress_bg_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/progress_bg_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/progress_bg_holo_light.9.png b/core/res/res/drawable-xhdpi/progress_bg_holo_light.9.png
index c843ef3..cbd19ac 100644
--- a/core/res/res/drawable-xhdpi/progress_bg_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/progress_bg_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/progress_primary_holo_dark.9.png b/core/res/res/drawable-xhdpi/progress_primary_holo_dark.9.png
index c6c3f1e..f1069fd 100644
--- a/core/res/res/drawable-xhdpi/progress_primary_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/progress_primary_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/progress_primary_holo_light.9.png b/core/res/res/drawable-xhdpi/progress_primary_holo_light.9.png
index c6c3f1e..e62123c 100644
--- a/core/res/res/drawable-xhdpi/progress_primary_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/progress_primary_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/progress_secondary_holo_dark.9.png b/core/res/res/drawable-xhdpi/progress_secondary_holo_dark.9.png
index 205b66e..06ae19c 100644
--- a/core/res/res/drawable-xhdpi/progress_secondary_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/progress_secondary_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/progress_secondary_holo_light.9.png b/core/res/res/drawable-xhdpi/progress_secondary_holo_light.9.png
index 205b66e..37c6d5f 100644
--- a/core/res/res/drawable-xhdpi/progress_secondary_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/progress_secondary_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/scrubber_control_disabled_holo.png b/core/res/res/drawable-xhdpi/scrubber_control_disabled_holo.png
index 8cf3868..62be77c 100644
--- a/core/res/res/drawable-xhdpi/scrubber_control_disabled_holo.png
+++ b/core/res/res/drawable-xhdpi/scrubber_control_disabled_holo.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/scrubber_control_focused_holo.png b/core/res/res/drawable-xhdpi/scrubber_control_focused_holo.png
index 417b35a..754dd2f 100644
--- a/core/res/res/drawable-xhdpi/scrubber_control_focused_holo.png
+++ b/core/res/res/drawable-xhdpi/scrubber_control_focused_holo.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/scrubber_control_normal_holo.png b/core/res/res/drawable-xhdpi/scrubber_control_normal_holo.png
index 8053d88..d546a73 100644
--- a/core/res/res/drawable-xhdpi/scrubber_control_normal_holo.png
+++ b/core/res/res/drawable-xhdpi/scrubber_control_normal_holo.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/scrubber_control_pressed_holo.png b/core/res/res/drawable-xhdpi/scrubber_control_pressed_holo.png
index d17fa7d..0b62072 100644
--- a/core/res/res/drawable-xhdpi/scrubber_control_pressed_holo.png
+++ b/core/res/res/drawable-xhdpi/scrubber_control_pressed_holo.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/scrubber_primary_holo.9.png b/core/res/res/drawable-xhdpi/scrubber_primary_holo.9.png
index 073ff4c..3b0b241 100644
--- a/core/res/res/drawable-xhdpi/scrubber_primary_holo.9.png
+++ b/core/res/res/drawable-xhdpi/scrubber_primary_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/scrubber_secondary_holo.9.png b/core/res/res/drawable-xhdpi/scrubber_secondary_holo.9.png
index 4c7b0aac..9099034 100644
--- a/core/res/res/drawable-xhdpi/scrubber_secondary_holo.9.png
+++ b/core/res/res/drawable-xhdpi/scrubber_secondary_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/scrubber_track_holo_dark.9.png b/core/res/res/drawable-xhdpi/scrubber_track_holo_dark.9.png
index a217a90..bfb2048 100644
--- a/core/res/res/drawable-xhdpi/scrubber_track_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/scrubber_track_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/scrubber_track_holo_light.9.png b/core/res/res/drawable-xhdpi/scrubber_track_holo_light.9.png
index 551fb0a..a7d396de2 100644
--- a/core/res/res/drawable-xhdpi/scrubber_track_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/scrubber_track_holo_light.9.png
Binary files differ
diff --git a/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock.xml b/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock.xml
index 66cf98d..efd406d 100644
--- a/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock.xml
+++ b/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock.xml
@@ -31,7 +31,7 @@
<!-- top: status -->
<RelativeLayout
android:layout_height="0dip"
- android:layout_weight="1"
+ android:layout_weight="0.42"
android:layout_width="match_parent"
android:gravity="center">
@@ -69,8 +69,9 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dip"
- android:layout_weight="1"
- android:orientation="vertical">
+ android:layout_weight="0.58"
+ android:orientation="vertical"
+ android:gravity="bottom">
<TextView
android:id="@+id/screenLocked"
@@ -87,7 +88,7 @@
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center"
+ android:layout_gravity="center_horizontal"
android:gravity="center"
android:targetDrawables="@array/lockscreen_targets_with_camera"
@@ -98,7 +99,7 @@
android:outerRadius="@dimen/multiwaveview_target_placement_radius"
android:snapMargin="@dimen/multiwaveview_snap_margin"
android:hitRadius="@dimen/multiwaveview_hit_radius"
- android:rightChevronDrawable="@drawable/ic_lockscreen_chevron_right"
+ android:chevronDrawables="@array/lockscreen_chevron_drawables"
android:feedbackCount="3"
android:vibrationDuration="20"
/>
diff --git a/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock_land.xml b/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock_land.xml
index 65b442b..de64a51 100644
--- a/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock_land.xml
+++ b/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock_land.xml
@@ -30,7 +30,7 @@
<!-- left side: status and music -->
<RelativeLayout
android:layout_height="match_parent"
- android:layout_weight="1"
+ android:layout_weight="0.42"
android:layout_width="0dip"
android:gravity="center">
@@ -67,7 +67,7 @@
<!-- right side -->
<RelativeLayout
android:layout_height="match_parent"
- android:layout_weight="1"
+ android:layout_weight="0.58"
android:layout_width="0dip"
android:gravity="center_horizontal|center_vertical">
@@ -87,7 +87,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_rowSpan="7"
- android:layout_gravity="center_vertical|center_horizontal"
+ android:layout_gravity="center_vertical|right"
android:gravity="center"
android:targetDrawables="@array/lockscreen_targets_with_camera"
@@ -98,7 +98,7 @@
android:outerRadius="@dimen/multiwaveview_target_placement_radius"
android:snapMargin="@dimen/multiwaveview_snap_margin"
android:hitRadius="@dimen/multiwaveview_hit_radius"
- android:rightChevronDrawable="@drawable/ic_lockscreen_chevron_right"
+ android:chevronDrawables="@array/lockscreen_chevron_drawables"
android:feedbackCount="3"
android:vibrationDuration="20"
/>
diff --git a/core/res/res/layout/keyguard_screen_tab_unlock.xml b/core/res/res/layout/keyguard_screen_tab_unlock.xml
index 3fd3023..2dcb774 100644
--- a/core/res/res/layout/keyguard_screen_tab_unlock.xml
+++ b/core/res/res/layout/keyguard_screen_tab_unlock.xml
@@ -139,7 +139,7 @@
android:outerRadius="@dimen/multiwaveview_target_placement_radius"
android:snapMargin="@dimen/multiwaveview_snap_margin"
android:hitRadius="@dimen/multiwaveview_hit_radius"
- android:rightChevronDrawable="@drawable/ic_lockscreen_chevron_right"
+ android:chevronDrawables="@array/lockscreen_chevron_drawables"
android:feedbackCount="3"
android:vibrationDuration="20"
/>
diff --git a/core/res/res/layout/keyguard_screen_tab_unlock_land.xml b/core/res/res/layout/keyguard_screen_tab_unlock_land.xml
index cd03c10..10ddd1e 100644
--- a/core/res/res/layout/keyguard_screen_tab_unlock_land.xml
+++ b/core/res/res/layout/keyguard_screen_tab_unlock_land.xml
@@ -144,7 +144,7 @@
android:outerRadius="@dimen/multiwaveview_target_placement_radius"
android:snapMargin="@dimen/multiwaveview_snap_margin"
android:hitRadius="@dimen/multiwaveview_hit_radius"
- android:topChevronDrawable="@drawable/ic_lockscreen_chevron_up"
+ android:chevronDrawables="@array/lockscreen_chevron_drawables"
android:feedbackCount="3"
android:vibrationDuration="20"
/>
diff --git a/core/res/res/layout/notification_template_big_text.xml b/core/res/res/layout/notification_template_big_text.xml
index d0549cf..77a5f11 100644
--- a/core/res/res/layout/notification_template_big_text.xml
+++ b/core/res/res/layout/notification_template_big_text.xml
@@ -43,14 +43,16 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:minHeight="@dimen/notification_large_icon_height"
android:orientation="vertical"
- >
+ android:layout_weight="1"
+ >
<LinearLayout
android:id="@+id/line1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
+ android:layout_gravity="top"
+ android:layout_weight="0"
>
<TextView android:id="@+id/title"
android:textAppearance="@style/TextAppearance.StatusBar.EventContent.Title"
@@ -87,24 +89,29 @@
android:singleLine="true"
android:fadingEdge="horizontal"
android:ellipsize="marquee"
+ android:layout_weight="0"
android:visibility="gone"
/>
<TextView android:id="@+id/big_text"
android:textAppearance="@style/TextAppearance.StatusBar.EventContent"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="0dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:singleLine="false"
android:visibility="gone"
+ android:maxLines="8"
+ android:ellipsize="end"
+ android:layout_weight="1"
/>
</LinearLayout>
<LinearLayout
android:id="@+id/actions"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="0dp"
android:orientation="vertical"
android:visibility="gone"
+ android:layout_weight="1"
>
<!-- actions will be added here -->
</LinearLayout>
@@ -116,13 +123,14 @@
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:visibility="gone"
- android:layout_weight="1"
+ android:layout_weight="0"
/>
<LinearLayout
android:id="@+id/line3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
+ android:layout_weight="1"
>
<TextView android:id="@+id/text"
android:textAppearance="@style/TextAppearance.StatusBar.EventContent"
@@ -160,6 +168,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
+ android:layout_weight="0"
style="?android:attr/progressBarStyleHorizontal"
/>
</LinearLayout>
diff --git a/core/res/res/layout/notification_template_inbox.xml b/core/res/res/layout/notification_template_inbox.xml
index 7b63ac5..05ec1d8 100644
--- a/core/res/res/layout/notification_template_inbox.xml
+++ b/core/res/res/layout/notification_template_inbox.xml
@@ -47,6 +47,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
+ android:layout_weight="0"
>
<TextView android:id="@+id/title"
android:textAppearance="@style/TextAppearance.StatusBar.EventContent.Title"
@@ -84,62 +85,69 @@
android:fadingEdge="horizontal"
android:ellipsize="marquee"
android:visibility="gone"
+ android:layout_weight="0"
/>
<TextView android:id="@+id/inbox_text0"
android:textAppearance="@style/TextAppearance.StatusBar.EventContent"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="0dp"
android:singleLine="true"
android:ellipsize="end"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:visibility="gone"
+ android:layout_weight="1"
/>
<TextView android:id="@+id/inbox_text1"
android:textAppearance="@style/TextAppearance.StatusBar.EventContent"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="0dp"
android:singleLine="true"
android:ellipsize="end"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:visibility="gone"
+ android:layout_weight="1"
/>
<TextView android:id="@+id/inbox_text2"
android:textAppearance="@style/TextAppearance.StatusBar.EventContent"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="0dp"
android:singleLine="true"
android:ellipsize="end"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:visibility="gone"
+ android:layout_weight="1"
/>
<TextView android:id="@+id/inbox_text3"
android:textAppearance="@style/TextAppearance.StatusBar.EventContent"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="0dp"
android:singleLine="true"
android:ellipsize="end"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:visibility="gone"
+ android:layout_weight="1"
/>
<TextView android:id="@+id/inbox_text4"
android:textAppearance="@style/TextAppearance.StatusBar.EventContent"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="0dp"
android:singleLine="true"
android:ellipsize="end"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:visibility="gone"
+ android:layout_weight="1"
/>
<LinearLayout
android:id="@+id/actions"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
+ android:layout_weight="0"
android:visibility="gone"
>
<!-- actions will be added here -->
@@ -152,13 +160,14 @@
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:visibility="gone"
- android:layout_weight="1"
+ android:layout_weight="0"
/>
<LinearLayout
android:id="@+id/line3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
+ android:layout_weight="0"
>
<TextView android:id="@+id/text"
android:textAppearance="@style/TextAppearance.StatusBar.EventContent"
@@ -196,6 +205,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
+ android:layout_weight="0"
style="?android:attr/progressBarStyleHorizontal"
/>
</LinearLayout>
diff --git a/core/res/res/values-be/strings.xml b/core/res/res/values-be/strings.xml
index 86e21a94..a95541e 100644
--- a/core/res/res/values-be/strings.xml
+++ b/core/res/res/values-be/strings.xml
@@ -1311,7 +1311,6 @@
<string name="sending" msgid="3245653681008218030">"Адпраўка..."</string>
<string name="launchBrowserDefault" msgid="2057951947297614725">"Запусцiць браўзер?"</string>
<string name="SetupCallDefault" msgid="5834948469253758575">"Прыняць выклік?"</string>
- <!-- no translation found for activity_resolver_use_always (8017770747801494933) -->
- <skip />
+ <string name="activity_resolver_use_always" msgid="8017770747801494933">"Заўсёды"</string>
<string name="activity_resolver_use_once" msgid="405646673463328329">"Толькі адзін раз"</string>
</resources>
diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml
index d5bb21e..6ebe576 100644
--- a/core/res/res/values-bg/strings.xml
+++ b/core/res/res/values-bg/strings.xml
@@ -1311,7 +1311,6 @@
<string name="sending" msgid="3245653681008218030">"Изпраща се..."</string>
<string name="launchBrowserDefault" msgid="2057951947297614725">"Да се стартира ли браузърът?"</string>
<string name="SetupCallDefault" msgid="5834948469253758575">"Да се приеме ли обаждането?"</string>
- <!-- no translation found for activity_resolver_use_always (8017770747801494933) -->
- <skip />
+ <string name="activity_resolver_use_always" msgid="8017770747801494933">"Винаги"</string>
<string name="activity_resolver_use_once" msgid="405646673463328329">"Само веднъж"</string>
</resources>
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index 3a0c936..fb8f466 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -1311,7 +1311,6 @@
<string name="sending" msgid="3245653681008218030">"Odesílání..."</string>
<string name="launchBrowserDefault" msgid="2057951947297614725">"Spustit prohlížeč?"</string>
<string name="SetupCallDefault" msgid="5834948469253758575">"Přijmout hovor?"</string>
- <!-- no translation found for activity_resolver_use_always (8017770747801494933) -->
- <skip />
+ <string name="activity_resolver_use_always" msgid="8017770747801494933">"Vždy"</string>
<string name="activity_resolver_use_once" msgid="405646673463328329">"Pouze jednou"</string>
</resources>
diff --git a/core/res/res/values-et/strings.xml b/core/res/res/values-et/strings.xml
index 81f4204..88f8fdb 100644
--- a/core/res/res/values-et/strings.xml
+++ b/core/res/res/values-et/strings.xml
@@ -1311,7 +1311,6 @@
<string name="sending" msgid="3245653681008218030">"Saatmine ..."</string>
<string name="launchBrowserDefault" msgid="2057951947297614725">"Kas käivitada brauser?"</string>
<string name="SetupCallDefault" msgid="5834948469253758575">"Kas vastata kõnele?"</string>
- <!-- no translation found for activity_resolver_use_always (8017770747801494933) -->
- <skip />
+ <string name="activity_resolver_use_always" msgid="8017770747801494933">"Alati"</string>
<string name="activity_resolver_use_once" msgid="405646673463328329">"Ainult üks kord"</string>
</resources>
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index ccb47ef..55f923f 100644
--- a/core/res/res/values-hr/strings.xml
+++ b/core/res/res/values-hr/strings.xml
@@ -1311,7 +1311,6 @@
<string name="sending" msgid="3245653681008218030">"Slanje..."</string>
<string name="launchBrowserDefault" msgid="2057951947297614725">"Pokrenuti preglednik?"</string>
<string name="SetupCallDefault" msgid="5834948469253758575">"Prihvatiti poziv?"</string>
- <!-- no translation found for activity_resolver_use_always (8017770747801494933) -->
- <skip />
+ <string name="activity_resolver_use_always" msgid="8017770747801494933">"Uvijek"</string>
<string name="activity_resolver_use_once" msgid="405646673463328329">"Samo jednom"</string>
</resources>
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index 753e7fd..616b9be 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -175,14 +175,10 @@
<string name="permgroupdesc_location" msgid="5704679763124170100">"Memonitor lokasi fisik Anda."</string>
<string name="permgrouplab_network" msgid="5808983377727109831">"Komunikasi jaringan"</string>
<string name="permgroupdesc_network" msgid="4478299413241861987">"Mengakses berbagai fitur jaringan."</string>
- <!-- no translation found for permgrouplab_bluetoothNetwork (1585403544162128109) -->
- <skip />
- <!-- no translation found for permgroupdesc_bluetoothNetwork (5625288577164282391) -->
- <skip />
- <!-- no translation found for permgrouplab_shortrangeNetwork (130808676377486118) -->
- <skip />
- <!-- no translation found for permgroupdesc_shortrangeNetwork (1884069062653436007) -->
- <skip />
+ <string name="permgrouplab_bluetoothNetwork" msgid="1585403544162128109">"Bluetooth"</string>
+ <string name="permgroupdesc_bluetoothNetwork" msgid="5625288577164282391">"Mengakses perangkat dan jaringan melalui Bluetooth."</string>
+ <string name="permgrouplab_shortrangeNetwork" msgid="130808676377486118">"Jaringan jarak pendek"</string>
+ <string name="permgroupdesc_shortrangeNetwork" msgid="1884069062653436007">"Mengakses perangkat melalui jaringan jarak pendek seperti NFC."</string>
<string name="permgrouplab_audioSettings" msgid="8329261670151871235">"Setelan Audio"</string>
<string name="permgroupdesc_audioSettings" msgid="2641515403347568130">"Mengubah setelan audio."</string>
<string name="permgrouplab_affectsBattery" msgid="6209246653424798033">"Memengaruhi Baterai"</string>
@@ -195,8 +191,7 @@
<skip />
<!-- no translation found for permgrouplab_writeDictionary (8090237702432576788) -->
<skip />
- <!-- no translation found for permgroupdesc_writeDictionary (2711561994497361646) -->
- <skip />
+ <string name="permgroupdesc_writeDictionary" msgid="2711561994497361646">"Menambahkan kata ke kamus pengguna."</string>
<string name="permgrouplab_bookmarks" msgid="1949519673103968229">"Bookmark dan Riwayat"</string>
<string name="permgroupdesc_bookmarks" msgid="4169771606257963028">"Akses langsung ke bookmark dan riwayat browser."</string>
<string name="permgrouplab_deviceAlarms" msgid="6117704629728824101">"Alarm"</string>
@@ -1090,8 +1085,7 @@
<string name="date_time_set" msgid="5777075614321087758">"Setel"</string>
<string name="date_time_done" msgid="2507683751759308828">"Selesai"</string>
<string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ff900000">"BARU: "</font></string>
- <!-- no translation found for perms_description_app (5139836143293299417) -->
- <skip />
+ <string name="perms_description_app" msgid="5139836143293299417">"Disediakan oleh <xliff:g id="APP_NAME">%1$s</xliff:g>."</string>
<string name="no_permissions" msgid="7283357728219338112">"Tidak perlu izin"</string>
<string name="usb_storage_activity_title" msgid="4465055157209648641">"Penyimpanan massal USB"</string>
<string name="usb_storage_title" msgid="5901459041398751495">"USB terhubung"</string>
@@ -1321,8 +1315,6 @@
<string name="sending" msgid="3245653681008218030">"Mengirim..."</string>
<string name="launchBrowserDefault" msgid="2057951947297614725">"Luncurkan Browser?"</string>
<string name="SetupCallDefault" msgid="5834948469253758575">"Terima panggilan?"</string>
- <!-- no translation found for activity_resolver_use_always (8017770747801494933) -->
- <skip />
- <!-- no translation found for activity_resolver_use_once (405646673463328329) -->
- <skip />
+ <string name="activity_resolver_use_always" msgid="8017770747801494933">"Selalu"</string>
+ <string name="activity_resolver_use_once" msgid="405646673463328329">"Sekali Saja"</string>
</resources>
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index 56f4bc0..14730d95 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -175,28 +175,20 @@
<string name="permgroupdesc_location" msgid="5704679763124170100">"실제 위치 모니터링"</string>
<string name="permgrouplab_network" msgid="5808983377727109831">"네트워크 통신"</string>
<string name="permgroupdesc_network" msgid="4478299413241861987">"다양한 네트워크 기능에 액세스할 수 있도록 합니다."</string>
- <!-- no translation found for permgrouplab_bluetoothNetwork (1585403544162128109) -->
- <skip />
- <!-- no translation found for permgroupdesc_bluetoothNetwork (5625288577164282391) -->
- <skip />
- <!-- no translation found for permgrouplab_shortrangeNetwork (130808676377486118) -->
- <skip />
- <!-- no translation found for permgroupdesc_shortrangeNetwork (1884069062653436007) -->
- <skip />
+ <string name="permgrouplab_bluetoothNetwork" msgid="1585403544162128109">"블루투스"</string>
+ <string name="permgroupdesc_bluetoothNetwork" msgid="5625288577164282391">"블루투스를 통해 기기 및 네트워크에 액세스"</string>
+ <string name="permgrouplab_shortrangeNetwork" msgid="130808676377486118">"단거리 네트워크"</string>
+ <string name="permgroupdesc_shortrangeNetwork" msgid="1884069062653436007">"NFC와 같은 단거리 네트워크를 통해 기기에 액세스"</string>
<string name="permgrouplab_audioSettings" msgid="8329261670151871235">"오디오 설정"</string>
<string name="permgroupdesc_audioSettings" msgid="2641515403347568130">"오디오 설정을 변경합니다."</string>
<string name="permgrouplab_affectsBattery" msgid="6209246653424798033">"배터리 소모"</string>
<string name="permgroupdesc_affectsBattery" msgid="6441275320638916947">"배터리를 빨리 소모시킬 수 있는 기능을 사용합니다."</string>
<string name="permgrouplab_calendar" msgid="5863508437783683902">"캘린더"</string>
<string name="permgroupdesc_calendar" msgid="5777534316982184416">"캘린더 및 일정에 직접 액세스합니다."</string>
- <!-- no translation found for permgrouplab_dictionary (4148597128843641379) -->
- <skip />
- <!-- no translation found for permgroupdesc_dictionary (7921166355964764490) -->
- <skip />
- <!-- no translation found for permgrouplab_writeDictionary (8090237702432576788) -->
- <skip />
- <!-- no translation found for permgroupdesc_writeDictionary (2711561994497361646) -->
- <skip />
+ <string name="permgrouplab_dictionary" msgid="4148597128843641379">"사용자 사전 읽기"</string>
+ <string name="permgroupdesc_dictionary" msgid="7921166355964764490">"사용자 사전의 단어 읽기"</string>
+ <string name="permgrouplab_writeDictionary" msgid="8090237702432576788">"사용자 사전 쓰기"</string>
+ <string name="permgroupdesc_writeDictionary" msgid="2711561994497361646">"사용자 사전에 단어 추가"</string>
<string name="permgrouplab_bookmarks" msgid="1949519673103968229">"북마크 및 기록"</string>
<string name="permgroupdesc_bookmarks" msgid="4169771606257963028">"북마크 및 브라우저 기록에 직접 액세스합니다."</string>
<string name="permgrouplab_deviceAlarms" msgid="6117704629728824101">"알람"</string>
@@ -569,8 +561,7 @@
<string name="permdesc_sdcardRead" product="nosdcard" msgid="3530894470637667917">"앱이 사진과 미디어를 포함하고 있을 수 있는 USB 저장소의 콘텐츠를 읽도록 허용합니다."</string>
<string name="permdesc_sdcardRead" product="default" msgid="2555811422562526606">"앱이 사진과 미디어를 포함하고 있을 수 있는 SD 카드의 콘텐츠를 읽도록 허용합니다."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="8485979062254666748">"USB 저장소의 콘텐츠 수정 또는 삭제"</string>
- <!-- no translation found for permlab_sdcardWrite (8805693630050458763) -->
- <skip />
+ <string name="permlab_sdcardWrite" product="default" msgid="8805693630050458763">"SD 카드의 콘텐츠 수정 또는 삭제"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"앱이 USB 저장소에 쓸 수 있도록 허용합니다."</string>
<string name="permdesc_sdcardWrite" product="default" msgid="4337417790936632090">"앱이 SD 카드에 쓸 수 있도록 허용합니다."</string>
<string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"내부 미디어 저장소 콘텐츠 수정/삭제"</string>
@@ -1090,8 +1081,7 @@
<string name="date_time_set" msgid="5777075614321087758">"설정"</string>
<string name="date_time_done" msgid="2507683751759308828">"완료"</string>
<string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ff900000">"신규: "</font></string>
- <!-- no translation found for perms_description_app (5139836143293299417) -->
- <skip />
+ <string name="perms_description_app" msgid="5139836143293299417">"<xliff:g id="APP_NAME">%1$s</xliff:g> 제공"</string>
<string name="no_permissions" msgid="7283357728219338112">"권한 필요 없음"</string>
<string name="usb_storage_activity_title" msgid="4465055157209648641">"USB 대용량 저장소"</string>
<string name="usb_storage_title" msgid="5901459041398751495">"USB 연결됨"</string>
@@ -1321,8 +1311,6 @@
<string name="sending" msgid="3245653681008218030">"전송 중..."</string>
<string name="launchBrowserDefault" msgid="2057951947297614725">"브라우저를 실행하시겠습니까?"</string>
<string name="SetupCallDefault" msgid="5834948469253758575">"통화를 수락하시겠습니까?"</string>
- <!-- no translation found for activity_resolver_use_always (8017770747801494933) -->
- <skip />
- <!-- no translation found for activity_resolver_use_once (405646673463328329) -->
- <skip />
+ <string name="activity_resolver_use_always" msgid="8017770747801494933">"항상"</string>
+ <string name="activity_resolver_use_once" msgid="405646673463328329">"한 번만"</string>
</resources>
diff --git a/core/res/res/values-land/arrays.xml b/core/res/res/values-land/arrays.xml
index 537d27c..7095c02 100644
--- a/core/res/res/values-land/arrays.xml
+++ b/core/res/res/values-land/arrays.xml
@@ -69,4 +69,11 @@
<item>@string/description_target_camera</item>
</array>
+ <array name="lockscreen_chevron_drawables">
+ <item>@null</item>
+ <item>@drawable/ic_lockscreen_chevron_up</item>
+ <item>@null</item>
+ <item>@null</item>
+ </array>
+
</resources>
diff --git a/core/res/res/values-ms/strings.xml b/core/res/res/values-ms/strings.xml
index 927e239..47aa00a 100644
--- a/core/res/res/values-ms/strings.xml
+++ b/core/res/res/values-ms/strings.xml
@@ -1311,7 +1311,6 @@
<string name="sending" msgid="3245653681008218030">"Menghantar…"</string>
<string name="launchBrowserDefault" msgid="2057951947297614725">"Lancarkan Penyemak Imbas?"</string>
<string name="SetupCallDefault" msgid="5834948469253758575">"Terima panggilan?"</string>
- <!-- no translation found for activity_resolver_use_always (8017770747801494933) -->
- <skip />
+ <string name="activity_resolver_use_always" msgid="8017770747801494933">"Sentiasa"</string>
<string name="activity_resolver_use_once" msgid="405646673463328329">"Hanya Sekali"</string>
</resources>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index 88db9f4..d39c75c 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -1321,8 +1321,7 @@
<string name="sending" msgid="3245653681008218030">"Sender …"</string>
<string name="launchBrowserDefault" msgid="2057951947297614725">"Vil du starte nettleseren?"</string>
<string name="SetupCallDefault" msgid="5834948469253758575">"Vil du besvare anropet?"</string>
- <!-- no translation found for activity_resolver_use_always (8017770747801494933) -->
- <skip />
+ <string name="activity_resolver_use_always" msgid="8017770747801494933">"Alltid"</string>
<!-- no translation found for activity_resolver_use_once (405646673463328329) -->
<skip />
</resources>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index 62c839b1..60ea8e8 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -1321,8 +1321,7 @@
<string name="sending" msgid="3245653681008218030">"Wysyłanie..."</string>
<string name="launchBrowserDefault" msgid="2057951947297614725">"Uruchomić przeglądarkę?"</string>
<string name="SetupCallDefault" msgid="5834948469253758575">"Odebrać połączenie?"</string>
- <!-- no translation found for activity_resolver_use_always (8017770747801494933) -->
- <skip />
+ <string name="activity_resolver_use_always" msgid="8017770747801494933">"Zawsze"</string>
<!-- no translation found for activity_resolver_use_once (405646673463328329) -->
<skip />
</resources>
diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml
index 1825346..4bb3b2f 100644
--- a/core/res/res/values-pt-rPT/strings.xml
+++ b/core/res/res/values-pt-rPT/strings.xml
@@ -175,28 +175,20 @@
<string name="permgroupdesc_location" msgid="5704679763124170100">"Monitorizar a sua localização física."</string>
<string name="permgrouplab_network" msgid="5808983377727109831">"Comunicação de rede"</string>
<string name="permgroupdesc_network" msgid="4478299413241861987">"Aceder a várias funcionalidades de rede."</string>
- <!-- no translation found for permgrouplab_bluetoothNetwork (1585403544162128109) -->
- <skip />
- <!-- no translation found for permgroupdesc_bluetoothNetwork (5625288577164282391) -->
- <skip />
- <!-- no translation found for permgrouplab_shortrangeNetwork (130808676377486118) -->
- <skip />
- <!-- no translation found for permgroupdesc_shortrangeNetwork (1884069062653436007) -->
- <skip />
+ <string name="permgrouplab_bluetoothNetwork" msgid="1585403544162128109">"Bluetooth"</string>
+ <string name="permgroupdesc_bluetoothNetwork" msgid="5625288577164282391">"Aceder a dispositivos e redes através de Bluetooth."</string>
+ <string name="permgrouplab_shortrangeNetwork" msgid="130808676377486118">"Redes de Curto Alcance"</string>
+ <string name="permgroupdesc_shortrangeNetwork" msgid="1884069062653436007">"Aceder a dispositivos através de redes de curto alcance como NFC."</string>
<string name="permgrouplab_audioSettings" msgid="8329261670151871235">"Definições de Áudio"</string>
<string name="permgroupdesc_audioSettings" msgid="2641515403347568130">"Alterar as definições de áudio."</string>
<string name="permgrouplab_affectsBattery" msgid="6209246653424798033">"Afetar a Bateria"</string>
<string name="permgroupdesc_affectsBattery" msgid="6441275320638916947">"Utilizar funcionalidades que podem descarregar rapidamente a bateria."</string>
<string name="permgrouplab_calendar" msgid="5863508437783683902">"Calendário"</string>
<string name="permgroupdesc_calendar" msgid="5777534316982184416">"Acesso direto ao calendário e eventos."</string>
- <!-- no translation found for permgrouplab_dictionary (4148597128843641379) -->
- <skip />
- <!-- no translation found for permgroupdesc_dictionary (7921166355964764490) -->
- <skip />
- <!-- no translation found for permgrouplab_writeDictionary (8090237702432576788) -->
- <skip />
- <!-- no translation found for permgroupdesc_writeDictionary (2711561994497361646) -->
- <skip />
+ <string name="permgrouplab_dictionary" msgid="4148597128843641379">"Ler Dicionário do Utilizador"</string>
+ <string name="permgroupdesc_dictionary" msgid="7921166355964764490">"Ler palavras no dicionário do utilizador."</string>
+ <string name="permgrouplab_writeDictionary" msgid="8090237702432576788">"Escrever no Dicionário do Utilizador"</string>
+ <string name="permgroupdesc_writeDictionary" msgid="2711561994497361646">"Adicionar palavras ao dicionário do utilizador."</string>
<string name="permgrouplab_bookmarks" msgid="1949519673103968229">"Marcadores e Histórico"</string>
<string name="permgroupdesc_bookmarks" msgid="4169771606257963028">"Acesso direto aos marcadores e histórico do navegador."</string>
<string name="permgrouplab_deviceAlarms" msgid="6117704629728824101">"Alarme"</string>
@@ -569,8 +561,7 @@
<string name="permdesc_sdcardRead" product="nosdcard" msgid="3530894470637667917">"Permitir que aplic. leia cont. da mem. USB, que poderão incluir fotogr. e multimédia."</string>
<string name="permdesc_sdcardRead" product="default" msgid="2555811422562526606">"Permite que a aplicação leia os conteúdos do cartão SD que poderão incluir fotografias e elementos multimédia."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="8485979062254666748">"modificar ou eliminar os conteúdos da memória USB"</string>
- <!-- no translation found for permlab_sdcardWrite (8805693630050458763) -->
- <skip />
+ <string name="permlab_sdcardWrite" product="default" msgid="8805693630050458763">"modificar ou eliminar os conteúdos do cartão SD"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Permite que a aplicação escreva na unidade de armazenamento USB."</string>
<string name="permdesc_sdcardWrite" product="default" msgid="4337417790936632090">"Permite que a aplicação escreva no cartão SD."</string>
<string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"modif./elim. armaz. interno"</string>
@@ -1090,8 +1081,7 @@
<string name="date_time_set" msgid="5777075614321087758">"Definir"</string>
<string name="date_time_done" msgid="2507683751759308828">"Concluído"</string>
<string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ff900000">"NOVA: "</font></string>
- <!-- no translation found for perms_description_app (5139836143293299417) -->
- <skip />
+ <string name="perms_description_app" msgid="5139836143293299417">"Fornecido por <xliff:g id="APP_NAME">%1$s</xliff:g>."</string>
<string name="no_permissions" msgid="7283357728219338112">"Não são necessárias permissões"</string>
<string name="usb_storage_activity_title" msgid="4465055157209648641">"Armazenamento em massa USB"</string>
<string name="usb_storage_title" msgid="5901459041398751495">"Ligado através de USB"</string>
@@ -1323,6 +1313,5 @@
<string name="SetupCallDefault" msgid="5834948469253758575">"Aceitar chamada?"</string>
<!-- no translation found for activity_resolver_use_always (8017770747801494933) -->
<skip />
- <!-- no translation found for activity_resolver_use_once (405646673463328329) -->
- <skip />
+ <string name="activity_resolver_use_once" msgid="405646673463328329">"Só Uma Vez"</string>
</resources>
diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml
index 66ec3a8..ba10acd 100644
--- a/core/res/res/values-pt/strings.xml
+++ b/core/res/res/values-pt/strings.xml
@@ -1311,7 +1311,6 @@
<string name="sending" msgid="3245653681008218030">"Enviando..."</string>
<string name="launchBrowserDefault" msgid="2057951947297614725">"Abrir Navegador?"</string>
<string name="SetupCallDefault" msgid="5834948469253758575">"Aceitar chamada?"</string>
- <!-- no translation found for activity_resolver_use_always (8017770747801494933) -->
- <skip />
+ <string name="activity_resolver_use_always" msgid="8017770747801494933">"Sempre"</string>
<string name="activity_resolver_use_once" msgid="405646673463328329">"Só uma vez"</string>
</resources>
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index 61428cd..45783d1 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -1321,8 +1321,7 @@
<string name="sending" msgid="3245653681008218030">"Se trimite..."</string>
<string name="launchBrowserDefault" msgid="2057951947297614725">"Lansaţi browserul?"</string>
<string name="SetupCallDefault" msgid="5834948469253758575">"Acceptaţi apelul?"</string>
- <!-- no translation found for activity_resolver_use_always (8017770747801494933) -->
- <skip />
+ <string name="activity_resolver_use_always" msgid="8017770747801494933">"Întotdeauna"</string>
<!-- no translation found for activity_resolver_use_once (405646673463328329) -->
<skip />
</resources>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index db562c7..79cb76a 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -175,28 +175,20 @@
<string name="permgroupdesc_location" msgid="5704679763124170100">"Sledovanie vašej fyzickej polohy."</string>
<string name="permgrouplab_network" msgid="5808983377727109831">"Sieťová komunikácia"</string>
<string name="permgroupdesc_network" msgid="4478299413241861987">"Prístup k rôznym funkciám siete."</string>
- <!-- no translation found for permgrouplab_bluetoothNetwork (1585403544162128109) -->
- <skip />
- <!-- no translation found for permgroupdesc_bluetoothNetwork (5625288577164282391) -->
- <skip />
- <!-- no translation found for permgrouplab_shortrangeNetwork (130808676377486118) -->
- <skip />
- <!-- no translation found for permgroupdesc_shortrangeNetwork (1884069062653436007) -->
- <skip />
+ <string name="permgrouplab_bluetoothNetwork" msgid="1585403544162128109">"Bluetooth"</string>
+ <string name="permgroupdesc_bluetoothNetwork" msgid="5625288577164282391">"Prístup k zariadeniam a sieťam prostredníctvom rozhrania Bluetooth."</string>
+ <string name="permgrouplab_shortrangeNetwork" msgid="130808676377486118">"Siete krátkeho dosahu"</string>
+ <string name="permgroupdesc_shortrangeNetwork" msgid="1884069062653436007">"Prístup k zariadeniam prostredníctvom sietí krátkeho dosahu (napr. NFC)."</string>
<string name="permgrouplab_audioSettings" msgid="8329261670151871235">"Nastavenia zvuku"</string>
<string name="permgroupdesc_audioSettings" msgid="2641515403347568130">"Zmena nastavení zvuku."</string>
<string name="permgrouplab_affectsBattery" msgid="6209246653424798033">"Má vplyv na batériu"</string>
<string name="permgroupdesc_affectsBattery" msgid="6441275320638916947">"Používanie funkcií, ktoré môžu rýchlo vyčerpať batériu."</string>
<string name="permgrouplab_calendar" msgid="5863508437783683902">"Kalendár"</string>
<string name="permgroupdesc_calendar" msgid="5777534316982184416">"Priamy prístup ku kalendáru a udalostiam."</string>
- <!-- no translation found for permgrouplab_dictionary (4148597128843641379) -->
- <skip />
- <!-- no translation found for permgroupdesc_dictionary (7921166355964764490) -->
- <skip />
- <!-- no translation found for permgrouplab_writeDictionary (8090237702432576788) -->
- <skip />
- <!-- no translation found for permgroupdesc_writeDictionary (2711561994497361646) -->
- <skip />
+ <string name="permgrouplab_dictionary" msgid="4148597128843641379">"Čítanie požívateľského slovníka"</string>
+ <string name="permgroupdesc_dictionary" msgid="7921166355964764490">"Čítanie slov v používateľskom slovníku."</string>
+ <string name="permgrouplab_writeDictionary" msgid="8090237702432576788">"Zápis do používateľského slovníka"</string>
+ <string name="permgroupdesc_writeDictionary" msgid="2711561994497361646">"Pridávanie slov do používateľského slovníka."</string>
<string name="permgrouplab_bookmarks" msgid="1949519673103968229">"Záložky a história"</string>
<string name="permgroupdesc_bookmarks" msgid="4169771606257963028">"Priamy prístup k záložkám a histórii prehliadača."</string>
<string name="permgrouplab_deviceAlarms" msgid="6117704629728824101">"Budík"</string>
@@ -569,8 +561,7 @@
<string name="permdesc_sdcardRead" product="nosdcard" msgid="3530894470637667917">"Umožňuje aplikácii čítať obsah úložiska USB, ktorý môže obsahovať fotografie a mediálne údaje."</string>
<string name="permdesc_sdcardRead" product="default" msgid="2555811422562526606">"Umožňuje aplikácii čítať obsah karty SD, ktorý môže zahrnovať fotografie a mediálne údaje."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="8485979062254666748">"upraviť alebo odstrániť obsah úložiska USB"</string>
- <!-- no translation found for permlab_sdcardWrite (8805693630050458763) -->
- <skip />
+ <string name="permlab_sdcardWrite" product="default" msgid="8805693630050458763">"úprava alebo odstránenie obsahu na karte SD"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Umožňuje aplikácii zápis do ukladacieho priestoru USB."</string>
<string name="permdesc_sdcardWrite" product="default" msgid="4337417790936632090">"Umožňuje aplikácii zápis na kartu SD."</string>
<string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"úprava alebo odstránenie obsahu interného ukladacieho priestoru média"</string>
@@ -1090,8 +1081,7 @@
<string name="date_time_set" msgid="5777075614321087758">"Nastaviť"</string>
<string name="date_time_done" msgid="2507683751759308828">"Hotovo"</string>
<string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ff900000">"NOVINKA: "</font></string>
- <!-- no translation found for perms_description_app (5139836143293299417) -->
- <skip />
+ <string name="perms_description_app" msgid="5139836143293299417">"Poskytuje aplikácia <xliff:g id="APP_NAME">%1$s</xliff:g>."</string>
<string name="no_permissions" msgid="7283357728219338112">"Nevyžadujú sa žiadne oprávnenia."</string>
<string name="usb_storage_activity_title" msgid="4465055157209648641">"Veľkokapacitné úložisko USB"</string>
<string name="usb_storage_title" msgid="5901459041398751495">"Zariadenie USB pripojené"</string>
@@ -1321,8 +1311,6 @@
<string name="sending" msgid="3245653681008218030">"Odosielanie..."</string>
<string name="launchBrowserDefault" msgid="2057951947297614725">"Spustiť prehliadač?"</string>
<string name="SetupCallDefault" msgid="5834948469253758575">"Prijať hovor?"</string>
- <!-- no translation found for activity_resolver_use_always (8017770747801494933) -->
- <skip />
- <!-- no translation found for activity_resolver_use_once (405646673463328329) -->
- <skip />
+ <string name="activity_resolver_use_always" msgid="8017770747801494933">"Vždy"</string>
+ <string name="activity_resolver_use_once" msgid="405646673463328329">"Len raz"</string>
</resources>
diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml
index 11a733d..e943dda 100644
--- a/core/res/res/values-sr/strings.xml
+++ b/core/res/res/values-sr/strings.xml
@@ -1321,8 +1321,7 @@
<string name="sending" msgid="3245653681008218030">"Слање..."</string>
<string name="launchBrowserDefault" msgid="2057951947297614725">"Желите ли да покренете прегледач?"</string>
<string name="SetupCallDefault" msgid="5834948469253758575">"Желите ли да прихватите позив?"</string>
- <!-- no translation found for activity_resolver_use_always (8017770747801494933) -->
- <skip />
+ <string name="activity_resolver_use_always" msgid="8017770747801494933">"Увек"</string>
<!-- no translation found for activity_resolver_use_once (405646673463328329) -->
<skip />
</resources>
diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml
index 9544701..70f8143 100644
--- a/core/res/res/values-tl/strings.xml
+++ b/core/res/res/values-tl/strings.xml
@@ -1311,7 +1311,6 @@
<string name="sending" msgid="3245653681008218030">"Ipinapadala..."</string>
<string name="launchBrowserDefault" msgid="2057951947297614725">"Ilunsad ang Browser?"</string>
<string name="SetupCallDefault" msgid="5834948469253758575">"Tanggapin ang tawag?"</string>
- <!-- no translation found for activity_resolver_use_always (8017770747801494933) -->
- <skip />
+ <string name="activity_resolver_use_always" msgid="8017770747801494933">"Palagi"</string>
<string name="activity_resolver_use_once" msgid="405646673463328329">"Isang Beses Lang"</string>
</resources>
diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml
index 4a1a0bc..150f728 100644
--- a/core/res/res/values-uk/strings.xml
+++ b/core/res/res/values-uk/strings.xml
@@ -175,28 +175,20 @@
<string name="permgroupdesc_location" msgid="5704679763124170100">"Відстежувати ваше фізичне місцезнаходження."</string>
<string name="permgrouplab_network" msgid="5808983377727109831">"Підключення до мережі"</string>
<string name="permgroupdesc_network" msgid="4478299413241861987">"Отримувати доступ до різних функцій мережі."</string>
- <!-- no translation found for permgrouplab_bluetoothNetwork (1585403544162128109) -->
- <skip />
- <!-- no translation found for permgroupdesc_bluetoothNetwork (5625288577164282391) -->
- <skip />
- <!-- no translation found for permgrouplab_shortrangeNetwork (130808676377486118) -->
- <skip />
- <!-- no translation found for permgroupdesc_shortrangeNetwork (1884069062653436007) -->
- <skip />
+ <string name="permgrouplab_bluetoothNetwork" msgid="1585403544162128109">"Bluetooth"</string>
+ <string name="permgroupdesc_bluetoothNetwork" msgid="5625288577164282391">"Отримувати доступ до пристроїв і мереж через Bluetooth."</string>
+ <string name="permgrouplab_shortrangeNetwork" msgid="130808676377486118">"Мережі короткого діапазону"</string>
+ <string name="permgroupdesc_shortrangeNetwork" msgid="1884069062653436007">"Отримувати доступ до пристроїв через мережі короткого діапазону, як-от NFC."</string>
<string name="permgrouplab_audioSettings" msgid="8329261670151871235">"Налаштування звуку"</string>
<string name="permgroupdesc_audioSettings" msgid="2641515403347568130">"Зміна налаштувань звуку."</string>
<string name="permgrouplab_affectsBattery" msgid="6209246653424798033">"Заряд акумулятора"</string>
<string name="permgroupdesc_affectsBattery" msgid="6441275320638916947">"Використання функцій, які швидко зменшують заряд акумулятора."</string>
<string name="permgrouplab_calendar" msgid="5863508437783683902">"Календар"</string>
<string name="permgroupdesc_calendar" msgid="5777534316982184416">"Безпосередній доступ до календаря та подій."</string>
- <!-- no translation found for permgrouplab_dictionary (4148597128843641379) -->
- <skip />
- <!-- no translation found for permgroupdesc_dictionary (7921166355964764490) -->
- <skip />
- <!-- no translation found for permgrouplab_writeDictionary (8090237702432576788) -->
- <skip />
- <!-- no translation found for permgroupdesc_writeDictionary (2711561994497361646) -->
- <skip />
+ <string name="permgrouplab_dictionary" msgid="4148597128843641379">"Читати словник користувача"</string>
+ <string name="permgroupdesc_dictionary" msgid="7921166355964764490">"Читати слова в словнику користувача."</string>
+ <string name="permgrouplab_writeDictionary" msgid="8090237702432576788">"Писати в словник користувача"</string>
+ <string name="permgroupdesc_writeDictionary" msgid="2711561994497361646">"Додавати слова в словник користувача."</string>
<string name="permgrouplab_bookmarks" msgid="1949519673103968229">"Закладки й історія"</string>
<string name="permgroupdesc_bookmarks" msgid="4169771606257963028">"Безпосередній доступ до закладок та історії веб-переглядача."</string>
<string name="permgrouplab_deviceAlarms" msgid="6117704629728824101">"Сигнал"</string>
@@ -569,8 +561,7 @@
<string name="permdesc_sdcardRead" product="nosdcard" msgid="3530894470637667917">"Дозволяє програмі читати вміст носія USB, що може включати фотографії й медіа-файли."</string>
<string name="permdesc_sdcardRead" product="default" msgid="2555811422562526606">"Дозволяє програмі читати вміст карти SD, що може включати фотографії й медіа-файли."</string>
<string name="permlab_sdcardWrite" product="nosdcard" msgid="8485979062254666748">"змінювати чи видаляти вміст USB"</string>
- <!-- no translation found for permlab_sdcardWrite (8805693630050458763) -->
- <skip />
+ <string name="permlab_sdcardWrite" product="default" msgid="8805693630050458763">"змінювати чи видаляти вміст на карті SD"</string>
<string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Дозволяє програмі писати на носій USB"</string>
<string name="permdesc_sdcardWrite" product="default" msgid="4337417790936632090">"Дозволяє програмі записувати на карту SD."</string>
<string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"змінювати/видаляти вміст внутр. сховища даних"</string>
@@ -1090,8 +1081,7 @@
<string name="date_time_set" msgid="5777075614321087758">"Застосувати"</string>
<string name="date_time_done" msgid="2507683751759308828">"Готово"</string>
<string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ff900000">"НОВИЙ: "</font></string>
- <!-- no translation found for perms_description_app (5139836143293299417) -->
- <skip />
+ <string name="perms_description_app" msgid="5139836143293299417">"Надано <xliff:g id="APP_NAME">%1$s</xliff:g>."</string>
<string name="no_permissions" msgid="7283357728219338112">"Дозвіл не потрібний"</string>
<string name="usb_storage_activity_title" msgid="4465055157209648641">"USB великої ємності"</string>
<string name="usb_storage_title" msgid="5901459041398751495">"Підкл. через USB"</string>
@@ -1321,8 +1311,6 @@
<string name="sending" msgid="3245653681008218030">"Надсилання…"</string>
<string name="launchBrowserDefault" msgid="2057951947297614725">"Запустити веб-переглядач?"</string>
<string name="SetupCallDefault" msgid="5834948469253758575">"Прийняти виклик?"</string>
- <!-- no translation found for activity_resolver_use_always (8017770747801494933) -->
- <skip />
- <!-- no translation found for activity_resolver_use_once (405646673463328329) -->
- <skip />
+ <string name="activity_resolver_use_always" msgid="8017770747801494933">"Завжди"</string>
+ <string name="activity_resolver_use_once" msgid="405646673463328329">"Лише один раз"</string>
</resources>
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index ea03797..b2ba997 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -1311,7 +1311,6 @@
<string name="sending" msgid="3245653681008218030">"正在发送..."</string>
<string name="launchBrowserDefault" msgid="2057951947297614725">"要启动浏览器吗?"</string>
<string name="SetupCallDefault" msgid="5834948469253758575">"要接听电话吗?"</string>
- <!-- no translation found for activity_resolver_use_always (8017770747801494933) -->
- <skip />
+ <string name="activity_resolver_use_always" msgid="8017770747801494933">"始终"</string>
<string name="activity_resolver_use_once" msgid="405646673463328329">"仅此一次"</string>
</resources>
diff --git a/core/res/res/values/arrays.xml b/core/res/res/values/arrays.xml
index d05a31c..1eeca59 100644
--- a/core/res/res/values/arrays.xml
+++ b/core/res/res/values/arrays.xml
@@ -400,4 +400,11 @@
<item>@null</item>
</array>
+ <array name="lockscreen_chevron_drawables">
+ <item>@drawable/ic_lockscreen_chevron_right</item>
+ <item>@null</item>
+ <item>@null</item>
+ <item>@null</item>
+ </array>
+
</resources>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index a4d9e14..2f540a5 100755
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -857,6 +857,9 @@
-->
<attr name="textSize" format="dimension" />
+ <!-- Default font family. -->
+ <attr name="fontFamily" format="string" />
+
<!-- Default text typeface. -->
<attr name="typeface">
<enum name="normal" value="0" />
@@ -2999,6 +3002,8 @@
<attr name="textStyle" />
<!-- Typeface (normal, sans, serif, monospace) for the text. -->
<attr name="typeface" />
+ <!-- Font family (named by string) for the text. -->
+ <attr name="fontFamily" />
<!-- Color of the text selection highlight. -->
<attr name="textColorHighlight" />
<!-- Color of the hint text. -->
@@ -3044,6 +3049,8 @@
<attr name="typeface" />
<!-- Style (bold, italic, bolditalic) for the text. -->
<attr name="textStyle" />
+ <!-- Font family (named by string) for the text. -->
+ <attr name="fontFamily" />
<!-- Text color for links. -->
<attr name="textColorLink" />
<!-- Makes the cursor visible (the default) or invisible. -->
@@ -5348,18 +5355,25 @@
<!-- Sets a drawable as the drag center. -->
<attr name="handleDrawable" format="reference" />
- <!-- Drawable to use for chevron animation on the left. May be null. -->
+ <!-- Drawable to use for chevron animation on the left. May be null.
+ @deprecated use chevronDrawables instead -->
<attr name="leftChevronDrawable" format="reference" />
- <!-- Drawable to use for chevron animation on the right. May be null. -->
+ <!-- Drawable to use for chevron animation on the right. May be null.
+ @deprecated use chevronDrawables instead -->
<attr name="rightChevronDrawable" format="reference" />
- <!-- Drawable to use for chevron animation on the top. May be null. -->
+ <!-- Drawable to use for chevron animation on the top. May be null.
+ @deprecated use chevronDrawables instead -->
<attr name="topChevronDrawable" format="reference" />
- <!-- Drawable to use for chevron animation on the bottom. May be null. -->
+ <!-- Drawable to use for chevron animation on the bottom. May be null.
+ @deprecated use chevronDrawables instead -->
<attr name="bottomChevronDrawable" format="reference" />
+ <!-- Drawables to use for chevron animations. May be null. -->
+ <attr name="chevronDrawables" format="reference"/>
+
<!-- Drawable to use for wave ripple animation. -->
<attr name="waveDrawable" format="reference" />
@@ -5620,6 +5634,6 @@
<!-- The display label of the keyboard layout. -->
<attr name="label" />
<!-- The key character map file resource. -->
- <attr name="kcm" format="reference" />
+ <attr name="keyboardLayout" format="reference" />
</declare-styleable>
</resources>
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 1d17cd8..48038dd 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -1009,6 +1009,7 @@
<java-symbol type="drawable" name="notification_bg_low" />
<java-symbol type="drawable" name="notification_template_icon_bg" />
<java-symbol type="drawable" name="notification_template_icon_low_bg" />
+ <java-symbol type="drawable" name="ic_lockscreen_unlock_phantom" />
<java-symbol type="layout" name="action_bar_home" />
<java-symbol type="layout" name="action_bar_title_item" />
@@ -3599,14 +3600,11 @@
<!-- ===============================================================
Resources added in version 16 of the platform (Jelly Bean)
=============================================================== -->
- <public type="attr" name="isolatedProcess" id="0x010103a7" />
-
- <public type="attr" name="kcm"/>
-
- <public type="attr" name="parentActivityName" />
-
- <public type="attr" name="importantForAccessibility"/>
-
- <public type="attr" name="permissionGroupFlags"/>
+ <public type="attr" name="parentActivityName" id="0x010103a7" />
+ <public type="attr" name="permissionGroupFlags" id="0x010103a8" />
+ <public type="attr" name="isolatedProcess" id="0x010103a9" />
+ <public type="attr" name="importantForAccessibility" id="0x010103aa" />
+ <public type="attr" name="keyboardLayout" id="0x010103ab" />
+ <public type="attr" name="fontFamily" id="0x010103ac" />
</resources>
diff --git a/data/fonts/Android.mk b/data/fonts/Android.mk
index 16a98d3..ebd9a47 100644
--- a/data/fonts/Android.mk
+++ b/data/fonts/Android.mk
@@ -144,6 +144,10 @@
Roboto-BoldItalic.ttf \
Roboto-Light.ttf \
Roboto-LightItalic.ttf \
+ RobotoCondensed-Regular.ttf \
+ RobotoCondensed-Bold.ttf \
+ RobotoCondensed-Italic.ttf \
+ RobotoCondensed-BoldItalic.ttf \
DroidNaskh-Regular.ttf \
DroidNaskh-Regular-SystemUI.ttf \
DroidSansDevanagari-Regular.ttf \
diff --git a/data/fonts/DroidNaskh-Regular-SystemUI.ttf b/data/fonts/DroidNaskh-Regular-SystemUI.ttf
old mode 100755
new mode 100644
index 5818b49..2f495cf
--- a/data/fonts/DroidNaskh-Regular-SystemUI.ttf
+++ b/data/fonts/DroidNaskh-Regular-SystemUI.ttf
Binary files differ
diff --git a/data/fonts/Roboto-BoldCondensed.ttf b/data/fonts/Roboto-BoldCondensed.ttf
deleted file mode 100755
index 61da020..0000000
--- a/data/fonts/Roboto-BoldCondensed.ttf
+++ /dev/null
Binary files differ
diff --git a/data/fonts/Roboto-BoldCondensedItalic.ttf b/data/fonts/Roboto-BoldCondensedItalic.ttf
deleted file mode 100755
index b946dce..0000000
--- a/data/fonts/Roboto-BoldCondensedItalic.ttf
+++ /dev/null
Binary files differ
diff --git a/data/fonts/Roboto-Condensed.ttf b/data/fonts/Roboto-Condensed.ttf
deleted file mode 100755
index 73a868f..0000000
--- a/data/fonts/Roboto-Condensed.ttf
+++ /dev/null
Binary files differ
diff --git a/data/fonts/Roboto-CondensedItalic.ttf b/data/fonts/Roboto-CondensedItalic.ttf
deleted file mode 100755
index a0969bb..0000000
--- a/data/fonts/Roboto-CondensedItalic.ttf
+++ /dev/null
Binary files differ
diff --git a/data/fonts/Roboto-Light.ttf b/data/fonts/Roboto-Light.ttf
index b50399e..e296c60 100644
--- a/data/fonts/Roboto-Light.ttf
+++ b/data/fonts/Roboto-Light.ttf
Binary files differ
diff --git a/data/fonts/Roboto-LightItalic.ttf b/data/fonts/Roboto-LightItalic.ttf
index a1fdc8d..3e6901d 100644
--- a/data/fonts/Roboto-LightItalic.ttf
+++ b/data/fonts/Roboto-LightItalic.ttf
Binary files differ
diff --git a/data/fonts/RobotoCondensed-Bold.ttf b/data/fonts/RobotoCondensed-Bold.ttf
new file mode 100644
index 0000000..21c10f5
--- /dev/null
+++ b/data/fonts/RobotoCondensed-Bold.ttf
Binary files differ
diff --git a/data/fonts/RobotoCondensed-BoldItalic.ttf b/data/fonts/RobotoCondensed-BoldItalic.ttf
new file mode 100644
index 0000000..d8edd2d
--- /dev/null
+++ b/data/fonts/RobotoCondensed-BoldItalic.ttf
Binary files differ
diff --git a/data/fonts/RobotoCondensed-Italic.ttf b/data/fonts/RobotoCondensed-Italic.ttf
new file mode 100644
index 0000000..4dec2cf
--- /dev/null
+++ b/data/fonts/RobotoCondensed-Italic.ttf
Binary files differ
diff --git a/data/fonts/RobotoCondensed-Regular.ttf b/data/fonts/RobotoCondensed-Regular.ttf
new file mode 100644
index 0000000..875ea1a
--- /dev/null
+++ b/data/fonts/RobotoCondensed-Regular.ttf
Binary files differ
diff --git a/data/fonts/fallback_fonts-ja.xml b/data/fonts/fallback_fonts-ja.xml
index be53d1d..5f9b5ed 100644
--- a/data/fonts/fallback_fonts-ja.xml
+++ b/data/fonts/fallback_fonts-ja.xml
@@ -70,13 +70,28 @@
</family>
<family>
<fileset>
+ <file>DroidSansTamil-Regular.ttf</file>
+ <file>DroidSansTamil-Bold.ttf</file>
+ </fileset>
+ </family>
+ <family>
+ <fileset>
+ <file>AnjaliNewLipi-light.ttf</file>
+ </fileset>
+ </family>
+ <family>
+ <fileset>
<file>Lohit-Bengali.ttf</file>
</fileset>
</family>
<family>
<fileset>
- <file>DroidSansTamil-Regular.ttf</file>
- <file>DroidSansTamil-Bold.ttf</file>
+ <file>Lohit-Kannada.ttf</file>
+ </fileset>
+ </family>
+ <family>
+ <fileset>
+ <file>Lohit-Telugu.ttf</file>
</fileset>
</family>
<family>
diff --git a/data/fonts/fallback_fonts.xml b/data/fonts/fallback_fonts.xml
index 80fffa9..8517152 100644
--- a/data/fonts/fallback_fonts.xml
+++ b/data/fonts/fallback_fonts.xml
@@ -70,13 +70,27 @@
</family>
<family>
<fileset>
+ <file>DroidSansTamil-Regular.ttf</file>
+ <file>DroidSansTamil-Bold.ttf</file>
+ </family>
+ <family>
+ <fileset>
+ <file>AnjaliNewLipi-light.ttf</file>
+ </fileset>
+ </family>
+ <family>
+ <fileset>
<file>Lohit-Bengali.ttf</file>
</fileset>
</family>
<family>
<fileset>
- <file>DroidSansTamil-Regular.ttf</file>
- <file>DroidSansTamil-Bold.ttf</file>
+ <file>Lohit-Kannada.ttf</file>
+ </fileset>
+ </family>
+ <family>
+ <fileset>
+ <file>Lohit-Telugu.ttf</file>
</fileset>
</family>
<family>
diff --git a/data/fonts/fonts.mk b/data/fonts/fonts.mk
index 397ccda..97233d7 100644
--- a/data/fonts/fonts.mk
+++ b/data/fonts/fonts.mk
@@ -26,6 +26,10 @@
Roboto-BoldItalic.ttf \
Roboto-Light.ttf \
Roboto-LightItalic.ttf \
+ RobotoCondensed-Regular.ttf \
+ RobotoCondensed-Bold.ttf \
+ RobotoCondensed-Italic.ttf \
+ RobotoCondensed-BoldItalic.ttf \
DroidNaskh-Regular.ttf \
DroidNaskh-Regular-SystemUI.ttf \
DroidSansDevanagari-Regular.ttf \
diff --git a/data/fonts/system_fonts.xml b/data/fonts/system_fonts.xml
index 95c4f70..5a10523 100644
--- a/data/fonts/system_fonts.xml
+++ b/data/fonts/system_fonts.xml
@@ -46,6 +46,17 @@
<family>
<nameset>
+ <name>sans-serif-condensed</name>
+ </nameset>
+ <fileset>
+ <file>RobotoCondensed-Regular.ttf</file>
+ <file>RobotoCondensed-Bold.ttf</file>
+ <file>RobotoCondensed-Italic.ttf</file>
+ <file>RobotoCondensed-BoldItalic.ttf</file>
+ </fileset>
+ </family>
+ <family>
+ <nameset>
<name>serif</name>
<name>times</name>
<name>times new roman</name>
diff --git a/graphics/java/android/graphics/Rect.java b/graphics/java/android/graphics/Rect.java
index ec911b0..6c204ab 100644
--- a/graphics/java/android/graphics/Rect.java
+++ b/graphics/java/android/graphics/Rect.java
@@ -49,9 +49,9 @@
* checking is performed, so the caller must ensure that left <= right and
* top <= bottom.
*
- * @param left The X coordinate of the left side of the rectagle
+ * @param left The X coordinate of the left side of the rectangle
* @param top The Y coordinate of the top of the rectangle
- * @param right The X coordinate of the right side of the rectagle
+ * @param right The X coordinate of the right side of the rectangle
* @param bottom The Y coordinate of the bottom of the rectangle
*/
public Rect(int left, int top, int right, int bottom) {
@@ -235,9 +235,9 @@
* checking is performed, so it is up to the caller to ensure that
* left <= right and top <= bottom.
*
- * @param left The X coordinate of the left side of the rectagle
+ * @param left The X coordinate of the left side of the rectangle
* @param top The Y coordinate of the top of the rectangle
- * @param right The X coordinate of the right side of the rectagle
+ * @param right The X coordinate of the right side of the rectangle
* @param bottom The Y coordinate of the bottom of the rectangle
*/
public void set(int left, int top, int right, int bottom) {
diff --git a/graphics/java/android/graphics/RectF.java b/graphics/java/android/graphics/RectF.java
index c633d84..108b7f9 100644
--- a/graphics/java/android/graphics/RectF.java
+++ b/graphics/java/android/graphics/RectF.java
@@ -46,9 +46,9 @@
* checking is performed, so the caller must ensure that left <= right and
* top <= bottom.
*
- * @param left The X coordinate of the left side of the rectagle
+ * @param left The X coordinate of the left side of the rectangle
* @param top The Y coordinate of the top of the rectangle
- * @param right The X coordinate of the right side of the rectagle
+ * @param right The X coordinate of the right side of the rectangle
* @param bottom The Y coordinate of the bottom of the rectangle
*/
public RectF(float left, float top, float right, float bottom) {
@@ -182,9 +182,9 @@
* checking is performed, so it is up to the caller to ensure that
* left <= right and top <= bottom.
*
- * @param left The X coordinate of the left side of the rectagle
+ * @param left The X coordinate of the left side of the rectangle
* @param top The Y coordinate of the top of the rectangle
- * @param right The X coordinate of the right side of the rectagle
+ * @param right The X coordinate of the right side of the rectangle
* @param bottom The Y coordinate of the bottom of the rectangle
*/
public void set(float left, float top, float right, float bottom) {
diff --git a/include/androidfw/Input.h b/include/androidfw/Input.h
index 6d03fd6..aa8b824 100644
--- a/include/androidfw/Input.h
+++ b/include/androidfw/Input.h
@@ -27,7 +27,6 @@
#include <utils/Timers.h>
#include <utils/RefBase.h>
#include <utils/String8.h>
-#include <utils/BitSet.h>
#ifdef HAVE_ANDROID_OS
class SkMatrix;
@@ -607,182 +606,6 @@
Vector<MotionEvent*> mMotionEventPool;
};
-/*
- * Calculates the velocity of pointer movements over time.
- */
-class VelocityTracker {
-public:
- // Default polynomial degree. (used by getVelocity)
- static const uint32_t DEFAULT_DEGREE = 2;
-
- // Default sample horizon. (used by getVelocity)
- // We don't use too much history by default since we want to react to quick
- // changes in direction.
- static const nsecs_t DEFAULT_HORIZON = 100 * 1000000; // 100 ms
-
- struct Position {
- float x, y;
- };
-
- struct Estimator {
- static const size_t MAX_DEGREE = 2;
-
- // Polynomial coefficients describing motion in X and Y.
- float xCoeff[MAX_DEGREE + 1], yCoeff[MAX_DEGREE + 1];
-
- // Polynomial degree (number of coefficients), or zero if no information is
- // available.
- uint32_t degree;
-
- // Confidence (coefficient of determination), between 0 (no fit) and 1 (perfect fit).
- float confidence;
-
- inline void clear() {
- degree = 0;
- confidence = 0;
- for (size_t i = 0; i <= MAX_DEGREE; i++) {
- xCoeff[i] = 0;
- yCoeff[i] = 0;
- }
- }
- };
-
- VelocityTracker();
-
- // Resets the velocity tracker state.
- void clear();
-
- // Resets the velocity tracker state for specific pointers.
- // Call this method when some pointers have changed and may be reusing
- // an id that was assigned to a different pointer earlier.
- void clearPointers(BitSet32 idBits);
-
- // Adds movement information for a set of pointers.
- // The idBits bitfield specifies the pointer ids of the pointers whose positions
- // are included in the movement.
- // The positions array contains position information for each pointer in order by
- // increasing id. Its size should be equal to the number of one bits in idBits.
- void addMovement(nsecs_t eventTime, BitSet32 idBits, const Position* positions);
-
- // Adds movement information for all pointers in a MotionEvent, including historical samples.
- void addMovement(const MotionEvent* event);
-
- // Gets the velocity of the specified pointer id in position units per second.
- // Returns false and sets the velocity components to zero if there is
- // insufficient movement information for the pointer.
- bool getVelocity(uint32_t id, float* outVx, float* outVy) const;
-
- // Gets a quadratic estimator for the movements of the specified pointer id.
- // Returns false and clears the estimator if there is no information available
- // about the pointer.
- bool getEstimator(uint32_t id, uint32_t degree, nsecs_t horizon,
- Estimator* outEstimator) const;
-
- // Gets the active pointer id, or -1 if none.
- inline int32_t getActivePointerId() const { return mActivePointerId; }
-
- // Gets a bitset containing all pointer ids from the most recent movement.
- inline BitSet32 getCurrentPointerIdBits() const { return mMovements[mIndex].idBits; }
-
-private:
- // Number of samples to keep.
- static const uint32_t HISTORY_SIZE = 20;
-
- struct Movement {
- nsecs_t eventTime;
- BitSet32 idBits;
- Position positions[MAX_POINTERS];
-
- inline const Position& getPosition(uint32_t id) const {
- return positions[idBits.getIndexOfBit(id)];
- }
- };
-
- uint32_t mIndex;
- Movement mMovements[HISTORY_SIZE];
- int32_t mActivePointerId;
-};
-
-
-/*
- * Specifies parameters that govern pointer or wheel acceleration.
- */
-struct VelocityControlParameters {
- // A scale factor that is multiplied with the raw velocity deltas
- // prior to applying any other velocity control factors. The scale
- // factor should be used to adapt the input device resolution
- // (eg. counts per inch) to the output device resolution (eg. pixels per inch).
- //
- // Must be a positive value.
- // Default is 1.0 (no scaling).
- float scale;
-
- // The scaled speed at which acceleration begins to be applied.
- // This value establishes the upper bound of a low speed regime for
- // small precise motions that are performed without any acceleration.
- //
- // Must be a non-negative value.
- // Default is 0.0 (no low threshold).
- float lowThreshold;
-
- // The scaled speed at which maximum acceleration is applied.
- // The difference between highThreshold and lowThreshold controls
- // the range of speeds over which the acceleration factor is interpolated.
- // The wider the range, the smoother the acceleration.
- //
- // Must be a non-negative value greater than or equal to lowThreshold.
- // Default is 0.0 (no high threshold).
- float highThreshold;
-
- // The acceleration factor.
- // When the speed is above the low speed threshold, the velocity will scaled
- // by an interpolated value between 1.0 and this amount.
- //
- // Must be a positive greater than or equal to 1.0.
- // Default is 1.0 (no acceleration).
- float acceleration;
-
- VelocityControlParameters() :
- scale(1.0f), lowThreshold(0.0f), highThreshold(0.0f), acceleration(1.0f) {
- }
-
- VelocityControlParameters(float scale, float lowThreshold,
- float highThreshold, float acceleration) :
- scale(scale), lowThreshold(lowThreshold),
- highThreshold(highThreshold), acceleration(acceleration) {
- }
-};
-
-/*
- * Implements mouse pointer and wheel speed control and acceleration.
- */
-class VelocityControl {
-public:
- VelocityControl();
-
- /* Sets the various parameters. */
- void setParameters(const VelocityControlParameters& parameters);
-
- /* Resets the current movement counters to zero.
- * This has the effect of nullifying any acceleration. */
- void reset();
-
- /* Translates a raw movement delta into an appropriately
- * scaled / accelerated delta based on the current velocity. */
- void move(nsecs_t eventTime, float* deltaX, float* deltaY);
-
-private:
- // If no movements are received within this amount of time,
- // we assume the movement has stopped and reset the movement counters.
- static const nsecs_t STOP_TIME = 500 * 1000000; // 500 ms
-
- VelocityControlParameters mParameters;
-
- nsecs_t mLastMovementTime;
- VelocityTracker::Position mRawPosition;
- VelocityTracker mVelocityTracker;
-};
-
} // namespace android
#endif // _ANDROIDFW_INPUT_H
diff --git a/include/androidfw/VelocityControl.h b/include/androidfw/VelocityControl.h
new file mode 100644
index 0000000..84e0444
--- /dev/null
+++ b/include/androidfw/VelocityControl.h
@@ -0,0 +1,107 @@
+/*
+ * Copyright (C) 2012 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.
+ */
+
+#ifndef _ANDROIDFW_VELOCITY_CONTROL_H
+#define _ANDROIDFW_VELOCITY_CONTROL_H
+
+#include <androidfw/Input.h>
+#include <androidfw/VelocityTracker.h>
+#include <utils/Timers.h>
+
+namespace android {
+
+/*
+ * Specifies parameters that govern pointer or wheel acceleration.
+ */
+struct VelocityControlParameters {
+ // A scale factor that is multiplied with the raw velocity deltas
+ // prior to applying any other velocity control factors. The scale
+ // factor should be used to adapt the input device resolution
+ // (eg. counts per inch) to the output device resolution (eg. pixels per inch).
+ //
+ // Must be a positive value.
+ // Default is 1.0 (no scaling).
+ float scale;
+
+ // The scaled speed at which acceleration begins to be applied.
+ // This value establishes the upper bound of a low speed regime for
+ // small precise motions that are performed without any acceleration.
+ //
+ // Must be a non-negative value.
+ // Default is 0.0 (no low threshold).
+ float lowThreshold;
+
+ // The scaled speed at which maximum acceleration is applied.
+ // The difference between highThreshold and lowThreshold controls
+ // the range of speeds over which the acceleration factor is interpolated.
+ // The wider the range, the smoother the acceleration.
+ //
+ // Must be a non-negative value greater than or equal to lowThreshold.
+ // Default is 0.0 (no high threshold).
+ float highThreshold;
+
+ // The acceleration factor.
+ // When the speed is above the low speed threshold, the velocity will scaled
+ // by an interpolated value between 1.0 and this amount.
+ //
+ // Must be a positive greater than or equal to 1.0.
+ // Default is 1.0 (no acceleration).
+ float acceleration;
+
+ VelocityControlParameters() :
+ scale(1.0f), lowThreshold(0.0f), highThreshold(0.0f), acceleration(1.0f) {
+ }
+
+ VelocityControlParameters(float scale, float lowThreshold,
+ float highThreshold, float acceleration) :
+ scale(scale), lowThreshold(lowThreshold),
+ highThreshold(highThreshold), acceleration(acceleration) {
+ }
+};
+
+/*
+ * Implements mouse pointer and wheel speed control and acceleration.
+ */
+class VelocityControl {
+public:
+ VelocityControl();
+
+ /* Sets the various parameters. */
+ void setParameters(const VelocityControlParameters& parameters);
+
+ /* Resets the current movement counters to zero.
+ * This has the effect of nullifying any acceleration. */
+ void reset();
+
+ /* Translates a raw movement delta into an appropriately
+ * scaled / accelerated delta based on the current velocity. */
+ void move(nsecs_t eventTime, float* deltaX, float* deltaY);
+
+private:
+ // If no movements are received within this amount of time,
+ // we assume the movement has stopped and reset the movement counters.
+ static const nsecs_t STOP_TIME = 500 * 1000000; // 500 ms
+
+ VelocityControlParameters mParameters;
+
+ nsecs_t mLastMovementTime;
+ VelocityTracker::Position mRawPosition;
+ VelocityTracker mVelocityTracker;
+};
+
+} // namespace android
+
+#endif // _ANDROIDFW_VELOCITY_CONTROL_H
diff --git a/include/androidfw/VelocityTracker.h b/include/androidfw/VelocityTracker.h
new file mode 100644
index 0000000..6d17e1f
--- /dev/null
+++ b/include/androidfw/VelocityTracker.h
@@ -0,0 +1,124 @@
+/*
+ * Copyright (C) 2012 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.
+ */
+
+#ifndef _ANDROIDFW_VELOCITY_TRACKER_H
+#define _ANDROIDFW_VELOCITY_TRACKER_H
+
+#include <androidfw/Input.h>
+#include <utils/Timers.h>
+#include <utils/BitSet.h>
+
+namespace android {
+
+/*
+ * Calculates the velocity of pointer movements over time.
+ */
+class VelocityTracker {
+public:
+ // Default polynomial degree. (used by getVelocity)
+ static const uint32_t DEFAULT_DEGREE = 2;
+
+ // Default sample horizon. (used by getVelocity)
+ // We don't use too much history by default since we want to react to quick
+ // changes in direction.
+ static const nsecs_t DEFAULT_HORIZON = 100 * 1000000; // 100 ms
+
+ struct Position {
+ float x, y;
+ };
+
+ struct Estimator {
+ static const size_t MAX_DEGREE = 2;
+
+ // Polynomial coefficients describing motion in X and Y.
+ float xCoeff[MAX_DEGREE + 1], yCoeff[MAX_DEGREE + 1];
+
+ // Polynomial degree (number of coefficients), or zero if no information is
+ // available.
+ uint32_t degree;
+
+ // Confidence (coefficient of determination), between 0 (no fit) and 1 (perfect fit).
+ float confidence;
+
+ inline void clear() {
+ degree = 0;
+ confidence = 0;
+ for (size_t i = 0; i <= MAX_DEGREE; i++) {
+ xCoeff[i] = 0;
+ yCoeff[i] = 0;
+ }
+ }
+ };
+
+ VelocityTracker();
+
+ // Resets the velocity tracker state.
+ void clear();
+
+ // Resets the velocity tracker state for specific pointers.
+ // Call this method when some pointers have changed and may be reusing
+ // an id that was assigned to a different pointer earlier.
+ void clearPointers(BitSet32 idBits);
+
+ // Adds movement information for a set of pointers.
+ // The idBits bitfield specifies the pointer ids of the pointers whose positions
+ // are included in the movement.
+ // The positions array contains position information for each pointer in order by
+ // increasing id. Its size should be equal to the number of one bits in idBits.
+ void addMovement(nsecs_t eventTime, BitSet32 idBits, const Position* positions);
+
+ // Adds movement information for all pointers in a MotionEvent, including historical samples.
+ void addMovement(const MotionEvent* event);
+
+ // Gets the velocity of the specified pointer id in position units per second.
+ // Returns false and sets the velocity components to zero if there is
+ // insufficient movement information for the pointer.
+ bool getVelocity(uint32_t id, float* outVx, float* outVy) const;
+
+ // Gets a quadratic estimator for the movements of the specified pointer id.
+ // Returns false and clears the estimator if there is no information available
+ // about the pointer.
+ bool getEstimator(uint32_t id, uint32_t degree, nsecs_t horizon,
+ Estimator* outEstimator) const;
+
+ // Gets the active pointer id, or -1 if none.
+ inline int32_t getActivePointerId() const { return mActivePointerId; }
+
+ // Gets a bitset containing all pointer ids from the most recent movement.
+ inline BitSet32 getCurrentPointerIdBits() const { return mMovements[mIndex].idBits; }
+
+private:
+ // Number of samples to keep.
+ static const uint32_t HISTORY_SIZE = 20;
+
+ struct Movement {
+ nsecs_t eventTime;
+ BitSet32 idBits;
+ Position positions[MAX_POINTERS];
+
+ inline const Position& getPosition(uint32_t id) const {
+ return positions[idBits.getIndexOfBit(id)];
+ }
+ };
+
+ uint32_t mIndex;
+ Movement mMovements[HISTORY_SIZE];
+ int32_t mActivePointerId;
+};
+
+} // namespace android
+
+#endif // _ANDROIDFW_VELOCITY_TRACKER_H
diff --git a/libs/androidfw/Android.mk b/libs/androidfw/Android.mk
index 95c77d4..3ed75a2 100644
--- a/libs/androidfw/Android.mk
+++ b/libs/androidfw/Android.mk
@@ -33,6 +33,8 @@
Keyboard.cpp \
KeyCharacterMap.cpp \
KeyLayoutMap.cpp \
+ VelocityControl.cpp \
+ VelocityTracker.cpp \
VirtualKeyMap.cpp
commonSources:= \
diff --git a/libs/androidfw/Input.cpp b/libs/androidfw/Input.cpp
index fbe1926..40a6c47 100644
--- a/libs/androidfw/Input.cpp
+++ b/libs/androidfw/Input.cpp
@@ -15,31 +15,13 @@
*/
#define LOG_TAG "Input"
-
//#define LOG_NDEBUG 0
-// Log debug messages about keymap probing.
-#define DEBUG_PROBE 0
-
-// Log debug messages about velocity tracking.
-#define DEBUG_VELOCITY 0
-
-// Log debug messages about least squares fitting.
-#define DEBUG_LEAST_SQUARES 0
-
-// Log debug messages about acceleration.
-#define DEBUG_ACCELERATION 0
-
-
-#include <stdlib.h>
-#include <unistd.h>
-#include <ctype.h>
-
-#include <androidfw/Input.h>
-
#include <math.h>
#include <limits.h>
+#include <androidfw/Input.h>
+
#ifdef HAVE_ANDROID_OS
#include <binder/Parcel.h>
@@ -665,492 +647,4 @@
delete event;
}
-
-// --- VelocityTracker ---
-
-const uint32_t VelocityTracker::DEFAULT_DEGREE;
-const nsecs_t VelocityTracker::DEFAULT_HORIZON;
-const uint32_t VelocityTracker::HISTORY_SIZE;
-
-static inline float vectorDot(const float* a, const float* b, uint32_t m) {
- float r = 0;
- while (m--) {
- r += *(a++) * *(b++);
- }
- return r;
-}
-
-static inline float vectorNorm(const float* a, uint32_t m) {
- float r = 0;
- while (m--) {
- float t = *(a++);
- r += t * t;
- }
- return sqrtf(r);
-}
-
-#if DEBUG_LEAST_SQUARES || DEBUG_VELOCITY
-static String8 vectorToString(const float* a, uint32_t m) {
- String8 str;
- str.append("[");
- while (m--) {
- str.appendFormat(" %f", *(a++));
- if (m) {
- str.append(",");
- }
- }
- str.append(" ]");
- return str;
-}
-
-static String8 matrixToString(const float* a, uint32_t m, uint32_t n, bool rowMajor) {
- String8 str;
- str.append("[");
- for (size_t i = 0; i < m; i++) {
- if (i) {
- str.append(",");
- }
- str.append(" [");
- for (size_t j = 0; j < n; j++) {
- if (j) {
- str.append(",");
- }
- str.appendFormat(" %f", a[rowMajor ? i * n + j : j * m + i]);
- }
- str.append(" ]");
- }
- str.append(" ]");
- return str;
-}
-#endif
-
-VelocityTracker::VelocityTracker() {
- clear();
-}
-
-void VelocityTracker::clear() {
- mIndex = 0;
- mMovements[0].idBits.clear();
- mActivePointerId = -1;
-}
-
-void VelocityTracker::clearPointers(BitSet32 idBits) {
- BitSet32 remainingIdBits(mMovements[mIndex].idBits.value & ~idBits.value);
- mMovements[mIndex].idBits = remainingIdBits;
-
- if (mActivePointerId >= 0 && idBits.hasBit(mActivePointerId)) {
- mActivePointerId = !remainingIdBits.isEmpty() ? remainingIdBits.firstMarkedBit() : -1;
- }
-}
-
-void VelocityTracker::addMovement(nsecs_t eventTime, BitSet32 idBits, const Position* positions) {
- if (++mIndex == HISTORY_SIZE) {
- mIndex = 0;
- }
-
- while (idBits.count() > MAX_POINTERS) {
- idBits.clearLastMarkedBit();
- }
-
- Movement& movement = mMovements[mIndex];
- movement.eventTime = eventTime;
- movement.idBits = idBits;
- uint32_t count = idBits.count();
- for (uint32_t i = 0; i < count; i++) {
- movement.positions[i] = positions[i];
- }
-
- if (mActivePointerId < 0 || !idBits.hasBit(mActivePointerId)) {
- mActivePointerId = count != 0 ? idBits.firstMarkedBit() : -1;
- }
-
-#if DEBUG_VELOCITY
- ALOGD("VelocityTracker: addMovement eventTime=%lld, idBits=0x%08x, activePointerId=%d",
- eventTime, idBits.value, mActivePointerId);
- for (BitSet32 iterBits(idBits); !iterBits.isEmpty(); ) {
- uint32_t id = iterBits.firstMarkedBit();
- uint32_t index = idBits.getIndexOfBit(id);
- iterBits.clearBit(id);
- Estimator estimator;
- getEstimator(id, DEFAULT_DEGREE, DEFAULT_HORIZON, &estimator);
- ALOGD(" %d: position (%0.3f, %0.3f), "
- "estimator (degree=%d, xCoeff=%s, yCoeff=%s, confidence=%f)",
- id, positions[index].x, positions[index].y,
- int(estimator.degree),
- vectorToString(estimator.xCoeff, estimator.degree).string(),
- vectorToString(estimator.yCoeff, estimator.degree).string(),
- estimator.confidence);
- }
-#endif
-}
-
-void VelocityTracker::addMovement(const MotionEvent* event) {
- int32_t actionMasked = event->getActionMasked();
-
- switch (actionMasked) {
- case AMOTION_EVENT_ACTION_DOWN:
- case AMOTION_EVENT_ACTION_HOVER_ENTER:
- // Clear all pointers on down before adding the new movement.
- clear();
- break;
- case AMOTION_EVENT_ACTION_POINTER_DOWN: {
- // Start a new movement trace for a pointer that just went down.
- // We do this on down instead of on up because the client may want to query the
- // final velocity for a pointer that just went up.
- BitSet32 downIdBits;
- downIdBits.markBit(event->getPointerId(event->getActionIndex()));
- clearPointers(downIdBits);
- break;
- }
- case AMOTION_EVENT_ACTION_MOVE:
- case AMOTION_EVENT_ACTION_HOVER_MOVE:
- break;
- default:
- // Ignore all other actions because they do not convey any new information about
- // pointer movement. We also want to preserve the last known velocity of the pointers.
- // Note that ACTION_UP and ACTION_POINTER_UP always report the last known position
- // of the pointers that went up. ACTION_POINTER_UP does include the new position of
- // pointers that remained down but we will also receive an ACTION_MOVE with this
- // information if any of them actually moved. Since we don't know how many pointers
- // will be going up at once it makes sense to just wait for the following ACTION_MOVE
- // before adding the movement.
- return;
- }
-
- size_t pointerCount = event->getPointerCount();
- if (pointerCount > MAX_POINTERS) {
- pointerCount = MAX_POINTERS;
- }
-
- BitSet32 idBits;
- for (size_t i = 0; i < pointerCount; i++) {
- idBits.markBit(event->getPointerId(i));
- }
-
- nsecs_t eventTime;
- Position positions[pointerCount];
-
- size_t historySize = event->getHistorySize();
- for (size_t h = 0; h < historySize; h++) {
- eventTime = event->getHistoricalEventTime(h);
- for (size_t i = 0; i < pointerCount; i++) {
- positions[i].x = event->getHistoricalX(i, h);
- positions[i].y = event->getHistoricalY(i, h);
- }
- addMovement(eventTime, idBits, positions);
- }
-
- eventTime = event->getEventTime();
- for (size_t i = 0; i < pointerCount; i++) {
- positions[i].x = event->getX(i);
- positions[i].y = event->getY(i);
- }
- addMovement(eventTime, idBits, positions);
-}
-
-/**
- * Solves a linear least squares problem to obtain a N degree polynomial that fits
- * the specified input data as nearly as possible.
- *
- * Returns true if a solution is found, false otherwise.
- *
- * The input consists of two vectors of data points X and Y with indices 0..m-1.
- * The output is a vector B with indices 0..n-1 that describes a polynomial
- * that fits the data, such the sum of abs(Y[i] - (B[0] + B[1] X[i] + B[2] X[i]^2 ... B[n] X[i]^n))
- * for all i between 0 and m-1 is minimized.
- *
- * That is to say, the function that generated the input data can be approximated
- * by y(x) ~= B[0] + B[1] x + B[2] x^2 + ... + B[n] x^n.
- *
- * The coefficient of determination (R^2) is also returned to describe the goodness
- * of fit of the model for the given data. It is a value between 0 and 1, where 1
- * indicates perfect correspondence.
- *
- * This function first expands the X vector to a m by n matrix A such that
- * A[i][0] = 1, A[i][1] = X[i], A[i][2] = X[i]^2, ..., A[i][n] = X[i]^n.
- *
- * Then it calculates the QR decomposition of A yielding an m by m orthonormal matrix Q
- * and an m by n upper triangular matrix R. Because R is upper triangular (lower
- * part is all zeroes), we can simplify the decomposition into an m by n matrix
- * Q1 and a n by n matrix R1 such that A = Q1 R1.
- *
- * Finally we solve the system of linear equations given by R1 B = (Qtranspose Y)
- * to find B.
- *
- * For efficiency, we lay out A and Q column-wise in memory because we frequently
- * operate on the column vectors. Conversely, we lay out R row-wise.
- *
- * http://en.wikipedia.org/wiki/Numerical_methods_for_linear_least_squares
- * http://en.wikipedia.org/wiki/Gram-Schmidt
- */
-static bool solveLeastSquares(const float* x, const float* y, uint32_t m, uint32_t n,
- float* outB, float* outDet) {
-#if DEBUG_LEAST_SQUARES
- ALOGD("solveLeastSquares: m=%d, n=%d, x=%s, y=%s", int(m), int(n),
- vectorToString(x, m).string(), vectorToString(y, m).string());
-#endif
-
- // Expand the X vector to a matrix A.
- float a[n][m]; // column-major order
- for (uint32_t h = 0; h < m; h++) {
- a[0][h] = 1;
- for (uint32_t i = 1; i < n; i++) {
- a[i][h] = a[i - 1][h] * x[h];
- }
- }
-#if DEBUG_LEAST_SQUARES
- ALOGD(" - a=%s", matrixToString(&a[0][0], m, n, false /*rowMajor*/).string());
-#endif
-
- // Apply the Gram-Schmidt process to A to obtain its QR decomposition.
- float q[n][m]; // orthonormal basis, column-major order
- float r[n][n]; // upper triangular matrix, row-major order
- for (uint32_t j = 0; j < n; j++) {
- for (uint32_t h = 0; h < m; h++) {
- q[j][h] = a[j][h];
- }
- for (uint32_t i = 0; i < j; i++) {
- float dot = vectorDot(&q[j][0], &q[i][0], m);
- for (uint32_t h = 0; h < m; h++) {
- q[j][h] -= dot * q[i][h];
- }
- }
-
- float norm = vectorNorm(&q[j][0], m);
- if (norm < 0.000001f) {
- // vectors are linearly dependent or zero so no solution
-#if DEBUG_LEAST_SQUARES
- ALOGD(" - no solution, norm=%f", norm);
-#endif
- return false;
- }
-
- float invNorm = 1.0f / norm;
- for (uint32_t h = 0; h < m; h++) {
- q[j][h] *= invNorm;
- }
- for (uint32_t i = 0; i < n; i++) {
- r[j][i] = i < j ? 0 : vectorDot(&q[j][0], &a[i][0], m);
- }
- }
-#if DEBUG_LEAST_SQUARES
- ALOGD(" - q=%s", matrixToString(&q[0][0], m, n, false /*rowMajor*/).string());
- ALOGD(" - r=%s", matrixToString(&r[0][0], n, n, true /*rowMajor*/).string());
-
- // calculate QR, if we factored A correctly then QR should equal A
- float qr[n][m];
- for (uint32_t h = 0; h < m; h++) {
- for (uint32_t i = 0; i < n; i++) {
- qr[i][h] = 0;
- for (uint32_t j = 0; j < n; j++) {
- qr[i][h] += q[j][h] * r[j][i];
- }
- }
- }
- ALOGD(" - qr=%s", matrixToString(&qr[0][0], m, n, false /*rowMajor*/).string());
-#endif
-
- // Solve R B = Qt Y to find B. This is easy because R is upper triangular.
- // We just work from bottom-right to top-left calculating B's coefficients.
- for (uint32_t i = n; i-- != 0; ) {
- outB[i] = vectorDot(&q[i][0], y, m);
- for (uint32_t j = n - 1; j > i; j--) {
- outB[i] -= r[i][j] * outB[j];
- }
- outB[i] /= r[i][i];
- }
-#if DEBUG_LEAST_SQUARES
- ALOGD(" - b=%s", vectorToString(outB, n).string());
-#endif
-
- // Calculate the coefficient of determination as 1 - (SSerr / SStot) where
- // SSerr is the residual sum of squares (squared variance of the error),
- // and SStot is the total sum of squares (squared variance of the data).
- float ymean = 0;
- for (uint32_t h = 0; h < m; h++) {
- ymean += y[h];
- }
- ymean /= m;
-
- float sserr = 0;
- float sstot = 0;
- for (uint32_t h = 0; h < m; h++) {
- float err = y[h] - outB[0];
- float term = 1;
- for (uint32_t i = 1; i < n; i++) {
- term *= x[h];
- err -= term * outB[i];
- }
- sserr += err * err;
- float var = y[h] - ymean;
- sstot += var * var;
- }
- *outDet = sstot > 0.000001f ? 1.0f - (sserr / sstot) : 1;
-#if DEBUG_LEAST_SQUARES
- ALOGD(" - sserr=%f", sserr);
- ALOGD(" - sstot=%f", sstot);
- ALOGD(" - det=%f", *outDet);
-#endif
- return true;
-}
-
-bool VelocityTracker::getVelocity(uint32_t id, float* outVx, float* outVy) const {
- Estimator estimator;
- if (getEstimator(id, DEFAULT_DEGREE, DEFAULT_HORIZON, &estimator)) {
- if (estimator.degree >= 1) {
- *outVx = estimator.xCoeff[1];
- *outVy = estimator.yCoeff[1];
- return true;
- }
- }
- *outVx = 0;
- *outVy = 0;
- return false;
-}
-
-bool VelocityTracker::getEstimator(uint32_t id, uint32_t degree, nsecs_t horizon,
- Estimator* outEstimator) const {
- outEstimator->clear();
-
- // Iterate over movement samples in reverse time order and collect samples.
- float x[HISTORY_SIZE];
- float y[HISTORY_SIZE];
- float time[HISTORY_SIZE];
- uint32_t m = 0;
- uint32_t index = mIndex;
- const Movement& newestMovement = mMovements[mIndex];
- do {
- const Movement& movement = mMovements[index];
- if (!movement.idBits.hasBit(id)) {
- break;
- }
-
- nsecs_t age = newestMovement.eventTime - movement.eventTime;
- if (age > horizon) {
- break;
- }
-
- const Position& position = movement.getPosition(id);
- x[m] = position.x;
- y[m] = position.y;
- time[m] = -age * 0.000000001f;
- index = (index == 0 ? HISTORY_SIZE : index) - 1;
- } while (++m < HISTORY_SIZE);
-
- if (m == 0) {
- return false; // no data
- }
-
- // Calculate a least squares polynomial fit.
- if (degree > Estimator::MAX_DEGREE) {
- degree = Estimator::MAX_DEGREE;
- }
- if (degree > m - 1) {
- degree = m - 1;
- }
- if (degree >= 1) {
- float xdet, ydet;
- uint32_t n = degree + 1;
- if (solveLeastSquares(time, x, m, n, outEstimator->xCoeff, &xdet)
- && solveLeastSquares(time, y, m, n, outEstimator->yCoeff, &ydet)) {
- outEstimator->degree = degree;
- outEstimator->confidence = xdet * ydet;
-#if DEBUG_LEAST_SQUARES
- ALOGD("estimate: degree=%d, xCoeff=%s, yCoeff=%s, confidence=%f",
- int(outEstimator->degree),
- vectorToString(outEstimator->xCoeff, n).string(),
- vectorToString(outEstimator->yCoeff, n).string(),
- outEstimator->confidence);
-#endif
- return true;
- }
- }
-
- // No velocity data available for this pointer, but we do have its current position.
- outEstimator->xCoeff[0] = x[0];
- outEstimator->yCoeff[0] = y[0];
- outEstimator->degree = 0;
- outEstimator->confidence = 1;
- return true;
-}
-
-
-// --- VelocityControl ---
-
-const nsecs_t VelocityControl::STOP_TIME;
-
-VelocityControl::VelocityControl() {
- reset();
-}
-
-void VelocityControl::setParameters(const VelocityControlParameters& parameters) {
- mParameters = parameters;
- reset();
-}
-
-void VelocityControl::reset() {
- mLastMovementTime = LLONG_MIN;
- mRawPosition.x = 0;
- mRawPosition.y = 0;
- mVelocityTracker.clear();
-}
-
-void VelocityControl::move(nsecs_t eventTime, float* deltaX, float* deltaY) {
- if ((deltaX && *deltaX) || (deltaY && *deltaY)) {
- if (eventTime >= mLastMovementTime + STOP_TIME) {
-#if DEBUG_ACCELERATION
- ALOGD("VelocityControl: stopped, last movement was %0.3fms ago",
- (eventTime - mLastMovementTime) * 0.000001f);
-#endif
- reset();
- }
-
- mLastMovementTime = eventTime;
- if (deltaX) {
- mRawPosition.x += *deltaX;
- }
- if (deltaY) {
- mRawPosition.y += *deltaY;
- }
- mVelocityTracker.addMovement(eventTime, BitSet32(BitSet32::valueForBit(0)), &mRawPosition);
-
- float vx, vy;
- float scale = mParameters.scale;
- if (mVelocityTracker.getVelocity(0, &vx, &vy)) {
- float speed = hypotf(vx, vy) * scale;
- if (speed >= mParameters.highThreshold) {
- // Apply full acceleration above the high speed threshold.
- scale *= mParameters.acceleration;
- } else if (speed > mParameters.lowThreshold) {
- // Linearly interpolate the acceleration to apply between the low and high
- // speed thresholds.
- scale *= 1 + (speed - mParameters.lowThreshold)
- / (mParameters.highThreshold - mParameters.lowThreshold)
- * (mParameters.acceleration - 1);
- }
-
-#if DEBUG_ACCELERATION
- ALOGD("VelocityControl(%0.3f, %0.3f, %0.3f, %0.3f): "
- "vx=%0.3f, vy=%0.3f, speed=%0.3f, accel=%0.3f",
- mParameters.scale, mParameters.lowThreshold, mParameters.highThreshold,
- mParameters.acceleration,
- vx, vy, speed, scale / mParameters.scale);
-#endif
- } else {
-#if DEBUG_ACCELERATION
- ALOGD("VelocityControl(%0.3f, %0.3f, %0.3f, %0.3f): unknown velocity",
- mParameters.scale, mParameters.lowThreshold, mParameters.highThreshold,
- mParameters.acceleration);
-#endif
- }
-
- if (deltaX) {
- *deltaX *= scale;
- }
- if (deltaY) {
- *deltaY *= scale;
- }
- }
-}
-
} // namespace android
diff --git a/libs/androidfw/VelocityControl.cpp b/libs/androidfw/VelocityControl.cpp
new file mode 100644
index 0000000..cde2b76
--- /dev/null
+++ b/libs/androidfw/VelocityControl.cpp
@@ -0,0 +1,110 @@
+/*
+ * Copyright (C) 2012 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.
+ */
+
+#define LOG_TAG "VelocityControl"
+//#define LOG_NDEBUG 0
+
+// Log debug messages about acceleration.
+#define DEBUG_ACCELERATION 0
+
+#include <math.h>
+#include <limits.h>
+
+#include <androidfw/VelocityControl.h>
+#include <utils/BitSet.h>
+#include <utils/Timers.h>
+
+namespace android {
+
+// --- VelocityControl ---
+
+const nsecs_t VelocityControl::STOP_TIME;
+
+VelocityControl::VelocityControl() {
+ reset();
+}
+
+void VelocityControl::setParameters(const VelocityControlParameters& parameters) {
+ mParameters = parameters;
+ reset();
+}
+
+void VelocityControl::reset() {
+ mLastMovementTime = LLONG_MIN;
+ mRawPosition.x = 0;
+ mRawPosition.y = 0;
+ mVelocityTracker.clear();
+}
+
+void VelocityControl::move(nsecs_t eventTime, float* deltaX, float* deltaY) {
+ if ((deltaX && *deltaX) || (deltaY && *deltaY)) {
+ if (eventTime >= mLastMovementTime + STOP_TIME) {
+#if DEBUG_ACCELERATION
+ ALOGD("VelocityControl: stopped, last movement was %0.3fms ago",
+ (eventTime - mLastMovementTime) * 0.000001f);
+#endif
+ reset();
+ }
+
+ mLastMovementTime = eventTime;
+ if (deltaX) {
+ mRawPosition.x += *deltaX;
+ }
+ if (deltaY) {
+ mRawPosition.y += *deltaY;
+ }
+ mVelocityTracker.addMovement(eventTime, BitSet32(BitSet32::valueForBit(0)), &mRawPosition);
+
+ float vx, vy;
+ float scale = mParameters.scale;
+ if (mVelocityTracker.getVelocity(0, &vx, &vy)) {
+ float speed = hypotf(vx, vy) * scale;
+ if (speed >= mParameters.highThreshold) {
+ // Apply full acceleration above the high speed threshold.
+ scale *= mParameters.acceleration;
+ } else if (speed > mParameters.lowThreshold) {
+ // Linearly interpolate the acceleration to apply between the low and high
+ // speed thresholds.
+ scale *= 1 + (speed - mParameters.lowThreshold)
+ / (mParameters.highThreshold - mParameters.lowThreshold)
+ * (mParameters.acceleration - 1);
+ }
+
+#if DEBUG_ACCELERATION
+ ALOGD("VelocityControl(%0.3f, %0.3f, %0.3f, %0.3f): "
+ "vx=%0.3f, vy=%0.3f, speed=%0.3f, accel=%0.3f",
+ mParameters.scale, mParameters.lowThreshold, mParameters.highThreshold,
+ mParameters.acceleration,
+ vx, vy, speed, scale / mParameters.scale);
+#endif
+ } else {
+#if DEBUG_ACCELERATION
+ ALOGD("VelocityControl(%0.3f, %0.3f, %0.3f, %0.3f): unknown velocity",
+ mParameters.scale, mParameters.lowThreshold, mParameters.highThreshold,
+ mParameters.acceleration);
+#endif
+ }
+
+ if (deltaX) {
+ *deltaX *= scale;
+ }
+ if (deltaY) {
+ *deltaY *= scale;
+ }
+ }
+}
+
+} // namespace android
diff --git a/libs/androidfw/VelocityTracker.cpp b/libs/androidfw/VelocityTracker.cpp
new file mode 100644
index 0000000..2fb094e
--- /dev/null
+++ b/libs/androidfw/VelocityTracker.cpp
@@ -0,0 +1,444 @@
+/*
+ * Copyright (C) 2012 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.
+ */
+
+#define LOG_TAG "VelocityTracker"
+//#define LOG_NDEBUG 0
+
+// Log debug messages about velocity tracking.
+#define DEBUG_VELOCITY 0
+
+// Log debug messages about least squares fitting.
+#define DEBUG_LEAST_SQUARES 0
+
+#include <math.h>
+#include <limits.h>
+
+#include <androidfw/VelocityTracker.h>
+#include <utils/BitSet.h>
+#include <utils/String8.h>
+#include <utils/Timers.h>
+
+namespace android {
+
+// --- VelocityTracker ---
+
+const uint32_t VelocityTracker::DEFAULT_DEGREE;
+const nsecs_t VelocityTracker::DEFAULT_HORIZON;
+const uint32_t VelocityTracker::HISTORY_SIZE;
+
+static inline float vectorDot(const float* a, const float* b, uint32_t m) {
+ float r = 0;
+ while (m--) {
+ r += *(a++) * *(b++);
+ }
+ return r;
+}
+
+static inline float vectorNorm(const float* a, uint32_t m) {
+ float r = 0;
+ while (m--) {
+ float t = *(a++);
+ r += t * t;
+ }
+ return sqrtf(r);
+}
+
+#if DEBUG_LEAST_SQUARES || DEBUG_VELOCITY
+static String8 vectorToString(const float* a, uint32_t m) {
+ String8 str;
+ str.append("[");
+ while (m--) {
+ str.appendFormat(" %f", *(a++));
+ if (m) {
+ str.append(",");
+ }
+ }
+ str.append(" ]");
+ return str;
+}
+
+static String8 matrixToString(const float* a, uint32_t m, uint32_t n, bool rowMajor) {
+ String8 str;
+ str.append("[");
+ for (size_t i = 0; i < m; i++) {
+ if (i) {
+ str.append(",");
+ }
+ str.append(" [");
+ for (size_t j = 0; j < n; j++) {
+ if (j) {
+ str.append(",");
+ }
+ str.appendFormat(" %f", a[rowMajor ? i * n + j : j * m + i]);
+ }
+ str.append(" ]");
+ }
+ str.append(" ]");
+ return str;
+}
+#endif
+
+VelocityTracker::VelocityTracker() {
+ clear();
+}
+
+void VelocityTracker::clear() {
+ mIndex = 0;
+ mMovements[0].idBits.clear();
+ mActivePointerId = -1;
+}
+
+void VelocityTracker::clearPointers(BitSet32 idBits) {
+ BitSet32 remainingIdBits(mMovements[mIndex].idBits.value & ~idBits.value);
+ mMovements[mIndex].idBits = remainingIdBits;
+
+ if (mActivePointerId >= 0 && idBits.hasBit(mActivePointerId)) {
+ mActivePointerId = !remainingIdBits.isEmpty() ? remainingIdBits.firstMarkedBit() : -1;
+ }
+}
+
+void VelocityTracker::addMovement(nsecs_t eventTime, BitSet32 idBits, const Position* positions) {
+ if (++mIndex == HISTORY_SIZE) {
+ mIndex = 0;
+ }
+
+ while (idBits.count() > MAX_POINTERS) {
+ idBits.clearLastMarkedBit();
+ }
+
+ Movement& movement = mMovements[mIndex];
+ movement.eventTime = eventTime;
+ movement.idBits = idBits;
+ uint32_t count = idBits.count();
+ for (uint32_t i = 0; i < count; i++) {
+ movement.positions[i] = positions[i];
+ }
+
+ if (mActivePointerId < 0 || !idBits.hasBit(mActivePointerId)) {
+ mActivePointerId = count != 0 ? idBits.firstMarkedBit() : -1;
+ }
+
+#if DEBUG_VELOCITY
+ ALOGD("VelocityTracker: addMovement eventTime=%lld, idBits=0x%08x, activePointerId=%d",
+ eventTime, idBits.value, mActivePointerId);
+ for (BitSet32 iterBits(idBits); !iterBits.isEmpty(); ) {
+ uint32_t id = iterBits.firstMarkedBit();
+ uint32_t index = idBits.getIndexOfBit(id);
+ iterBits.clearBit(id);
+ Estimator estimator;
+ getEstimator(id, DEFAULT_DEGREE, DEFAULT_HORIZON, &estimator);
+ ALOGD(" %d: position (%0.3f, %0.3f), "
+ "estimator (degree=%d, xCoeff=%s, yCoeff=%s, confidence=%f)",
+ id, positions[index].x, positions[index].y,
+ int(estimator.degree),
+ vectorToString(estimator.xCoeff, estimator.degree).string(),
+ vectorToString(estimator.yCoeff, estimator.degree).string(),
+ estimator.confidence);
+ }
+#endif
+}
+
+void VelocityTracker::addMovement(const MotionEvent* event) {
+ int32_t actionMasked = event->getActionMasked();
+
+ switch (actionMasked) {
+ case AMOTION_EVENT_ACTION_DOWN:
+ case AMOTION_EVENT_ACTION_HOVER_ENTER:
+ // Clear all pointers on down before adding the new movement.
+ clear();
+ break;
+ case AMOTION_EVENT_ACTION_POINTER_DOWN: {
+ // Start a new movement trace for a pointer that just went down.
+ // We do this on down instead of on up because the client may want to query the
+ // final velocity for a pointer that just went up.
+ BitSet32 downIdBits;
+ downIdBits.markBit(event->getPointerId(event->getActionIndex()));
+ clearPointers(downIdBits);
+ break;
+ }
+ case AMOTION_EVENT_ACTION_MOVE:
+ case AMOTION_EVENT_ACTION_HOVER_MOVE:
+ break;
+ default:
+ // Ignore all other actions because they do not convey any new information about
+ // pointer movement. We also want to preserve the last known velocity of the pointers.
+ // Note that ACTION_UP and ACTION_POINTER_UP always report the last known position
+ // of the pointers that went up. ACTION_POINTER_UP does include the new position of
+ // pointers that remained down but we will also receive an ACTION_MOVE with this
+ // information if any of them actually moved. Since we don't know how many pointers
+ // will be going up at once it makes sense to just wait for the following ACTION_MOVE
+ // before adding the movement.
+ return;
+ }
+
+ size_t pointerCount = event->getPointerCount();
+ if (pointerCount > MAX_POINTERS) {
+ pointerCount = MAX_POINTERS;
+ }
+
+ BitSet32 idBits;
+ for (size_t i = 0; i < pointerCount; i++) {
+ idBits.markBit(event->getPointerId(i));
+ }
+
+ nsecs_t eventTime;
+ Position positions[pointerCount];
+
+ size_t historySize = event->getHistorySize();
+ for (size_t h = 0; h < historySize; h++) {
+ eventTime = event->getHistoricalEventTime(h);
+ for (size_t i = 0; i < pointerCount; i++) {
+ positions[i].x = event->getHistoricalX(i, h);
+ positions[i].y = event->getHistoricalY(i, h);
+ }
+ addMovement(eventTime, idBits, positions);
+ }
+
+ eventTime = event->getEventTime();
+ for (size_t i = 0; i < pointerCount; i++) {
+ positions[i].x = event->getX(i);
+ positions[i].y = event->getY(i);
+ }
+ addMovement(eventTime, idBits, positions);
+}
+
+/**
+ * Solves a linear least squares problem to obtain a N degree polynomial that fits
+ * the specified input data as nearly as possible.
+ *
+ * Returns true if a solution is found, false otherwise.
+ *
+ * The input consists of two vectors of data points X and Y with indices 0..m-1.
+ * The output is a vector B with indices 0..n-1 that describes a polynomial
+ * that fits the data, such the sum of abs(Y[i] - (B[0] + B[1] X[i] + B[2] X[i]^2 ... B[n] X[i]^n))
+ * for all i between 0 and m-1 is minimized.
+ *
+ * That is to say, the function that generated the input data can be approximated
+ * by y(x) ~= B[0] + B[1] x + B[2] x^2 + ... + B[n] x^n.
+ *
+ * The coefficient of determination (R^2) is also returned to describe the goodness
+ * of fit of the model for the given data. It is a value between 0 and 1, where 1
+ * indicates perfect correspondence.
+ *
+ * This function first expands the X vector to a m by n matrix A such that
+ * A[i][0] = 1, A[i][1] = X[i], A[i][2] = X[i]^2, ..., A[i][n] = X[i]^n.
+ *
+ * Then it calculates the QR decomposition of A yielding an m by m orthonormal matrix Q
+ * and an m by n upper triangular matrix R. Because R is upper triangular (lower
+ * part is all zeroes), we can simplify the decomposition into an m by n matrix
+ * Q1 and a n by n matrix R1 such that A = Q1 R1.
+ *
+ * Finally we solve the system of linear equations given by R1 B = (Qtranspose Y)
+ * to find B.
+ *
+ * For efficiency, we lay out A and Q column-wise in memory because we frequently
+ * operate on the column vectors. Conversely, we lay out R row-wise.
+ *
+ * http://en.wikipedia.org/wiki/Numerical_methods_for_linear_least_squares
+ * http://en.wikipedia.org/wiki/Gram-Schmidt
+ */
+static bool solveLeastSquares(const float* x, const float* y, uint32_t m, uint32_t n,
+ float* outB, float* outDet) {
+#if DEBUG_LEAST_SQUARES
+ ALOGD("solveLeastSquares: m=%d, n=%d, x=%s, y=%s", int(m), int(n),
+ vectorToString(x, m).string(), vectorToString(y, m).string());
+#endif
+
+ // Expand the X vector to a matrix A.
+ float a[n][m]; // column-major order
+ for (uint32_t h = 0; h < m; h++) {
+ a[0][h] = 1;
+ for (uint32_t i = 1; i < n; i++) {
+ a[i][h] = a[i - 1][h] * x[h];
+ }
+ }
+#if DEBUG_LEAST_SQUARES
+ ALOGD(" - a=%s", matrixToString(&a[0][0], m, n, false /*rowMajor*/).string());
+#endif
+
+ // Apply the Gram-Schmidt process to A to obtain its QR decomposition.
+ float q[n][m]; // orthonormal basis, column-major order
+ float r[n][n]; // upper triangular matrix, row-major order
+ for (uint32_t j = 0; j < n; j++) {
+ for (uint32_t h = 0; h < m; h++) {
+ q[j][h] = a[j][h];
+ }
+ for (uint32_t i = 0; i < j; i++) {
+ float dot = vectorDot(&q[j][0], &q[i][0], m);
+ for (uint32_t h = 0; h < m; h++) {
+ q[j][h] -= dot * q[i][h];
+ }
+ }
+
+ float norm = vectorNorm(&q[j][0], m);
+ if (norm < 0.000001f) {
+ // vectors are linearly dependent or zero so no solution
+#if DEBUG_LEAST_SQUARES
+ ALOGD(" - no solution, norm=%f", norm);
+#endif
+ return false;
+ }
+
+ float invNorm = 1.0f / norm;
+ for (uint32_t h = 0; h < m; h++) {
+ q[j][h] *= invNorm;
+ }
+ for (uint32_t i = 0; i < n; i++) {
+ r[j][i] = i < j ? 0 : vectorDot(&q[j][0], &a[i][0], m);
+ }
+ }
+#if DEBUG_LEAST_SQUARES
+ ALOGD(" - q=%s", matrixToString(&q[0][0], m, n, false /*rowMajor*/).string());
+ ALOGD(" - r=%s", matrixToString(&r[0][0], n, n, true /*rowMajor*/).string());
+
+ // calculate QR, if we factored A correctly then QR should equal A
+ float qr[n][m];
+ for (uint32_t h = 0; h < m; h++) {
+ for (uint32_t i = 0; i < n; i++) {
+ qr[i][h] = 0;
+ for (uint32_t j = 0; j < n; j++) {
+ qr[i][h] += q[j][h] * r[j][i];
+ }
+ }
+ }
+ ALOGD(" - qr=%s", matrixToString(&qr[0][0], m, n, false /*rowMajor*/).string());
+#endif
+
+ // Solve R B = Qt Y to find B. This is easy because R is upper triangular.
+ // We just work from bottom-right to top-left calculating B's coefficients.
+ for (uint32_t i = n; i-- != 0; ) {
+ outB[i] = vectorDot(&q[i][0], y, m);
+ for (uint32_t j = n - 1; j > i; j--) {
+ outB[i] -= r[i][j] * outB[j];
+ }
+ outB[i] /= r[i][i];
+ }
+#if DEBUG_LEAST_SQUARES
+ ALOGD(" - b=%s", vectorToString(outB, n).string());
+#endif
+
+ // Calculate the coefficient of determination as 1 - (SSerr / SStot) where
+ // SSerr is the residual sum of squares (squared variance of the error),
+ // and SStot is the total sum of squares (squared variance of the data).
+ float ymean = 0;
+ for (uint32_t h = 0; h < m; h++) {
+ ymean += y[h];
+ }
+ ymean /= m;
+
+ float sserr = 0;
+ float sstot = 0;
+ for (uint32_t h = 0; h < m; h++) {
+ float err = y[h] - outB[0];
+ float term = 1;
+ for (uint32_t i = 1; i < n; i++) {
+ term *= x[h];
+ err -= term * outB[i];
+ }
+ sserr += err * err;
+ float var = y[h] - ymean;
+ sstot += var * var;
+ }
+ *outDet = sstot > 0.000001f ? 1.0f - (sserr / sstot) : 1;
+#if DEBUG_LEAST_SQUARES
+ ALOGD(" - sserr=%f", sserr);
+ ALOGD(" - sstot=%f", sstot);
+ ALOGD(" - det=%f", *outDet);
+#endif
+ return true;
+}
+
+bool VelocityTracker::getVelocity(uint32_t id, float* outVx, float* outVy) const {
+ Estimator estimator;
+ if (getEstimator(id, DEFAULT_DEGREE, DEFAULT_HORIZON, &estimator)) {
+ if (estimator.degree >= 1) {
+ *outVx = estimator.xCoeff[1];
+ *outVy = estimator.yCoeff[1];
+ return true;
+ }
+ }
+ *outVx = 0;
+ *outVy = 0;
+ return false;
+}
+
+bool VelocityTracker::getEstimator(uint32_t id, uint32_t degree, nsecs_t horizon,
+ Estimator* outEstimator) const {
+ outEstimator->clear();
+
+ // Iterate over movement samples in reverse time order and collect samples.
+ float x[HISTORY_SIZE];
+ float y[HISTORY_SIZE];
+ float time[HISTORY_SIZE];
+ uint32_t m = 0;
+ uint32_t index = mIndex;
+ const Movement& newestMovement = mMovements[mIndex];
+ do {
+ const Movement& movement = mMovements[index];
+ if (!movement.idBits.hasBit(id)) {
+ break;
+ }
+
+ nsecs_t age = newestMovement.eventTime - movement.eventTime;
+ if (age > horizon) {
+ break;
+ }
+
+ const Position& position = movement.getPosition(id);
+ x[m] = position.x;
+ y[m] = position.y;
+ time[m] = -age * 0.000000001f;
+ index = (index == 0 ? HISTORY_SIZE : index) - 1;
+ } while (++m < HISTORY_SIZE);
+
+ if (m == 0) {
+ return false; // no data
+ }
+
+ // Calculate a least squares polynomial fit.
+ if (degree > Estimator::MAX_DEGREE) {
+ degree = Estimator::MAX_DEGREE;
+ }
+ if (degree > m - 1) {
+ degree = m - 1;
+ }
+ if (degree >= 1) {
+ float xdet, ydet;
+ uint32_t n = degree + 1;
+ if (solveLeastSquares(time, x, m, n, outEstimator->xCoeff, &xdet)
+ && solveLeastSquares(time, y, m, n, outEstimator->yCoeff, &ydet)) {
+ outEstimator->degree = degree;
+ outEstimator->confidence = xdet * ydet;
+#if DEBUG_LEAST_SQUARES
+ ALOGD("estimate: degree=%d, xCoeff=%s, yCoeff=%s, confidence=%f",
+ int(outEstimator->degree),
+ vectorToString(outEstimator->xCoeff, n).string(),
+ vectorToString(outEstimator->yCoeff, n).string(),
+ outEstimator->confidence);
+#endif
+ return true;
+ }
+ }
+
+ // No velocity data available for this pointer, but we do have its current position.
+ outEstimator->xCoeff[0] = x[0];
+ outEstimator->yCoeff[0] = y[0];
+ outEstimator->degree = 0;
+ outEstimator->confidence = 1;
+ return true;
+}
+
+} // namespace android
diff --git a/libs/hwui/Caches.cpp b/libs/hwui/Caches.cpp
index 123695a..f210820 100644
--- a/libs/hwui/Caches.cpp
+++ b/libs/hwui/Caches.cpp
@@ -48,25 +48,9 @@
///////////////////////////////////////////////////////////////////////////////
Caches::Caches(): Singleton<Caches>(), mInitialized(false) {
- GLint maxTextureUnits;
- glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &maxTextureUnits);
- if (maxTextureUnits < REQUIRED_TEXTURE_UNITS_COUNT) {
- ALOGW("At least %d texture units are required!", REQUIRED_TEXTURE_UNITS_COUNT);
- }
-
- glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxTextureSize);
-
- if (extensions.hasDebugMarker()) {
- eventMark = glInsertEventMarkerEXT;
- startMark = glPushGroupMarkerEXT;
- endMark = glPopGroupMarkerEXT;
- } else {
- eventMark = eventMarkNull;
- startMark = startMarkNull;
- endMark = endMarkNull;
- }
-
init();
+ initExtensions();
+ initConstraints();
mDebugLevel = readDebugLevel();
ALOGD("Enabling debug mode %d", mDebugLevel);
@@ -105,6 +89,36 @@
mInitialized = true;
}
+void Caches::initExtensions() {
+ if (extensions.hasDebugMarker()) {
+ eventMark = glInsertEventMarkerEXT;
+ startMark = glPushGroupMarkerEXT;
+ endMark = glPopGroupMarkerEXT;
+ } else {
+ eventMark = eventMarkNull;
+ startMark = startMarkNull;
+ endMark = endMarkNull;
+ }
+
+ if (extensions.hasDebugLabel()) {
+ setLabel = glLabelObjectEXT;
+ getLabel = glGetObjectLabelEXT;
+ } else {
+ setLabel = setLabelNull;
+ getLabel = getLabelNull;
+ }
+}
+
+void Caches::initConstraints() {
+ GLint maxTextureUnits;
+ glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &maxTextureUnits);
+ if (maxTextureUnits < REQUIRED_TEXTURE_UNITS_COUNT) {
+ ALOGW("At least %d texture units are required!", REQUIRED_TEXTURE_UNITS_COUNT);
+ }
+
+ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxTextureSize);
+}
+
void Caches::terminate() {
if (!mInitialized) return;
diff --git a/libs/hwui/Caches.h b/libs/hwui/Caches.h
index 65ff9ad..58361c9 100644
--- a/libs/hwui/Caches.h
+++ b/libs/hwui/Caches.h
@@ -107,7 +107,7 @@
};
/**
- * Initializes the cache.
+ * Initialize caches.
*/
void init();
@@ -247,15 +247,30 @@
GammaFontRenderer fontRenderer;
ResourceCache resourceCache;
+ // Debug methods
PFNGLINSERTEVENTMARKEREXTPROC eventMark;
PFNGLPUSHGROUPMARKEREXTPROC startMark;
PFNGLPOPGROUPMARKEREXTPROC endMark;
+ PFNGLLABELOBJECTEXTPROC setLabel;
+ PFNGLGETOBJECTLABELEXTPROC getLabel;
+
private:
- static void eventMarkNull(GLsizei length, const GLchar *marker) { }
- static void startMarkNull(GLsizei length, const GLchar *marker) { }
+ void initExtensions();
+ void initConstraints();
+
+ static void eventMarkNull(GLsizei length, const GLchar* marker) { }
+ static void startMarkNull(GLsizei length, const GLchar* marker) { }
static void endMarkNull() { }
+ static void setLabelNull(GLenum type, uint object, GLsizei length,
+ const char* label) { }
+ static void getLabelNull(GLenum type, uint object, GLsizei bufferSize,
+ GLsizei* length, char* label) {
+ if (length) *length = 0;
+ if (label) *label = '\0';
+ }
+
GLuint mCurrentBuffer;
GLuint mCurrentIndicesBuffer;
void* mCurrentPositionPointer;
diff --git a/libs/hwui/Extensions.h b/libs/hwui/Extensions.h
index f11fecc..6b174d6 100644
--- a/libs/hwui/Extensions.h
+++ b/libs/hwui/Extensions.h
@@ -40,7 +40,6 @@
#endif
// Vendor strings
-
#define VENDOR_IMG "Imagination Technologies"
///////////////////////////////////////////////////////////////////////////////
@@ -68,6 +67,7 @@
mHasFramebufferFetch = hasExtension("GL_NV_shader_framebuffer_fetch");
mHasDiscardFramebuffer = hasExtension("GL_EXT_discard_framebuffer");
mHasDebugMarker = hasExtension("GL_EXT_debug_marker");
+ mHasDebugLabel = hasExtension("GL_EXT_debug_label");
const char* vendor = (const char*) glGetString(GL_VENDOR);
EXT_LOGD("Vendor: %s", vendor);
@@ -84,6 +84,7 @@
inline bool needsHighpTexCoords() const { return mNeedsHighpTexCoords; }
inline bool hasDiscardFramebuffer() const { return mHasDiscardFramebuffer; }
inline bool hasDebugMarker() const { return mHasDebugMarker; }
+ inline bool hasDebugLabel() const { return mHasDebugLabel; }
bool hasExtension(const char* extension) const {
const String8 s(extension);
@@ -104,6 +105,7 @@
bool mHasFramebufferFetch;
bool mHasDiscardFramebuffer;
bool mHasDebugMarker;
+ bool mHasDebugLabel;
}; // class Extensions
}; // namespace uirenderer
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index f412b9b..8015203 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -33,6 +33,7 @@
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothHeadset;
import android.bluetooth.BluetoothProfile;
+import android.content.ActivityNotFoundException;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.ContentResolver;
@@ -3607,24 +3608,20 @@
// RemoteControl
//==========================================================================================
public void dispatchMediaKeyEvent(KeyEvent keyEvent) {
- dispatchMediaKeyEvent(keyEvent, false /*needWakeLock*/);
+ filterMediaKeyEvent(keyEvent, false /*needWakeLock*/);
}
public void dispatchMediaKeyEventUnderWakelock(KeyEvent keyEvent) {
- dispatchMediaKeyEvent(keyEvent, true /*needWakeLock*/);
+ filterMediaKeyEvent(keyEvent, true /*needWakeLock*/);
}
- /**
- * Handles the dispatching of the media button events to one of the registered listeners,
- * or if there was none, broadcast a ACTION_MEDIA_BUTTON intent to the rest of the system.
- */
- private void dispatchMediaKeyEvent(KeyEvent keyEvent, boolean needWakeLock) {
+ private void filterMediaKeyEvent(KeyEvent keyEvent, boolean needWakeLock) {
// sanity check on the incoming key event
if (!isValidMediaKeyEvent(keyEvent)) {
Log.e(TAG, "not dispatching invalid media key event " + keyEvent);
return;
}
- // event filtering
+ // event filtering based on audio mode
synchronized(mRingingLock) {
if (mIsRinging || (getMode() == AudioSystem.MODE_IN_CALL) ||
(getMode() == AudioSystem.MODE_IN_COMMUNICATION) ||
@@ -3632,6 +3629,22 @@
return;
}
}
+ // event filtering based on voice-based interactions
+ if (isValidVoiceInputKeyCode(keyEvent.getKeyCode())) {
+ filterVoiceInputKeyEvent(keyEvent, needWakeLock);
+ } else {
+ dispatchMediaKeyEvent(keyEvent, needWakeLock);
+ }
+ }
+
+ /**
+ * Handles the dispatching of the media button events to one of the registered listeners,
+ * or if there was none, broadcast an ACTION_MEDIA_BUTTON intent to the rest of the system.
+ * @param keyEvent a non-null KeyEvent whose key code is one of the supported media buttons
+ * @param needWakeLock true if a PARTIAL_WAKE_LOCK needs to be held while this key event
+ * is dispatched.
+ */
+ private void dispatchMediaKeyEvent(KeyEvent keyEvent, boolean needWakeLock) {
if (needWakeLock) {
mMediaEventWakeLock.acquire();
}
@@ -3660,6 +3673,140 @@
}
}
+ /**
+ * The minimum duration during which a user must press to trigger voice-based interactions
+ */
+ private final static int MEDIABUTTON_LONG_PRESS_DURATION_MS = 300;
+ /**
+ * The different states of the state machine to handle the launch of voice-based interactions,
+ * stored in mVoiceButtonState.
+ */
+ private final static int VOICEBUTTON_STATE_IDLE = 0;
+ private final static int VOICEBUTTON_STATE_DOWN = 1;
+ private final static int VOICEBUTTON_STATE_DOWN_IGNORE_NEW = 2;
+ /**
+ * The different actions after state transitions on mVoiceButtonState.
+ */
+ private final static int VOICEBUTTON_ACTION_DISCARD_CURRENT_KEY_PRESS = 1;
+ private final static int VOICEBUTTON_ACTION_START_VOICE_INPUT = 2;
+ private final static int VOICEBUTTON_ACTION_SIMULATE_KEY_PRESS = 3;
+
+ private final Object mVoiceEventLock = new Object();
+ private int mVoiceButtonState = VOICEBUTTON_STATE_IDLE;
+ private long mVoiceButtonDownTime = 0;
+
+ /**
+ * Log an error when an unexpected action is encountered in the state machine to filter
+ * key events.
+ * @param keyAction the unexpected action of the key event being filtered
+ * @param stateName the string corresponding to the state in which the error occurred
+ */
+ private static void logErrorForKeyAction(int keyAction, String stateName) {
+ Log.e(TAG, "unexpected action "
+ + KeyEvent.actionToString(keyAction)
+ + " in " + stateName + " state");
+ }
+
+ /**
+ * Filter key events that may be used for voice-based interactions
+ * @param keyEvent a non-null KeyEvent whose key code is that of one of the supported
+ * media buttons that can be used to trigger voice-based interactions.
+ * @param needWakeLock true if a PARTIAL_WAKE_LOCK needs to be held while this key event
+ * is dispatched.
+ */
+ private void filterVoiceInputKeyEvent(KeyEvent keyEvent, boolean needWakeLock) {
+ int voiceButtonAction = VOICEBUTTON_ACTION_DISCARD_CURRENT_KEY_PRESS;
+ int keyAction = keyEvent.getAction();
+ synchronized (mVoiceEventLock) {
+ // state machine on mVoiceButtonState
+ switch (mVoiceButtonState) {
+
+ case VOICEBUTTON_STATE_IDLE:
+ if (keyAction == KeyEvent.ACTION_DOWN) {
+ mVoiceButtonDownTime = keyEvent.getDownTime();
+ // valid state transition
+ mVoiceButtonState = VOICEBUTTON_STATE_DOWN;
+ } else if (keyAction == KeyEvent.ACTION_UP) {
+ // no state transition
+ // action is still VOICEBUTTON_ACTION_DISCARD_CURRENT_KEY_PRESS
+ } else {
+ logErrorForKeyAction(keyAction, "VOICEBUTTON_STATE_IDLE");
+ }
+ break;
+
+ case VOICEBUTTON_STATE_DOWN:
+ if ((keyEvent.getEventTime() - mVoiceButtonDownTime)
+ >= MEDIABUTTON_LONG_PRESS_DURATION_MS) {
+ // press was long enough, start voice-based interactions, regardless of
+ // whether this was a DOWN or UP key event
+ voiceButtonAction = VOICEBUTTON_ACTION_START_VOICE_INPUT;
+ if (keyAction == KeyEvent.ACTION_UP) {
+ // done tracking the key press, so transition back to idle state
+ mVoiceButtonState = VOICEBUTTON_STATE_IDLE;
+ } else if (keyAction == KeyEvent.ACTION_DOWN) {
+ // no need to observe the upcoming key events
+ mVoiceButtonState = VOICEBUTTON_STATE_DOWN_IGNORE_NEW;
+ } else {
+ logErrorForKeyAction(keyAction, "VOICEBUTTON_STATE_DOWN");
+ }
+ } else {
+ if (keyAction == KeyEvent.ACTION_UP) {
+ // press wasn't long enough, simulate complete key press
+ voiceButtonAction = VOICEBUTTON_ACTION_SIMULATE_KEY_PRESS;
+ // not tracking the key press anymore, so transition back to idle state
+ mVoiceButtonState = VOICEBUTTON_STATE_IDLE;
+ } else if (keyAction == KeyEvent.ACTION_DOWN) {
+ // no state transition
+ // action is still VOICEBUTTON_ACTION_DISCARD_CURRENT_KEY_PRESS
+ } else {
+ logErrorForKeyAction(keyAction, "VOICEBUTTON_STATE_DOWN");
+ }
+ }
+ break;
+
+ case VOICEBUTTON_STATE_DOWN_IGNORE_NEW:
+ if (keyAction == KeyEvent.ACTION_UP) {
+ // done tracking the key press, so transition back to idle state
+ mVoiceButtonState = VOICEBUTTON_STATE_IDLE;
+ // action is still VOICEBUTTON_ACTION_DISCARD_CURRENT_KEY_PRESS
+ } else if (keyAction == KeyEvent.ACTION_DOWN) {
+ // no state transition: we've already launched voice-based interactions
+ // action is still VOICEBUTTON_ACTION_DISCARD_CURRENT_KEY_PRESS
+ } else {
+ logErrorForKeyAction(keyAction, "VOICEBUTTON_STATE_DOWN_IGNORE_NEW");
+ }
+ break;
+ }
+ }//synchronized (mVoiceEventLock)
+
+ // take action after media button event filtering for voice-based interactions
+ switch (voiceButtonAction) {
+ case VOICEBUTTON_ACTION_DISCARD_CURRENT_KEY_PRESS:
+ if (DEBUG_RC) Log.v(TAG, " ignore key event");
+ break;
+ case VOICEBUTTON_ACTION_START_VOICE_INPUT:
+ if (DEBUG_RC) Log.v(TAG, " start voice-based interactions");
+ // then start the voice-based interactions
+ startVoiceBasedInteractions(needWakeLock);
+ break;
+ case VOICEBUTTON_ACTION_SIMULATE_KEY_PRESS:
+ if (DEBUG_RC) Log.v(TAG, " send simulated key event");
+ sendSimulatedMediaButtonEvent(keyEvent, needWakeLock);
+ break;
+ }
+ }
+
+ private void sendSimulatedMediaButtonEvent(KeyEvent originalKeyEvent, boolean needWakeLock) {
+ // send DOWN event
+ KeyEvent keyEvent = KeyEvent.changeAction(originalKeyEvent, KeyEvent.ACTION_DOWN);
+ dispatchMediaKeyEvent(keyEvent, needWakeLock);
+ // send UP event
+ keyEvent = KeyEvent.changeAction(originalKeyEvent, KeyEvent.ACTION_UP);
+ dispatchMediaKeyEvent(keyEvent, needWakeLock);
+
+ }
+
+
private static boolean isValidMediaKeyEvent(KeyEvent keyEvent) {
if (keyEvent == null) {
return false;
@@ -3686,6 +3833,63 @@
return true;
}
+ /**
+ * Checks whether the given key code is one that can trigger the launch of voice-based
+ * interactions.
+ * @param keyCode the key code associated with the key event
+ * @return true if the key is one of the supported voice-based interaction triggers
+ */
+ private static boolean isValidVoiceInputKeyCode(int keyCode) {
+ if (keyCode == KeyEvent.KEYCODE_HEADSETHOOK) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * Tell the system to start voice-based interactions / voice commands
+ */
+ private void startVoiceBasedInteractions(boolean needWakeLock) {
+ Intent voiceIntent = new Intent(android.speech.RecognizerIntent.ACTION_WEB_SEARCH);
+ if (needWakeLock) {
+ mMediaEventWakeLock.acquire();
+ }
+ voiceIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
+ | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
+ try {
+ if (mKeyguardManager != null) {
+ // it's ok to start voice-based interactions when:
+ // - the device is locked but doesn't require a password to be unlocked
+ // - the device is not locked
+ if ((mKeyguardManager.isKeyguardLocked() && !mKeyguardManager.isKeyguardSecure())
+ || !mKeyguardManager.isKeyguardLocked()) {
+ mContext.startActivity(voiceIntent);
+ }
+ }
+ } catch (ActivityNotFoundException e) {
+ Log.e(TAG, "Error launching activity for ACTION_WEB_SEARCH: " + e);
+ } finally {
+ if (needWakeLock) {
+ mMediaEventWakeLock.release();
+ }
+ }
+ }
+
+ /**
+ * Verify whether it is safe to start voice-based interactions given the state of the system
+ * @return false is the Keyguard is locked and secure, true otherwise
+ */
+ private boolean safeToStartVoiceBasedInteractions() {
+ KeyguardManager keyguard =
+ (KeyguardManager) mContext.getSystemService(Context.KEYGUARD_SERVICE);
+ if (keyguard == null) {
+ return false;
+ }
+
+ return true;
+ }
+
private PowerManager.WakeLock mMediaEventWakeLock;
private static final int WAKELOCK_RELEASE_ON_FINISHED = 1980; //magic number
@@ -3703,7 +3907,14 @@
BroadcastReceiver mKeyEventDone = new BroadcastReceiver() {
public void onReceive(Context context, Intent intent) {
- if (intent.getExtras().containsKey(EXTRA_WAKELOCK_ACQUIRED)) {
+ if (intent == null) {
+ return;
+ }
+ Bundle extras = intent.getExtras();
+ if (extras == null) {
+ return;
+ }
+ if (extras.containsKey(EXTRA_WAKELOCK_ACQUIRED)) {
mMediaEventWakeLock.release();
}
}
diff --git a/media/java/android/media/MediaPlayer.java b/media/java/android/media/MediaPlayer.java
index 9f0fd48..aa4cdbe 100644
--- a/media/java/android/media/MediaPlayer.java
+++ b/media/java/android/media/MediaPlayer.java
@@ -2020,8 +2020,9 @@
if (msg.obj == null) {
mOnTimedTextListener.onTimedText(mMediaPlayer, null);
} else {
- if (msg.obj instanceof byte[]) {
- TimedText text = new TimedText((byte[])(msg.obj));
+ if (msg.obj instanceof Parcel) {
+ Parcel parcel = (Parcel)msg.obj;
+ TimedText text = new TimedText(parcel);
mOnTimedTextListener.onTimedText(mMediaPlayer, text);
}
}
diff --git a/media/java/android/media/TimedText.java b/media/java/android/media/TimedText.java
index 1d7c9682..e6a7e13 100644
--- a/media/java/android/media/TimedText.java
+++ b/media/java/android/media/TimedText.java
@@ -28,7 +28,7 @@
* Class to hold the timed text's metadata, including:
* <ul>
* <li> The characters for rendering</li>
- * <li> The rendering postion for the timed text</li>
+ * <li> The rendering position for the timed text</li>
* </ul>
*
* <p> To render the timed text, applications need to do the following:
@@ -86,7 +86,6 @@
private static final String TAG = "TimedText";
- private Parcel mParcel = Parcel.obtain();
private final HashMap<Integer, Object> mKeyObjectMap =
new HashMap<Integer, Object>();
@@ -356,10 +355,8 @@
* @throws IllegalArgumentExcept if parseParcel() fails.
* {@hide}
*/
- public TimedText(byte[] obj) {
- mParcel.unmarshall(obj, 0, obj.length);
-
- if (!parseParcel()) {
+ public TimedText(Parcel parcel) {
+ if (!parseParcel(parcel)) {
mKeyObjectMap.clear();
throw new IllegalArgumentException("parseParcel() fails");
}
@@ -393,28 +390,28 @@
* Parcel. These are stored in mKeyObjectMap for application to retrieve.
* @return false if an error occurred during parsing. Otherwise, true.
*/
- private boolean parseParcel() {
- mParcel.setDataPosition(0);
- if (mParcel.dataAvail() == 0) {
+ private boolean parseParcel(Parcel parcel) {
+ parcel.setDataPosition(0);
+ if (parcel.dataAvail() == 0) {
return false;
}
- int type = mParcel.readInt();
+ int type = parcel.readInt();
if (type == KEY_LOCAL_SETTING) {
- type = mParcel.readInt();
+ type = parcel.readInt();
if (type != KEY_START_TIME) {
return false;
}
- int mStartTimeMs = mParcel.readInt();
+ int mStartTimeMs = parcel.readInt();
mKeyObjectMap.put(type, mStartTimeMs);
- type = mParcel.readInt();
+ type = parcel.readInt();
if (type != KEY_STRUCT_TEXT) {
return false;
}
- int textLen = mParcel.readInt();
- byte[] text = mParcel.createByteArray();
+ int textLen = parcel.readInt();
+ byte[] text = parcel.createByteArray();
if (text == null || text.length == 0) {
mTextChars = null;
} else {
@@ -426,8 +423,8 @@
return false;
}
- while (mParcel.dataAvail() > 0) {
- int key = mParcel.readInt();
+ while (parcel.dataAvail() > 0) {
+ int key = parcel.readInt();
if (!isValidKey(key)) {
Log.w(TAG, "Invalid timed text key found: " + key);
return false;
@@ -437,77 +434,77 @@
switch (key) {
case KEY_STRUCT_STYLE_LIST: {
- readStyle();
+ readStyle(parcel);
object = mStyleList;
break;
}
case KEY_STRUCT_FONT_LIST: {
- readFont();
+ readFont(parcel);
object = mFontList;
break;
}
case KEY_STRUCT_HIGHLIGHT_LIST: {
- readHighlight();
+ readHighlight(parcel);
object = mHighlightPosList;
break;
}
case KEY_STRUCT_KARAOKE_LIST: {
- readKaraoke();
+ readKaraoke(parcel);
object = mKaraokeList;
break;
}
case KEY_STRUCT_HYPER_TEXT_LIST: {
- readHyperText();
+ readHyperText(parcel);
object = mHyperTextList;
break;
}
case KEY_STRUCT_BLINKING_TEXT_LIST: {
- readBlinkingText();
+ readBlinkingText(parcel);
object = mBlinkingPosList;
break;
}
case KEY_WRAP_TEXT: {
- mWrapText = mParcel.readInt();
+ mWrapText = parcel.readInt();
object = mWrapText;
break;
}
case KEY_HIGHLIGHT_COLOR_RGBA: {
- mHighlightColorRGBA = mParcel.readInt();
+ mHighlightColorRGBA = parcel.readInt();
object = mHighlightColorRGBA;
break;
}
case KEY_DISPLAY_FLAGS: {
- mDisplayFlags = mParcel.readInt();
+ mDisplayFlags = parcel.readInt();
object = mDisplayFlags;
break;
}
case KEY_STRUCT_JUSTIFICATION: {
- int horizontal = mParcel.readInt();
- int vertical = mParcel.readInt();
+ int horizontal = parcel.readInt();
+ int vertical = parcel.readInt();
mJustification = new Justification(horizontal, vertical);
object = mJustification;
break;
}
case KEY_BACKGROUND_COLOR_RGBA: {
- mBackgroundColorRGBA = mParcel.readInt();
+ mBackgroundColorRGBA = parcel.readInt();
object = mBackgroundColorRGBA;
break;
}
case KEY_STRUCT_TEXT_POS: {
- int top = mParcel.readInt();
- int left = mParcel.readInt();
- int bottom = mParcel.readInt();
- int right = mParcel.readInt();
+ int top = parcel.readInt();
+ int left = parcel.readInt();
+ int bottom = parcel.readInt();
+ int right = parcel.readInt();
mTextBounds = new Rect(left, top, right, bottom);
break;
}
case KEY_SCROLL_DELAY: {
- mScrollDelay = mParcel.readInt();
+ mScrollDelay = parcel.readInt();
object = mScrollDelay;
break;
}
@@ -520,18 +517,18 @@
if (mKeyObjectMap.containsKey(key)) {
mKeyObjectMap.remove(key);
}
+ // Previous mapping will be replaced with the new object, if there was one.
mKeyObjectMap.put(key, object);
}
}
- mParcel.recycle();
return true;
}
/*
* To parse and store the Style list.
*/
- private void readStyle() {
+ private void readStyle(Parcel parcel) {
boolean endOfStyle = false;
int startChar = -1;
int endChar = -1;
@@ -541,23 +538,23 @@
boolean isUnderlined = false;
int fontSize = -1;
int colorRGBA = -1;
- while (!endOfStyle && (mParcel.dataAvail() > 0)) {
- int key = mParcel.readInt();
+ while (!endOfStyle && (parcel.dataAvail() > 0)) {
+ int key = parcel.readInt();
switch (key) {
case KEY_START_CHAR: {
- startChar = mParcel.readInt();
+ startChar = parcel.readInt();
break;
}
case KEY_END_CHAR: {
- endChar = mParcel.readInt();
+ endChar = parcel.readInt();
break;
}
case KEY_FONT_ID: {
- fontId = mParcel.readInt();
+ fontId = parcel.readInt();
break;
}
case KEY_STYLE_FLAGS: {
- int flags = mParcel.readInt();
+ int flags = parcel.readInt();
// In the absence of any bits set in flags, the text
// is plain. Otherwise, 1: bold, 2: italic, 4: underline
isBold = ((flags % 2) == 1);
@@ -566,17 +563,17 @@
break;
}
case KEY_FONT_SIZE: {
- fontSize = mParcel.readInt();
+ fontSize = parcel.readInt();
break;
}
case KEY_TEXT_COLOR_RGBA: {
- colorRGBA = mParcel.readInt();
+ colorRGBA = parcel.readInt();
break;
}
default: {
// End of the Style parsing. Reset the data position back
- // to the position before the last mParcel.readInt() call.
- mParcel.setDataPosition(mParcel.dataPosition() - 4);
+ // to the position before the last parcel.readInt() call.
+ parcel.setDataPosition(parcel.dataPosition() - 4);
endOfStyle = true;
break;
}
@@ -594,14 +591,14 @@
/*
* To parse and store the Font list
*/
- private void readFont() {
- int entryCount = mParcel.readInt();
+ private void readFont(Parcel parcel) {
+ int entryCount = parcel.readInt();
for (int i = 0; i < entryCount; i++) {
- int id = mParcel.readInt();
- int nameLen = mParcel.readInt();
+ int id = parcel.readInt();
+ int nameLen = parcel.readInt();
- byte[] text = mParcel.createByteArray();
+ byte[] text = parcel.createByteArray();
final String name = new String(text, 0, nameLen);
Font font = new Font(id, name);
@@ -616,9 +613,9 @@
/*
* To parse and store the Highlight list
*/
- private void readHighlight() {
- int startChar = mParcel.readInt();
- int endChar = mParcel.readInt();
+ private void readHighlight(Parcel parcel) {
+ int startChar = parcel.readInt();
+ int endChar = parcel.readInt();
CharPos pos = new CharPos(startChar, endChar);
if (mHighlightPosList == null) {
@@ -630,14 +627,14 @@
/*
* To parse and store the Karaoke list
*/
- private void readKaraoke() {
- int entryCount = mParcel.readInt();
+ private void readKaraoke(Parcel parcel) {
+ int entryCount = parcel.readInt();
for (int i = 0; i < entryCount; i++) {
- int startTimeMs = mParcel.readInt();
- int endTimeMs = mParcel.readInt();
- int startChar = mParcel.readInt();
- int endChar = mParcel.readInt();
+ int startTimeMs = parcel.readInt();
+ int endTimeMs = parcel.readInt();
+ int startChar = parcel.readInt();
+ int endChar = parcel.readInt();
Karaoke kara = new Karaoke(startTimeMs, endTimeMs,
startChar, endChar);
@@ -651,16 +648,16 @@
/*
* To parse and store HyperText list
*/
- private void readHyperText() {
- int startChar = mParcel.readInt();
- int endChar = mParcel.readInt();
+ private void readHyperText(Parcel parcel) {
+ int startChar = parcel.readInt();
+ int endChar = parcel.readInt();
- int len = mParcel.readInt();
- byte[] url = mParcel.createByteArray();
+ int len = parcel.readInt();
+ byte[] url = parcel.createByteArray();
final String urlString = new String(url, 0, len);
- len = mParcel.readInt();
- byte[] alt = mParcel.createByteArray();
+ len = parcel.readInt();
+ byte[] alt = parcel.createByteArray();
final String altString = new String(alt, 0, len);
HyperText hyperText = new HyperText(startChar, endChar, urlString, altString);
@@ -674,9 +671,9 @@
/*
* To parse and store blinking text list
*/
- private void readBlinkingText() {
- int startChar = mParcel.readInt();
- int endChar = mParcel.readInt();
+ private void readBlinkingText(Parcel parcel) {
+ int startChar = parcel.readInt();
+ int endChar = parcel.readInt();
CharPos blinkingPos = new CharPos(startChar, endChar);
if (mBlinkingPosList == null) {
diff --git a/media/jni/android_media_MediaPlayer.cpp b/media/jni/android_media_MediaPlayer.cpp
index 5eadb3a..de22e09 100644
--- a/media/jni/android_media_MediaPlayer.cpp
+++ b/media/jni/android_media_MediaPlayer.cpp
@@ -72,6 +72,7 @@
JNIMediaPlayerListener();
jclass mClass; // Reference to MediaPlayer class
jobject mObject; // Weak ref to MediaPlayer Java object to call on
+ jobject mParcel;
};
JNIMediaPlayerListener::JNIMediaPlayerListener(JNIEnv* env, jobject thiz, jobject weak_thiz)
@@ -90,6 +91,7 @@
// We use a weak reference so the MediaPlayer object can be garbage collected.
// The reference is only used as a proxy for callbacks.
mObject = env->NewGlobalRef(weak_thiz);
+ mParcel = env->NewGlobalRef(createJavaParcelObject(env));
}
JNIMediaPlayerListener::~JNIMediaPlayerListener()
@@ -98,25 +100,30 @@
JNIEnv *env = AndroidRuntime::getJNIEnv();
env->DeleteGlobalRef(mObject);
env->DeleteGlobalRef(mClass);
+
+ recycleJavaParcelObject(env, mParcel);
+ env->DeleteGlobalRef(mParcel);
}
void JNIMediaPlayerListener::notify(int msg, int ext1, int ext2, const Parcel *obj)
{
JNIEnv *env = AndroidRuntime::getJNIEnv();
if (obj && obj->dataSize() > 0) {
- jbyteArray jArray = env->NewByteArray(obj->dataSize());
- if (jArray != NULL) {
- jbyte *nArray = env->GetByteArrayElements(jArray, NULL);
- memcpy(nArray, obj->data(), obj->dataSize());
- env->ReleaseByteArrayElements(jArray, nArray, 0);
+ if (mParcel != NULL) {
+ Parcel* nativeParcel = parcelForJavaObject(env, mParcel);
+ nativeParcel->setData(obj->data(), obj->dataSize());
env->CallStaticVoidMethod(mClass, fields.post_event, mObject,
- msg, ext1, ext2, jArray);
- env->DeleteLocalRef(jArray);
+ msg, ext1, ext2, mParcel);
}
} else {
env->CallStaticVoidMethod(mClass, fields.post_event, mObject,
msg, ext1, ext2, NULL);
}
+ if (env->ExceptionCheck()) {
+ ALOGW("An exception occurred while notifying an event.");
+ LOGW_EX(env);
+ env->ExceptionClear();
+ }
}
// ----------------------------------------------------------------------------
@@ -533,7 +540,6 @@
return UNKNOWN_ERROR;
}
-
Parcel *request = parcelForJavaObject(env, java_request);
Parcel *reply = parcelForJavaObject(env, java_reply);
diff --git a/packages/InputDevices/res/xml/keyboard_layouts.xml b/packages/InputDevices/res/xml/keyboard_layouts.xml
index 23f6bcb..c2a2ecc 100644
--- a/packages/InputDevices/res/xml/keyboard_layouts.xml
+++ b/packages/InputDevices/res/xml/keyboard_layouts.xml
@@ -2,109 +2,109 @@
<keyboard-layouts xmlns:android="http://schemas.android.com/apk/res/android">
<keyboard-layout android:name="keyboard_layout_english_us"
android:label="@string/keyboard_layout_english_us_label"
- android:kcm="@raw/keyboard_layout_english_us" />
+ android:keyboardLayout="@raw/keyboard_layout_english_us" />
<keyboard-layout android:name="keyboard_layout_english_us_dvorak"
android:label="@string/keyboard_layout_english_us_dvorak_label"
- android:kcm="@raw/keyboard_layout_english_us_dvorak" />
+ android:keyboardLayout="@raw/keyboard_layout_english_us_dvorak" />
<keyboard-layout android:name="keyboard_layout_german"
android:label="@string/keyboard_layout_german_label"
- android:kcm="@raw/keyboard_layout_german" />
+ android:keyboardLayout="@raw/keyboard_layout_german" />
<keyboard-layout android:name="keyboard_layout_french"
android:label="@string/keyboard_layout_french_label"
- android:kcm="@raw/keyboard_layout_french" />
+ android:keyboardLayout="@raw/keyboard_layout_french" />
<keyboard-layout android:name="keyboard_layout_french_ca"
android:label="@string/keyboard_layout_french_ca_label"
- android:kcm="@raw/keyboard_layout_french_ca" />
+ android:keyboardLayout="@raw/keyboard_layout_french_ca" />
<keyboard-layout android:name="keyboard_layout_russian"
android:label="@string/keyboard_layout_russian_label"
- android:kcm="@raw/keyboard_layout_russian" />
+ android:keyboardLayout="@raw/keyboard_layout_russian" />
<keyboard-layout android:name="keyboard_layout_russian_mac"
android:label="@string/keyboard_layout_russian_mac_label"
- android:kcm="@raw/keyboard_layout_russian_mac" />
+ android:keyboardLayout="@raw/keyboard_layout_russian_mac" />
<keyboard-layout android:name="keyboard_layout_spanish"
android:label="@string/keyboard_layout_spanish_label"
- android:kcm="@raw/keyboard_layout_spanish" />
+ android:keyboardLayout="@raw/keyboard_layout_spanish" />
<keyboard-layout android:name="keyboard_layout_swiss_french"
android:label="@string/keyboard_layout_swiss_french_label"
- android:kcm="@raw/keyboard_layout_swiss_french" />
+ android:keyboardLayout="@raw/keyboard_layout_swiss_french" />
<keyboard-layout android:name="keyboard_layout_swiss_german"
android:label="@string/keyboard_layout_swiss_german_label"
- android:kcm="@raw/keyboard_layout_swiss_german" />
+ android:keyboardLayout="@raw/keyboard_layout_swiss_german" />
<keyboard-layout android:name="keyboard_layout_belgian"
android:label="@string/keyboard_layout_belgian"
- android:kcm="@raw/keyboard_layout_belgian" />
+ android:keyboardLayout="@raw/keyboard_layout_belgian" />
<keyboard-layout android:name="keyboard_layout_bulgarian"
android:label="@string/keyboard_layout_bulgarian"
- android:kcm="@raw/keyboard_layout_bulgarian" />
+ android:keyboardLayout="@raw/keyboard_layout_bulgarian" />
<keyboard-layout android:name="keyboard_layout_italian"
android:label="@string/keyboard_layout_italian"
- android:kcm="@raw/keyboard_layout_italian" />
+ android:keyboardLayout="@raw/keyboard_layout_italian" />
<keyboard-layout android:name="keyboard_layout_danish"
android:label="@string/keyboard_layout_danish"
- android:kcm="@raw/keyboard_layout_danish" />
+ android:keyboardLayout="@raw/keyboard_layout_danish" />
<keyboard-layout android:name="keyboard_layout_norwegian"
android:label="@string/keyboard_layout_norwegian"
- android:kcm="@raw/keyboard_layout_norwegian" />
+ android:keyboardLayout="@raw/keyboard_layout_norwegian" />
<keyboard-layout android:name="keyboard_layout_swedish"
android:label="@string/keyboard_layout_swedish"
- android:kcm="@raw/keyboard_layout_swedish" />
+ android:keyboardLayout="@raw/keyboard_layout_swedish" />
<keyboard-layout android:name="keyboard_layout_finnish"
android:label="@string/keyboard_layout_finnish"
- android:kcm="@raw/keyboard_layout_finnish" />
+ android:keyboardLayout="@raw/keyboard_layout_finnish" />
<keyboard-layout android:name="keyboard_layout_croatian"
android:label="@string/keyboard_layout_croatian"
- android:kcm="@raw/keyboard_layout_croatian_and_slovenian" />
+ android:keyboardLayout="@raw/keyboard_layout_croatian_and_slovenian" />
<keyboard-layout android:name="keyboard_layout_czech"
android:label="@string/keyboard_layout_czech"
- android:kcm="@raw/keyboard_layout_czech" />
+ android:keyboardLayout="@raw/keyboard_layout_czech" />
<keyboard-layout android:name="keyboard_layout_estonian"
android:label="@string/keyboard_layout_estonian"
- android:kcm="@raw/keyboard_layout_estonian" />
+ android:keyboardLayout="@raw/keyboard_layout_estonian" />
<keyboard-layout android:name="keyboard_layout_hungarian"
android:label="@string/keyboard_layout_hungarian"
- android:kcm="@raw/keyboard_layout_hungarian" />
+ android:keyboardLayout="@raw/keyboard_layout_hungarian" />
<keyboard-layout android:name="keyboard_layout_icelandic"
android:label="@string/keyboard_layout_icelandic"
- android:kcm="@raw/keyboard_layout_icelandic" />
+ android:keyboardLayout="@raw/keyboard_layout_icelandic" />
<keyboard-layout android:name="keyboard_layout_portuguese"
android:label="@string/keyboard_layout_portuguese"
- android:kcm="@raw/keyboard_layout_portuguese" />
+ android:keyboardLayout="@raw/keyboard_layout_portuguese" />
<keyboard-layout android:name="keyboard_layout_slovak"
android:label="@string/keyboard_layout_slovak"
- android:kcm="@raw/keyboard_layout_slovak" />
+ android:keyboardLayout="@raw/keyboard_layout_slovak" />
<keyboard-layout android:name="keyboard_layout_slovenian"
android:label="@string/keyboard_layout_slovenian"
- android:kcm="@raw/keyboard_layout_croatian_and_slovenian" />
+ android:keyboardLayout="@raw/keyboard_layout_croatian_and_slovenian" />
<keyboard-layout android:name="keyboard_layout_turkish"
android:label="@string/keyboard_layout_turkish"
- android:kcm="@raw/keyboard_layout_turkish" />
+ android:keyboardLayout="@raw/keyboard_layout_turkish" />
<keyboard-layout android:name="keyboard_layout_ukrainian"
android:label="@string/keyboard_layout_ukrainian"
- android:kcm="@raw/keyboard_layout_ukrainian" />
+ android:keyboardLayout="@raw/keyboard_layout_ukrainian" />
</keyboard-layouts>
diff --git a/packages/SystemUI/res/layout-land/status_bar_recent_panel.xml b/packages/SystemUI/res/layout-land/status_bar_recent_panel.xml
index 869b164..8a21117 100644
--- a/packages/SystemUI/res/layout-land/status_bar_recent_panel.xml
+++ b/packages/SystemUI/res/layout-land/status_bar_recent_panel.xml
@@ -27,12 +27,6 @@
systemui:recentItemLayout="@layout/status_bar_recent_item"
>
- <ImageView
- android:id="@+id/recents_transition_placeholder_icon"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:visibility="invisible" />
-
<FrameLayout
android:id="@+id/recents_bg_protect"
android:background="@drawable/status_bar_recents_background"
@@ -42,6 +36,12 @@
android:clipToPadding="false"
android:clipChildren="false">
+ <ImageView
+ android:id="@+id/recents_transition_placeholder_icon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:visibility="invisible" />
+
<com.android.systemui.recent.RecentsHorizontalScrollView android:id="@+id/recents_container"
android:layout_width="wrap_content"
android:layout_height="match_parent"
diff --git a/packages/SystemUI/res/layout-land/status_bar_search_panel.xml b/packages/SystemUI/res/layout-land/status_bar_search_panel.xml
index 5d4d989..392a8b5 100644
--- a/packages/SystemUI/res/layout-land/status_bar_search_panel.xml
+++ b/packages/SystemUI/res/layout-land/status_bar_search_panel.xml
@@ -52,7 +52,6 @@
prvandroid:directionDescriptions="@array/navbar_search_direction_descriptions"
prvandroid:handleDrawable="@drawable/navbar_search_handle"
prvandroid:waveDrawable="@drawable/navbar_search_outerring"
- prvandroid:outerRadius="@dimen/navbar_search_target_placement_radius"
prvandroid:snapMargin="@dimen/navbar_search_snap_margin"
prvandroid:hitRadius="@dimen/navbar_search_hit_radius"
prvandroid:feedbackCount="0"
diff --git a/packages/SystemUI/res/layout-port/status_bar_recent_panel.xml b/packages/SystemUI/res/layout-port/status_bar_recent_panel.xml
index fc9fcf4..1d29c5a 100644
--- a/packages/SystemUI/res/layout-port/status_bar_recent_panel.xml
+++ b/packages/SystemUI/res/layout-port/status_bar_recent_panel.xml
@@ -27,12 +27,6 @@
systemui:recentItemLayout="@layout/status_bar_recent_item"
>
- <ImageView
- android:id="@+id/recents_transition_placeholder_icon"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:visibility="invisible" />
-
<FrameLayout
android:id="@+id/recents_bg_protect"
android:background="@drawable/status_bar_recents_background"
@@ -40,6 +34,12 @@
android:layout_height="match_parent"
android:layout_alignParentBottom="true">
+ <ImageView
+ android:id="@+id/recents_transition_placeholder_icon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:visibility="invisible" />
+
<com.android.systemui.recent.RecentsVerticalScrollView
android:id="@+id/recents_container"
android:layout_width="match_parent"
diff --git a/packages/SystemUI/res/layout-port/status_bar_search_panel.xml b/packages/SystemUI/res/layout-port/status_bar_search_panel.xml
index 2486b75..371c575 100644
--- a/packages/SystemUI/res/layout-port/status_bar_search_panel.xml
+++ b/packages/SystemUI/res/layout-port/status_bar_search_panel.xml
@@ -52,7 +52,6 @@
prvandroid:directionDescriptions="@array/navbar_search_direction_descriptions"
prvandroid:handleDrawable="@drawable/navbar_search_handle"
prvandroid:waveDrawable="@drawable/navbar_search_outerring"
- prvandroid:outerRadius="@dimen/navbar_search_target_placement_radius"
prvandroid:snapMargin="@dimen/navbar_search_snap_margin"
prvandroid:hitRadius="@dimen/navbar_search_hit_radius"
prvandroid:feedbackCount="0"
diff --git a/packages/SystemUI/res/layout-sw600dp/status_bar_expanded_header.xml b/packages/SystemUI/res/layout-sw600dp/status_bar_expanded_header.xml
new file mode 100644
index 0000000..9b834d2
--- /dev/null
+++ b/packages/SystemUI/res/layout-sw600dp/status_bar_expanded_header.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+** Copyright 2012, 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.
+-->
+
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingTop="@dimen/notification_panel_header_padding_top"
+ android:background="@drawable/notification_header_bg"
+ android:orientation="horizontal"
+ android:gravity="center_vertical"
+ android:baselineAligned="false"
+ >
+ <com.android.systemui.statusbar.policy.Clock
+ android:id="@+id/clock"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="8dp"
+ android:singleLine="true"
+ android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock"
+ />
+
+ <com.android.systemui.statusbar.policy.DateView android:id="@+id/date"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="8dp"
+ android:layout_marginRight="8dp"
+ android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date"
+ />
+
+ <com.android.systemui.statusbar.RotationToggle android:id="@+id/rotation_lock_button"
+ android:layout_width="32dp"
+ android:layout_height="32dp"
+ android:layout_margin="8dp"
+ android:button="@drawable/ic_notify_rotation"
+ android:contentDescription="@string/accessibility_rotation_lock_off"
+ />
+
+ <ImageView android:id="@+id/settings_button"
+ android:layout_width="48dp"
+ android:layout_height="48dp"
+ android:scaleType="center"
+ android:src="@drawable/ic_notify_quicksettings"
+ android:contentDescription="@string/accessibility_settings_button"
+ />
+
+ <Space
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ />
+
+ <ImageView android:id="@+id/clear_all_button"
+ android:layout_width="48dp"
+ android:layout_height="48dp"
+ android:scaleType="center"
+ android:src="@drawable/ic_notify_clear"
+ android:contentDescription="@string/accessibility_clear_all"
+ />
+</LinearLayout>
\ No newline at end of file
diff --git a/packages/SystemUI/res/layout-sw600dp/status_bar_search_panel.xml b/packages/SystemUI/res/layout-sw600dp/status_bar_search_panel.xml
index 4b2fbc7..0ccfe95 100644
--- a/packages/SystemUI/res/layout-sw600dp/status_bar_search_panel.xml
+++ b/packages/SystemUI/res/layout-sw600dp/status_bar_search_panel.xml
@@ -61,7 +61,6 @@
prvandroid:directionDescriptions="@array/navbar_search_direction_descriptions"
prvandroid:handleDrawable="@drawable/navbar_search_handle"
prvandroid:waveDrawable="@drawable/navbar_search_outerring"
- prvandroid:outerRadius="@dimen/navbar_search_target_placement_radius"
prvandroid:snapMargin="@dimen/navbar_search_snap_margin"
prvandroid:hitRadius="@dimen/navbar_search_hit_radius"
prvandroid:feedbackCount="0"
diff --git a/packages/SystemUI/res/layout-sw720dp/status_bar_search_panel.xml b/packages/SystemUI/res/layout-sw720dp/status_bar_search_panel.xml
index b4872c7..0a5390a 100644
--- a/packages/SystemUI/res/layout-sw720dp/status_bar_search_panel.xml
+++ b/packages/SystemUI/res/layout-sw720dp/status_bar_search_panel.xml
@@ -36,7 +36,8 @@
android:layout_width="wrap_content"
android:layout_height="@dimen/navbar_search_panel_height"
android:layout_alignParentBottom="true"
- android:layout_alignParentLeft="true">
+ android:layout_alignParentLeft="true"
+ android:layout_marginLeft="-120dip">
<View
android:layout_width="0dip"
@@ -60,7 +61,6 @@
prvandroid:directionDescriptions="@array/navbar_search_direction_descriptions"
prvandroid:handleDrawable="@drawable/navbar_search_handle"
prvandroid:waveDrawable="@drawable/navbar_search_outerring"
- prvandroid:outerRadius="@dimen/navbar_search_target_placement_radius"
prvandroid:snapMargin="@dimen/navbar_search_snap_margin"
prvandroid:hitRadius="@dimen/navbar_search_hit_radius"
prvandroid:feedbackCount="0"
diff --git a/packages/SystemUI/res/layout/signal_cluster_view.xml b/packages/SystemUI/res/layout/signal_cluster_view.xml
index 9be9041..66c64c4 100644
--- a/packages/SystemUI/res/layout/signal_cluster_view.xml
+++ b/packages/SystemUI/res/layout/signal_cluster_view.xml
@@ -105,4 +105,9 @@
/>
</FrameLayout>
</FrameLayout>
+ <ImageView
+ android:id="@+id/airplane"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ />
</com.android.systemui.statusbar.SignalClusterView>
diff --git a/packages/SystemUI/res/layout/status_bar_expanded.xml b/packages/SystemUI/res/layout/status_bar_expanded.xml
index f69aac8..bc144bb 100644
--- a/packages/SystemUI/res/layout/status_bar_expanded.xml
+++ b/packages/SystemUI/res/layout/status_bar_expanded.xml
@@ -30,63 +30,11 @@
android:layout_marginLeft="@dimen/notification_panel_margin_left"
>
- <LinearLayout
+ <include layout="@layout/status_bar_expanded_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingTop="@dimen/notification_panel_header_padding_top"
- android:background="@drawable/notification_header_bg"
- android:orientation="horizontal"
- android:gravity="center_vertical"
- android:baselineAligned="false"
- >
- <com.android.systemui.statusbar.policy.Clock
- android:id="@+id/clock"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginLeft="8dp"
- android:singleLine="true"
- android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock"
- />
-
- <com.android.systemui.statusbar.policy.DateView android:id="@+id/date"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginLeft="8dp"
- android:layout_marginRight="8dp"
- android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date"
- />
-
- <com.android.systemui.statusbar.RotationToggle android:id="@+id/rotation_lock_button"
- android:layout_width="32dp"
- android:layout_height="32dp"
- android:layout_margin="8dp"
- android:button="@drawable/ic_notify_rotation"
- android:contentDescription="@string/accessibility_rotation_lock_off"
- />
-
- <ImageView android:id="@+id/settings_button"
- android:layout_width="48dp"
- android:layout_height="48dp"
- android:scaleType="center"
- android:src="@drawable/ic_notify_quicksettings"
- android:contentDescription="@string/accessibility_settings_button"
- />
-
- <Space
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:layout_weight="1"
- />
-
- <ImageView android:id="@+id/clear_all_button"
- android:layout_width="48dp"
- android:layout_height="48dp"
- android:scaleType="center"
- android:src="@drawable/ic_notify_clear"
- android:contentDescription="@string/accessibility_clear_all"
- />
- </LinearLayout>
-
+ />
+
<ScrollView
android:id="@+id/scroll"
android:layout_width="match_parent"
diff --git a/packages/SystemUI/res/layout/status_bar_expanded_header.xml b/packages/SystemUI/res/layout/status_bar_expanded_header.xml
new file mode 100644
index 0000000..893d422
--- /dev/null
+++ b/packages/SystemUI/res/layout/status_bar_expanded_header.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+** Copyright 2012, 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.
+-->
+
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingTop="@dimen/notification_panel_header_padding_top"
+ android:background="@drawable/notification_header_bg"
+ android:orientation="horizontal"
+ android:gravity="center_vertical"
+ android:baselineAligned="false"
+ >
+ <com.android.systemui.statusbar.policy.Clock
+ android:id="@+id/clock"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="8dp"
+ android:singleLine="true"
+ android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock"
+ />
+
+ <com.android.systemui.statusbar.policy.DateView android:id="@+id/date"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="8dp"
+ android:layout_marginRight="8dp"
+ android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date"
+ />
+
+ <ImageView android:id="@+id/settings_button"
+ android:layout_width="48dp"
+ android:layout_height="48dp"
+ android:scaleType="center"
+ android:src="@drawable/ic_notify_quicksettings"
+ android:contentDescription="@string/accessibility_settings_button"
+ />
+
+ <Space
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ />
+
+ <ImageView android:id="@+id/clear_all_button"
+ android:layout_width="48dp"
+ android:layout_height="48dp"
+ android:scaleType="center"
+ android:src="@drawable/ic_notify_clear"
+ android:contentDescription="@string/accessibility_clear_all"
+ />
+</LinearLayout>
\ No newline at end of file
diff --git a/packages/SystemUI/res/values-be/strings.xml b/packages/SystemUI/res/values-be/strings.xml
index 82262f2..c4af8d8 100644
--- a/packages/SystemUI/res/values-be/strings.xml
+++ b/packages/SystemUI/res/values-be/strings.xml
@@ -144,10 +144,7 @@
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Інфармацыя пра прыкладанне"</string>
<string name="notifications_off_title" msgid="8936620513608443224">"Паведамленні адключаны"</string>
<string name="notifications_off_text" msgid="2529001315769385273">"Націсніце тут, каб зноў уключыць апавяшчэнні."</string>
- <!-- no translation found for accessibility_rotation_lock_off (4062780228931590069) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_landscape (6731197337665366273) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_portrait (5809367521644012115) -->
- <skip />
+ <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Экран паварочваецца аўтаматычна."</string>
+ <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Экран заблакiраваны ў альбомнай арыентацыі."</string>
+ <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Экран заблакiраваны ў партрэтнай арыентацыі."</string>
</resources>
diff --git a/packages/SystemUI/res/values-bg/strings.xml b/packages/SystemUI/res/values-bg/strings.xml
index c32bafe..a4a0e78 100644
--- a/packages/SystemUI/res/values-bg/strings.xml
+++ b/packages/SystemUI/res/values-bg/strings.xml
@@ -142,10 +142,7 @@
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Информация за приложението"</string>
<string name="notifications_off_title" msgid="8936620513608443224">"Известията са изключени"</string>
<string name="notifications_off_text" msgid="2529001315769385273">"Докоснете тук, за да включите отново известията."</string>
- <!-- no translation found for accessibility_rotation_lock_off (4062780228931590069) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_landscape (6731197337665366273) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_portrait (5809367521644012115) -->
- <skip />
+ <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Екранът ще се завърта автоматично."</string>
+ <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Екранът е заключен в хоризонтална ориентация."</string>
+ <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Екранът е заключен във вертикална ориентация."</string>
</resources>
diff --git a/packages/SystemUI/res/values-cs/strings.xml b/packages/SystemUI/res/values-cs/strings.xml
index dfcb3b4..c41cf6f 100644
--- a/packages/SystemUI/res/values-cs/strings.xml
+++ b/packages/SystemUI/res/values-cs/strings.xml
@@ -144,10 +144,7 @@
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Informace o aplikaci"</string>
<string name="notifications_off_title" msgid="8936620513608443224">"Oznámení jsou vypnuta"</string>
<string name="notifications_off_text" msgid="2529001315769385273">"Chcete-li oznámení znovu zapnout, klepněte sem."</string>
- <!-- no translation found for accessibility_rotation_lock_off (4062780228931590069) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_landscape (6731197337665366273) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_portrait (5809367521644012115) -->
- <skip />
+ <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Obrazovka se automaticky otočí."</string>
+ <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Obrazovka je uzamčena v orientaci na šířku."</string>
+ <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Obrazovka je uzamčena v orientaci na výšku."</string>
</resources>
diff --git a/packages/SystemUI/res/values-de/strings.xml b/packages/SystemUI/res/values-de/strings.xml
index 0520821..b7dcb14 100644
--- a/packages/SystemUI/res/values-de/strings.xml
+++ b/packages/SystemUI/res/values-de/strings.xml
@@ -66,7 +66,7 @@
<string name="screenshot_saving_title" msgid="8242282144535555697">"Screenshot wird gespeichert..."</string>
<string name="screenshot_saving_text" msgid="2419718443411738818">"Screenshot wird gespeichert..."</string>
<string name="screenshot_saved_title" msgid="6461865960961414961">"Screenshot aufgenommen"</string>
- <string name="screenshot_saved_text" msgid="1152839647677558815">"Zum Anzeigen Ihres Screenshots berühren"</string>
+ <string name="screenshot_saved_text" msgid="1152839647677558815">"Zum Anzeigen des Screenshots berühren"</string>
<string name="screenshot_failed_title" msgid="705781116746922771">"Screenshot konnte nicht aufgenommen werden."</string>
<string name="screenshot_failed_text" msgid="8134011269572415402">"Screenshot konnte nicht gespeichert werden. Eventuell wird der Speicher gerade verwendet."</string>
<string name="usb_preference_title" msgid="6551050377388882787">"USB-Dateiübertragungsoptionen"</string>
diff --git a/packages/SystemUI/res/values-et/strings.xml b/packages/SystemUI/res/values-et/strings.xml
index a2eb51e..318ed04 100644
--- a/packages/SystemUI/res/values-et/strings.xml
+++ b/packages/SystemUI/res/values-et/strings.xml
@@ -142,10 +142,7 @@
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Rakenduse teave"</string>
<string name="notifications_off_title" msgid="8936620513608443224">"Teatised väljas"</string>
<string name="notifications_off_text" msgid="2529001315769385273">"Teatiste uuesti sisselülitamiseks puudutage siin."</string>
- <!-- no translation found for accessibility_rotation_lock_off (4062780228931590069) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_landscape (6731197337665366273) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_portrait (5809367521644012115) -->
- <skip />
+ <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Ekraani pööramine toimub automaatselt."</string>
+ <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Ekraan on lukustatud horisontaalsuunas."</string>
+ <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Ekraan on lukustatud vertikaalsuunas."</string>
</resources>
diff --git a/packages/SystemUI/res/values-hr/strings.xml b/packages/SystemUI/res/values-hr/strings.xml
index 4b87005..4a1f35a 100644
--- a/packages/SystemUI/res/values-hr/strings.xml
+++ b/packages/SystemUI/res/values-hr/strings.xml
@@ -142,10 +142,7 @@
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Informacije o aplikaciji"</string>
<string name="notifications_off_title" msgid="8936620513608443224">"Obavijesti isključene"</string>
<string name="notifications_off_text" msgid="2529001315769385273">"Dotaknite ovdje da biste ponovo uključili obavijesti."</string>
- <!-- no translation found for accessibility_rotation_lock_off (4062780228931590069) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_landscape (6731197337665366273) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_portrait (5809367521644012115) -->
- <skip />
+ <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Zaslon će se automatski zakrenuti."</string>
+ <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Zaslon je zaključan u pejzažnoj orijentaciji."</string>
+ <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Zaslon je zaključan u portretnoj orijentaciji."</string>
</resources>
diff --git a/packages/SystemUI/res/values-in/strings.xml b/packages/SystemUI/res/values-in/strings.xml
index 4571066..a117252 100644
--- a/packages/SystemUI/res/values-in/strings.xml
+++ b/packages/SystemUI/res/values-in/strings.xml
@@ -140,14 +140,10 @@
<string name="accessibility_clear_all" msgid="5235938559247164925">"Menghapus semua pemberitahuan."</string>
<string name="dreams_dock_launcher" msgid="3541196417659166245">"Aktifkan tirai layar"</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Info aplikasi"</string>
- <!-- no translation found for notifications_off_title (8936620513608443224) -->
- <skip />
+ <string name="notifications_off_title" msgid="8936620513608443224">"Pemberitahuan mati"</string>
<!-- no translation found for notifications_off_text (2529001315769385273) -->
<skip />
- <!-- no translation found for accessibility_rotation_lock_off (4062780228931590069) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_landscape (6731197337665366273) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_portrait (5809367521644012115) -->
- <skip />
+ <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Layar akan diputar secara otomatis."</string>
+ <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Layar dikunci dalam orientasi lanskap."</string>
+ <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Layar dikunci dalam orientasi potret."</string>
</resources>
diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml
index 438cc0d..e54b06c 100644
--- a/packages/SystemUI/res/values-ko/strings.xml
+++ b/packages/SystemUI/res/values-ko/strings.xml
@@ -140,14 +140,9 @@
<string name="accessibility_clear_all" msgid="5235938559247164925">"모든 알림 지우기"</string>
<string name="dreams_dock_launcher" msgid="3541196417659166245">"스크린 세이버 활성화"</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"앱 정보"</string>
- <!-- no translation found for notifications_off_title (8936620513608443224) -->
- <skip />
- <!-- no translation found for notifications_off_text (2529001315769385273) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_off (4062780228931590069) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_landscape (6731197337665366273) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_portrait (5809367521644012115) -->
- <skip />
+ <string name="notifications_off_title" msgid="8936620513608443224">"알림 사용 안함"</string>
+ <string name="notifications_off_text" msgid="2529001315769385273">"알림을 다시 사용하려면 여기를 터치하세요."</string>
+ <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"화면이 자동으로 회전됩니다."</string>
+ <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"화면이 가로 방향으로 잠겨 있습니다."</string>
+ <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"화면이 세로 방향으로 잠겨 있습니다."</string>
</resources>
diff --git a/packages/SystemUI/res/values-ms/strings.xml b/packages/SystemUI/res/values-ms/strings.xml
index 9292783..3265cd5 100644
--- a/packages/SystemUI/res/values-ms/strings.xml
+++ b/packages/SystemUI/res/values-ms/strings.xml
@@ -142,10 +142,7 @@
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Maklumat apl"</string>
<string name="notifications_off_title" msgid="8936620513608443224">"Pemberitahuan dimatikan"</string>
<string name="notifications_off_text" msgid="2529001315769385273">"Ketik di sini untuk menghidupkan kembali pemberitahuan."</string>
- <!-- no translation found for accessibility_rotation_lock_off (4062780228931590069) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_landscape (6731197337665366273) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_portrait (5809367521644012115) -->
- <skip />
+ <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Skrin akan berputar secara automatik."</string>
+ <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Skrin dikunci dalam orientasi landskap."</string>
+ <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Skrin dikunci dalam orientasi potret."</string>
</resources>
diff --git a/packages/SystemUI/res/values-nb/strings.xml b/packages/SystemUI/res/values-nb/strings.xml
index b416095..2a9c1c8 100644
--- a/packages/SystemUI/res/values-nb/strings.xml
+++ b/packages/SystemUI/res/values-nb/strings.xml
@@ -144,10 +144,7 @@
<skip />
<!-- no translation found for notifications_off_text (2529001315769385273) -->
<skip />
- <!-- no translation found for accessibility_rotation_lock_off (4062780228931590069) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_landscape (6731197337665366273) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_portrait (5809367521644012115) -->
- <skip />
+ <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Skjermen roterer automatisk."</string>
+ <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Skjermen er låst i liggende retning."</string>
+ <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Skjermen er låst i stående retning."</string>
</resources>
diff --git a/packages/SystemUI/res/values-pl/strings.xml b/packages/SystemUI/res/values-pl/strings.xml
index 3dab389..b01345e 100644
--- a/packages/SystemUI/res/values-pl/strings.xml
+++ b/packages/SystemUI/res/values-pl/strings.xml
@@ -144,10 +144,7 @@
<skip />
<!-- no translation found for notifications_off_text (2529001315769385273) -->
<skip />
- <!-- no translation found for accessibility_rotation_lock_off (4062780228931590069) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_landscape (6731197337665366273) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_portrait (5809367521644012115) -->
- <skip />
+ <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Ekran zostanie obrócony automatycznie."</string>
+ <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Ekran jest zablokowany w orientacji poziomej."</string>
+ <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Ekran jest zablokowany w orientacji pionowej."</string>
</resources>
diff --git a/packages/SystemUI/res/values-pt-rPT/strings.xml b/packages/SystemUI/res/values-pt-rPT/strings.xml
index 30950ba..77ed068 100644
--- a/packages/SystemUI/res/values-pt-rPT/strings.xml
+++ b/packages/SystemUI/res/values-pt-rPT/strings.xml
@@ -140,10 +140,8 @@
<string name="accessibility_clear_all" msgid="5235938559247164925">"Limpar todas as notificações."</string>
<string name="dreams_dock_launcher" msgid="3541196417659166245">"Ativar proteção de ecrã"</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Informações da aplicação"</string>
- <!-- no translation found for notifications_off_title (8936620513608443224) -->
- <skip />
- <!-- no translation found for notifications_off_text (2529001315769385273) -->
- <skip />
+ <string name="notifications_off_title" msgid="8936620513608443224">"Notificações desativadas"</string>
+ <string name="notifications_off_text" msgid="2529001315769385273">"Toque aqui para voltar a ativar as notificações."</string>
<!-- no translation found for accessibility_rotation_lock_off (4062780228931590069) -->
<skip />
<!-- no translation found for accessibility_rotation_lock_on_landscape (6731197337665366273) -->
diff --git a/packages/SystemUI/res/values-pt/strings.xml b/packages/SystemUI/res/values-pt/strings.xml
index 7f9e6e1..f074d22 100644
--- a/packages/SystemUI/res/values-pt/strings.xml
+++ b/packages/SystemUI/res/values-pt/strings.xml
@@ -144,10 +144,7 @@
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Informações do aplicativo"</string>
<string name="notifications_off_title" msgid="8936620513608443224">"Notificações desativadas"</string>
<string name="notifications_off_text" msgid="2529001315769385273">"Toque aqui para ativar as notificações novamente."</string>
- <!-- no translation found for accessibility_rotation_lock_off (4062780228931590069) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_landscape (6731197337665366273) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_portrait (5809367521644012115) -->
- <skip />
+ <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"A tela girará automaticamente."</string>
+ <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"A tela está bloqueada na orientação paisagem."</string>
+ <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"A tela está bloqueada na orientação retrato."</string>
</resources>
diff --git a/packages/SystemUI/res/values-ro/strings.xml b/packages/SystemUI/res/values-ro/strings.xml
index 2896eae..4750ac5 100644
--- a/packages/SystemUI/res/values-ro/strings.xml
+++ b/packages/SystemUI/res/values-ro/strings.xml
@@ -144,10 +144,7 @@
<skip />
<!-- no translation found for notifications_off_text (2529001315769385273) -->
<skip />
- <!-- no translation found for accessibility_rotation_lock_off (4062780228931590069) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_landscape (6731197337665366273) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_portrait (5809367521644012115) -->
- <skip />
+ <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Ecranul se va roti în mod automat."</string>
+ <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Ecranul este blocat în orientarea de tip peisaj."</string>
+ <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Ecranul este blocat în orientarea de tip portret."</string>
</resources>
diff --git a/packages/SystemUI/res/values-sk/strings.xml b/packages/SystemUI/res/values-sk/strings.xml
index 64494b8..8e64487 100644
--- a/packages/SystemUI/res/values-sk/strings.xml
+++ b/packages/SystemUI/res/values-sk/strings.xml
@@ -142,14 +142,9 @@
<string name="accessibility_clear_all" msgid="5235938559247164925">"Vymazať všetky upozornenia."</string>
<string name="dreams_dock_launcher" msgid="3541196417659166245">"Aktivovať šetrič obrazovky"</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Informácie o aplikácii"</string>
- <!-- no translation found for notifications_off_title (8936620513608443224) -->
- <skip />
- <!-- no translation found for notifications_off_text (2529001315769385273) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_off (4062780228931590069) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_landscape (6731197337665366273) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_portrait (5809367521644012115) -->
- <skip />
+ <string name="notifications_off_title" msgid="8936620513608443224">"Upozornenia sú vypnuté"</string>
+ <string name="notifications_off_text" msgid="2529001315769385273">"Klepnutím sem upozornenia znova povolíte."</string>
+ <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Obrazovka sa automaticky otočí."</string>
+ <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Obrazovka je uzamknutá v orientácii na šírku."</string>
+ <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Obrazovka je uzamknutá v orientácii na výšku."</string>
</resources>
diff --git a/packages/SystemUI/res/values-sr/strings.xml b/packages/SystemUI/res/values-sr/strings.xml
index 6b475d3..5f523a2 100644
--- a/packages/SystemUI/res/values-sr/strings.xml
+++ b/packages/SystemUI/res/values-sr/strings.xml
@@ -144,10 +144,7 @@
<skip />
<!-- no translation found for notifications_off_text (2529001315769385273) -->
<skip />
- <!-- no translation found for accessibility_rotation_lock_off (4062780228931590069) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_landscape (6731197337665366273) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_portrait (5809367521644012115) -->
- <skip />
+ <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Екран ће се аутоматски ротирати."</string>
+ <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Екран је закључан у хоризонталном положају."</string>
+ <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Екран је закључан у вертикалном положају."</string>
</resources>
diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml
index 2cb99ff..07d55f1 100644
--- a/packages/SystemUI/res/values-sw600dp/dimens.xml
+++ b/packages/SystemUI/res/values-sw600dp/dimens.xml
@@ -27,9 +27,6 @@
<!-- 0x33 = center_horizontal|top -->
<integer name="notification_panel_layout_gravity">0x31</integer>
- <!-- Default target placement radius for navigation bar search target -->
- <dimen name="navbar_search_target_placement_radius">182dip</dimen>
-
<!-- Diameter of outer shape drawable shown in navbar search-->
<dimen name="navbar_search_outerring_diameter">364dp</dimen>
diff --git a/packages/SystemUI/res/values-tl/strings.xml b/packages/SystemUI/res/values-tl/strings.xml
index de4ae18..e1c4185 100644
--- a/packages/SystemUI/res/values-tl/strings.xml
+++ b/packages/SystemUI/res/values-tl/strings.xml
@@ -142,10 +142,7 @@
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Impormasyon ng app"</string>
<string name="notifications_off_title" msgid="8936620513608443224">"Naka-off ang mga notification"</string>
<string name="notifications_off_text" msgid="2529001315769385273">"Tumapik dito upang muling i-on ang mga notification."</string>
- <!-- no translation found for accessibility_rotation_lock_off (4062780228931590069) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_landscape (6731197337665366273) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_portrait (5809367521644012115) -->
- <skip />
+ <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Awtomatikong iikot ang screen."</string>
+ <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Naka-lock ang screen sa pahigang oryentasyon."</string>
+ <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Naka-lock ang screen sa patayong oryentasyon."</string>
</resources>
diff --git a/packages/SystemUI/res/values-uk/strings.xml b/packages/SystemUI/res/values-uk/strings.xml
index 6494fc8..165baae 100644
--- a/packages/SystemUI/res/values-uk/strings.xml
+++ b/packages/SystemUI/res/values-uk/strings.xml
@@ -140,14 +140,9 @@
<string name="accessibility_clear_all" msgid="5235938559247164925">"Очистити всі сповіщення."</string>
<string name="dreams_dock_launcher" msgid="3541196417659166245">"Активувати заставку"</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Інформація про програму"</string>
- <!-- no translation found for notifications_off_title (8936620513608443224) -->
- <skip />
- <!-- no translation found for notifications_off_text (2529001315769385273) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_off (4062780228931590069) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_landscape (6731197337665366273) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_portrait (5809367521644012115) -->
- <skip />
+ <string name="notifications_off_title" msgid="8936620513608443224">"Сповіщення вимкнено"</string>
+ <string name="notifications_off_text" msgid="2529001315769385273">"Торкніться тут, щоб знову ввімкнути сповіщення."</string>
+ <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Екран обертатиметься автоматично."</string>
+ <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Екран заблоковано в альбомній орієнтації."</string>
+ <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Екран заблоковано в книжковій орієнтації."</string>
</resources>
diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml
index 831cdc0..007ee96 100644
--- a/packages/SystemUI/res/values-zh-rCN/strings.xml
+++ b/packages/SystemUI/res/values-zh-rCN/strings.xml
@@ -144,10 +144,7 @@
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"应用信息"</string>
<string name="notifications_off_title" msgid="8936620513608443224">"通知功能已停用"</string>
<string name="notifications_off_text" msgid="2529001315769385273">"点按此处可重新启用通知功能。"</string>
- <!-- no translation found for accessibility_rotation_lock_off (4062780228931590069) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_landscape (6731197337665366273) -->
- <skip />
- <!-- no translation found for accessibility_rotation_lock_on_portrait (5809367521644012115) -->
- <skip />
+ <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"屏幕会自动旋转。"</string>
+ <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"屏幕锁定为横向浏览模式。"</string>
+ <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"屏幕已锁定为纵向浏览模式。"</string>
</resources>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 2ff0e00..f548166 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -58,9 +58,8 @@
<!-- Height of a small notification in the status bar plus glow, padding, etc -->
<dimen name="notification_min_height">72dp</dimen>
- <!-- Height of a small notification in the status bar -->
- <!-- TODO: change this back to 256dp once we deal with actions. -->
- <dimen name="notification_max_height">320dp</dimen>
+ <!-- Height of a large notification in the status bar -->
+ <dimen name="notification_max_height">256dp</dimen>
<!-- size at which Notification icons will be drawn in the status bar -->
<dimen name="status_bar_icon_drawing_size">18dip</dimen>
@@ -106,9 +105,6 @@
<!-- The width of the view containing the menu status bar icon -->
<dimen name="navigation_menu_key_width">40dip</dimen>
- <!-- Default target placement radius for navigation bar search target -->
- <dimen name="navbar_search_target_placement_radius">150dip</dimen>
-
<!-- Default distance beyond which snaps to the target radius -->
<dimen name="navbar_search_snap_margin">20dip</dimen>
diff --git a/packages/SystemUI/src/com/android/systemui/recent/Choreographer.java b/packages/SystemUI/src/com/android/systemui/recent/Choreographer.java
index a8c2020..ccdf038 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/Choreographer.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/Choreographer.java
@@ -102,12 +102,14 @@
builder.with(noRecentAppsFadeAnim);
}
- Drawable background = mScrimView.getBackground();
- if (background != null) {
- Animator bgAnim = ObjectAnimator.ofInt(background,
- "alpha", appearing ? 0 : 255, appearing ? 255 : 0);
- bgAnim.setDuration(appearing ? SCRIM_DURATION : CLOSE_DURATION);
- builder.with(bgAnim);
+ if (appearing) {
+ Drawable background = mScrimView.getBackground();
+ if (background != null) {
+ Animator bgAnim = ObjectAnimator.ofInt(background,
+ "alpha", appearing ? 0 : 255, appearing ? 255 : 0);
+ bgAnim.setDuration(appearing ? SCRIM_DURATION : CLOSE_DURATION);
+ builder.with(bgAnim);
+ }
}
mContentAnim.addListener(this);
if (mListener != null) {
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
index feb1ac8..6785c29 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
@@ -469,7 +469,7 @@
Display d = ((WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE))
.getDefaultDisplay();
if (!ActivityManager.isHighEndGfx(d)) {
- mRecentsScrim.setBackgroundDrawable(null);
+ mRecentsScrim.setBackground(null);
} else if (mRecentsScrim.getBackground() instanceof BitmapDrawable) {
// In order to save space, we make the background texture repeat in the Y direction
((BitmapDrawable) mRecentsScrim.getBackground()).setTileModeY(TileMode.REPEAT);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index a310b1d..a44279a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -751,6 +751,7 @@
protected abstract void tick(IBinder key, StatusBarNotification n, boolean firstTime);
protected abstract void updateExpandedViewPos(int expandedPosition);
protected abstract int getExpandedViewMaxHeight();
+ protected abstract boolean isStatusBarExpanded();
protected boolean isTopNotification(ViewGroup parent, NotificationData.Entry entry) {
return parent.indexOfChild(entry.row) == 0;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/DelegateViewHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/DelegateViewHelper.java
index e074a80..912a165 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/DelegateViewHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/DelegateViewHelper.java
@@ -53,6 +53,9 @@
}
public boolean onInterceptTouchEvent(MotionEvent event) {
+ if (mBar.isStatusBarExpanded()) {
+ return false;
+ }
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
mDownPoint[0] = event.getX();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
index 744a46b..2f02d23 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
@@ -44,10 +44,11 @@
private boolean mMobileVisible = false;
private int mMobileStrengthId = 0, mMobileActivityId = 0, mMobileTypeId = 0;
private boolean mIsAirplaneMode = false;
+ private int mAirplaneIconId = 0;
private String mWifiDescription, mMobileDescription, mMobileTypeDescription;
ViewGroup mWifiGroup, mMobileGroup;
- ImageView mWifi, mMobile, mWifiActivity, mMobileActivity, mMobileType;
+ ImageView mWifi, mMobile, mWifiActivity, mMobileActivity, mMobileType, mAirplane;
View mSpacer;
public SignalClusterView(Context context) {
@@ -79,6 +80,7 @@
mMobileActivity = (ImageView) findViewById(R.id.mobile_inout);
mMobileType = (ImageView) findViewById(R.id.mobile_type);
mSpacer = findViewById(R.id.spacer);
+ mAirplane = (ImageView) findViewById(R.id.airplane);
apply();
}
@@ -92,10 +94,13 @@
mMobile = null;
mMobileActivity = null;
mMobileType = null;
+ mSpacer = null;
+ mAirplane = null;
super.onDetachedFromWindow();
}
+ @Override
public void setWifiIndicators(boolean visible, int strengthIcon, int activityIcon,
String contentDescription) {
mWifiVisible = visible;
@@ -106,6 +111,7 @@
apply();
}
+ @Override
public void setMobileDataIndicators(boolean visible, int strengthIcon, int activityIcon,
int typeIcon, String contentDescription, String typeContentDescription) {
mMobileVisible = visible;
@@ -118,8 +124,12 @@
apply();
}
- public void setIsAirplaneMode(boolean is) {
+ @Override
+ public void setIsAirplaneMode(boolean is, int airplaneIconId) {
mIsAirplaneMode = is;
+ mAirplaneIconId = airplaneIconId;
+
+ apply();
}
// Run after each indicator change.
@@ -140,7 +150,7 @@
(mWifiVisible ? "VISIBLE" : "GONE"),
mWifiStrengthId, mWifiActivityId));
- if (mMobileVisible) {
+ if (mMobileVisible && !mIsAirplaneMode) {
mMobileGroup.setVisibility(View.VISIBLE);
mMobile.setImageResource(mMobileStrengthId);
mMobileActivity.setImageResource(mMobileActivityId);
@@ -150,6 +160,13 @@
mMobileGroup.setVisibility(View.GONE);
}
+ if (mIsAirplaneMode) {
+ mAirplane.setVisibility(View.VISIBLE);
+ mAirplane.setImageResource(mAirplaneIconId);
+ } else {
+ mAirplane.setVisibility(View.GONE);
+ }
+
if (mMobileVisible && mWifiVisible && mIsAirplaneMode) {
mSpacer.setVisibility(View.INVISIBLE);
} else {
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 d3fbdab..6122390 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -2109,5 +2109,10 @@
protected void haltTicker() {
mTicker.halt();
}
+
+ @Override
+ protected boolean isStatusBarExpanded() {
+ return mExpanded;
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessController.java
index 72fdfad..3ba36af 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessController.java
@@ -31,8 +31,8 @@
public class BrightnessController implements ToggleSlider.Listener {
private static final String TAG = "StatusBar.BrightnessController";
- private static final int MINIMUM_BACKLIGHT = android.os.Power.BRIGHTNESS_DIM;
- private static final int MAXIMUM_BACKLIGHT = android.os.Power.BRIGHTNESS_ON;
+ private static final int MINIMUM_BACKLIGHT = android.os.PowerManager.BRIGHTNESS_DIM;
+ private static final int MAXIMUM_BACKLIGHT = android.os.PowerManager.BRIGHTNESS_ON;
private Context mContext;
private ToggleSlider mControl;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
index 95704f6..a05fcc1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
@@ -83,6 +83,7 @@
int mDataDirectionIconId; // data + data direction on phones
int mDataSignalIconId;
int mDataTypeIconId;
+ int mAirplaneIconId;
boolean mDataActive;
int mMobileActivityIconId; // overlay arrows for data direction
int mLastSignalLevel;
@@ -161,7 +162,7 @@
String contentDescription);
void setMobileDataIndicators(boolean visible, int strengthIcon, int activityIcon,
int typeIcon, String contentDescription, String typeContentDescription);
- void setIsAirplaneMode(boolean is);
+ void setIsAirplaneMode(boolean is, int airplaneIcon);
}
/**
@@ -305,7 +306,7 @@
mContentDescriptionPhoneSignal,
mContentDescriptionDataType);
}
- cluster.setIsAirplaneMode(mAirplaneMode);
+ cluster.setIsAirplaneMode(mAirplaneMode, mAirplaneIconId);
}
public void setStackedMode(boolean stacked) {
@@ -997,7 +998,7 @@
// look again; your radios are now airplanes
mContentDescriptionPhoneSignal = mContext.getString(
R.string.accessibility_airplane_mode);
- mPhoneSignalIconId = mDataSignalIconId = R.drawable.stat_sys_signal_flightmode;
+ mAirplaneIconId = R.drawable.stat_sys_signal_flightmode;
mDataTypeIconId = 0;
// combined values from connected wifi take precedence over airplane mode
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
index 906d1aa..a2c7637 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
@@ -1618,6 +1618,11 @@
@Override
protected void updateExpandedViewPos(int expandedPosition) {
}
+
+ @Override
+ protected boolean isStatusBarExpanded() {
+ return mNotificationPanel.getVisibility() == View.VISIBLE;
+ }
}
diff --git a/policy/src/com/android/internal/policy/impl/GlobalActions.java b/policy/src/com/android/internal/policy/impl/GlobalActions.java
index 3fa79b6..aa73de4 100644
--- a/policy/src/com/android/internal/policy/impl/GlobalActions.java
+++ b/policy/src/com/android/internal/policy/impl/GlobalActions.java
@@ -16,14 +16,12 @@
package com.android.internal.policy.impl;
-import com.android.internal.app.ShutdownThread;
import com.android.internal.telephony.TelephonyIntents;
import com.android.internal.telephony.TelephonyProperties;
import com.android.internal.R;
import android.app.ActivityManagerNative;
import android.app.AlertDialog;
-import android.app.admin.DevicePolicyManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
@@ -48,6 +46,7 @@
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
+import android.view.WindowManagerPolicy.WindowManagerFuncs;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.ImageView;
@@ -68,6 +67,7 @@
private static final boolean SHOW_SILENT_TOGGLE = true;
private final Context mContext;
+ private final WindowManagerFuncs mWindowManagerFuncs;
private final AudioManager mAudioManager;
private ArrayList<Action> mItems;
@@ -88,8 +88,9 @@
/**
* @param context everything needs a context :(
*/
- public GlobalActions(Context context) {
+ public GlobalActions(Context context, WindowManagerFuncs windowManagerFuncs) {
mContext = context;
+ mWindowManagerFuncs = windowManagerFuncs;
mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
// receive broadcasts
@@ -186,11 +187,11 @@
public void onPress() {
// shutdown by making sure radio and power are handled accordingly.
- ShutdownThread.shutdown(mContext, true);
+ mWindowManagerFuncs.shutdown();
}
public boolean onLongPress() {
- ShutdownThread.rebootSafeMode(mContext, true);
+ mWindowManagerFuncs.rebootSafeMode();
return true;
}
diff --git a/policy/src/com/android/internal/policy/impl/LockScreen.java b/policy/src/com/android/internal/policy/impl/LockScreen.java
index c7a30e2..8ea334e 100644
--- a/policy/src/com/android/internal/policy/impl/LockScreen.java
+++ b/policy/src/com/android/internal/policy/impl/LockScreen.java
@@ -129,6 +129,9 @@
// Get the target position for the given resource. Returns -1 if not found.
public int getTargetPosition(int resourceId);
+
+ // Clean up when this widget is going away
+ public void cleanUp();
}
class SlidingTabMethods implements SlidingTab.OnTriggerListener, UnlockWidgetCommonMethods {
@@ -197,6 +200,10 @@
public int getTargetPosition(int resourceId) {
return -1; // Not supported
}
+
+ public void cleanUp() {
+ mSlidingTab.setOnTriggerListener(null);
+ }
}
class WaveViewMethods implements WaveView.OnTriggerListener, UnlockWidgetCommonMethods {
@@ -240,6 +247,9 @@
public int getTargetPosition(int resourceId) {
return -1; // Not supported
}
+ public void cleanUp() {
+ mWaveView.setOnTriggerListener(null);
+ }
}
private Intent getAssistIntent() {
@@ -322,6 +332,7 @@
mCallback.pokeWakelock();
break;
+ case com.android.internal.R.drawable.ic_lockscreen_unlock_phantom:
case com.android.internal.R.drawable.ic_lockscreen_unlock:
mCallback.goToUnlockScreen();
break;
@@ -341,7 +352,7 @@
try {
mContext.startActivity(intent);
} catch (ActivityNotFoundException e) {
- Log.w(TAG, "Camera application not found");
+ Log.w(TAG, "Activity not found for intent + " + intent.getAction());
}
}
@@ -373,6 +384,10 @@
public int getTargetPosition(int resourceId) {
return mMultiWaveView.getTargetPosition(resourceId);
}
+
+ public void cleanUp() {
+ mMultiWaveView.setOnTriggerListener(null);
+ }
}
private void requestUnlockScreen() {
@@ -591,6 +606,7 @@
public void cleanUp() {
mUpdateMonitor.removeCallback(mInfoCallback); // this must be first
mUpdateMonitor.removeCallback(mSimStateCallback);
+ mUnlockWidgetMethods.cleanUp();
mLockPatternUtils = null;
mUpdateMonitor = null;
mCallback = null;
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 794ed15..3147ba7 100755
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -15,7 +15,6 @@
package com.android.internal.policy.impl;
-import android.app.Activity;
import android.app.ActivityManager;
import android.app.ActivityManagerNative;
import android.app.IUiModeManager;
@@ -37,8 +36,6 @@
import android.database.ContentObserver;
import android.graphics.PixelFormat;
import android.graphics.Rect;
-import android.graphics.RectF;
-import android.hardware.input.InputManager;
import android.media.AudioManager;
import android.media.IAudioService;
import android.os.BatteryManager;
@@ -60,7 +57,6 @@
import android.provider.Settings;
import com.android.internal.R;
-import com.android.internal.app.ShutdownThread;
import com.android.internal.policy.PolicyManager;
import com.android.internal.statusbar.IStatusBarService;
import com.android.internal.telephony.ITelephony;
@@ -149,7 +145,6 @@
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
-import java.util.ArrayList;
/**
* WindowManagerPolicy implementation for the Android phone UI. This
@@ -248,8 +243,6 @@
static final int SYSTEM_UI_CHANGING_LAYOUT =
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN;
- private static final int BTN_MOUSE = 0x110;
-
/* Table of Application Launch keys. Maps from key codes to intent categories.
*
* These are special keys that are used to launch particular kinds of applications,
@@ -448,7 +441,6 @@
static final Rect mTmpParentFrame = new Rect();
static final Rect mTmpDisplayFrame = new Rect();
- static final Rect mTmpSystemFrame = new Rect();
static final Rect mTmpContentFrame = new Rect();
static final Rect mTmpVisibleFrame = new Rect();
static final Rect mTmpNavigationFrame = new Rect();
@@ -727,7 +719,7 @@
mPowerKeyHandled = true;
performHapticFeedbackLw(null, HapticFeedbackConstants.LONG_PRESS, false);
sendCloseSystemWindows(SYSTEM_DIALOG_REASON_GLOBAL_ACTIONS);
- ShutdownThread.shutdown(mContext, true);
+ mWindowManagerFuncs.shutdown();
break;
}
}
@@ -741,7 +733,7 @@
void showGlobalActionsDialog() {
if (mGlobalActions == null) {
- mGlobalActions = new GlobalActions(mContext);
+ mGlobalActions = new GlobalActions(mContext, mWindowManagerFuncs);
}
final boolean keyguardShowing = keyguardIsShowingTq();
mGlobalActions.showDialog(keyguardShowing, isDeviceProvisioned());
@@ -2302,7 +2294,7 @@
mStatusBarLayer = mNavigationBar.getSurfaceLayer();
// And compute the final frame.
mNavigationBar.computeFrameLw(mTmpNavigationFrame, mTmpNavigationFrame,
- mTmpNavigationFrame, mTmpNavigationFrame, mTmpNavigationFrame);
+ mTmpNavigationFrame, mTmpNavigationFrame);
if (DEBUG_LAYOUT) Log.i(TAG, "mNavigationBar frame: " + mTmpNavigationFrame);
}
if (DEBUG_LAYOUT) Log.i(TAG, String.format("mDock rect: (%d,%d - %d,%d)",
@@ -2323,7 +2315,7 @@
mStatusBarLayer = mStatusBar.getSurfaceLayer();
// Let the status bar determine its size.
- mStatusBar.computeFrameLw(pf, df, df, vf, vf);
+ mStatusBar.computeFrameLw(pf, df, vf, vf);
// For layout, the status bar is always at the top with our fixed height.
mStableTop = mUnrestrictedScreenTop + mStatusBarHeight;
@@ -2357,6 +2349,17 @@
}
}
+ /** {@inheritDoc} */
+ public int getSystemDecorRectLw(Rect systemRect) {
+ systemRect.left = mSystemLeft;
+ systemRect.top = mSystemTop;
+ systemRect.right = mSystemRight;
+ systemRect.bottom = mSystemBottom;
+ if (mStatusBar != null) return mStatusBar.getSurfaceLayer();
+ if (mNavigationBar != null) return mNavigationBar.getSurfaceLayer();
+ return 0;
+ }
+
void setAttachedWindowFrames(WindowState win, int fl, int adjust,
WindowState attached, boolean insetDecors, Rect pf, Rect df, Rect cf, Rect vf) {
if (win.getSurfaceLayer() > mDockLayer && attached.getSurfaceLayer() < mDockLayer) {
@@ -2427,7 +2430,6 @@
final Rect pf = mTmpParentFrame;
final Rect df = mTmpDisplayFrame;
- final Rect sf = mTmpSystemFrame;
final Rect cf = mTmpContentFrame;
final Rect vf = mTmpVisibleFrame;
@@ -2671,20 +2673,6 @@
df.right = df.bottom = cf.right = cf.bottom = vf.right = vf.bottom = 10000;
}
- // Compute the system frame. This is easy: for things behind the
- // status bar, it is any application windows; otherwise it is not set.
- int parentType = attached != null ? attached.getAttrs().type : attrs.type;
- if (win.getSurfaceLayer() < mStatusBarLayer
- && parentType < WindowManager.LayoutParams.FIRST_SYSTEM_WINDOW) {
- sf.left = mSystemLeft;
- sf.top = mSystemTop;
- sf.right = mSystemRight;
- sf.bottom = mSystemBottom;
- } else {
- sf.left = sf.top = -10000;
- sf.right = sf.bottom = 10000;
- }
-
if (DEBUG_LAYOUT) Log.v(TAG, "Compute frame " + attrs.getTitle()
+ ": sim=#" + Integer.toHexString(sim)
+ " attach=" + attached + " type=" + attrs.type
@@ -2692,7 +2680,7 @@
+ " pf=" + pf.toShortString() + " df=" + df.toShortString()
+ " cf=" + cf.toShortString() + " vf=" + vf.toShortString());
- win.computeFrameLw(pf, df, sf, cf, vf);
+ win.computeFrameLw(pf, df, cf, vf);
// Dock windows carve out the bottom of the screen, so normal windows
// can't appear underneath them.
diff --git a/services/input/InputReader.h b/services/input/InputReader.h
index 03198a6..122a2ab 100644
--- a/services/input/InputReader.h
+++ b/services/input/InputReader.h
@@ -22,6 +22,8 @@
#include "InputListener.h"
#include <androidfw/Input.h>
+#include <androidfw/VelocityControl.h>
+#include <androidfw/VelocityTracker.h>
#include <ui/DisplayInfo.h>
#include <utils/KeyedVector.h>
#include <utils/threads.h>
diff --git a/services/input/PointerController.h b/services/input/PointerController.h
index 39dbf6b..4c307c4 100644
--- a/services/input/PointerController.h
+++ b/services/input/PointerController.h
@@ -21,6 +21,7 @@
#include <ui/DisplayInfo.h>
#include <androidfw/Input.h>
+#include <utils/BitSet.h>
#include <utils/RefBase.h>
#include <utils/Looper.h>
#include <utils/String8.h>
diff --git a/services/java/com/android/server/PowerManagerService.java b/services/java/com/android/server/PowerManagerService.java
index 289ab2a..2cc2704 100644
--- a/services/java/com/android/server/PowerManagerService.java
+++ b/services/java/com/android/server/PowerManagerService.java
@@ -17,8 +17,8 @@
package com.android.server;
import com.android.internal.app.IBatteryStats;
-import com.android.internal.app.ShutdownThread;
import com.android.server.am.BatteryStatsService;
+import com.android.server.pm.ShutdownThread;
import android.app.ActivityManagerNative;
import android.app.IActivityManager;
@@ -47,7 +47,6 @@
import android.os.IPowerManager;
import android.os.LocalPowerManager;
import android.os.Message;
-import android.os.Power;
import android.os.PowerManager;
import android.os.Process;
import android.os.RemoteException;
@@ -71,6 +70,7 @@
import static android.provider.Settings.System.TRANSITION_ANIMATION_SCALE;
import java.io.FileDescriptor;
+import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
@@ -84,6 +84,12 @@
private static final String TAG = "PowerManagerService";
static final String PARTIAL_NAME = "PowerManagerService";
+ // Wake lock that ensures that the CPU is running. The screen might not be on.
+ private static final int PARTIAL_WAKE_LOCK_ID = 1;
+
+ // Wake lock that ensures that the screen is on.
+ private static final int FULL_WAKE_LOCK_ID = 2;
+
static final boolean DEBUG_SCREEN_ON = false;
private static final boolean LOG_PARTIAL_WL = false;
@@ -134,6 +140,10 @@
// Screen brightness should always have a value, but just in case...
private static final int DEFAULT_SCREEN_BRIGHTNESS = 192;
+ // Threshold for BRIGHTNESS_LOW_BATTERY (percentage)
+ // Screen will stay dim if battery level is <= LOW_BATTERY_THRESHOLD
+ private static final int LOW_BATTERY_THRESHOLD = 10;
+
// flags for setPowerState
private static final int ALL_LIGHTS_OFF = 0x00000000;
private static final int SCREEN_ON_BIT = 0x00000001;
@@ -175,8 +185,8 @@
// we should read them from the driver, but our current hardware returns 0
// for the initial value. Oops!
static final int INITIAL_SCREEN_BRIGHTNESS = 255;
- static final int INITIAL_BUTTON_BRIGHTNESS = Power.BRIGHTNESS_OFF;
- static final int INITIAL_KEYBOARD_BRIGHTNESS = Power.BRIGHTNESS_OFF;
+ static final int INITIAL_BUTTON_BRIGHTNESS = PowerManager.BRIGHTNESS_OFF;
+ static final int INITIAL_KEYBOARD_BRIGHTNESS = PowerManager.BRIGHTNESS_OFF;
private final int MY_UID;
private final int MY_PID;
@@ -296,6 +306,11 @@
private native void nativeInit();
private native void nativeSetPowerState(boolean screenOn, boolean screenBright);
private native void nativeStartSurfaceFlingerAnimation(int mode);
+ private static native void nativeAcquireWakeLock(int lock, String id);
+ private static native void nativeReleaseWakeLock(String id);
+ private static native int nativeSetScreenState(boolean on);
+ private static native void nativeShutdown();
+ private static native void nativeReboot(String reason) throws IOException;
/*
static PrintStream mLog;
@@ -515,14 +530,13 @@
MY_PID = Process.myPid();
Binder.restoreCallingIdentity(token);
- // XXX remove this when the kernel doesn't timeout wake locks
- Power.setLastUserActivityTimeout(7*24*3600*1000); // one week
-
// assume nothing is on yet
mUserState = mPowerState = 0;
// Add ourself to the Watchdog monitors.
Watchdog.getInstance().addMonitor(this);
+
+ nativeInit();
}
private ContentQueryMap mSettings;
@@ -541,11 +555,6 @@
mAttentionLight = lights.getLight(LightsService.LIGHT_ID_ATTENTION);
mHeadless = "1".equals(SystemProperties.get("ro.config.headless", "0"));
- nativeInit();
- synchronized (mLocks) {
- updateNativePowerStateLocked();
- }
-
mInitComplete = false;
mScreenBrightnessAnimator = new ScreenBrightnessAnimator("mScreenBrightnessUpdaterThread",
Process.THREAD_PRIORITY_DISPLAY);
@@ -581,8 +590,6 @@
}
}
- nativeInit();
- Power.powerInitNative();
synchronized (mLocks) {
updateNativePowerStateLocked();
// We make sure to start out with the screen on due to user activity.
@@ -686,6 +693,26 @@
}
}
+ /**
+ * Low-level function turn the device off immediately, without trying
+ * to be clean. Most people should use
+ * {@link com.android.server.pm.internal.app.ShutdownThread} for a clean shutdown.
+ */
+ public static void lowLevelShutdown() {
+ nativeShutdown();
+ }
+
+ /**
+ * Low-level function to reboot the device.
+ *
+ * @param reason code to pass to the kernel (e.g. "recovery"), or null.
+ * @throws IOException if reboot fails for some reason (eg, lack of
+ * permission)
+ */
+ public static void lowLevelReboot(String reason) throws IOException {
+ nativeReboot(reason);
+ }
+
private class WakeLock implements IBinder.DeathRecipient
{
WakeLock(int f, IBinder b, String t, int u, int p) {
@@ -926,7 +953,7 @@
if (LOG_PARTIAL_WL) EventLog.writeEvent(EventLogTags.POWER_PARTIAL_WAKE_STATE, 1, tag);
}
}
- Power.acquireWakeLock(Power.PARTIAL_WAKE_LOCK,PARTIAL_NAME);
+ nativeAcquireWakeLock(PARTIAL_WAKE_LOCK_ID, PARTIAL_NAME);
}
if (diffsource) {
@@ -1010,7 +1037,7 @@
mPartialCount--;
if (mPartialCount == 0) {
if (LOG_PARTIAL_WL) EventLog.writeEvent(EventLogTags.POWER_PARTIAL_WAKE_STATE, 0, wl.tag);
- Power.releaseWakeLock(PARTIAL_NAME);
+ nativeReleaseWakeLock(PARTIAL_NAME);
}
}
// Unlink the lock from the binder.
@@ -1719,10 +1746,10 @@
+ " mSkippedScreenOn=" + mSkippedScreenOn);
}
mScreenBrightnessHandler.removeMessages(ScreenBrightnessAnimator.ANIMATE_LIGHTS);
- mScreenBrightnessAnimator.animateTo(Power.BRIGHTNESS_OFF, SCREEN_BRIGHT_BIT, 0);
+ mScreenBrightnessAnimator.animateTo(PowerManager.BRIGHTNESS_OFF, SCREEN_BRIGHT_BIT, 0);
}
}
- int err = Power.setScreenState(on);
+ int err = nativeSetScreenState(on);
if (err == 0) {
mLastScreenOnTime = (on ? SystemClock.elapsedRealtime() : 0);
if (mUseSoftwareAutoBrightness) {
@@ -1934,7 +1961,7 @@
private boolean batteryIsLow() {
return (!mIsPowered &&
- mBatteryService.getBatteryLevel() <= Power.LOW_BATTERY_THRESHOLD);
+ mBatteryService.getBatteryLevel() <= LOW_BATTERY_THRESHOLD);
}
private boolean shouldDeferScreenOnLocked() {
@@ -2024,7 +2051,7 @@
nominalCurrentValue = mScreenBrightnessDim;
break;
case 0:
- nominalCurrentValue = Power.BRIGHTNESS_OFF;
+ nominalCurrentValue = PowerManager.BRIGHTNESS_OFF;
break;
case SCREEN_BRIGHT_BIT:
default:
@@ -2050,7 +2077,7 @@
// was dim
steps = (int)(ANIM_STEPS*ratio*scale);
}
- brightness = Power.BRIGHTNESS_OFF;
+ brightness = PowerManager.BRIGHTNESS_OFF;
} else {
if ((oldState & SCREEN_ON_BIT) != 0) {
// was bright
@@ -2101,13 +2128,13 @@
if (offMask != 0) {
if (mSpew) Slog.i(TAG, "Setting brightess off: " + offMask);
- setLightBrightness(offMask, Power.BRIGHTNESS_OFF);
+ setLightBrightness(offMask, PowerManager.BRIGHTNESS_OFF);
}
if (dimMask != 0) {
int brightness = mScreenBrightnessDim;
if ((newState & BATTERY_LOW_BIT) != 0 &&
- brightness > Power.BRIGHTNESS_LOW_BATTERY) {
- brightness = Power.BRIGHTNESS_LOW_BATTERY;
+ brightness > PowerManager.BRIGHTNESS_LOW_BATTERY) {
+ brightness = PowerManager.BRIGHTNESS_LOW_BATTERY;
}
if (mSpew) Slog.i(TAG, "Setting brightess dim " + brightness + ": " + dimMask);
setLightBrightness(dimMask, brightness);
@@ -2115,8 +2142,8 @@
if (onMask != 0) {
int brightness = getPreferredBrightness();
if ((newState & BATTERY_LOW_BIT) != 0 &&
- brightness > Power.BRIGHTNESS_LOW_BATTERY) {
- brightness = Power.BRIGHTNESS_LOW_BATTERY;
+ brightness > PowerManager.BRIGHTNESS_LOW_BATTERY) {
+ brightness = PowerManager.BRIGHTNESS_LOW_BATTERY;
}
if (mSpew) Slog.i(TAG, "Setting brightess on " + brightness + ": " + onMask);
setLightBrightness(onMask, brightness);
@@ -2198,8 +2225,8 @@
if (elapsed < duration) {
int delta = endValue - startValue;
newValue = startValue + delta * elapsed / duration;
- newValue = Math.max(Power.BRIGHTNESS_OFF, newValue);
- newValue = Math.min(Power.BRIGHTNESS_ON, newValue);
+ newValue = Math.max(PowerManager.BRIGHTNESS_OFF, newValue);
+ newValue = Math.min(PowerManager.BRIGHTNESS_ON, newValue);
} else {
newValue = endValue;
mInitialAnimation = false;
@@ -2249,7 +2276,7 @@
if (target != currentValue) {
final boolean doScreenAnim = (mask & (SCREEN_BRIGHT_BIT | SCREEN_ON_BIT)) != 0;
- final boolean turningOff = endValue == Power.BRIGHTNESS_OFF;
+ final boolean turningOff = endValue == PowerManager.BRIGHTNESS_OFF;
if (turningOff && doScreenAnim) {
// Cancel all pending animations since we're turning off
mScreenBrightnessHandler.removeCallbacksAndMessages(null);
@@ -2353,7 +2380,7 @@
private boolean isScreenTurningOffLocked() {
return (mScreenBrightnessAnimator.isAnimating()
- && mScreenBrightnessAnimator.endValue == Power.BRIGHTNESS_OFF);
+ && mScreenBrightnessAnimator.endValue == PowerManager.BRIGHTNESS_OFF);
}
private boolean shouldLog(long time) {
diff --git a/services/java/com/android/server/ShutdownActivity.java b/services/java/com/android/server/ShutdownActivity.java
index c9d4d01..d85abe6 100644
--- a/services/java/com/android/server/ShutdownActivity.java
+++ b/services/java/com/android/server/ShutdownActivity.java
@@ -22,7 +22,8 @@
import android.os.Bundle;
import android.os.Handler;
import android.util.Slog;
-import com.android.internal.app.ShutdownThread;
+
+import com.android.server.pm.ShutdownThread;
public class ShutdownActivity extends Activity {
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 849281d..d9833ab 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -46,7 +46,6 @@
import android.util.Slog;
import android.view.WindowManager;
-import com.android.internal.app.ShutdownThread;
import com.android.internal.os.BinderInternal;
import com.android.internal.os.SamplingProfilerIntegration;
import com.android.internal.widget.LockSettingsService;
@@ -56,6 +55,7 @@
import com.android.server.net.NetworkPolicyManagerService;
import com.android.server.net.NetworkStatsService;
import com.android.server.pm.PackageManagerService;
+import com.android.server.pm.ShutdownThread;
import com.android.server.usb.UsbService;
import com.android.server.wm.WindowManagerService;
diff --git a/services/java/com/android/server/input/InputManagerService.java b/services/java/com/android/server/input/InputManagerService.java
index 299649d..9e94b52 100644
--- a/services/java/com/android/server/input/InputManagerService.java
+++ b/services/java/com/android/server/input/InputManagerService.java
@@ -597,7 +597,7 @@
visitAllKeyboardLayouts(new KeyboardLayoutVisitor() {
@Override
public void visitKeyboardLayout(Resources resources,
- String descriptor, String label, int kcmResId) {
+ String descriptor, String label, int keyboardLayoutResId) {
list.add(new KeyboardLayout(descriptor, label));
}
});
@@ -614,7 +614,7 @@
visitKeyboardLayout(keyboardLayoutDescriptor, new KeyboardLayoutVisitor() {
@Override
public void visitKeyboardLayout(Resources resources,
- String descriptor, String label, int kcmResId) {
+ String descriptor, String label, int keyboardLayoutResId) {
result[0] = new KeyboardLayout(descriptor, label);
}
});
@@ -683,10 +683,11 @@
com.android.internal.R.styleable.KeyboardLayout_name);
String label = a.getString(
com.android.internal.R.styleable.KeyboardLayout_label);
- int kcmResId = a.getResourceId(
- com.android.internal.R.styleable.KeyboardLayout_kcm, 0);
- if (name == null || label == null || kcmResId == 0) {
- Log.w(TAG, "Missing required 'name', 'label' or 'kcm' "
+ int keyboardLayoutResId = a.getResourceId(
+ com.android.internal.R.styleable.KeyboardLayout_keyboardLayout,
+ 0);
+ if (name == null || label == null || keyboardLayoutResId == 0) {
+ Log.w(TAG, "Missing required 'name', 'label' or 'keyboardLayout' "
+ "attributes in keyboard layout "
+ "resource from receiver "
+ receiver.packageName + "/" + receiver.name);
@@ -695,7 +696,7 @@
receiver.packageName, receiver.name, name);
if (keyboardName == null || name.equals(keyboardName)) {
visitor.visitKeyboardLayout(resources, descriptor,
- label, kcmResId);
+ label, keyboardLayoutResId);
}
}
} finally {
@@ -1138,11 +1139,11 @@
visitKeyboardLayout(keyboardLayoutDescriptor, new KeyboardLayoutVisitor() {
@Override
public void visitKeyboardLayout(Resources resources,
- String descriptor, String label, int kcmResId) {
+ String descriptor, String label, int keyboardLayoutResId) {
try {
result[0] = descriptor;
result[1] = Streams.readFully(new InputStreamReader(
- resources.openRawResource(kcmResId)));
+ resources.openRawResource(keyboardLayoutResId)));
} catch (IOException ex) {
} catch (NotFoundException ex) {
}
@@ -1261,7 +1262,7 @@
private interface KeyboardLayoutVisitor {
void visitKeyboardLayout(Resources resources,
- String descriptor, String label, int kcmResId);
+ String descriptor, String label, int keyboardLayoutResId);
}
private final class InputDevicesChangedListenerRecord implements DeathRecipient {
diff --git a/services/java/com/android/server/pm/PackageManagerService.java b/services/java/com/android/server/pm/PackageManagerService.java
index d41cd5a..d7c5eea 100644
--- a/services/java/com/android/server/pm/PackageManagerService.java
+++ b/services/java/com/android/server/pm/PackageManagerService.java
@@ -98,6 +98,7 @@
import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.UserId;
+import android.provider.Settings.Secure;
import android.security.SystemKeyStore;
import android.util.DisplayMetrics;
import android.util.EventLog;
@@ -9259,7 +9260,8 @@
mContext.enforceCallingOrSelfPermission(GRANT_REVOKE_PERMISSIONS, null);
if (READ_EXTERNAL_STORAGE.equals(permission)) {
synchronized (mPackages) {
- if (mSettings.mReadExternalStorageEnforced != enforced) {
+ if (mSettings.mReadExternalStorageEnforced == null
+ || mSettings.mReadExternalStorageEnforced != enforced) {
mSettings.mReadExternalStorageEnforced = enforced;
mSettings.writeLPr();
@@ -9284,7 +9286,6 @@
@Override
public boolean isPermissionEnforced(String permission) {
- mContext.enforceCallingOrSelfPermission(GRANT_REVOKE_PERMISSIONS, null);
synchronized (mPackages) {
return isPermissionEnforcedLocked(permission);
}
@@ -9292,7 +9293,13 @@
private boolean isPermissionEnforcedLocked(String permission) {
if (READ_EXTERNAL_STORAGE.equals(permission)) {
- return mSettings.mReadExternalStorageEnforced;
+ if (mSettings.mReadExternalStorageEnforced != null) {
+ return mSettings.mReadExternalStorageEnforced;
+ } else {
+ // if user hasn't defined, fall back to secure default
+ return Secure.getInt(mContext.getContentResolver(),
+ Secure.READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT, 0) != 0;
+ }
} else {
return true;
}
diff --git a/services/java/com/android/server/pm/Settings.java b/services/java/com/android/server/pm/Settings.java
index d0eda2d..ffb69fa 100644
--- a/services/java/com/android/server/pm/Settings.java
+++ b/services/java/com/android/server/pm/Settings.java
@@ -111,7 +111,7 @@
int mInternalSdkPlatform;
int mExternalSdkPlatform;
- boolean mReadExternalStorageEnforced = PackageManager.DEFAULT_ENFORCE_READ_EXTERNAL_STORAGE;
+ Boolean mReadExternalStorageEnforced;
/** Device identity for the purpose of package verification. */
private VerifierDeviceIdentity mVerifierDeviceIdentity;
@@ -1147,8 +1147,7 @@
serializer.endTag(null, "verifier");
}
- if (mReadExternalStorageEnforced
- != PackageManager.DEFAULT_ENFORCE_READ_EXTERNAL_STORAGE) {
+ if (mReadExternalStorageEnforced != null) {
serializer.startTag(null, TAG_READ_EXTERNAL_STORAGE);
serializer.attribute(
null, ATTR_ENFORCEMENT, mReadExternalStorageEnforced ? "1" : "0");
diff --git a/core/java/com/android/internal/app/ShutdownThread.java b/services/java/com/android/server/pm/ShutdownThread.java
similarity index 98%
rename from core/java/com/android/internal/app/ShutdownThread.java
rename to services/java/com/android/server/pm/ShutdownThread.java
index d867ff9..1d6e068 100644
--- a/core/java/com/android/internal/app/ShutdownThread.java
+++ b/services/java/com/android/server/pm/ShutdownThread.java
@@ -15,7 +15,7 @@
*/
-package com.android.internal.app;
+package com.android.server.pm;
import android.app.ActivityManagerNative;
import android.app.AlertDialog;
@@ -32,7 +32,6 @@
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Handler;
-import android.os.Power;
import android.os.PowerManager;
import android.os.RemoteException;
import android.os.ServiceManager;
@@ -44,6 +43,8 @@
import android.os.storage.IMountShutdownObserver;
import com.android.internal.telephony.ITelephony;
+import com.android.server.PowerManagerService;
+
import android.util.Log;
import android.view.WindowManager;
@@ -456,7 +457,7 @@
if (reboot) {
Log.i(TAG, "Rebooting, reason: " + reason);
try {
- Power.reboot(reason);
+ PowerManagerService.lowLevelReboot(reason);
} catch (Exception e) {
Log.e(TAG, "Reboot failed, will attempt shutdown instead", e);
}
@@ -479,6 +480,6 @@
// Shutdown power
Log.i(TAG, "Performing low-level shutdown...");
- Power.shutdown();
+ PowerManagerService.lowLevelShutdown();
}
}
diff --git a/services/java/com/android/server/wm/Session.java b/services/java/com/android/server/wm/Session.java
index 53c0e07..61c0e9c 100644
--- a/services/java/com/android/server/wm/Session.java
+++ b/services/java/com/android/server/wm/Session.java
@@ -151,13 +151,13 @@
public int relayout(IWindow window, int seq, WindowManager.LayoutParams attrs,
int requestedWidth, int requestedHeight, int viewFlags,
- int flags, Rect outFrame, Rect outSystemInsets, Rect outContentInsets,
+ int flags, Rect outFrame, Rect outContentInsets,
Rect outVisibleInsets, Configuration outConfig, Surface outSurface) {
if (false) Slog.d(WindowManagerService.TAG, ">>>>>> ENTERED relayout from "
+ Binder.getCallingPid());
int res = mService.relayoutWindow(this, window, seq, attrs,
requestedWidth, requestedHeight, viewFlags, flags,
- outFrame, outSystemInsets, outContentInsets, outVisibleInsets,
+ outFrame, outContentInsets, outVisibleInsets,
outConfig, outSurface);
if (false) Slog.d(WindowManagerService.TAG, "<<<<<< EXITING relayout to "
+ Binder.getCallingPid());
diff --git a/services/java/com/android/server/wm/WindowAnimator.java b/services/java/com/android/server/wm/WindowAnimator.java
index 146de34..480992b 100644
--- a/services/java/com/android/server/wm/WindowAnimator.java
+++ b/services/java/com/android/server/wm/WindowAnimator.java
@@ -269,7 +269,7 @@
mPendingLayoutChanges);
}
mService.mFocusMayChange = true;
- } else if (win.isReadyForDisplay() && winAnimator.mAnimation == null) {
+ } else if (win.isReadyForDisplay()) {
mForceHiding = true;
}
} else if (mPolicy.canBeForceHidden(win, win.mAttrs)) {
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index 2efcb8e..b3ac6f1 100755
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -34,7 +34,6 @@
import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER;
import com.android.internal.app.IBatteryStats;
-import com.android.internal.app.ShutdownThread;
import com.android.internal.policy.PolicyManager;
import com.android.internal.policy.impl.PhoneWindowManager;
import com.android.internal.view.IInputContext;
@@ -48,6 +47,7 @@
import com.android.server.am.BatteryStatsService;
import com.android.server.input.InputFilter;
import com.android.server.input.InputManagerService;
+import com.android.server.pm.ShutdownThread;
import android.Manifest;
import android.app.ActivityManagerNative;
@@ -82,7 +82,6 @@
import android.os.Message;
import android.os.Parcel;
import android.os.ParcelFileDescriptor;
-import android.os.Power;
import android.os.PowerManager;
import android.os.Process;
import android.os.RemoteException;
@@ -480,6 +479,9 @@
= new ArrayList<IRotationWatcher>();
int mDeferredRotationPauseCount;
+ final Rect mSystemDecorRect = new Rect();
+ int mSystemDecorLayer = 0;
+
int mPendingLayoutChanges = 0;
boolean mLayoutNeeded = true;
boolean mTraversalScheduled = false;
@@ -2647,7 +2649,7 @@
public int relayoutWindow(Session session, IWindow client, int seq,
WindowManager.LayoutParams attrs, int requestedWidth,
int requestedHeight, int viewVisibility, int flags,
- Rect outFrame, Rect outSystemInsets, Rect outContentInsets,
+ Rect outFrame, Rect outContentInsets,
Rect outVisibleInsets, Configuration outConfig, Surface outSurface) {
boolean displayed = false;
boolean inTouchMode;
@@ -2939,7 +2941,6 @@
win.mAppToken.updateReportedVisibilityLocked();
}
outFrame.set(win.mCompatFrame);
- outSystemInsets.set(win.mSystemInsets);
outContentInsets.set(win.mContentInsets);
outVisibleInsets.set(win.mVisibleInsets);
if (localLOGV) Slog.v(
@@ -3222,28 +3223,23 @@
// Entering app zooms out from the center of the thumbnail.
float scaleW = thumbWidth / mAppDisplayWidth;
float scaleH = thumbHeight / mAppDisplayHeight;
- AnimationSet set = new AnimationSet(true);
Animation scale = new ScaleAnimation(scaleW, 1, scaleH, 1,
computePivot(mNextAppTransitionStartX, scaleW),
computePivot(mNextAppTransitionStartY, scaleH));
scale.setDuration(duration);
scale.setFillBefore(true);
- set.addAnimation(scale);
- // Need to set an alpha animation on the entering app window
- // in case it appears one frame before the thumbnail window
- // (this solves flicker)
- Animation alpha = new AlphaAnimation(0, 1);
- alpha.setDuration(1);
- alpha.setFillAfter(true);
- set.addAnimation(alpha);
- a = set;
if (delayDuration > 0) {
- a.setStartOffset(delayDuration);
+ scale.setStartOffset(delayDuration);
}
+ a = scale;
} else {
- a = createExitAnimationLocked(transit, duration);
- if (delayDuration > 0) {
- a.setStartOffset(delayDuration);
+ if (delayed) {
+ a = new AlphaAnimation(1, 0);
+ a.setStartOffset(0);
+ a.setDuration(delayDuration - 50);
+ a.setBackgroundColor(0xFF000000);
+ } else {
+ a = createExitAnimationLocked(transit, duration);
}
}
a.setFillAfter(true);
@@ -5025,6 +5021,18 @@
return mInputManager.monitorInput(inputChannelName);
}
+ // Called by window manager policy. Not exposed externally.
+ @Override
+ public void shutdown() {
+ ShutdownThread.shutdown(mContext, true);
+ }
+
+ // Called by window manager policy. Not exposed externally.
+ @Override
+ public void rebootSafeMode() {
+ ShutdownThread.rebootSafeMode(mContext, true);
+ }
+
public void setInputFilter(InputFilter filter) {
mInputManager.setInputFilter(filter);
}
@@ -7710,6 +7718,7 @@
}
mPolicy.beginLayoutLw(dw, dh, mRotation);
+ mSystemDecorLayer = mPolicy.getSystemDecorRectLw(mSystemDecorRect);
int seq = mLayoutSeq+1;
if (seq < 0) seq = 0;
@@ -8172,8 +8181,6 @@
private void updateResizingWindows(final WindowState w) {
final WindowStateAnimator winAnimator = w.mWinAnimator;
if (w.mHasSurface && !w.mAppFreezing && w.mLayoutSeq == mLayoutSeq) {
- w.mSystemInsetsChanged |=
- !w.mLastSystemInsets.equals(w.mSystemInsets);
w.mContentInsetsChanged |=
!w.mLastContentInsets.equals(w.mContentInsets);
w.mVisibleInsetsChanged |=
@@ -8190,8 +8197,7 @@
+ ": configChanged=" + configChanged
+ " last=" + w.mLastFrame + " frame=" + w.mFrame);
w.mLastFrame.set(w.mFrame);
- if (w.mSystemInsetsChanged
- || w.mContentInsetsChanged
+ if (w.mContentInsetsChanged
|| w.mVisibleInsetsChanged
|| winAnimator.mSurfaceResized
|| configChanged) {
@@ -8203,7 +8209,6 @@
+ " configChanged=" + configChanged);
}
- w.mLastSystemInsets.set(w.mSystemInsets);
w.mLastContentInsets.set(w.mContentInsets);
w.mLastVisibleInsets.set(w.mVisibleInsets);
makeWindowFreezingScreenIfNeededLocked(w);
@@ -8587,11 +8592,10 @@
winAnimator.mDrawState == WindowStateAnimator.DRAW_PENDING) Slog.i(
TAG, "Resizing " + win + " WITH DRAW PENDING");
win.mClient.resized((int)winAnimator.mSurfaceW,
- (int)winAnimator.mSurfaceH, win.mLastSystemInsets,
+ (int)winAnimator.mSurfaceH,
win.mLastContentInsets, win.mLastVisibleInsets,
winAnimator.mDrawState == WindowStateAnimator.DRAW_PENDING,
configChanged ? win.mConfiguration : null);
- win.mSystemInsetsChanged = false;
win.mContentInsetsChanged = false;
win.mVisibleInsetsChanged = false;
winAnimator.mSurfaceResized = false;
@@ -8700,13 +8704,13 @@
mPowerManager.setScreenBrightnessOverride(-1);
} else {
mPowerManager.setScreenBrightnessOverride((int)
- (mInnerFields.mScreenBrightness * Power.BRIGHTNESS_ON));
+ (mInnerFields.mScreenBrightness * PowerManager.BRIGHTNESS_ON));
}
if (mInnerFields.mButtonBrightness < 0 || mInnerFields.mButtonBrightness > 1.0f) {
mPowerManager.setButtonBrightnessOverride(-1);
} else {
mPowerManager.setButtonBrightnessOverride((int)
- (mInnerFields.mButtonBrightness * Power.BRIGHTNESS_ON));
+ (mInnerFields.mButtonBrightness * PowerManager.BRIGHTNESS_ON));
}
}
if (mInnerFields.mHoldScreen != mHoldingScreenOn) {
@@ -9582,6 +9586,8 @@
pw.print(" mInTouchMode="); pw.print(mInTouchMode);
pw.print(" mLayoutSeq="); pw.println(mLayoutSeq);
if (dumpAll) {
+ pw.print(" mSystemDecorRect="); pw.print(mSystemDecorRect.toShortString());
+ pw.print(" mSystemDecorLayer="); pw.println(mSystemDecorLayer);
if (mLastStatusBarVisibility != 0) {
pw.print(" mLastStatusBarVisibility=0x");
pw.println(Integer.toHexString(mLastStatusBarVisibility));
diff --git a/services/java/com/android/server/wm/WindowState.java b/services/java/com/android/server/wm/WindowState.java
index 05e7d3a..1fd80c2 100644
--- a/services/java/com/android/server/wm/WindowState.java
+++ b/services/java/com/android/server/wm/WindowState.java
@@ -133,14 +133,6 @@
boolean mContentInsetsChanged;
/**
- * Insets that are covered by system windows such as the status bar. These
- * are in the application's coordinate space (without compatibility scale applied).
- */
- final Rect mSystemInsets = new Rect();
- final Rect mLastSystemInsets = new Rect();
- boolean mSystemInsetsChanged;
-
- /**
* Set to true if we are waiting for this window to receive its
* given internal insets before laying out other windows based on it.
*/
@@ -171,6 +163,13 @@
*/
int mTouchableInsets = ViewTreeObserver.InternalInsetsInfo.TOUCHABLE_INSETS_FRAME;
+ /**
+ * This is rectangle of the window's surface that is not covered by
+ * system decorations.
+ */
+ final Rect mSystemDecorRect = new Rect();
+ final Rect mLastSystemDecorRect = new Rect();
+
// Current transformation being applied.
float mGlobalScale=1;
float mInvGlobalScale=1;
@@ -187,7 +186,6 @@
final Rect mContainingFrame = new Rect();
final Rect mDisplayFrame = new Rect();
- final Rect mSystemFrame = new Rect();
final Rect mContentFrame = new Rect();
final Rect mParentFrame = new Rect();
final Rect mVisibleFrame = new Rect();
@@ -356,7 +354,7 @@
}
@Override
- public void computeFrameLw(Rect pf, Rect df, Rect sf, Rect cf, Rect vf) {
+ public void computeFrameLw(Rect pf, Rect df, Rect cf, Rect vf) {
mHaveFrame = true;
final Rect container = mContainingFrame;
@@ -413,9 +411,6 @@
mContentChanged = true;
}
- final Rect system = mSystemFrame;
- system.set(sf);
-
final Rect content = mContentFrame;
content.set(cf);
@@ -449,10 +444,6 @@
// Make sure the system, content and visible frames are inside of the
// final window frame.
- if (system.left < frame.left) system.left = frame.left;
- if (system.top < frame.top) system.top = frame.top;
- if (system.right > frame.right) system.right = frame.right;
- if (system.bottom > frame.bottom) system.bottom = frame.bottom;
if (content.left < frame.left) content.left = frame.left;
if (content.top < frame.top) content.top = frame.top;
if (content.right > frame.right) content.right = frame.right;
@@ -462,12 +453,6 @@
if (visible.right > frame.right) visible.right = frame.right;
if (visible.bottom > frame.bottom) visible.bottom = frame.bottom;
- final Rect systemInsets = mSystemInsets;
- systemInsets.left = system.left-frame.left;
- systemInsets.top = system.top-frame.top;
- systemInsets.right = frame.right-system.right;
- systemInsets.bottom = frame.bottom-system.bottom;
-
final Rect contentInsets = mContentInsets;
contentInsets.left = content.left-frame.left;
contentInsets.top = content.top-frame.top;
@@ -485,7 +470,6 @@
// If there is a size compatibility scale being applied to the
// window, we need to apply this to its insets so that they are
// reported to the app in its coordinate space.
- systemInsets.scale(mInvGlobalScale);
contentInsets.scale(mInvGlobalScale);
visibleInsets.scale(mInvGlobalScale);
@@ -506,7 +490,6 @@
+ mRequestedWidth + ", mRequestedheight="
+ mRequestedHeight + ") to" + " (pw=" + pw + ", ph=" + ph
+ "): frame=" + mFrame.toShortString()
- + " si=" + systemInsets.toShortString()
+ " ci=" + contentInsets.toShortString()
+ " vi=" + visibleInsets.toShortString());
//}
@@ -529,11 +512,6 @@
}
@Override
- public Rect getSystemFrameLw() {
- return mSystemFrame;
- }
-
- @Override
public Rect getContentFrameLw() {
return mContentFrame;
}
@@ -1067,6 +1045,9 @@
pw.print(prefix); pw.print("mFrame="); mFrame.printShortString(pw);
pw.print(" last="); mLastFrame.printShortString(pw);
pw.println();
+ pw.print(prefix); pw.print("mSystemDecorRect="); mSystemDecorRect.printShortString(pw);
+ pw.print(" last="); mLastSystemDecorRect.printShortString(pw);
+ pw.println();
}
if (mEnforceSizeCompat) {
pw.print(prefix); pw.print("mCompatFrame="); mCompatFrame.printShortString(pw);
@@ -1078,16 +1059,15 @@
pw.print(" parent="); mParentFrame.printShortString(pw);
pw.print(" display="); mDisplayFrame.printShortString(pw);
pw.println();
- pw.print(prefix); pw.print(" system="); mSystemFrame.printShortString(pw);
- pw.print(" content="); mContentFrame.printShortString(pw);
+ pw.print(prefix); pw.print(" content="); mContentFrame.printShortString(pw);
pw.print(" visible="); mVisibleFrame.printShortString(pw);
pw.println();
- pw.print(prefix); pw.print("Cur insets: system="); mSystemInsets.printShortString(pw);
- pw.print(" content="); mContentInsets.printShortString(pw);;
+ pw.print(prefix); pw.print("Cur insets: content=");
+ mContentInsets.printShortString(pw);
pw.print(" visible="); mVisibleInsets.printShortString(pw);
pw.println();
- pw.print(prefix); pw.print("Lst insets: system="); mLastSystemInsets.printShortString(pw);
- pw.print(" content="); mLastContentInsets.printShortString(pw);;
+ pw.print(prefix); pw.print("Lst insets: content=");
+ mLastContentInsets.printShortString(pw);
pw.print(" visible="); mLastVisibleInsets.printShortString(pw);
pw.println();
}
diff --git a/services/java/com/android/server/wm/WindowStateAnimator.java b/services/java/com/android/server/wm/WindowStateAnimator.java
index 293d3e8..0aa1b45 100644
--- a/services/java/com/android/server/wm/WindowStateAnimator.java
+++ b/services/java/com/android/server/wm/WindowStateAnimator.java
@@ -436,8 +436,9 @@
private float mSurfaceTraceAlpha = 0;
private int mLayer;
- private PointF mPosition = new PointF();
- private Point mSize;
+ private final PointF mPosition = new PointF();
+ private final Point mSize = new Point();
+ private final Rect mWindowCrop = new Rect();
private boolean mShown = false;
private String mName = "Not named";
@@ -445,7 +446,7 @@
int pid, int display, int w, int h, int format, int flags) throws
OutOfResourcesException {
super(s, pid, display, w, h, format, flags);
- mSize = new Point(w, h);
+ mSize.set(w, h);
Slog.v(SURFACE_TAG, "ctor: " + this + ". Called by "
+ Debug.getCallers(3));
}
@@ -455,7 +456,7 @@
throws OutOfResourcesException {
super(s, pid, name, display, w, h, format, flags);
mName = name;
- mSize = new Point(w, h);
+ mSize.set(w, h);
Slog.v(SURFACE_TAG, "ctor: " + this + ". Called by "
+ Debug.getCallers(3));
}
@@ -489,7 +490,7 @@
@Override
public void setPosition(float x, float y) {
super.setPosition(x, y);
- mPosition = new PointF(x, y);
+ mPosition.set(x, y);
Slog.v(SURFACE_TAG, "setPosition: " + this + ". Called by "
+ Debug.getCallers(3));
}
@@ -497,12 +498,20 @@
@Override
public void setSize(int w, int h) {
super.setSize(w, h);
- mSize = new Point(w, h);
+ mSize.set(w, h);
Slog.v(SURFACE_TAG, "setSize: " + this + ". Called by "
+ Debug.getCallers(3));
}
@Override
+ public void setWindowCrop(Rect crop) {
+ super.setWindowCrop(crop);
+ mWindowCrop.set(crop);
+ Slog.v(SURFACE_TAG, "setWindowCrop: " + this + ". Called by "
+ + Debug.getCallers(3));
+ }
+
+ @Override
public void hide() {
super.hide();
mShown = false;
@@ -545,7 +554,8 @@
return "Surface " + Integer.toHexString(System.identityHashCode(this)) + " "
+ mName + ": shown=" + mShown + " layer=" + mLayer
+ " alpha=" + mSurfaceTraceAlpha + " " + mPosition.x + "," + mPosition.y
- + " " + mSize.x + "x" + mSize.y;
+ + " " + mSize.x + "x" + mSize.y
+ + " crop=" + mWindowCrop.toShortString();
}
}
@@ -596,6 +606,7 @@
mSurfaceY = 0;
mSurfaceW = w;
mSurfaceH = h;
+ mWin.mLastSystemDecorRect.set(0, 0, 0, 0);
try {
final boolean isHwAccelerated = (attrs.flags &
WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED) != 0;
@@ -991,6 +1002,55 @@
}
}
}
+
+ // Need to recompute a new system decor rect each time.
+ if ((w.mAttrs.flags & LayoutParams.FLAG_SCALED) != 0) {
+ // Currently can't do this cropping for scaled windows. We'll
+ // just keep the crop rect the same as the source surface.
+ w.mSystemDecorRect.set(0, 0, w.mRequestedWidth, w.mRequestedHeight);
+ } else if (w.mLayer >= mService.mSystemDecorLayer) {
+ // Above the decor layer is easy, just use the entire window.
+ w.mSystemDecorRect.set(0, 0, w.mCompatFrame.width(),
+ w.mCompatFrame.height());
+ } else {
+ final Rect decorRect = mService.mSystemDecorRect;
+ // Compute the offset of the window in relation to the decor rect.
+ final int offX = w.mXOffset + w.mFrame.left;
+ final int offY = w.mYOffset + w.mFrame.top;
+ // Initialize the decor rect to the entire frame.
+ w.mSystemDecorRect.set(0, 0, w.mFrame.width(), w.mFrame.height());
+ // Intersect with the decor rect, offsetted by window position.
+ w.mSystemDecorRect.intersect(decorRect.left-offX, decorRect.top-offY,
+ decorRect.right-offX, decorRect.bottom-offY);
+ // If size compatibility is being applied to the window, the
+ // surface is scaled relative to the screen. Also apply this
+ // scaling to the crop rect. We aren't using the standard rect
+ // scale function because we want to round things to make the crop
+ // always round to a larger rect to ensure we don't crop too
+ // much and hide part of the window that should be seen.
+ if (w.mEnforceSizeCompat && w.mInvGlobalScale != 1.0f) {
+ final float scale = w.mInvGlobalScale;
+ w.mSystemDecorRect.left = (int) (w.mSystemDecorRect.left * scale - 0.5f);
+ w.mSystemDecorRect.top = (int) (w.mSystemDecorRect.top * scale - 0.5f);
+ w.mSystemDecorRect.right = (int) ((w.mSystemDecorRect.right+1) * scale - 0.5f);
+ w.mSystemDecorRect.bottom = (int) ((w.mSystemDecorRect.bottom+1) * scale - 0.5f);
+ }
+ }
+
+ if (!w.mSystemDecorRect.equals(w.mLastSystemDecorRect)) {
+ w.mLastSystemDecorRect.set(w.mSystemDecorRect);
+ try {
+ if (WindowManagerService.SHOW_TRANSACTIONS) WindowManagerService.logSurface(w,
+ "CROP " + w.mSystemDecorRect.toShortString(), null);
+ mSurface.setWindowCrop(w.mSystemDecorRect);
+ } catch (RuntimeException e) {
+ Slog.w(TAG, "Error setting crop surface of " + w
+ + " crop=" + w.mSystemDecorRect.toShortString(), e);
+ if (!recoveringMemory) {
+ mService.reclaimSomeSurfaceMemoryLocked(this, "crop", true);
+ }
+ }
+ }
}
public void prepareSurfaceLocked(final boolean recoveringMemory) {
diff --git a/services/jni/Android.mk b/services/jni/Android.mk
index e2bd622..e0a14af 100644
--- a/services/jni/Android.mk
+++ b/services/jni/Android.mk
@@ -23,7 +23,10 @@
frameworks/base/services \
frameworks/base/core/jni \
external/skia/include/core \
- libcore/include
+ libcore/include \
+ libcore/include/libsuspend \
+ $(call include-path-for, libhardware)/hardware \
+ $(call include-path-for, libhardware_legacy)/hardware_legacy \
LOCAL_SHARED_LIBRARIES := \
libandroid_runtime \
@@ -38,7 +41,8 @@
libinput \
libskia \
libgui \
- libusbhost
+ libusbhost \
+ libsuspend
ifeq ($(WITH_MALLOC_LEAK_CHECK),true)
LOCAL_CFLAGS += -DMALLOC_LEAK_CHECK
diff --git a/services/jni/com_android_server_PowerManagerService.cpp b/services/jni/com_android_server_PowerManagerService.cpp
index ce80c1f..a47f8fd 100644
--- a/services/jni/com_android_server_PowerManagerService.cpp
+++ b/services/jni/com_android_server_PowerManagerService.cpp
@@ -24,8 +24,14 @@
#include <limits.h>
#include <android_runtime/AndroidRuntime.h>
-#include <utils/Timers.h>
#include <gui/ISurfaceComposer.h>
+#include <utils/Timers.h>
+#include <utils/misc.h>
+#include <utils/String8.h>
+#include <hardware/power.h>
+#include <hardware_legacy/power.h>
+#include <cutils/android_reboot.h>
+#include <suspend/autosuspend.h>
#include <private/gui/ComposerService.h>
@@ -43,6 +49,7 @@
// ----------------------------------------------------------------------------
static jobject gPowerManagerServiceObj;
+static struct power_module* gPowerModule;
static Mutex gPowerManagerLock;
static bool gScreenOn;
@@ -76,6 +83,13 @@
}
void android_server_PowerManagerService_userActivity(nsecs_t eventTime, int32_t eventType) {
+ if (gPowerModule) {
+ // Tell the power HAL when user activity occurs.
+ if (gPowerModule->powerHint) {
+ gPowerModule->powerHint(gPowerModule, POWER_HINT_INTERACTION, NULL);
+ }
+ }
+
if (gPowerManagerServiceObj) {
// Throttle calls into user activity by event type.
// We're a little conservative about argument checking here in case the caller
@@ -112,33 +126,115 @@
// ----------------------------------------------------------------------------
-static void android_server_PowerManagerService_nativeInit(JNIEnv* env, jobject obj) {
+static void nativeInit(JNIEnv* env, jobject obj) {
gPowerManagerServiceObj = env->NewGlobalRef(obj);
+
+ status_t err = hw_get_module(POWER_HARDWARE_MODULE_ID,
+ (hw_module_t const**)&gPowerModule);
+ if (err) {
+ String8 msg;
+ msg.appendFormat("Couldn't load %s module (%s)",
+ POWER_HARDWARE_MODULE_ID, strerror(-err));
+ ALOGE("%s", msg.string());
+ jniThrowRuntimeException(env, msg.string());
+ return;
+ }
+
+ gPowerModule->init(gPowerModule);
}
-static void android_server_PowerManagerService_nativeSetPowerState(JNIEnv* env,
+static void nativeSetPowerState(JNIEnv* env,
jobject serviceObj, jboolean screenOn, jboolean screenBright) {
AutoMutex _l(gPowerManagerLock);
gScreenOn = screenOn;
gScreenBright = screenBright;
}
-static void android_server_PowerManagerService_nativeStartSurfaceFlingerAnimation(JNIEnv* env,
+static void nativeStartSurfaceFlingerAnimation(JNIEnv* env,
jobject obj, jint mode) {
sp<ISurfaceComposer> s(ComposerService::getComposerService());
s->turnElectronBeamOff(mode);
}
+static void nativeAcquireWakeLock(JNIEnv *env, jobject clazz, jint lock, jstring idObj) {
+ if (idObj == NULL) {
+ jniThrowNullPointerException(env, "id is null");
+ return;
+ }
+
+ const char *id = env->GetStringUTFChars(idObj, NULL);
+
+ acquire_wake_lock(lock, id);
+
+ env->ReleaseStringUTFChars(idObj, id);
+}
+
+static void nativeReleaseWakeLock(JNIEnv *env, jobject clazz, jstring idObj) {
+ if (idObj == NULL) {
+ jniThrowNullPointerException(env, "id is null");
+ return ;
+ }
+
+ const char *id = env->GetStringUTFChars(idObj, NULL);
+
+ release_wake_lock(id);
+
+ env->ReleaseStringUTFChars(idObj, id);
+
+}
+
+static int nativeSetScreenState(JNIEnv *env, jobject clazz, jboolean on) {
+ if (on) {
+ autosuspend_disable();
+ if (gPowerModule) {
+ gPowerModule->setInteractive(gPowerModule, true);
+ }
+ } else {
+ if (gPowerModule) {
+ gPowerModule->setInteractive(gPowerModule, false);
+ }
+ autosuspend_enable();
+ }
+
+ return 0;
+}
+
+static void nativeShutdown(JNIEnv *env, jobject clazz) {
+ android_reboot(ANDROID_RB_POWEROFF, 0, 0);
+}
+
+static void nativeReboot(JNIEnv *env, jobject clazz, jstring reason) {
+ if (reason == NULL) {
+ android_reboot(ANDROID_RB_RESTART, 0, 0);
+ } else {
+ const char *chars = env->GetStringUTFChars(reason, NULL);
+ android_reboot(ANDROID_RB_RESTART2, 0, (char *) chars);
+ env->ReleaseStringUTFChars(reason, chars); // In case it fails.
+ }
+ jniThrowIOException(env, errno);
+}
+
+
// ----------------------------------------------------------------------------
static JNINativeMethod gPowerManagerServiceMethods[] = {
/* name, signature, funcPtr */
{ "nativeInit", "()V",
- (void*) android_server_PowerManagerService_nativeInit },
+ (void*) nativeInit },
{ "nativeSetPowerState", "(ZZ)V",
- (void*) android_server_PowerManagerService_nativeSetPowerState },
+ (void*) nativeSetPowerState },
{ "nativeStartSurfaceFlingerAnimation", "(I)V",
- (void*) android_server_PowerManagerService_nativeStartSurfaceFlingerAnimation },
+ (void*) nativeStartSurfaceFlingerAnimation },
+ { "nativeAcquireWakeLock", "(ILjava/lang/String;)V",
+ (void*) nativeAcquireWakeLock },
+ { "nativeReleaseWakeLock", "(Ljava/lang/String;)V",
+ (void*) nativeReleaseWakeLock },
+ { "nativeSetScreenState", "(Z)I",
+ (void*) nativeSetScreenState },
+ { "nativeShutdown", "()V",
+ (void*) nativeShutdown },
+ { "nativeReboot", "(Ljava/lang/String;)V",
+ (void*) nativeReboot },
};
#define FIND_CLASS(var, className) \
@@ -175,6 +271,8 @@
}
gScreenOn = true;
gScreenBright = true;
+ gPowerManagerServiceObj = NULL;
+ gPowerModule = NULL;
return 0;
}
diff --git a/telephony/java/com/android/internal/telephony/DataConnection.java b/telephony/java/com/android/internal/telephony/DataConnection.java
index da03f76..7c70a7e 100644
--- a/telephony/java/com/android/internal/telephony/DataConnection.java
+++ b/telephony/java/com/android/internal/telephony/DataConnection.java
@@ -31,6 +31,7 @@
import android.os.Message;
import android.os.SystemProperties;
import android.text.TextUtils;
+import android.util.TimeUtils;
import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -1225,21 +1226,6 @@
}
/**
- * Convert a System.currentTimeMillis() value to a time of day value.
- *
- * @param millis since the epoch (1/1/1970)
- * @return String representation of the time.
- */
- private String timeMillisToTimeOfDay(long millis) {
- Calendar c = Calendar.getInstance();
- if (millis >= 0) {
- c.setTimeInMillis(millis);
- return String.format("%tm-%td %tH:%tM:%tS.%tL", c, c, c, c, c, c);
- } else {
- return Long.toString(millis);
- }
- }
- /**
* Dump the current state.
*
* @param fd
@@ -1263,8 +1249,8 @@
pw.println(" mLinkProperties=" + mLinkProperties);
pw.flush();
pw.println(" mCapabilities=" + mCapabilities);
- pw.println(" createTime=" + timeMillisToTimeOfDay(createTime));
- pw.println(" lastFailTime=" + timeMillisToTimeOfDay(lastFailTime));
+ pw.println(" createTime=" + TimeUtils.logTimeOfDay(createTime));
+ pw.println(" lastFailTime=" + TimeUtils.logTimeOfDay(lastFailTime));
pw.println(" lastFailCause=" + lastFailCause);
pw.flush();
pw.println(" mRetryOverride=" + mRetryOverride);
diff --git a/telephony/java/com/android/internal/telephony/IccCard.java b/telephony/java/com/android/internal/telephony/IccCard.java
index 92024cd..d738d7b 100644
--- a/telephony/java/com/android/internal/telephony/IccCard.java
+++ b/telephony/java/com/android/internal/telephony/IccCard.java
@@ -26,7 +26,6 @@
import android.os.AsyncResult;
import android.os.Handler;
import android.os.Message;
-import android.os.Power;
import android.os.PowerManager;
import android.os.Registrant;
import android.os.RegistrantList;
diff --git a/telephony/java/com/android/internal/telephony/ServiceStateTracker.java b/telephony/java/com/android/internal/telephony/ServiceStateTracker.java
index bd78065..69dd666 100644
--- a/telephony/java/com/android/internal/telephony/ServiceStateTracker.java
+++ b/telephony/java/com/android/internal/telephony/ServiceStateTracker.java
@@ -23,6 +23,7 @@
import android.os.RegistrantList;
import android.telephony.ServiceState;
import android.telephony.SignalStrength;
+import android.util.TimeUtils;
import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -507,13 +508,15 @@
// Determine retVal
boolean retVal = ((iccCardExist && (mcc != prevMcc)) || needToFixTimeZone);
if (DBG) {
+ long ctm = System.currentTimeMillis();
log("shouldFixTimeZoneNow: retVal=" + retVal +
" iccCard=" + iccCard +
" iccCard.state=" + (iccCard == null ? "null" : iccCard.getState().toString()) +
" iccCardExist=" + iccCardExist +
" operatorNumeric=" + operatorNumeric + " mcc=" + mcc +
" prevOperatorNumeric=" + prevOperatorNumeric + " prevMcc=" + prevMcc +
- " needToFixTimeZone=" + needToFixTimeZone);
+ " needToFixTimeZone=" + needToFixTimeZone +
+ " ltod=" + TimeUtils.logTimeOfDay(ctm));
}
return retVal;
}
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
index ba2e51a..e4287c0 100755
--- a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
@@ -878,13 +878,19 @@
// For NITZ string without time zone,
// need adjust time to reflect default time zone setting
zone = TimeZone.getDefault();
- long tzOffset;
- tzOffset = zone.getOffset(System.currentTimeMillis());
+ long ctm = System.currentTimeMillis();
+ long tzOffset = zone.getOffset(ctm);
+ if (DBG) {
+ log("fixTimeZone: tzOffset=" + tzOffset + " ltod=" + TimeUtils.logTimeOfDay(ctm));
+ }
if (getAutoTime()) {
- setAndBroadcastNetworkSetTime(System.currentTimeMillis() - tzOffset);
+ long adj = ctm - tzOffset;
+ if (DBG) log("fixTimeZone: adj ltod=" + TimeUtils.logTimeOfDay(adj));
+ setAndBroadcastNetworkSetTime(adj);
} else {
// Adjust the saved NITZ time to account for tzOffset.
mSavedTime = mSavedTime - tzOffset;
+ if (DBG) log("fixTimeZone: adj mSavedTime=" + mSavedTime);
}
if (DBG) log("fixTimeZone: using default TimeZone");
} else if (isoCountryCode.equals("")) {
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
index 4235577..1aa17c7 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
@@ -923,10 +923,16 @@
zone = TimeZone.getDefault();
// For NITZ string without timezone,
// need adjust time to reflect default timezone setting
- long tzOffset;
- tzOffset = zone.getOffset(System.currentTimeMillis());
+ long ctm = System.currentTimeMillis();
+ long tzOffset = zone.getOffset(ctm);
+ if (DBG) {
+ log("pollStateDone: tzOffset=" + tzOffset + " ltod=" +
+ TimeUtils.logTimeOfDay(ctm));
+ }
if (getAutoTime()) {
- setAndBroadcastNetworkSetTime(System.currentTimeMillis() - tzOffset);
+ long adj = ctm - tzOffset;
+ if (DBG) log("pollStateDone: adj ltod=" + TimeUtils.logTimeOfDay(adj));
+ setAndBroadcastNetworkSetTime(adj);
} else {
// Adjust the saved NITZ time to account for tzOffset.
mSavedTime = mSavedTime - tzOffset;
diff --git a/tests/RenderScriptTests/tests/src/com/android/rs/test/RSTestCore.java b/tests/RenderScriptTests/tests/src/com/android/rs/test/RSTestCore.java
index d2e1527..9321cb3 100644
--- a/tests/RenderScriptTests/tests/src/com/android/rs/test/RSTestCore.java
+++ b/tests/RenderScriptTests/tests/src/com/android/rs/test/RSTestCore.java
@@ -69,6 +69,8 @@
unitTests.add(new UT_vector(this, mRes, mCtx));
unitTests.add(new UT_array_init(this, mRes, mCtx));
unitTests.add(new UT_array_alloc(this, mRes, mCtx));
+ unitTests.add(new UT_clamp(this, mRes, mCtx));
+ unitTests.add(new UT_clamp_relaxed(this, mRes, mCtx));
unitTests.add(new UT_convert(this, mRes, mCtx));
unitTests.add(new UT_rsdebug(this, mRes, mCtx));
unitTests.add(new UT_rstime(this, mRes, mCtx));
diff --git a/tests/RenderScriptTests/tests/src/com/android/rs/test/UT_clamp.java b/tests/RenderScriptTests/tests/src/com/android/rs/test/UT_clamp.java
new file mode 100644
index 0000000..08c96bb
--- /dev/null
+++ b/tests/RenderScriptTests/tests/src/com/android/rs/test/UT_clamp.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2012 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.rs.test;
+
+import android.content.Context;
+import android.content.res.Resources;
+import android.renderscript.*;
+
+public class UT_clamp extends UnitTest {
+ private Resources mRes;
+
+ protected UT_clamp(RSTestCore rstc, Resources res, Context ctx) {
+ super(rstc, "Clamp (Full)", ctx);
+ mRes = res;
+ }
+
+ public void run() {
+ RenderScript pRS = RenderScript.create(mCtx);
+ ScriptC_clamp s = new ScriptC_clamp(pRS, mRes, R.raw.clamp);
+ pRS.setMessageHandler(mRsMessage);
+ s.invoke_clamp_test();
+ pRS.finish();
+ waitForMessage();
+ pRS.destroy();
+ }
+}
diff --git a/tests/RenderScriptTests/tests/src/com/android/rs/test/UT_clamp_relaxed.java b/tests/RenderScriptTests/tests/src/com/android/rs/test/UT_clamp_relaxed.java
new file mode 100644
index 0000000..a6fd868
--- /dev/null
+++ b/tests/RenderScriptTests/tests/src/com/android/rs/test/UT_clamp_relaxed.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2012 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.rs.test;
+
+import android.content.Context;
+import android.content.res.Resources;
+import android.renderscript.*;
+
+public class UT_clamp_relaxed extends UnitTest {
+ private Resources mRes;
+
+ protected UT_clamp_relaxed(RSTestCore rstc, Resources res, Context ctx) {
+ super(rstc, "Clamp (Relaxed)", ctx);
+ mRes = res;
+ }
+
+ public void run() {
+ RenderScript pRS = RenderScript.create(mCtx);
+ ScriptC_clamp_relaxed s =
+ new ScriptC_clamp_relaxed(pRS, mRes, R.raw.clamp_relaxed);
+ pRS.setMessageHandler(mRsMessage);
+ s.invoke_clamp_test();
+ pRS.finish();
+ waitForMessage();
+ pRS.destroy();
+ }
+}
diff --git a/tests/RenderScriptTests/tests/src/com/android/rs/test/clamp.rs b/tests/RenderScriptTests/tests/src/com/android/rs/test/clamp.rs
new file mode 100644
index 0000000..28b00bd
--- /dev/null
+++ b/tests/RenderScriptTests/tests/src/com/android/rs/test/clamp.rs
@@ -0,0 +1,56 @@
+#include "shared.rsh"
+
+static bool test_clamp_vector() {
+ bool failed = false;
+
+ float2 src2 = { 2.0f, 2.0f};
+ float2 min2 = { 0.5f, -3.0f};
+ float2 max2 = { 1.0f, 9.0f};
+
+ float2 res2 = clamp(src2, min2, max2);
+ _RS_ASSERT(res2.x == 1.0f);
+ _RS_ASSERT(res2.y == 2.0f);
+
+
+ float3 src3 = { 2.0f, 2.0f, 1.0f};
+ float3 min3 = { 0.5f, -3.0f, 3.0f};
+ float3 max3 = { 1.0f, 9.0f, 4.0f};
+
+ float3 res3 = clamp(src3, min3, max3);
+ _RS_ASSERT(res3.x == 1.0f);
+ _RS_ASSERT(res3.y == 2.0f);
+ _RS_ASSERT(res3.z == 3.0f);
+
+
+ float4 src4 = { 2.0f, 2.0f, 1.0f, 4.0f };
+ float4 min4 = { 0.5f, -3.0f, 3.0f, 4.0f };
+ float4 max4 = { 1.0f, 9.0f, 4.0f, 4.0f };
+
+ float4 res4 = clamp(src4, min4, max4);
+ _RS_ASSERT(res4.x == 1.0f);
+ _RS_ASSERT(res4.y == 2.0f);
+ _RS_ASSERT(res4.z == 3.0f);
+ _RS_ASSERT(res4.w == 4.0f);
+
+ if (failed) {
+ rsDebug("test_clamp_vector FAILED", 0);
+ }
+ else {
+ rsDebug("test_clamp_vector PASSED", 0);
+ }
+
+ return failed;
+}
+
+void clamp_test() {
+ bool failed = false;
+ failed |= test_clamp_vector();
+
+ if (failed) {
+ rsSendToClientBlocking(RS_MSG_TEST_FAILED);
+ }
+ else {
+ rsSendToClientBlocking(RS_MSG_TEST_PASSED);
+ }
+}
+
diff --git a/tests/RenderScriptTests/tests/src/com/android/rs/test/clamp_relaxed.rs b/tests/RenderScriptTests/tests/src/com/android/rs/test/clamp_relaxed.rs
new file mode 100644
index 0000000..71c65ae
--- /dev/null
+++ b/tests/RenderScriptTests/tests/src/com/android/rs/test/clamp_relaxed.rs
@@ -0,0 +1,2 @@
+#include "clamp.rs"
+#pragma rs_fp_relaxed
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindow.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindow.java
index c44ddc6..379fb81 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindow.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindow.java
@@ -47,7 +47,7 @@
}
@Override
- public void resized(int arg0, int arg1, Rect argBlah, Rect arg2, Rect arg3,
+ public void resized(int arg0, int arg1, Rect arg2, Rect arg3,
boolean arg4, Configuration arg5) throws RemoteException {
// pass for now.
}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindowSession.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindowSession.java
index 3996d26..6fb599d 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindowSession.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindowSession.java
@@ -69,7 +69,7 @@
}
@Override
public int relayout(IWindow arg0, int seq, LayoutParams arg1, int arg2, int arg3, int arg4,
- int arg4_5, Rect arg4_6, Rect arg5, Rect arg6, Rect arg7, Configuration arg7b,
+ int arg4_5, Rect arg5, Rect arg6, Rect arg7, Configuration arg7b,
Surface arg8) throws RemoteException {
// pass for now.
return 0;
diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java
index dfc1b18..0a846fd 100644
--- a/wifi/java/android/net/wifi/WifiConfiguration.java
+++ b/wifi/java/android/net/wifi/WifiConfiguration.java
@@ -56,6 +56,12 @@
*/
public static final String ENGINE_ENABLE = "1";
+ /**
+ * String to set the engine value to when it should be disabled.
+ * @hide
+ */
+ public static final String ENGINE_DISABLE = "0";
+
/** {@hide} */
public static final String ssidVarName = "ssid";
/** {@hide} */
diff --git a/wifi/java/android/net/wifi/WifiNative.java b/wifi/java/android/net/wifi/WifiNative.java
index 73618f6..0a87a538 100644
--- a/wifi/java/android/net/wifi/WifiNative.java
+++ b/wifi/java/android/net/wifi/WifiNative.java
@@ -442,8 +442,8 @@
return doBooleanCommand("SET p2p_ssid_postfix " + postfix);
}
- public boolean setP2pGroupIdle(int time) {
- return doBooleanCommand("SET p2p_group_idle " + time);
+ public boolean setP2pGroupIdle(String iface, int time) {
+ return doBooleanCommand("SET interface=" + iface + " p2p_group_idle " + time);
}
public void setPowerSave(boolean enabled) {
@@ -624,13 +624,6 @@
return "";
}
- public boolean isGroupOwner(String deviceAddress) {
- /* BSS returns details only for a GO */
- String bssInfo = doStringCommand("BSS p2p_dev_addr=" + deviceAddress);
- if (TextUtils.isEmpty(bssInfo)) return false;
- return true;
- }
-
public String p2pPeer(String deviceAddress) {
return doStringCommand("P2P_PEER " + deviceAddress);
}
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pDeviceList.java b/wifi/java/android/net/wifi/p2p/WifiP2pDeviceList.java
index 8942ff1..b2347c8 100644
--- a/wifi/java/android/net/wifi/p2p/WifiP2pDeviceList.java
+++ b/wifi/java/android/net/wifi/p2p/WifiP2pDeviceList.java
@@ -108,6 +108,15 @@
return Collections.unmodifiableCollection(mDevices.values());
}
+ /** @hide */
+ public boolean isGroupOwner(String deviceAddress) {
+ if (deviceAddress != null) {
+ WifiP2pDevice device = mDevices.get(deviceAddress);
+ if (device != null) return device.isGroupOwner();
+ }
+ return false;
+ }
+
public String toString() {
StringBuffer sbuf = new StringBuffer();
for (WifiP2pDevice device : mDevices.values()) {
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pService.java b/wifi/java/android/net/wifi/p2p/WifiP2pService.java
index b4a879a..cc49cae 100644
--- a/wifi/java/android/net/wifi/p2p/WifiP2pService.java
+++ b/wifi/java/android/net/wifi/p2p/WifiP2pService.java
@@ -159,6 +159,9 @@
* is invoked */
private boolean mAutonomousGroup;
+ /* Invitation to join an existing p2p group */
+ private boolean mJoinExistingGroup;
+
/* Track whether we are in p2p discovery. This is used to avoid sending duplicate
* broadcasts
*/
@@ -761,7 +764,7 @@
//Stop discovery before issuing connect
mWifiNative.p2pStopFind();
- if (mWifiNative.isGroupOwner(mSavedPeerConfig.deviceAddress)) {
+ if (mPeers.isGroupOwner(mSavedPeerConfig.deviceAddress)) {
p2pConnectWithPinDisplay(mSavedPeerConfig, JOIN_GROUP);
} else {
p2pConnectWithPinDisplay(mSavedPeerConfig, FORM_GROUP);
@@ -778,7 +781,7 @@
mWifiNative.p2pStopFind();
//If peer is a GO, we do not need to send provisional discovery,
//the supplicant takes care of it.
- if (mWifiNative.isGroupOwner(mSavedPeerConfig.deviceAddress)) {
+ if (mPeers.isGroupOwner(mSavedPeerConfig.deviceAddress)) {
if (DBG) logd("Sending join to GO");
p2pConnectWithPinDisplay(mSavedPeerConfig, JOIN_GROUP);
transitionTo(mGroupNegotiationState);
@@ -795,6 +798,8 @@
case WifiMonitor.P2P_GO_NEGOTIATION_REQUEST_EVENT:
mSavedPeerConfig = (WifiP2pConfig) message.obj;
+ mAutonomousGroup = false;
+ mJoinExistingGroup = false;
if (!sendConnectNoticeToApp(mPeers.get(mSavedPeerConfig.deviceAddress),
mSavedPeerConfig)) {
transitionTo(mUserAuthorizingInvitationState);
@@ -824,6 +829,8 @@
}
}
+ mAutonomousGroup = false;
+ mJoinExistingGroup = true;
//TODO In the p2p client case, we should set source address correctly.
if (!sendConnectNoticeToApp(mPeers.get(mSavedPeerConfig.deviceAddress),
mSavedPeerConfig)) {
@@ -840,8 +847,6 @@
break;
case WifiP2pManager.CREATE_GROUP:
mAutonomousGroup = true;
- // An autonomous GO requires group idle settings to be reset
- mWifiNative.setP2pGroupIdle(0);
if (mWifiNative.p2pGroupAdd()) {
replyToMessage(message, WifiP2pManager.CREATE_GROUP_SUCCEEDED);
} else {
@@ -863,11 +868,6 @@
if (DBG) logd(getName());
sendMessageDelayed(obtainMessage(GROUP_CREATING_TIMED_OUT,
++mGroupCreatingTimeoutIndex, 0), GROUP_CREATING_WAIT_TIME_MS);
-
- // Set default group idle settings
- if (!mAutonomousGroup) {
- mWifiNative.setP2pGroupIdle(GROUP_IDLE_TIME_S);
- }
}
@Override
@@ -921,7 +921,7 @@
switch (message.what) {
case PEER_CONNECTION_USER_ACCEPT:
//TODO: handle persistence
- if (mWifiNative.isGroupOwner(mSavedPeerConfig.deviceAddress)) {
+ if (mJoinExistingGroup) {
p2pConnectWithPinDisplay(mSavedPeerConfig, JOIN_GROUP);
} else {
p2pConnectWithPinDisplay(mSavedPeerConfig, FORM_GROUP);
@@ -983,6 +983,7 @@
mWifiNative.p2pConnect(mSavedPeerConfig, FORM_GROUP);
transitionTo(mGroupNegotiationState);
} else {
+ mJoinExistingGroup = false;
transitionTo(mUserAuthorizingInvitationState);
}
}
@@ -1031,6 +1032,10 @@
if (mGroup.isGroupOwner()) {
startDhcpServer(mGroup.getInterface());
} else {
+ // Set group idle only for a client on the group interface to speed up
+ // disconnect when GO is gone. Setting group idle time for a group owner
+ // causes connectivity issues for new clients
+ mWifiNative.setP2pGroupIdle(mGroup.getInterface(), GROUP_IDLE_TIME_S);
mDhcpStateMachine = DhcpStateMachine.makeDhcpStateMachine(mContext,
P2pStateMachine.this, mGroup.getInterface());
mDhcpStateMachine.sendMessage(DhcpStateMachine.CMD_START_DHCP);
@@ -1455,6 +1460,13 @@
sendMessage(PEER_CONNECTION_USER_REJECT);
}
})
+ .setOnCancelListener(new DialogInterface.OnCancelListener() {
+ @Override
+ public void onCancel(DialogInterface arg0) {
+ if (DBG) logd(getName() + " ignore connect");
+ sendMessage(PEER_CONNECTION_USER_REJECT);
+ }
+ })
.create();
//make the enter pin area or the display pin area visible