Merge "Tap highlight fix + small perf increase"
diff --git a/api/current.txt b/api/current.txt
index c8cebce..334df2f 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -184,21 +184,21 @@
public static final class R.attr {
ctor public R.attr();
field public static final int absListViewStyle = 16842858; // 0x101006a
- field public static final int accessibilityEventTypes = 16843643; // 0x101037b
- field public static final int accessibilityFeedbackType = 16843645; // 0x101037d
- field public static final int accessibilityFlags = 16843647; // 0x101037f
+ field public static final int accessibilityEventTypes = 16843648; // 0x1010380
+ field public static final int accessibilityFeedbackType = 16843650; // 0x1010382
+ field public static final int accessibilityFlags = 16843652; // 0x1010384
field public static final int accountPreferences = 16843423; // 0x101029f
field public static final int accountType = 16843407; // 0x101028f
field public static final int action = 16842797; // 0x101002d
- field public static final int actionBarDivider = 16843684; // 0x10103a4
- field public static final int actionBarItemBackground = 16843685; // 0x10103a5
+ field public static final int actionBarDivider = 16843689; // 0x10103a9
+ field public static final int actionBarItemBackground = 16843690; // 0x10103aa
field public static final int actionBarSize = 16843499; // 0x10102eb
- field public static final int actionBarSplitStyle = 16843665; // 0x1010391
+ field public static final int actionBarSplitStyle = 16843670; // 0x1010396
field public static final int actionBarStyle = 16843470; // 0x10102ce
field public static final int actionBarTabBarStyle = 16843508; // 0x10102f4
field public static final int actionBarTabStyle = 16843507; // 0x10102f3
field public static final int actionBarTabTextStyle = 16843509; // 0x10102f5
- field public static final int actionBarWidgetTheme = 16843680; // 0x10103a0
+ field public static final int actionBarWidgetTheme = 16843685; // 0x10103a5
field public static final int actionButtonStyle = 16843480; // 0x10102d8
field public static final int actionDropDownStyle = 16843479; // 0x10102d7
field public static final int actionLayout = 16843515; // 0x10102fb
@@ -210,11 +210,11 @@
field public static final int actionModeCopyDrawable = 16843538; // 0x1010312
field public static final int actionModeCutDrawable = 16843537; // 0x1010311
field public static final int actionModePasteDrawable = 16843539; // 0x1010313
- field public static final int actionModeSelectAllDrawable = 16843641; // 0x1010379
- field public static final int actionModeSplitBackground = 16843686; // 0x10103a6
- field public static final int actionModeStyle = 16843677; // 0x101039d
+ field public static final int actionModeSelectAllDrawable = 16843646; // 0x101037e
+ field public static final int actionModeSplitBackground = 16843691; // 0x10103ab
+ field public static final int actionModeStyle = 16843682; // 0x10103a2
field public static final int actionOverflowButtonStyle = 16843510; // 0x10102f6
- field public static final int actionProviderClass = 16843666; // 0x1010392
+ field public static final int actionProviderClass = 16843671; // 0x1010397
field public static final int actionViewClass = 16843516; // 0x10102fc
field public static final int activatedBackgroundIndicator = 16843517; // 0x10102fd
field public static final int activityCloseEnterAnimation = 16842938; // 0x10100ba
@@ -226,7 +226,7 @@
field public static final int alertDialogIcon = 16843605; // 0x1010355
field public static final int alertDialogStyle = 16842845; // 0x101005d
field public static final int alertDialogTheme = 16843529; // 0x1010309
- field public static final int alignmentMode = 16843637; // 0x1010375
+ field public static final int alignmentMode = 16843642; // 0x101037a
field public static final int allContactsName = 16843468; // 0x10102cc
field public static final int allowBackup = 16843392; // 0x1010280
field public static final int allowClearUserData = 16842757; // 0x1010005
@@ -260,8 +260,8 @@
field public static final int background = 16842964; // 0x10100d4
field public static final int backgroundDimAmount = 16842802; // 0x1010032
field public static final int backgroundDimEnabled = 16843295; // 0x101021f
- field public static final int backgroundSplit = 16843668; // 0x1010394
- field public static final int backgroundStacked = 16843667; // 0x1010393
+ field public static final int backgroundSplit = 16843673; // 0x1010399
+ field public static final int backgroundStacked = 16843672; // 0x1010398
field public static final int backupAgent = 16843391; // 0x101027f
field public static final int baseline = 16843548; // 0x101031c
field public static final int baselineAlignBottom = 16843042; // 0x1010122
@@ -270,7 +270,7 @@
field public static final int borderlessButtonStyle = 16843563; // 0x101032b
field public static final int bottom = 16843184; // 0x10101b0
field public static final int bottomBright = 16842957; // 0x10100cd
- field public static final int bottomChevronDrawable = 16843654; // 0x1010386
+ field public static final int bottomChevronDrawable = 16843659; // 0x101038b
field public static final int bottomDark = 16842953; // 0x10100c9
field public static final int bottomLeftRadius = 16843179; // 0x10101ab
field public static final int bottomMedium = 16842958; // 0x10100ce
@@ -289,7 +289,7 @@
field public static final int cacheColorHint = 16843009; // 0x1010101
field public static final int calendarViewShown = 16843596; // 0x101034c
field public static final int calendarViewStyle = 16843613; // 0x101035d
- field public static final int canRetrieveWindowContent = 16843648; // 0x1010380
+ field public static final int canRetrieveWindowContent = 16843653; // 0x1010385
field public static final int candidatesTextStyleSpans = 16843312; // 0x1010230
field public static final deprecated int capitalize = 16843113; // 0x1010169
field public static final int centerBright = 16842956; // 0x10100cc
@@ -318,18 +318,18 @@
field public static final int codes = 16843330; // 0x1010242
field public static final int collapseColumns = 16843083; // 0x101014b
field public static final int color = 16843173; // 0x10101a5
- field public static final int colorActivatedHighlight = 16843673; // 0x1010399
+ field public static final int colorActivatedHighlight = 16843678; // 0x101039e
field public static final int colorBackground = 16842801; // 0x1010031
field public static final int colorBackgroundCacheHint = 16843435; // 0x10102ab
- field public static final int colorFocusedHighlight = 16843672; // 0x1010398
+ field public static final int colorFocusedHighlight = 16843677; // 0x101039d
field public static final int colorForeground = 16842800; // 0x1010030
field public static final int colorForegroundInverse = 16843270; // 0x1010206
- field public static final int colorLongPressedHighlight = 16843671; // 0x1010397
- field public static final int colorMultiSelectHighlight = 16843674; // 0x101039a
- field public static final int colorPressedHighlight = 16843670; // 0x1010396
- field public static final int columnCount = 16843634; // 0x1010372
+ field public static final int colorLongPressedHighlight = 16843676; // 0x101039c
+ field public static final int colorMultiSelectHighlight = 16843679; // 0x101039f
+ field public static final int colorPressedHighlight = 16843675; // 0x101039b
+ field public static final int columnCount = 16843639; // 0x1010377
field public static final int columnDelay = 16843215; // 0x10101cf
- field public static final int columnOrderPreserved = 16843635; // 0x1010373
+ field public static final int columnOrderPreserved = 16843640; // 0x1010378
field public static final int columnWidth = 16843031; // 0x1010117
field public static final int compatibleWidthLimitDp = 16843621; // 0x1010365
field public static final int completionHint = 16843122; // 0x1010172
@@ -383,11 +383,11 @@
field public static final int drawSelectorOnTop = 16843004; // 0x10100fc
field public static final int drawable = 16843161; // 0x1010199
field public static final int drawableBottom = 16843118; // 0x101016e
- field public static final int drawableEnd = 16843676; // 0x101039c
+ field public static final int drawableEnd = 16843681; // 0x10103a1
field public static final int drawableLeft = 16843119; // 0x101016f
field public static final int drawablePadding = 16843121; // 0x1010171
field public static final int drawableRight = 16843120; // 0x1010170
- field public static final int drawableStart = 16843675; // 0x101039b
+ field public static final int drawableStart = 16843680; // 0x10103a0
field public static final int drawableTop = 16843117; // 0x101016d
field public static final int drawingCacheQuality = 16842984; // 0x10100e8
field public static final int dropDownAnchor = 16843363; // 0x1010263
@@ -444,7 +444,7 @@
field public static final int fastScrollTextColor = 16843609; // 0x1010359
field public static final int fastScrollThumbDrawable = 16843574; // 0x1010336
field public static final int fastScrollTrackDrawable = 16843577; // 0x1010339
- field public static final int feedbackCount = 16843660; // 0x101038c
+ field public static final int feedbackCount = 16843665; // 0x1010391
field public static final int fillAfter = 16843197; // 0x10101bd
field public static final int fillBefore = 16843196; // 0x10101bc
field public static final int fillEnabled = 16843343; // 0x101024f
@@ -497,7 +497,7 @@
field public static final int hand_hour = 16843011; // 0x1010103
field public static final int hand_minute = 16843012; // 0x1010104
field public static final int handle = 16843354; // 0x101025a
- field public static final int handleDrawable = 16843650; // 0x1010382
+ field public static final int handleDrawable = 16843655; // 0x1010387
field public static final int handleProfiling = 16842786; // 0x1010022
field public static final int hapticFeedbackEnabled = 16843358; // 0x101025e
field public static final int hardwareAccelerated = 16843475; // 0x10102d3
@@ -506,12 +506,12 @@
field public static final int headerDividersEnabled = 16843310; // 0x101022e
field public static final int height = 16843093; // 0x1010155
field public static final int hint = 16843088; // 0x1010150
- field public static final int hitRadius = 16843657; // 0x1010389
+ field public static final int hitRadius = 16843662; // 0x101038e
field public static final int homeAsUpIndicator = 16843531; // 0x101030b
field public static final int homeLayout = 16843549; // 0x101031d
field public static final int horizontalDivider = 16843053; // 0x101012d
field public static final int horizontalGap = 16843327; // 0x101023f
- field public static final int horizontalOffset = 16843662; // 0x101038e
+ field public static final int horizontalOffset = 16843667; // 0x1010393
field public static final int horizontalScrollViewStyle = 16843603; // 0x1010353
field public static final int horizontalSpacing = 16843028; // 0x1010114
field public static final int host = 16842792; // 0x1010028
@@ -557,7 +557,7 @@
field public static final int installLocation = 16843447; // 0x10102b7
field public static final int interpolator = 16843073; // 0x1010141
field public static final int isAlwaysSyncable = 16843571; // 0x1010333
- field public static final int isAuxiliary = 16843642; // 0x101037a
+ field public static final int isAuxiliary = 16843647; // 0x101037f
field public static final int isDefault = 16843297; // 0x1010221
field public static final int isIndicator = 16843079; // 0x1010147
field public static final int isModifier = 16843334; // 0x1010246
@@ -610,7 +610,7 @@
field public static final int layout_centerInParent = 16843151; // 0x101018f
field public static final int layout_centerVertical = 16843153; // 0x1010191
field public static final int layout_column = 16843084; // 0x101014c
- field public static final int layout_columnSpan = 16843640; // 0x1010378
+ field public static final int layout_columnSpan = 16843645; // 0x101037d
field public static final int layout_gravity = 16842931; // 0x10100b3
field public static final int layout_height = 16842997; // 0x10100f5
field public static final int layout_margin = 16842998; // 0x10100f6
@@ -618,8 +618,8 @@
field public static final int layout_marginLeft = 16842999; // 0x10100f7
field public static final int layout_marginRight = 16843001; // 0x10100f9
field public static final int layout_marginTop = 16843000; // 0x10100f8
- field public static final int layout_row = 16843638; // 0x1010376
- field public static final int layout_rowSpan = 16843639; // 0x1010377
+ field public static final int layout_row = 16843643; // 0x101037b
+ field public static final int layout_rowSpan = 16843644; // 0x101037c
field public static final int layout_scale = 16843155; // 0x1010193
field public static final int layout_span = 16843085; // 0x101014d
field public static final int layout_toLeftOf = 16843138; // 0x1010182
@@ -629,7 +629,7 @@
field public static final int layout_x = 16843135; // 0x101017f
field public static final int layout_y = 16843136; // 0x1010180
field public static final int left = 16843181; // 0x10101ad
- field public static final int leftChevronDrawable = 16843651; // 0x1010383
+ field public static final int leftChevronDrawable = 16843656; // 0x1010388
field public static final int lineSpacingExtra = 16843287; // 0x1010217
field public static final int lineSpacingMultiplier = 16843288; // 0x1010218
field public static final int lines = 16843092; // 0x1010154
@@ -641,8 +641,8 @@
field public static final int listDividerAlertDialog = 16843525; // 0x1010305
field public static final int listPopupWindowStyle = 16843519; // 0x10102ff
field public static final int listPreferredItemHeight = 16842829; // 0x101004d
- field public static final int listPreferredItemHeightLarge = 16843663; // 0x101038f
- field public static final int listPreferredItemHeightSmall = 16843664; // 0x1010390
+ field public static final int listPreferredItemHeightLarge = 16843668; // 0x1010394
+ field public static final int listPreferredItemHeightSmall = 16843669; // 0x1010395
field public static final int listSelector = 16843003; // 0x10100fb
field public static final int listSeparatorTextViewStyle = 16843272; // 0x1010208
field public static final int listViewStyle = 16842868; // 0x1010074
@@ -673,8 +673,8 @@
field public static final int minHeight = 16843072; // 0x1010140
field public static final int minLevel = 16843185; // 0x10101b1
field public static final int minLines = 16843094; // 0x1010156
- field public static final int minResizeHeight = 16843679; // 0x101039f
- field public static final int minResizeWidth = 16843678; // 0x101039e
+ field public static final int minResizeHeight = 16843684; // 0x10103a4
+ field public static final int minResizeWidth = 16843683; // 0x10103a3
field public static final int minSdkVersion = 16843276; // 0x101020c
field public static final int minWidth = 16843071; // 0x101013f
field public static final int mode = 16843134; // 0x101017e
@@ -690,7 +690,7 @@
field public static final int nextFocusUp = 16842979; // 0x10100e3
field public static final int noHistory = 16843309; // 0x101022d
field public static final int normalScreens = 16843397; // 0x1010285
- field public static final int notificationTimeout = 16843646; // 0x101037e
+ field public static final int notificationTimeout = 16843651; // 0x1010383
field public static final int numColumns = 16843032; // 0x1010118
field public static final int numStars = 16843076; // 0x1010144
field public static final deprecated int numeric = 16843109; // 0x1010165
@@ -704,11 +704,11 @@
field public static final int orderingFromXml = 16843239; // 0x10101e7
field public static final int orientation = 16842948; // 0x10100c4
field public static final int outAnimation = 16843128; // 0x1010178
- field public static final int outerRadius = 16843656; // 0x1010388
+ field public static final int outerRadius = 16843661; // 0x101038d
field public static final int overScrollFooter = 16843459; // 0x10102c3
field public static final int overScrollHeader = 16843458; // 0x10102c2
field public static final int overScrollMode = 16843457; // 0x10102c1
- field public static final int packageNames = 16843644; // 0x101037c
+ field public static final int packageNames = 16843649; // 0x1010381
field public static final int padding = 16842965; // 0x10100d5
field public static final int paddingBottom = 16842969; // 0x10100d9
field public static final int paddingLeft = 16842966; // 0x10100d6
@@ -793,17 +793,17 @@
field public static final int restoreAnyVersion = 16843450; // 0x10102ba
field public static final deprecated int restoreNeedsApplication = 16843421; // 0x101029d
field public static final int right = 16843183; // 0x10101af
- field public static final int rightChevronDrawable = 16843652; // 0x1010384
+ field public static final int rightChevronDrawable = 16843657; // 0x1010389
field public static final int ringtonePreferenceStyle = 16842899; // 0x1010093
field public static final int ringtoneType = 16843257; // 0x10101f9
field public static final int rotation = 16843558; // 0x1010326
field public static final int rotationX = 16843559; // 0x1010327
field public static final int rotationY = 16843560; // 0x1010328
- field public static final int rowCount = 16843632; // 0x1010370
+ field public static final int rowCount = 16843637; // 0x1010375
field public static final int rowDelay = 16843216; // 0x10101d0
field public static final int rowEdgeFlags = 16843329; // 0x1010241
field public static final int rowHeight = 16843058; // 0x1010132
- field public static final int rowOrderPreserved = 16843633; // 0x1010371
+ field public static final int rowOrderPreserved = 16843638; // 0x1010376
field public static final int saveEnabled = 16842983; // 0x10100e7
field public static final int scaleGravity = 16843262; // 0x10101fe
field public static final int scaleHeight = 16843261; // 0x10101fd
@@ -869,7 +869,7 @@
field public static final int smallIcon = 16843422; // 0x101029e
field public static final int smallScreens = 16843396; // 0x1010284
field public static final int smoothScrollbar = 16843313; // 0x1010231
- field public static final int snapMargin = 16843659; // 0x101038b
+ field public static final int snapMargin = 16843664; // 0x1010390
field public static final int soundEffectsEnabled = 16843285; // 0x1010215
field public static final int spacing = 16843027; // 0x1010113
field public static final int spinnerDropDownItemStyle = 16842887; // 0x1010087
@@ -915,8 +915,8 @@
field public static final int stretchMode = 16843030; // 0x1010116
field public static final int subtitle = 16843473; // 0x10102d1
field public static final int subtitleTextStyle = 16843513; // 0x10102f9
- field public static final int subtypeExtraValue = 16843683; // 0x10103a3
- field public static final int subtypeLocale = 16843682; // 0x10103a2
+ field public static final int subtypeExtraValue = 16843688; // 0x10103a8
+ field public static final int subtypeLocale = 16843687; // 0x10103a7
field public static final int suggestActionMsg = 16843228; // 0x10101dc
field public static final int suggestActionMsgColumn = 16843229; // 0x10101dd
field public static final int summary = 16843241; // 0x10101e9
@@ -924,7 +924,10 @@
field public static final int summaryOff = 16843248; // 0x10101f0
field public static final int summaryOn = 16843247; // 0x10101ef
field public static final int supportsUploading = 16843419; // 0x101029b
+ field public static final int switchMinWidth = 16843632; // 0x1010370
+ field public static final int switchPadding = 16843633; // 0x1010371
field public static final int switchPreferenceStyle = 16843629; // 0x101036d
+ field public static final int switchTextAppearance = 16843630; // 0x101036e
field public static final int switchTextOff = 16843628; // 0x101036c
field public static final int switchTextOn = 16843627; // 0x101036b
field public static final int syncable = 16842777; // 0x1010019
@@ -935,7 +938,7 @@
field public static final int tag = 16842961; // 0x10100d1
field public static final int targetActivity = 16843266; // 0x1010202
field public static final int targetClass = 16842799; // 0x101002f
- field public static final int targetDrawables = 16843649; // 0x1010381
+ field public static final int targetDrawables = 16843654; // 0x1010386
field public static final int targetPackage = 16842785; // 0x1010021
field public static final int targetSdkVersion = 16843376; // 0x1010270
field public static final int taskAffinity = 16842770; // 0x1010012
@@ -950,15 +953,15 @@
field public static final int tension = 16843370; // 0x101026a
field public static final int testOnly = 16843378; // 0x1010272
field public static final int text = 16843087; // 0x101014f
- field public static final int textAllCaps = 16843669; // 0x1010395
+ field public static final int textAllCaps = 16843674; // 0x101039a
field public static final int textAppearance = 16842804; // 0x1010034
field public static final int textAppearanceButton = 16843271; // 0x1010207
field public static final int textAppearanceInverse = 16842805; // 0x1010035
field public static final int textAppearanceLarge = 16842816; // 0x1010040
field public static final int textAppearanceLargeInverse = 16842819; // 0x1010043
field public static final int textAppearanceLargePopupMenu = 16843521; // 0x1010301
- field public static final int textAppearanceListItem = 16843687; // 0x10103a7
- field public static final int textAppearanceListItemSmall = 16843688; // 0x10103a8
+ field public static final int textAppearanceListItem = 16843692; // 0x10103ac
+ field public static final int textAppearanceListItemSmall = 16843693; // 0x10103ad
field public static final int textAppearanceMedium = 16842817; // 0x1010041
field public static final int textAppearanceMediumInverse = 16842820; // 0x1010044
field public static final int textAppearanceSearchResultSubtitle = 16843424; // 0x10102a0
@@ -993,7 +996,7 @@
field public static final int textEditPasteWindowLayout = 16843540; // 0x1010314
field public static final int textEditSideNoPasteWindowLayout = 16843615; // 0x101035f
field public static final int textEditSidePasteWindowLayout = 16843614; // 0x101035e
- field public static final int textEditSuggestionItemLayout = 16843631; // 0x101036f
+ field public static final int textEditSuggestionItemLayout = 16843636; // 0x1010374
field public static final int textFilterEnabled = 16843007; // 0x10100ff
field public static final int textIsSelectable = 16843542; // 0x1010316
field public static final int textOff = 16843045; // 0x1010125
@@ -1005,13 +1008,14 @@
field public static final int textSelectHandleWindowStyle = 16843464; // 0x10102c8
field public static final int textSize = 16842901; // 0x1010095
field public static final int textStyle = 16842903; // 0x1010097
- field public static final int textSuggestionsWindowStyle = 16843630; // 0x101036e
+ field public static final int textSuggestionsWindowStyle = 16843635; // 0x1010373
field public static final int textViewStyle = 16842884; // 0x1010084
field public static final int theme = 16842752; // 0x1010000
field public static final int thickness = 16843360; // 0x1010260
field public static final int thicknessRatio = 16843164; // 0x101019c
field public static final int thumb = 16843074; // 0x1010142
field public static final int thumbOffset = 16843075; // 0x1010143
+ field public static final int thumbTextPadding = 16843634; // 0x1010372
field public static final int thumbnail = 16843429; // 0x10102a5
field public static final int tileMode = 16843265; // 0x1010201
field public static final int tint = 16843041; // 0x1010121
@@ -1026,11 +1030,12 @@
field public static final int toYScale = 16843205; // 0x10101c5
field public static final int top = 16843182; // 0x10101ae
field public static final int topBright = 16842955; // 0x10100cb
- field public static final int topChevronDrawable = 16843653; // 0x1010385
+ field public static final int topChevronDrawable = 16843658; // 0x101038a
field public static final int topDark = 16842951; // 0x10100c7
field public static final int topLeftRadius = 16843177; // 0x10101a9
field public static final int topOffset = 16843352; // 0x1010258
field public static final int topRightRadius = 16843178; // 0x10101aa
+ field public static final int track = 16843631; // 0x101036f
field public static final int transcriptMode = 16843008; // 0x1010100
field public static final int transformPivotX = 16843552; // 0x1010320
field public static final int transformPivotY = 16843553; // 0x1010321
@@ -1038,12 +1043,12 @@
field public static final int translationY = 16843555; // 0x1010323
field public static final int type = 16843169; // 0x10101a1
field public static final int typeface = 16842902; // 0x1010096
- field public static final int uiOptions = 16843681; // 0x10103a1
+ field public static final int uiOptions = 16843686; // 0x10103a6
field public static final int uncertainGestureColor = 16843382; // 0x1010276
field public static final int unfocusedMonthDateColor = 16843588; // 0x1010344
field public static final int unselectedAlpha = 16843278; // 0x101020e
field public static final int updatePeriodMillis = 16843344; // 0x1010250
- field public static final int useDefaultMargins = 16843636; // 0x1010374
+ field public static final int useDefaultMargins = 16843641; // 0x1010379
field public static final int useIntrinsicSizeAsMinimum = 16843536; // 0x1010310
field public static final int useLevel = 16843167; // 0x101019f
field public static final int userVisible = 16843409; // 0x1010291
@@ -1057,10 +1062,10 @@
field public static final int verticalCorrection = 16843322; // 0x101023a
field public static final int verticalDivider = 16843054; // 0x101012e
field public static final int verticalGap = 16843328; // 0x1010240
- field public static final int verticalOffset = 16843661; // 0x101038d
+ field public static final int verticalOffset = 16843666; // 0x1010392
field public static final int verticalScrollbarPosition = 16843572; // 0x1010334
field public static final int verticalSpacing = 16843029; // 0x1010115
- field public static final int vibrationDuration = 16843658; // 0x101038a
+ field public static final int vibrationDuration = 16843663; // 0x101038f
field public static final int visibility = 16842972; // 0x10100dc
field public static final int visible = 16843156; // 0x1010194
field public static final int vmSafeMode = 16843448; // 0x10102b8
@@ -1077,7 +1082,7 @@
field public static final int wallpaperIntraOpenExitAnimation = 16843416; // 0x1010298
field public static final int wallpaperOpenEnterAnimation = 16843411; // 0x1010293
field public static final int wallpaperOpenExitAnimation = 16843412; // 0x1010294
- field public static final int waveDrawable = 16843655; // 0x1010387
+ field public static final int waveDrawable = 16843660; // 0x101038c
field public static final int webTextViewStyle = 16843449; // 0x10102b9
field public static final int webViewStyle = 16842885; // 0x1010085
field public static final int weekDayTextAppearance = 16843592; // 0x1010348
@@ -26904,6 +26909,20 @@
ctor public StackView(android.content.Context, android.util.AttributeSet, int);
}
+ public class Switch extends android.widget.CompoundButton {
+ 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 java.lang.CharSequence getTextOff();
+ method public java.lang.CharSequence getTextOn();
+ method public void onMeasure(int, 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);
+ }
+
public class TabHost extends android.widget.FrameLayout implements android.view.ViewTreeObserver.OnTouchModeChangeListener {
ctor public TabHost(android.content.Context);
ctor public TabHost(android.content.Context, android.util.AttributeSet);
diff --git a/core/java/android/text/Html.java b/core/java/android/text/Html.java
index 07e71f9..85a3bbb 100644
--- a/core/java/android/text/Html.java
+++ b/core/java/android/text/Html.java
@@ -449,11 +449,11 @@
handleP(mSpannableStringBuilder);
} else if (tag.equalsIgnoreCase("div")) {
handleP(mSpannableStringBuilder);
- } else if (tag.equalsIgnoreCase("em")) {
+ } else if (tag.equalsIgnoreCase("strong")) {
start(mSpannableStringBuilder, new Bold());
} else if (tag.equalsIgnoreCase("b")) {
start(mSpannableStringBuilder, new Bold());
- } else if (tag.equalsIgnoreCase("strong")) {
+ } else if (tag.equalsIgnoreCase("em")) {
start(mSpannableStringBuilder, new Italic());
} else if (tag.equalsIgnoreCase("cite")) {
start(mSpannableStringBuilder, new Italic());
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index 86f061a..80cbbfb 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -1574,8 +1574,17 @@
ss.inActionMode = mChoiceMode == CHOICE_MODE_MULTIPLE_MODAL && mChoiceActionMode != null;
- ss.checkState = mCheckStates;
- ss.checkIdState = mCheckedIdStates;
+ if (mCheckStates != null) {
+ ss.checkState = mCheckStates.clone();
+ }
+ if (mCheckedIdStates != null) {
+ final LongSparseArray<Boolean> idState = new LongSparseArray<Boolean>();
+ final int count = mCheckedIdStates.size();
+ for (int i = 0; i < count; i++) {
+ idState.put(mCheckedIdStates.keyAt(i), mCheckedIdStates.valueAt(i));
+ }
+ ss.checkIdState = idState;
+ }
ss.checkedItemCount = mCheckedItemCount;
return ss;
diff --git a/core/java/android/widget/Switch.java b/core/java/android/widget/Switch.java
index 4143383..4fcb358 100644
--- a/core/java/android/widget/Switch.java
+++ b/core/java/android/widget/Switch.java
@@ -41,9 +41,15 @@
/**
* A Switch is a two-state toggle switch widget that can select between two
* options. The user may drag the "thumb" back and forth to choose the selected option,
- * or simply tap to toggle as if it were a checkbox.
+ * or simply tap to toggle as if it were a checkbox. The {@link #setText(CharSequence) text}
+ * property controls the text displayed in the label for the switch, whereas the
+ * {@link #setTextOff(CharSequence) off} and {@link #setTextOn(CharSequence) on} text
+ * controls the text on the thumb. Similarly, the
+ * {@link #setTextAppearance(android.content.Context, int) textAppearance} and the related
+ * setTypeface() methods control the typeface and style of label text, whereas the
+ * {@link #setSwitchTextAppearance(android.content.Context, int) switchTextAppearance} and
+ * the related seSwitchTypeface() methods control that of the thumb.
*
- * @hide
*/
public class Switch extends CompoundButton {
private static final int TOUCH_MODE_IDLE = 0;
@@ -132,8 +138,8 @@
TypedArray a = context.obtainStyledAttributes(attrs,
com.android.internal.R.styleable.Switch, defStyle, 0);
- mThumbDrawable = a.getDrawable(com.android.internal.R.styleable.Switch_switchThumb);
- mTrackDrawable = a.getDrawable(com.android.internal.R.styleable.Switch_switchTrack);
+ mThumbDrawable = a.getDrawable(com.android.internal.R.styleable.Switch_thumb);
+ mTrackDrawable = a.getDrawable(com.android.internal.R.styleable.Switch_track);
mTextOn = a.getText(com.android.internal.R.styleable.Switch_textOn);
mTextOff = a.getText(com.android.internal.R.styleable.Switch_textOff);
mThumbTextPadding = a.getDimensionPixelSize(
@@ -146,7 +152,7 @@
int appearance = a.getResourceId(
com.android.internal.R.styleable.Switch_switchTextAppearance, 0);
if (appearance != 0) {
- setSwitchTextAppearance(appearance);
+ setSwitchTextAppearance(context, appearance);
}
a.recycle();
@@ -162,9 +168,9 @@
* Sets the switch text color, size, style, hint color, and highlight color
* from the specified TextAppearance resource.
*/
- public void setSwitchTextAppearance(int resid) {
+ public void setSwitchTextAppearance(Context context, int resid) {
TypedArray appearance =
- getContext().obtainStyledAttributes(resid,
+ context.obtainStyledAttributes(resid,
com.android.internal.R.styleable.TextAppearance);
ColorStateList colors;
@@ -174,6 +180,9 @@
TextAppearance_textColor);
if (colors != null) {
mTextColors = colors;
+ } else {
+ // If no color set in TextAppearance, default to the view's textColor
+ mTextColors = getTextColors();
}
ts = appearance.getDimensionPixelSize(com.android.internal.R.styleable.
@@ -244,7 +253,7 @@
}
/**
- * Sets the typeface and style in which the text should be displayed on the switch.
+ * Sets the typeface in which the text should be displayed on the switch.
* Note that not all Typeface families actually have bold and italic
* variants, so you may need to use
* {@link #setSwitchTypeface(Typeface, int)} to get the appearance
@@ -263,18 +272,14 @@
}
/**
- * Returns the text for when the button is in the checked state.
- *
- * @return The text.
+ * Returns the text displayed when the button is in the checked state.
*/
public CharSequence getTextOn() {
return mTextOn;
}
/**
- * Sets the text for when the button is in the checked state.
- *
- * @param textOn The text.
+ * Sets the text displayed when the button is in the checked state.
*/
public void setTextOn(CharSequence textOn) {
mTextOn = textOn;
@@ -282,18 +287,14 @@
}
/**
- * Returns the text for when the button is not in the checked state.
- *
- * @return The text.
+ * Returns the text displayed when the button is not in the checked state.
*/
public CharSequence getTextOff() {
return mTextOff;
}
/**
- * Sets the text for when the button is not in the checked state.
- *
- * @param textOff The text.
+ * Sets the text displayed when the button is not in the checked state.
*/
public void setTextOff(CharSequence textOff) {
mTextOff = textOff;
@@ -582,8 +583,11 @@
mThumbDrawable.setBounds(thumbLeft, switchTop, thumbRight, switchBottom);
mThumbDrawable.draw(canvas);
- mTextPaint.setColor(mTextColors.getColorForState(getDrawableState(),
- mTextColors.getDefaultColor()));
+ // mTextColors should not be null, but just in case
+ if (mTextColors != null) {
+ mTextPaint.setColor(mTextColors.getColorForState(getDrawableState(),
+ mTextColors.getDefaultColor()));
+ }
mTextPaint.drawableState = getDrawableState();
Layout switchText = getTargetCheckedState() ? mOnLayout : mOffLayout;
diff --git a/core/java/com/android/internal/widget/AbsActionBarView.java b/core/java/com/android/internal/widget/AbsActionBarView.java
index ccbce3e..df2f717 100644
--- a/core/java/com/android/internal/widget/AbsActionBarView.java
+++ b/core/java/com/android/internal/widget/AbsActionBarView.java
@@ -56,6 +56,16 @@
mSplitView = splitView;
}
+ /**
+ * @return Current visibility or if animating, the visibility being animated to.
+ */
+ public int getAnimatedVisibility() {
+ if (mVisibilityAnim != null) {
+ return mVisAnimListener.mFinalVisibility;
+ }
+ return getVisibility();
+ }
+
public void animateToVisibility(int visibility) {
if (mVisibilityAnim != null) {
mVisibilityAnim.cancel();
@@ -179,7 +189,7 @@
protected class VisibilityAnimListener implements Animator.AnimatorListener {
private boolean mCanceled = false;
- private int mFinalVisibility;
+ int mFinalVisibility;
public VisibilityAnimListener withFinalVisibility(int visibility) {
mFinalVisibility = visibility;
@@ -199,6 +209,9 @@
mVisibilityAnim = null;
setVisibility(mFinalVisibility);
+ if (mSplitView != null && mMenuView != null) {
+ mMenuView.setVisibility(mFinalVisibility);
+ }
}
@Override
diff --git a/core/java/com/android/internal/widget/ActionBarContextView.java b/core/java/com/android/internal/widget/ActionBarContextView.java
index 45d38ae..4fccc32 100644
--- a/core/java/com/android/internal/widget/ActionBarContextView.java
+++ b/core/java/com/android/internal/widget/ActionBarContextView.java
@@ -33,6 +33,7 @@
import android.view.ActionMode;
import android.view.LayoutInflater;
import android.view.View;
+import android.view.ViewGroup;
import android.view.animation.DecelerateInterpolator;
import android.widget.LinearLayout;
import android.widget.TextView;
@@ -270,14 +271,14 @@
}
@Override
- protected LayoutParams generateDefaultLayoutParams() {
+ protected ViewGroup.LayoutParams generateDefaultLayoutParams() {
// Used by custom views if they don't supply layout params. Everything else
// added to an ActionBarContextView should have them already.
return new MarginLayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
}
@Override
- public LayoutParams generateLayoutParams(AttributeSet attrs) {
+ public ViewGroup.LayoutParams generateLayoutParams(AttributeSet attrs) {
return new MarginLayoutParams(getContext(), attrs);
}
@@ -321,7 +322,7 @@
}
if (mCustomView != null) {
- LayoutParams lp = mCustomView.getLayoutParams();
+ ViewGroup.LayoutParams lp = mCustomView.getLayoutParams();
final int customWidthMode = lp.width != LayoutParams.WRAP_CONTENT ?
MeasureSpec.EXACTLY : MeasureSpec.AT_MOST;
final int customWidth = lp.width >= 0 ?
diff --git a/core/java/com/android/internal/widget/ActionBarView.java b/core/java/com/android/internal/widget/ActionBarView.java
index a0f6259..ff26d50 100644
--- a/core/java/com/android/internal/widget/ActionBarView.java
+++ b/core/java/com/android/internal/widget/ActionBarView.java
@@ -401,6 +401,7 @@
if (oldParent != null && oldParent != mSplitView) {
oldParent.removeView(menuView);
}
+ menuView.setVisibility(getAnimatedVisibility());
mSplitView.addView(menuView, layoutParams);
} else {
// We'll add this later if we missed it this time.
@@ -683,7 +684,7 @@
}
@Override
- protected LayoutParams generateDefaultLayoutParams() {
+ protected ViewGroup.LayoutParams generateDefaultLayoutParams() {
// Used by custom nav views if they don't supply layout params. Everything else
// added to an ActionBarView should have them already.
return new ActionBar.LayoutParams(DEFAULT_CUSTOM_GRAVITY);
@@ -810,7 +811,7 @@
HomeView homeLayout = mExpandedActionView != null ? mExpandedHomeLayout : mHomeLayout;
if (homeLayout.getVisibility() != GONE) {
- final LayoutParams lp = homeLayout.getLayoutParams();
+ final ViewGroup.LayoutParams lp = homeLayout.getLayoutParams();
int homeWidthSpec;
if (lp.width < 0) {
homeWidthSpec = MeasureSpec.makeMeasureSpec(availableWidth, MeasureSpec.AT_MOST);
@@ -881,7 +882,7 @@
}
if (customView != null) {
- final LayoutParams lp = generateLayoutParams(customView.getLayoutParams());
+ final ViewGroup.LayoutParams lp = generateLayoutParams(customView.getLayoutParams());
final ActionBar.LayoutParams ablp = lp instanceof ActionBar.LayoutParams ?
(ActionBar.LayoutParams) lp : null;
@@ -1017,7 +1018,7 @@
customView = mCustomNavView;
}
if (customView != null) {
- LayoutParams lp = customView.getLayoutParams();
+ ViewGroup.LayoutParams lp = customView.getLayoutParams();
final ActionBar.LayoutParams ablp = lp instanceof ActionBar.LayoutParams ?
(ActionBar.LayoutParams) lp : null;
@@ -1095,12 +1096,12 @@
}
@Override
- public LayoutParams generateLayoutParams(AttributeSet attrs) {
+ public ViewGroup.LayoutParams generateLayoutParams(AttributeSet attrs) {
return new ActionBar.LayoutParams(getContext(), attrs);
}
@Override
- public LayoutParams generateLayoutParams(LayoutParams lp) {
+ public ViewGroup.LayoutParams generateLayoutParams(ViewGroup.LayoutParams lp) {
if (lp == null) {
lp = generateDefaultLayoutParams();
}
diff --git a/core/res/res/anim-sw600dp/activity_close_enter.xml b/core/res/res/anim-sw600dp/activity_close_enter.xml
deleted file mode 100644
index c17786f..0000000
--- a/core/res/res/anim-sw600dp/activity_close_enter.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2009, 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.
-*/
--->
-
-<set xmlns:android="http://schemas.android.com/apk/res/android" android:zAdjustment="normal">
- <alpha android:fromAlpha="1.0" android:toAlpha="1.0"
- android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
- android:duration="@android:integer/config_shortAnimTime"/>
-</set>
\ No newline at end of file
diff --git a/core/res/res/anim-sw600dp/activity_close_exit.xml b/core/res/res/anim-sw600dp/activity_close_exit.xml
deleted file mode 100644
index ba33640..0000000
--- a/core/res/res/anim-sw600dp/activity_close_exit.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2009, 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.
-*/
--->
-
-<set xmlns:android="http://schemas.android.com/apk/res/android"
- android:shareInterpolator="false"
- android:zAdjustment="top">
- <alpha android:fromAlpha="1.0" android:toAlpha="0.0"
- android:interpolator="@interpolator/accelerate_decelerate"
- android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
- android:duration="@android:integer/config_shortAnimTime"/>
- <scale android:fromXScale="1.0" android:toXScale="1.1"
- android:fromYScale="1.0" android:toYScale="1.1"
- android:pivotX="50%p" android:pivotY="50%p"
- android:interpolator="@interpolator/accelerate_decelerate"
- android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
- android:duration="@android:integer/config_shortAnimTime"/>
-</set>
\ No newline at end of file
diff --git a/core/res/res/anim-sw600dp/activity_open_enter.xml b/core/res/res/anim-sw600dp/activity_open_enter.xml
deleted file mode 100644
index c4b5ed7..0000000
--- a/core/res/res/anim-sw600dp/activity_open_enter.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2009, 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.
-*/
--->
-
-<set xmlns:android="http://schemas.android.com/apk/res/android"
- android:shareInterpolator="false"
- android:zAdjustment="top">
- <alpha android:fromAlpha="0.0" android:toAlpha="1.0"
- android:interpolator="@interpolator/accelerate_decelerate"
- android:fillEnabled="true"
- android:fillBefore="false" android:fillAfter="false"
- android:duration="@android:integer/config_shortAnimTime"/>
- <scale android:fromXScale="1.1" android:toXScale="1.0"
- android:fromYScale="1.1" android:toYScale="1.0"
- android:pivotX="50%p" android:pivotY="50%p"
- android:interpolator="@interpolator/accelerate_decelerate"
- android:fillEnabled="true"
- android:fillBefore="false" android:fillAfter="false"
- android:duration="@android:integer/config_shortAnimTime"/>
-</set>
\ No newline at end of file
diff --git a/core/res/res/anim-sw600dp/activity_open_exit.xml b/core/res/res/anim-sw600dp/activity_open_exit.xml
deleted file mode 100644
index b386b8bc..0000000
--- a/core/res/res/anim-sw600dp/activity_open_exit.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2009, 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.
-*/
--->
-
-<set xmlns:android="http://schemas.android.com/apk/res/android" android:zAdjustment="normal">
- <alpha android:fromAlpha="1.0" android:toAlpha="1.0"
- android:fillEnabled="true" android:fillBefore="false" android:fillAfter="false"
- android:duration="@android:integer/config_shortAnimTime"/>
-</set>
\ No newline at end of file
diff --git a/core/res/res/anim-sw600dp/wallpaper_close_enter.xml b/core/res/res/anim-sw600dp/wallpaper_close_enter.xml
deleted file mode 100644
index b65ecf4..0000000
--- a/core/res/res/anim-sw600dp/wallpaper_close_enter.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2009, 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.
-*/
--->
-
-<set xmlns:android="http://schemas.android.com/apk/res/android"
- android:detachWallpaper="true" android:shareInterpolator="false"
- android:zAdjustment="top">
-
- <alpha android:fromAlpha="0.0" android:toAlpha="1.0"
- android:interpolator="@interpolator/decelerate_cubic"
- android:fillEnabled="true"
- android:fillBefore="false" android:fillAfter="true"
- android:duration="@android:integer/config_shortAnimTime"/>
-
- <scale android:fromXScale="2.0" android:toXScale="1.0"
- android:fromYScale="0.1" android:toYScale="1.0"
- android:pivotX="50%p" android:pivotY="50%p"
- android:interpolator="@interpolator/decelerate_quint"
- android:fillEnabled="true"
- android:fillBefore="false" android:fillAfter="true"
- android:duration="@android:integer/config_shortAnimTime"/>
-
-</set>
\ No newline at end of file
diff --git a/core/res/res/anim-sw600dp/wallpaper_close_exit.xml b/core/res/res/anim-sw600dp/wallpaper_close_exit.xml
deleted file mode 100644
index fabfacc..0000000
--- a/core/res/res/anim-sw600dp/wallpaper_close_exit.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2009, 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.
-*/
--->
-
-<set xmlns:android="http://schemas.android.com/apk/res/android"
- android:detachWallpaper="false" android:shareInterpolator="false"
- android:zAdjustment="normal">
- <alpha android:fromAlpha="1.0" android:toAlpha="1.0"
- android:interpolator="@interpolator/decelerate_cubic"
- android:fillEnabled="true"
- android:fillBefore="true" android:fillAfter="true"
- android:duration="@android:integer/config_shortAnimTime"/>
-</set>
\ No newline at end of file
diff --git a/core/res/res/anim-sw600dp/wallpaper_open_enter.xml b/core/res/res/anim-sw600dp/wallpaper_open_enter.xml
deleted file mode 100644
index 96bdf42..0000000
--- a/core/res/res/anim-sw600dp/wallpaper_open_enter.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2009, 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.
-*/
--->
-
-<set xmlns:android="http://schemas.android.com/apk/res/android"
- android:detachWallpaper="false" android:shareInterpolator="false"
- android:zAdjustment="normal">
- <alpha android:fromAlpha="1.0" android:toAlpha="1.0"
- android:interpolator="@interpolator/accelerate_cubic"
- android:fillEnabled="true"
- android:fillBefore="true" android:fillAfter="true"
- android:duration="@android:integer/config_shortAnimTime"/>
-</set>
\ No newline at end of file
diff --git a/core/res/res/anim-sw600dp/wallpaper_open_exit.xml b/core/res/res/anim-sw600dp/wallpaper_open_exit.xml
deleted file mode 100644
index d7bcc5c..0000000
--- a/core/res/res/anim-sw600dp/wallpaper_open_exit.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2009, 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.
-*/
--->
-
-<set xmlns:android="http://schemas.android.com/apk/res/android"
- android:detachWallpaper="true" android:shareInterpolator="false"
- android:zAdjustment="top">
-
-
- <alpha android:fromAlpha="1.0" android:toAlpha="0.0"
- android:interpolator="@interpolator/accelerate_cubic"
- android:fillEnabled="true"
- android:fillBefore="true" android:fillAfter="false"
- android:duration="@android:integer/config_shortAnimTime"/>
-
-
- <scale android:fromXScale="1.0" android:toXScale="2.0"
- android:fromYScale="1.0" android:toYScale="0.1"
- android:pivotX="50%p" android:pivotY="50%p"
- android:interpolator="@interpolator/accelerate_quint"
- android:fillEnabled="true"
- android:fillBefore="true" android:fillAfter="false"
- android:duration="@android:integer/config_shortAnimTime" />
-
-</set>
\ No newline at end of file
diff --git a/core/res/res/anim/activity_close_enter.xml b/core/res/res/anim/activity_close_enter.xml
index c17786f..c759a83 100644
--- a/core/res/res/anim/activity_close_enter.xml
+++ b/core/res/res/anim/activity_close_enter.xml
@@ -21,4 +21,11 @@
<alpha android:fromAlpha="1.0" android:toAlpha="1.0"
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
android:duration="@android:integer/config_shortAnimTime"/>
+ <scale android:fromXScale=".95" android:toXScale="1.0"
+ android:fromYScale=".95" android:toYScale="1.0"
+ android:pivotX="50%p" android:pivotY="50%p"
+ android:interpolator="@interpolator/accelerate_quint"
+ android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
+ android:duration="@android:integer/config_shortAnimTime"/>
+
</set>
\ No newline at end of file
diff --git a/core/res/res/anim/activity_close_exit.xml b/core/res/res/anim/activity_close_exit.xml
index e560a41..384810f2 100644
--- a/core/res/res/anim/activity_close_exit.xml
+++ b/core/res/res/anim/activity_close_exit.xml
@@ -18,16 +18,15 @@
-->
<set xmlns:android="http://schemas.android.com/apk/res/android"
- android:shareInterpolator="false"
- android:zAdjustment="top">
+ android:shareInterpolator="false" android:zAdjustment="top">
<alpha android:fromAlpha="1.0" android:toAlpha="0.0"
- android:interpolator="@interpolator/accelerate_decelerate"
+ android:interpolator="@interpolator/decelerate_cubic"
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
android:duration="@android:integer/config_shortAnimTime"/>
- <scale android:fromXScale="1.0" android:toXScale="1.15"
- android:fromYScale="1.0" android:toYScale="1.15"
+ <scale android:fromXScale="1.0" android:toXScale="1.1"
+ android:fromYScale="1.0" android:toYScale="1.1"
android:pivotX="50%p" android:pivotY="50%p"
- android:interpolator="@interpolator/accelerate_decelerate"
+ android:interpolator="@interpolator/decelerate_quint"
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
android:duration="@android:integer/config_shortAnimTime"/>
</set>
\ No newline at end of file
diff --git a/core/res/res/anim/activity_open_enter.xml b/core/res/res/anim/activity_open_enter.xml
index 55fcc0d..744153d 100644
--- a/core/res/res/anim/activity_open_enter.xml
+++ b/core/res/res/anim/activity_open_enter.xml
@@ -21,14 +21,14 @@
android:shareInterpolator="false"
android:zAdjustment="top">
<alpha android:fromAlpha="0.0" android:toAlpha="1.0"
- android:interpolator="@interpolator/accelerate_decelerate"
+ android:interpolator="@interpolator/decelerate_cubic"
android:fillEnabled="true"
android:fillBefore="false" android:fillAfter="false"
android:duration="@android:integer/config_shortAnimTime"/>
- <scale android:fromXScale="1.15" android:toXScale="1.0"
- android:fromYScale="1.15" android:toYScale="1.0"
+ <scale android:fromXScale="1.1" android:toXScale="1.0"
+ android:fromYScale="1.1" android:toYScale="1.0"
android:pivotX="50%p" android:pivotY="50%p"
- android:interpolator="@interpolator/accelerate_decelerate"
+ android:interpolator="@interpolator/decelerate_quint"
android:fillEnabled="true"
android:fillBefore="false" android:fillAfter="false"
android:duration="@android:integer/config_shortAnimTime"/>
diff --git a/core/res/res/anim/activity_open_exit.xml b/core/res/res/anim/activity_open_exit.xml
index b386b8bc..58e8816 100644
--- a/core/res/res/anim/activity_open_exit.xml
+++ b/core/res/res/anim/activity_open_exit.xml
@@ -21,4 +21,12 @@
<alpha android:fromAlpha="1.0" android:toAlpha="1.0"
android:fillEnabled="true" android:fillBefore="false" android:fillAfter="false"
android:duration="@android:integer/config_shortAnimTime"/>
+ <scale android:fromXScale="1.0" android:toXScale=".95"
+ android:fromYScale="1.0" android:toYScale=".95"
+ android:pivotX="50%p" android:pivotY="50%p"
+ android:interpolator="@interpolator/decelerate_quint"
+ android:fillEnabled="true"
+ android:fillBefore="false" android:fillAfter="false"
+ android:duration="@android:integer/config_shortAnimTime"/>
+
</set>
\ No newline at end of file
diff --git a/core/res/res/anim/lock_screen_behind_enter.xml b/core/res/res/anim/lock_screen_behind_enter.xml
index 232096c..4f58be4 100644
--- a/core/res/res/anim/lock_screen_behind_enter.xml
+++ b/core/res/res/anim/lock_screen_behind_enter.xml
@@ -19,10 +19,18 @@
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:detachWallpaper="true" android:shareInterpolator="false">
+ <scale
+ android:fromXScale="0.95" android:toXScale="1.0"
+ android:fromYScale="0.95" android:toYScale="1.0"
+ android:pivotX="50%p" android:pivotY="50%p"
+ android:fillEnabled="true" android:fillBefore="true"
+ android:interpolator="@interpolator/decelerate_cubic"
+ android:startOffset="@android:integer/config_shortAnimTime"
+ android:duration="@android:integer/config_shortAnimTime" />
<alpha
- android:fromAlpha="0" android:toAlpha="1.0"
+ android:fromAlpha="0.0" android:toAlpha="1.0"
android:fillEnabled="true" android:fillBefore="true"
android:interpolator="@interpolator/decelerate_quad"
android:startOffset="@android:integer/config_shortAnimTime"
- android:duration="300"/>
+ android:duration="@android:integer/config_shortAnimTime"/>
</set>
\ No newline at end of file
diff --git a/core/res/res/anim/lock_screen_exit.xml b/core/res/res/anim/lock_screen_exit.xml
index c4b6fcb..a186126 100644
--- a/core/res/res/anim/lock_screen_exit.xml
+++ b/core/res/res/anim/lock_screen_exit.xml
@@ -19,16 +19,18 @@
<set xmlns:android="http://schemas.android.com/apk/res/android"
- android:shareInterpolator="false"
- android:zAdjustment="top">
- <alpha android:fromAlpha="1.0" android:toAlpha="0.0"
- android:interpolator="@interpolator/accelerate_decelerate"
- android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
- android:duration="@android:integer/config_shortAnimTime"/>
- <scale android:fromXScale="1.0" android:toXScale="1.15"
- android:fromYScale="1.0" android:toYScale="1.15"
- android:pivotX="50%p" android:pivotY="50%p"
- android:interpolator="@interpolator/accelerate_decelerate"
- android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
- android:duration="@android:integer/config_shortAnimTime"/>
+ android:zAdjustment="top"
+ android:shareInterpolator="false">
+ <scale
+ android:fromXScale="1.0" android:toXScale="1.15"
+ android:fromYScale="1.0" android:toYScale="1.15"
+ android:pivotX="50%p" android:pivotY="50%p"
+ android:fillEnabled="true" android:fillAfter="true"
+ android:interpolator="@interpolator/accelerate_quint"
+ android:duration="@android:integer/config_shortAnimTime" />
+ <alpha
+ android:fromAlpha="1.0" android:toAlpha="0"
+ android:fillEnabled="true" android:fillAfter="true"
+ android:interpolator="@interpolator/accelerate_quad"
+ android:duration="@android:integer/config_shortAnimTime"/>
</set>
\ No newline at end of file
diff --git a/core/res/res/anim/wallpaper_close_enter.xml b/core/res/res/anim/wallpaper_close_enter.xml
index 1cbe3ec..1ca5c0c 100644
--- a/core/res/res/anim/wallpaper_close_enter.xml
+++ b/core/res/res/anim/wallpaper_close_enter.xml
@@ -18,35 +18,17 @@
-->
<set xmlns:android="http://schemas.android.com/apk/res/android"
- android:detachWallpaper="true" android:shareInterpolator="false"
- android:zAdjustment="top">
-
- <alpha android:fromAlpha="0.0" android:toAlpha="0.5"
- android:interpolator="@interpolator/accelerate_cubic"
- android:fillEnabled="true"
- android:fillBefore="true" android:fillAfter="false"
- android:duration="140"/>
- <alpha android:fromAlpha="0.5" android:toAlpha="1.0"
- android:interpolator="@interpolator/decelerate_cubic"
- android:fillEnabled="true"
- android:fillBefore="false" android:fillAfter="true"
- android:startOffset="140"
- android:duration="140"/>
-
- <scale android:fromXScale="2.0" android:toXScale="1.5"
- android:fromYScale="0.01" android:toYScale="0.495"
- android:pivotX="50%p" android:pivotY="50%p"
- android:interpolator="@interpolator/accelerate_quint"
- android:fillEnabled="true"
- android:fillBefore="true" android:fillAfter="false"
- android:duration="140"/>
- <scale android:fromXScale="1.5" android:toXScale="1.0"
- android:fromYScale="0.495" android:toYScale="1.0"
- android:pivotX="50%p" android:pivotY="50%p"
- android:interpolator="@interpolator/decelerate_quint"
- android:fillEnabled="true"
- android:fillBefore="false" android:fillAfter="true"
- android:startOffset="140"
- android:duration="140"/>
-
+ android:shareInterpolator="false" android:zAdjustment="top">
+ <scale android:fromXScale="1.2" android:toXScale="1.0"
+ android:fromYScale=".8" android:toYScale="1.0"
+ android:pivotX="50%p" android:pivotY="50%p"
+ android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
+ android:interpolator="@interpolator/decelerate_quint"
+ android:startOffset="300"
+ android:duration="240" />
+ <alpha android:fromAlpha="0" android:toAlpha="1.0"
+ android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
+ android:interpolator="@interpolator/decelerate_quad"
+ android:startOffset="300"
+ android:duration="300"/>
</set>
\ No newline at end of file
diff --git a/core/res/res/anim/wallpaper_close_exit.xml b/core/res/res/anim/wallpaper_close_exit.xml
index ebeae6e..7e0e05f 100644
--- a/core/res/res/anim/wallpaper_close_exit.xml
+++ b/core/res/res/anim/wallpaper_close_exit.xml
@@ -18,11 +18,15 @@
-->
<set xmlns:android="http://schemas.android.com/apk/res/android"
- android:detachWallpaper="false" android:shareInterpolator="false"
- android:zAdjustment="normal">
- <alpha android:fromAlpha="1.0" android:toAlpha="1.0"
+ android:detachWallpaper="true" android:shareInterpolator="false" android:zAdjustment="normal">
+ <alpha android:fromAlpha="1.0" android:toAlpha="0"
+ android:fillEnabled="true" android:fillAfter="true"
android:interpolator="@interpolator/decelerate_cubic"
- android:fillEnabled="true"
- android:fillBefore="true" android:fillAfter="true"
- android:duration="280"/>
-</set>
+ android:duration="200"/>
+ <scale android:fromXScale="1.0" android:toXScale="0.95"
+ android:fromYScale="1.0" android:toYScale="0.95"
+ android:pivotX="50%p" android:pivotY="50%p"
+ android:fillEnabled="true" android:fillAfter="true"
+ android:interpolator="@interpolator/decelerate_quint"
+ android:duration="300" />
+</set>
\ No newline at end of file
diff --git a/core/res/res/anim/wallpaper_open_enter.xml b/core/res/res/anim/wallpaper_open_enter.xml
index 411ecd6..6fdbd40 100644
--- a/core/res/res/anim/wallpaper_open_enter.xml
+++ b/core/res/res/anim/wallpaper_open_enter.xml
@@ -18,11 +18,17 @@
-->
<set xmlns:android="http://schemas.android.com/apk/res/android"
- android:detachWallpaper="false" android:shareInterpolator="false"
- android:zAdjustment="normal">
- <alpha android:fromAlpha="1.0" android:toAlpha="1.0"
- android:interpolator="@interpolator/accelerate_cubic"
- android:fillEnabled="true"
- android:fillBefore="true" android:fillAfter="true"
- android:duration="280"/>
-</set>
+ android:detachWallpaper="true" android:shareInterpolator="false" android:zAdjustment="normal">
+ <scale android:fromXScale="0.95" android:toXScale="1.0"
+ android:fromYScale="0.95" android:toYScale="1.0"
+ android:pivotX="50%p" android:pivotY="50%p"
+ android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
+ android:interpolator="@interpolator/decelerate_quint"
+ android:startOffset="200"
+ android:duration="300" />
+ <alpha android:fromAlpha="0" android:toAlpha="1.0"
+ android:interpolator="@interpolator/decelerate_cubic"
+ android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
+ android:startOffset="200"
+ android:duration="300"/>
+</set>
\ No newline at end of file
diff --git a/core/res/res/anim/wallpaper_open_exit.xml b/core/res/res/anim/wallpaper_open_exit.xml
index f9e0996..075831b 100644
--- a/core/res/res/anim/wallpaper_open_exit.xml
+++ b/core/res/res/anim/wallpaper_open_exit.xml
@@ -18,35 +18,16 @@
-->
<set xmlns:android="http://schemas.android.com/apk/res/android"
- android:detachWallpaper="true" android:shareInterpolator="false"
- android:zAdjustment="top">
-
-
- <alpha android:fromAlpha="1.0" android:toAlpha="0.5"
+ android:shareInterpolator="false" android:zAdjustment="top">
+ <alpha android:fromAlpha="1.0" android:toAlpha="0.0"
android:interpolator="@interpolator/accelerate_cubic"
- android:fillEnabled="true"
- android:fillBefore="true" android:fillAfter="false"
- android:duration="140"/>
- <alpha android:fromAlpha="0.5" android:toAlpha="0.0"
- android:interpolator="@interpolator/decelerate_cubic"
- android:fillEnabled="true"
- android:fillBefore="false" android:fillAfter="true"
- android:startOffset="140" android:duration="140"/>
-
-
- <scale android:fromXScale="1.0" android:toXScale="1.5"
- android:fromYScale="1.0" android:toYScale="0.495"
+ android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
+ android:duration="200" />
+ <scale android:fromXScale="1.0" android:toXScale="1.2"
+ android:fromYScale="1.0" android:toYScale="0.8"
android:pivotX="50%p" android:pivotY="50%p"
android:interpolator="@interpolator/accelerate_quint"
- android:fillEnabled="true"
- android:fillBefore="true" android:fillAfter="false"
- android:duration="140" />
- <scale android:fromXScale="1.5" android:toXScale="2.0"
- android:fromYScale="0.495" android:toYScale="0.0"
- android:pivotX="50%p" android:pivotY="50%p"
- android:interpolator="@interpolator/decelerate_quint"
- android:fillEnabled="true"
- android:fillBefore="false" android:fillAfter="true"
- android:startOffset="140" android:duration="140" />
+ android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
+ android:duration="200" />
</set>
\ No newline at end of file
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 93cbde5..dae9f70 100755
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -5318,9 +5318,9 @@
<declare-styleable name="Switch">
<!-- Drawable to use as the "thumb" that switches back and forth. -->
- <attr name="switchThumb" format="reference" />
+ <attr name="thumb" />
<!-- Drawable to use as the "track" that the switch thumb slides within. -->
- <attr name="switchTrack" format="reference" />
+ <attr name="track" format="reference" />
<!-- Text to use when the switch is in the checked/"on" state. -->
<attr name="textOn" />
<!-- Text to use when the switch is in the unchecked/"off" state. -->
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index b9d05fd..fcd3bba 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -1713,6 +1713,11 @@
<public type="attr" name="switchTextOn" />
<public type="attr" name="switchTextOff" />
<public type="attr" name="switchPreferenceStyle" />
+ <public type="attr" name="switchTextAppearance" />
+ <public type="attr" name="track" />
+ <public type="attr" name="switchMinWidth" />
+ <public type="attr" name="switchPadding" />
+ <public type="attr" name="thumbTextPadding" />
<public type="attr" name="textSuggestionsWindowStyle" />
<public type="attr" name="textEditSuggestionItemLayout" />
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index a3e460e..8e0f300 100755
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -1789,7 +1789,7 @@
<!-- When the lock screen is showing and the phone plugged in, and the battery
is not fully charged, show the current charge %. -->
- <string name="lockscreen_plugged_in">Charging (<xliff:g id="number">%d</xliff:g><xliff:g id="percent">%%</xliff:g>)</string>
+ <string name="lockscreen_plugged_in">Charging, <xliff:g id="number">%d</xliff:g><xliff:g id="percent">%%</xliff:g></string>
<!-- When the lock screen is showing, the phone is plugged in and the battery is fully
charged, say that it is charged. -->
<string name="lockscreen_charged">Charged.</string>
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index 5a76ed4..c35c5e6 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -725,6 +725,11 @@
<item name="android:quickContactWindowSize">modeLarge</item>
</style>
+ <style name="Widget.CompoundButton.Switch">
+ <item name="android:textOn">@android:string/capital_on</item>
+ <item name="android:textOff">@android:string/capital_off</item>
+ </style>
+
<!-- Text Appearances -->
<eat-comment />
@@ -1919,8 +1924,8 @@
</style>
<style name="Widget.Holo.CompoundButton.Switch">
- <item name="android:switchTrack">@android:drawable/switch_track_holo_dark</item>
- <item name="android:switchThumb">@android:drawable/switch_inner_holo_dark</item>
+ <item name="android:track">@android:drawable/switch_track_holo_dark</item>
+ <item name="android:thumb">@android:drawable/switch_inner_holo_dark</item>
<item name="android:switchTextAppearance">@android:style/TextAppearance.Holo.Widget.Switch</item>
<item name="android:textOn">@android:string/capital_on</item>
<item name="android:textOff">@android:string/capital_off</item>
@@ -2293,6 +2298,17 @@
<item name="android:itemPadding">8dip</item>
</style>
+ <style name="Widget.Holo.Light.CompoundButton.Switch" parent="Widget.CompoundButton.Switch">
+ <item name="android:track">@android:drawable/switch_track_holo_light</item>
+ <item name="android:thumb">@android:drawable/switch_inner_holo_light</item>
+ <item name="android:switchTextAppearance">@android:style/TextAppearance.Holo.Widget.Switch</item>
+ <item name="android:textOn">@android:string/capital_on</item>
+ <item name="android:textOff">@android:string/capital_off</item>
+ <item name="android:thumbTextPadding">12dip</item>
+ <item name="android:switchMinWidth">96dip</item>
+ <item name="android:switchPadding">16dip</item>
+ </style>
+
<!-- Animation Styles -->
<style name="Animation.Holo" parent="Animation">
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index f8866f2..f434ce8 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -1215,6 +1215,7 @@
<item name="buttonStyleInset">@android:style/Widget.Holo.Light.Button.Inset</item>
<item name="buttonStyleToggle">@android:style/Widget.Holo.Light.Button.Toggle</item>
+ <item name="switchStyle">@android:style/Widget.Holo.Light.CompoundButton.Switch</item>
<item name="selectableItemBackground">@android:drawable/item_background_holo_light</item>
<item name="borderlessButtonStyle">@android:style/Widget.Holo.Light.Button.Borderless</item>
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index a5c9053..dbe4115 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -3084,7 +3084,7 @@
mRcDisplay.setCurrentClientId(
newClientGeneration, newClientEventReceiver, clearing);
} catch (RemoteException e) {
- Log.e(TAG, "Dead display in onRcDisplayUpdate() "+e);
+ Log.e(TAG, "Dead display in setNewRcClientOnDisplays_syncRcsCurrc() "+e);
// if we had a display before, stop monitoring its death
rcDisplay_stopDeathMonitor_syncRcStack();
mRcDisplay = null;
@@ -3103,7 +3103,7 @@
try {
se.mRcClient.setCurrentClientGenerationId(newClientGeneration);
} catch (RemoteException e) {
- Log.w(TAG, "Dead client in onRcDisplayUpdate()"+e);
+ Log.w(TAG, "Dead client in setNewRcClientGenerationOnClients_syncRcsCurrc()"+e);
stackIterator.remove();
se.unlinkToRcClientDeath();
}
@@ -3160,7 +3160,7 @@
rcse.mReceiverComponent /*event receiver*/,
false /*clearing*/);
- // ask the current client that it needs to send info
+ // tell the current client that it needs to send info
try {
mCurrentRcClient.onInformationRequested(mCurrentRcClientGen,
flags, mArtworkExpectedWidth, mArtworkExpectedHeight);
@@ -3457,6 +3457,21 @@
}
}
}
+
+ // we have a new display, tell the current client that it needs to send info
+ // (following lock order: mRCStack then mCurrentRcLock)
+ synchronized(mCurrentRcLock) {
+ if (mCurrentRcClient != null) {
+ // tell the current client that it needs to send info
+ try {
+ mCurrentRcClient.onInformationRequested(mCurrentRcClientGen,
+ RC_INFO_ALL, mArtworkExpectedWidth, mArtworkExpectedHeight);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Current valid remote client is dead: "+e);
+ mCurrentRcClient = null;
+ }
+ }
+ }
}
}
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
index e2d6c5f..b69a7c2 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
@@ -888,7 +888,8 @@
// Mark as handled
st.isHandled = true;
- if ((flags & Menu.FLAG_PERFORM_NO_CLOSE) == 0) {
+ // Only close down the menu if we don't have an action bar keeping it open.
+ if ((flags & Menu.FLAG_PERFORM_NO_CLOSE) == 0 && mActionBar == null) {
closePanel(st, true);
}
}
@@ -909,7 +910,10 @@
boolean res = st.menu.performIdentifierAction(id, flags);
- closePanel(st, true);
+ // Only close down the menu if we don't have an action bar keeping it open.
+ if (mActionBar == null) {
+ closePanel(st, true);
+ }
return res;
}
diff --git a/services/java/com/android/server/accessibility/TouchExplorer.java b/services/java/com/android/server/accessibility/TouchExplorer.java
index 4ad2916..496210c 100644
--- a/services/java/com/android/server/accessibility/TouchExplorer.java
+++ b/services/java/com/android/server/accessibility/TouchExplorer.java
@@ -21,11 +21,8 @@
import android.content.Context;
import android.os.Handler;
-import android.os.SystemClock;
import android.util.Slog;
import android.view.MotionEvent;
-import android.view.MotionEvent.PointerCoords;
-import android.view.MotionEvent.PointerProperties;
import android.view.ViewConfiguration;
import android.view.WindowManagerPolicy;
import android.view.accessibility.AccessibilityEvent;
@@ -75,11 +72,6 @@
// Invalid pointer ID.
private static final int INVALID_POINTER_ID = -1;
- // The coefficient by which to multiply
- // ViewConfiguration.#getScaledTouchExplorationTapSlop()
- // to compute #mDraggingDistance.
- private static final int COEFFICIENT_DRAGGING_DISTANCE = 2;
-
// The time slop in milliseconds for activating an item after it has
// been touch explored. Tapping on an item within this slop will perform
// a click and tapping and holding down a long press.
@@ -95,23 +87,14 @@
private static final float MIN_ANGLE_COS = 0.866025404f; // cos(pi/6)
// The delay for sending a hover enter event.
- private static final long DELAY_SEND_HOVER_MOVE = 200;
+ private static final long DELAY_SEND_HOVER_ENTER = 200;
+
+ // Constant referring to the ids bits of all pointers.
+ private static final int ALL_POINTER_ID_BITS = 0xFFFFFFFF;
// Temporary array for storing pointer IDs.
private final int[] mTempPointerIds = new int[MAX_POINTER_COUNT];
- // Temporary array for storing PointerProperties
- private final PointerProperties[] mTempPointerProperties =
- PointerProperties.createArray(MAX_POINTER_COUNT);
-
- // Temporary array for storing PointerCoords
- private final PointerCoords[] mTempPointerCoords =
- PointerCoords.createArray(MAX_POINTER_COUNT);
-
- // The maximal distance between two pointers so they are
- // considered to be performing a drag operation.
- private final float mDraggingDistance;
-
// The distance from the last touch explored location tapping within
// which would perform a click and tapping and holding a long press.
private final int mTouchExplorationTapSlop;
@@ -159,7 +142,6 @@
mInputFilter = inputFilter;
mTouchExplorationTapSlop =
ViewConfiguration.get(context).getScaledTouchExplorationTapSlop();
- mDraggingDistance = mTouchExplorationTapSlop * COEFFICIENT_DRAGGING_DISTANCE;
mPointerTracker = new PointerTracker(context);
mHandler = new Handler(context.getMainLooper());
mSendHoverDelayed = new SendHoverDelayed();
@@ -220,18 +202,21 @@
+ "touch exploring state!");
}
case 1: {
- // Send hover if pending.
- mSendHoverDelayed.forceSendAndRemove();
+ mSendHoverDelayed.remove();
// Send a hover for every finger down so the user gets feedback.
final int pointerId = pointerTracker.getPrimaryActivePointerId();
final int pointerIdBits = (1 << pointerId);
final int lastAction = pointerTracker.getLastInjectedHoverAction();
- // If a hover enter for another pointer is delivered we send move.
- final int action = (lastAction == MotionEvent.ACTION_HOVER_ENTER)
- ? MotionEvent.ACTION_HOVER_MOVE
- : MotionEvent.ACTION_HOVER_ENTER;
- mSendHoverDelayed.post(event, action, pointerIdBits, policyFlags,
- DELAY_SEND_HOVER_MOVE);
+
+ // Deliver hover enter with a delay to have a change to detect
+ // whether the user actually starts a scrolling gesture.
+ if (lastAction == MotionEvent.ACTION_HOVER_EXIT) {
+ mSendHoverDelayed.post(event, MotionEvent.ACTION_HOVER_ENTER,
+ pointerIdBits, policyFlags, DELAY_SEND_HOVER_ENTER);
+ } else {
+ sendMotionEvent(event, MotionEvent.ACTION_HOVER_MOVE, pointerIdBits,
+ policyFlags);
+ }
if (mLastTouchExploreEvent == null) {
break;
@@ -318,12 +303,11 @@
}
} break;
case 2: {
- mSendHoverDelayed.forceSendAndRemove();
+ mSendHoverDelayed.remove();
mPerformLongPressDelayed.remove();
// We want to no longer hover over the location so subsequent
// touch at the same spot will generate a hover enter.
- sendMotionEvent(event, MotionEvent.ACTION_HOVER_EXIT, pointerIdBits,
- policyFlags);
+ ensureHoverExitSent(event, pointerIdBits, policyFlags);
if (isDraggingGesture(event)) {
// Two pointers moving in the same direction within
@@ -340,6 +324,7 @@
} else {
// Two pointers moving arbitrary are delegated to the view hierarchy.
mCurrentState = STATE_DELEGATING;
+ mSendHoverDelayed.remove();
if (mTouchExploreGestureInProgress) {
sendAccessibilityEvent(TYPE_TOUCH_EXPLORATION_GESTURE_END);
mTouchExploreGestureInProgress = false;
@@ -349,12 +334,11 @@
}
} break;
default: {
- mSendHoverDelayed.forceSendAndRemove();
+ mSendHoverDelayed.remove();
mPerformLongPressDelayed.remove();
// We want to no longer hover over the location so subsequent
// touch at the same spot will generate a hover enter.
- sendMotionEvent(event, MotionEvent.ACTION_HOVER_EXIT, pointerIdBits,
- policyFlags);
+ ensureHoverExitSent(event, pointerIdBits, policyFlags);
// More than two pointers are delegated to the view hierarchy.
mCurrentState = STATE_DELEGATING;
@@ -379,8 +363,9 @@
break;
}
- mSendHoverDelayed.forceSendAndRemove();
mPerformLongPressDelayed.remove();
+ mSendHoverDelayed.forceSendAndRemove();
+ ensureHoverExitSent(event, pointerIdBits, policyFlags);
// If touch exploring announce the end of the gesture.
// Also do not click on the last explored location.
@@ -388,11 +373,6 @@
mTouchExploreGestureInProgress = false;
mLastTouchExploreEvent = MotionEvent.obtain(event);
sendAccessibilityEvent(TYPE_TOUCH_EXPLORATION_GESTURE_END);
- final int lastAction = mPointerTracker.getLastInjectedHoverAction();
- if (lastAction != MotionEvent.ACTION_HOVER_EXIT) {
- sendMotionEvent(event, MotionEvent.ACTION_HOVER_EXIT,
- pointerIdBits, policyFlags);
- }
break;
}
@@ -404,11 +384,6 @@
final long exploreTime = mLastTouchExploreEvent.getEventTime();
final long deltaTime = eventTime - exploreTime;
if (deltaTime > ACTIVATION_TIME_SLOP) {
- final int lastAction = mPointerTracker.getLastInjectedHoverAction();
- if (lastAction != MotionEvent.ACTION_HOVER_EXIT) {
- sendMotionEvent(event, MotionEvent.ACTION_HOVER_EXIT,
- pointerIdBits, policyFlags);
- }
mLastTouchExploreEvent = MotionEvent.obtain(event);
break;
}
@@ -421,11 +396,6 @@
- event.getY(pointerIndex);
final float deltaMove = (float) Math.hypot(deltaX, deltaY);
if (deltaMove > mTouchExplorationTapSlop) {
- final int lastAction = mPointerTracker.getLastInjectedHoverAction();
- if (lastAction != MotionEvent.ACTION_HOVER_EXIT) {
- sendMotionEvent(event, MotionEvent.ACTION_HOVER_EXIT,
- pointerIdBits, policyFlags);
- }
mLastTouchExploreEvent = MotionEvent.obtain(event);
break;
}
@@ -434,12 +404,6 @@
sendActionDownAndUp(mLastTouchExploreEvent, policyFlags);
mLastTouchExploreEvent = null;
} else {
- mSendHoverDelayed.forceSendAndRemove();
- final int lastAction = mPointerTracker.getLastInjectedHoverAction();
- if (lastAction != MotionEvent.ACTION_HOVER_EXIT) {
- sendMotionEvent(event, MotionEvent.ACTION_HOVER_EXIT,
- pointerIdBits, policyFlags);
- }
mLastTouchExploreEvent = MotionEvent.obtain(event);
}
} break;
@@ -448,13 +412,9 @@
case MotionEvent.ACTION_CANCEL: {
mSendHoverDelayed.remove();
mPerformLongPressDelayed.remove();
- final int lastAction = pointerTracker.getLastInjectedHoverAction();
- if (lastAction != MotionEvent.ACTION_HOVER_EXIT) {
- final int pointerId = pointerTracker.getPrimaryActivePointerId();
- final int pointerIdBits = (1 << pointerId);
- sendMotionEvent(event, MotionEvent.ACTION_HOVER_EXIT, pointerIdBits,
- policyFlags);
- }
+ final int pointerId = pointerTracker.getPrimaryActivePointerId();
+ final int pointerIdBits = (1 << pointerId);
+ ensureHoverExitSent(event, pointerIdBits, policyFlags);
clear();
} break;
}
@@ -540,7 +500,8 @@
// a given distance and if such exist send them to the view hierarchy
final int notInjectedCount = mPointerTracker.getNotInjectedActivePointerCount();
if (notInjectedCount > 0) {
- sendDownForAllActiveNotInjectedPointers(event, policyFlags);
+ MotionEvent prototype = MotionEvent.obtain(event);
+ sendDownForAllActiveNotInjectedPointers(prototype, policyFlags);
}
} break;
case MotionEvent.ACTION_POINTER_UP: {
@@ -565,42 +526,47 @@
* @param policyFlags The policy flags associated with the event.
*/
private void sendDownForAllActiveNotInjectedPointers(MotionEvent prototype, int policyFlags) {
- final PointerProperties[] pointerProperties = mTempPointerProperties;
- final PointerCoords[] pointerCoords = mTempPointerCoords;
final PointerTracker pointerTracker = mPointerTracker;
- int pointerDataIndex = 0;
+ int pointerIdBits = 0;
+ final int pointerCount = prototype.getPointerCount();
- final int pinterCount = prototype.getPointerCount();
- for (int i = 0; i < pinterCount; i++) {
+ // Find which pointers are already injected.
+ for (int i = 0; i < pointerCount; i++) {
final int pointerId = prototype.getPointerId(i);
+ if (pointerTracker.isInjectedPointerDown(pointerId)) {
+ pointerIdBits |= (1 << pointerId);
+ }
+ }
+ // Inject the active and not injected pointers.
+ for (int i = 0; i < pointerCount; i++) {
+ final int pointerId = prototype.getPointerId(i);
// Skip inactive pointers.
if (!pointerTracker.isActivePointer(pointerId)) {
continue;
}
- // Skip already delivered pointers.
+ // Do not send event for already delivered pointers.
if (pointerTracker.isInjectedPointerDown(pointerId)) {
continue;
}
+ pointerIdBits |= (1 << pointerId);
+ final int action = computeInjectionAction(MotionEvent.ACTION_DOWN, i);
+ sendMotionEvent(prototype, action, pointerIdBits, policyFlags);
+ }
+ }
- // Populate and inject an event for the current pointer.
- prototype.getPointerProperties(i, pointerProperties[pointerDataIndex]);
- prototype.getPointerCoords(i, pointerCoords[pointerDataIndex]);
-
- final long downTime = pointerTracker.getLastInjectedDownEventTime();
- final int action = computeInjectionAction(MotionEvent.ACTION_DOWN, pointerDataIndex);
- final int pointerCount = pointerDataIndex + 1;
- final long eventTime = SystemClock.uptimeMillis();
-
- MotionEvent event = MotionEvent.obtain(downTime, eventTime,
- action, pointerCount, pointerProperties, pointerCoords,
- prototype.getMetaState(), prototype.getButtonState(),
- prototype.getXPrecision(), prototype.getYPrecision(), prototype.getDeviceId(),
- prototype.getEdgeFlags(), prototype.getSource(), prototype.getFlags());
- sendMotionEvent(event, policyFlags);
- event.recycle();
-
- pointerDataIndex++;
+ /**
+ * Ensures that hover exit has been sent.
+ *
+ * @param prototype The prototype from which to create the injected events.
+ * @param pointerIdBits The bits of the pointers to send.
+ * @param policyFlags The policy flags associated with the event.
+ */
+ private void ensureHoverExitSent(MotionEvent prototype, int pointerIdBits, int policyFlags) {
+ final int lastAction = mPointerTracker.getLastInjectedHoverAction();
+ if (lastAction != MotionEvent.ACTION_HOVER_EXIT) {
+ sendMotionEvent(prototype, MotionEvent.ACTION_HOVER_EXIT, pointerIdBits,
+ policyFlags);
}
}
@@ -613,38 +579,17 @@
*/
private void sendUpForInjectedDownPointers(MotionEvent prototype, int policyFlags) {
final PointerTracker pointerTracker = mPointerTracker;
- final PointerProperties[] pointerProperties = mTempPointerProperties;
- final PointerCoords[] pointerCoords = mTempPointerCoords;
- int pointerDataIndex = 0;
-
- final int pointerCount = prototype.getPointerCount();
+ int pointerIdBits = 0;
+ final int pointerCount = prototype.getPointerCount();
for (int i = 0; i < pointerCount; i++) {
final int pointerId = prototype.getPointerId(i);
-
// Skip non injected down pointers.
if (!pointerTracker.isInjectedPointerDown(pointerId)) {
continue;
}
-
- // Populate and inject event.
- prototype.getPointerProperties(i, pointerProperties[pointerDataIndex]);
- prototype.getPointerCoords(i, pointerCoords[pointerDataIndex]);
-
- final long downTime = pointerTracker.getLastInjectedDownEventTime();
- final int action = computeInjectionAction(MotionEvent.ACTION_UP, pointerDataIndex);
- final int newPointerCount = pointerDataIndex + 1;
- final long eventTime = SystemClock.uptimeMillis();
-
- MotionEvent event = MotionEvent.obtain(downTime, eventTime, action,
- newPointerCount, pointerProperties, pointerCoords,
- prototype.getMetaState(), prototype.getButtonState(),
- prototype.getXPrecision(), prototype.getYPrecision(), prototype.getDeviceId(),
- prototype.getEdgeFlags(), prototype.getSource(), prototype.getFlags());
-
- sendMotionEvent(event, policyFlags);
- event.recycle();
-
- pointerDataIndex++;
+ pointerIdBits |= (1 << pointerId);
+ final int action = computeInjectionAction(MotionEvent.ACTION_UP, i);
+ sendMotionEvent(prototype, action, pointerIdBits, policyFlags);
}
}
@@ -659,7 +604,7 @@
// All pointers active therefore we just inject the event as is.
if (prototype.getPointerCount() == pointerTracker.getActivePointerCount()) {
- sendMotionEvent(prototype, policyFlags);
+ sendMotionEvent(prototype, prototype.getAction(), ALL_POINTER_ID_BITS, policyFlags);
return;
}
@@ -670,20 +615,27 @@
return;
}
+ // If the action pointer going up/down is not active we have nothing to do.
+ // However, for moves we keep going to report moves of active pointers.
+ final int actionMasked = prototype.getActionMasked();
+ final int actionPointerId = prototype.getPointerId(prototype.getActionIndex());
+ if (actionMasked != MotionEvent.ACTION_MOVE) {
+ if (!pointerTracker.isActiveOrWasLastActiveUpPointer(actionPointerId)) {
+ return;
+ }
+ }
+
+ // If the pointer is active or the pointer that just went up
+ // was active we keep the pointer data in the event.
int pointerIdBits = 0;
final int pointerCount = prototype.getPointerCount();
for (int pointerIndex = 0; pointerIndex < pointerCount; pointerIndex++) {
final int pointerId = prototype.getPointerId(pointerIndex);
- // If the pointer is inactive or the pointer that just went up
- // was inactive we strip the pointer data from the event.
if (pointerTracker.isActiveOrWasLastActiveUpPointer(pointerId)) {
pointerIdBits |= (1 << pointerId);
}
}
-
- MotionEvent event = prototype.split(pointerIdBits);
- sendMotionEvent(event, policyFlags);
- event.recycle();
+ sendMotionEvent(prototype, prototype.getAction(), pointerIdBits, policyFlags);
}
/**
@@ -693,26 +645,11 @@
* @param policyFlags The policy flags associated with the event.
*/
private void sendActionDownAndUp(MotionEvent prototype, int policyFlags) {
- final PointerProperties[] pointerProperties = mTempPointerProperties;
- final PointerCoords[] pointerCoords = mTempPointerCoords;
- final int pointerIndex = prototype.getActionIndex();
-
- // Send down.
- prototype.getPointerProperties(pointerIndex, pointerProperties[0]);
- prototype.getPointerCoords(pointerIndex, pointerCoords[0]);
-
- final long downTime = SystemClock.uptimeMillis();
- MotionEvent event = MotionEvent.obtain(downTime, downTime, MotionEvent.ACTION_DOWN,
- 1, pointerProperties, pointerCoords,
- prototype.getMetaState(), prototype.getButtonState(),
- prototype.getXPrecision(), prototype.getYPrecision(), prototype.getDeviceId(),
- prototype.getEdgeFlags(), prototype.getSource(), prototype.getFlags());
- sendMotionEvent(event, policyFlags);
-
- // Send up.
- event.setAction(MotionEvent.ACTION_UP);
- sendMotionEvent(event, policyFlags);
- event.recycle();
+ // Tap with the pointer that last went up - we may have inactive pointers.
+ final int pointerId = mPointerTracker.getLastReceivedUpPointerId();
+ final int pointerIdBits = (1 << pointerId);
+ sendMotionEvent(prototype, MotionEvent.ACTION_DOWN, pointerIdBits, policyFlags);
+ sendMotionEvent(prototype, MotionEvent.ACTION_UP, pointerIdBits, policyFlags);
}
/**
@@ -725,11 +662,33 @@
*/
private void sendMotionEvent(MotionEvent prototype, int action, int pointerIdBits,
int policyFlags) {
- MotionEvent event = prototype.split(pointerIdBits);
- event.setDownTime(mPointerTracker.getLastInjectedDownEventTime());
- event.setAction(action);
- sendMotionEvent(event, policyFlags);
- event.recycle();
+ prototype.setAction(action);
+
+ MotionEvent event = null;
+ if (pointerIdBits == ALL_POINTER_ID_BITS) {
+ event = prototype;
+ } else {
+ event = prototype.split(pointerIdBits);
+ }
+ if (action == MotionEvent.ACTION_DOWN) {
+ event.setDownTime(event.getEventTime());
+ } else {
+ event.setDownTime(mPointerTracker.getLastInjectedDownEventTime());
+ }
+
+ if (DEBUG) {
+ Slog.d(LOG_TAG_INJECTED, "Injecting event: " + event + ", policyFlags=0x"
+ + Integer.toHexString(policyFlags));
+ }
+
+ // Make sure that the user will see the event.
+ policyFlags |= WindowManagerPolicy.FLAG_PASS_TO_USER;
+ mPointerTracker.onInjectedMotionEvent(event);
+ mInputFilter.sendInputEvent(event, policyFlags);
+
+ if (event != prototype) {
+ event.recycle();
+ }
}
/**
@@ -787,19 +746,16 @@
final float secondPtrX = event.getX(secondPtrIndex);
final float secondPtrY = event.getY(secondPtrIndex);
- // Check if the pointers are close enough.
- final float deltaX = firstPtrX - secondPtrX;
- final float deltaY = firstPtrY - secondPtrY;
- final float deltaMove = (float) Math.hypot(deltaX, deltaY);
- if (deltaMove > mDraggingDistance) {
- return false;
- }
-
// Check if the pointers are moving in the same direction.
final float firstDeltaX =
firstPtrX - pointerTracker.getReceivedPointerDownX(firstPtrIndex);
final float firstDeltaY =
firstPtrY - pointerTracker.getReceivedPointerDownY(firstPtrIndex);
+
+ if (firstDeltaX == 0 && firstDeltaY == 0) {
+ return true;
+ }
+
final float firstMagnitude =
(float) Math.sqrt(firstDeltaX * firstDeltaX + firstDeltaY * firstDeltaY);
final float firstXNormalized =
@@ -811,6 +767,11 @@
secondPtrX - pointerTracker.getReceivedPointerDownX(secondPtrIndex);
final float secondDeltaY =
secondPtrY - pointerTracker.getReceivedPointerDownY(secondPtrIndex);
+
+ if (secondDeltaX == 0 && secondDeltaY == 0) {
+ return true;
+ }
+
final float secondMagnitude =
(float) Math.sqrt(secondDeltaX * secondDeltaX + secondDeltaY * secondDeltaY);
final float secondXNormalized =
@@ -839,23 +800,6 @@
}
/**
- * Sends a motion event to the input filter for injection.
- *
- * @param event The event to send.
- * @param policyFlags The policy flags associated with the event.
- */
- private void sendMotionEvent(MotionEvent event, int policyFlags) {
- if (DEBUG) {
- Slog.d(LOG_TAG_INJECTED, "Injecting event: " + event + ", policyFlags=0x"
- + Integer.toHexString(policyFlags));
- }
- // Make sure that the user will see the event.
- policyFlags |= WindowManagerPolicy.FLAG_PASS_TO_USER;
- mPointerTracker.onInjectedMotionEvent(event);
- mInputFilter.sendInputEvent(event, policyFlags);
- }
-
- /**
* Clears the internal state of this explorer.
*/
public void clear() {
@@ -1013,6 +957,7 @@
switch (action) {
case MotionEvent.ACTION_DOWN: {
handleInjectedPointerDown(event.getActionIndex(), event);
+ mLastInjectedDownEventTime = event.getDownTime();
} break;
case MotionEvent.ACTION_POINTER_DOWN: {
handleInjectedPointerDown(event.getActionIndex(), event);
@@ -1270,7 +1215,6 @@
final int pointerId = event.getPointerId(pointerIndex);
final int pointerFlag = (1 << pointerId);
mInjectedPointersDown |= pointerFlag;
- mLastInjectedDownEventTime = event.getEventTime();
}
/**
@@ -1406,7 +1350,11 @@
public void run() {
mCurrentState = STATE_DELEGATING;
// Make sure the scheduled hover exit is delivered.
- mSendHoverDelayed.forceSendAndRemove();
+ mSendHoverDelayed.remove();
+ final int pointerId = mPointerTracker.getPrimaryActivePointerId();
+ final int pointerIdBits = (1 << pointerId);
+ ensureHoverExitSent(mEvent, pointerIdBits, mPolicyFlags);
+
sendDownForAllActiveNotInjectedPointers(mEvent, mPolicyFlags);
mTouchExploreGestureInProgress = false;
mLastTouchExploreEvent = null;