summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/current.txt302
-rw-r--r--core/java/android/view/GhostView.java47
-rw-r--r--core/jni/android_hardware_camera2_DngCreator.cpp4
-rw-r--r--core/res/res/values/attrs.xml4
-rw-r--r--core/res/res/values/public.xml2
-rw-r--r--docs/html/preview/api-overview.jd24
-rw-r--r--docs/html/preview/support.jd12
-rw-r--r--graphics/java/android/graphics/drawable/RippleDrawable.java34
-rw-r--r--packages/SystemUI/res/drawable/recents_task_view_header_bg.xml20
-rw-r--r--packages/SystemUI/res/layout/recents_task_view.xml4
-rw-r--r--packages/SystemUI/res/values/config.xml2
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java13
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java39
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/misc/Utilities.java11
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java7
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java21
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java62
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewLayoutAlgorithm.java22
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewScroller.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java145
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java119
-rw-r--r--services/core/java/com/android/server/location/GpsLocationProvider.java107
23 files changed, 696 insertions, 313 deletions
diff --git a/api/current.txt b/api/current.txt
index e8d1369..de305b6 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -272,14 +272,14 @@ package android {
field public static final int action = 16842797; // 0x101002d
field public static final int actionBarDivider = 16843675; // 0x101039b
field public static final int actionBarItemBackground = 16843676; // 0x101039c
- field public static final int actionBarPopupTheme = 16843917; // 0x101048d
+ field public static final int actionBarPopupTheme = 16843919; // 0x101048f
field public static final int actionBarSize = 16843499; // 0x10102eb
field public static final int actionBarSplitStyle = 16843656; // 0x1010388
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 actionBarTheme = 16843825; // 0x1010431
+ field public static final int actionBarTheme = 16843827; // 0x1010433
field public static final int actionBarWidgetTheme = 16843671; // 0x1010397
field public static final int actionButtonStyle = 16843480; // 0x10102d8
field public static final int actionDropDownStyle = 16843479; // 0x10102d7
@@ -291,15 +291,15 @@ package android {
field public static final int actionModeCloseDrawable = 16843484; // 0x10102dc
field public static final int actionModeCopyDrawable = 16843538; // 0x1010312
field public static final int actionModeCutDrawable = 16843537; // 0x1010311
- field public static final int actionModeFindDrawable = 16843898; // 0x101047a
+ field public static final int actionModeFindDrawable = 16843900; // 0x101047c
field public static final int actionModePasteDrawable = 16843539; // 0x1010313
field public static final int actionModeSelectAllDrawable = 16843646; // 0x101037e
- field public static final int actionModeShareDrawable = 16843897; // 0x1010479
+ field public static final int actionModeShareDrawable = 16843899; // 0x101047b
field public static final int actionModeSplitBackground = 16843677; // 0x101039d
field public static final int actionModeStyle = 16843668; // 0x1010394
- field public static final int actionModeWebSearchDrawable = 16843899; // 0x101047b
+ field public static final int actionModeWebSearchDrawable = 16843901; // 0x101047d
field public static final int actionOverflowButtonStyle = 16843510; // 0x10102f6
- field public static final int actionOverflowMenuStyle = 16843844; // 0x1010444
+ field public static final int actionOverflowMenuStyle = 16843846; // 0x1010446
field public static final int actionProviderClass = 16843657; // 0x1010389
field public static final int actionViewClass = 16843516; // 0x10102fc
field public static final int activatedBackgroundIndicator = 16843517; // 0x10102fd
@@ -326,8 +326,8 @@ package android {
field public static final int alphabeticShortcut = 16843235; // 0x10101e3
field public static final int alwaysDrawnWithCache = 16842991; // 0x10100ef
field public static final int alwaysRetainTaskState = 16843267; // 0x1010203
- field public static final int amPmBackgroundColor = 16843942; // 0x10104a6
- field public static final int amPmTextColor = 16843941; // 0x10104a5
+ field public static final int amPmBackgroundColor = 16843944; // 0x10104a8
+ field public static final int amPmTextColor = 16843943; // 0x10104a7
field public static final int angle = 16843168; // 0x10101a0
field public static final int animateFirstView = 16843477; // 0x10102d5
field public static final int animateLayoutChanges = 16843506; // 0x10102f2
@@ -347,7 +347,7 @@ package android {
field public static final int autoCompleteTextViewStyle = 16842859; // 0x101006b
field public static final int autoLink = 16842928; // 0x10100b0
field public static final int autoMirrored = 16843754; // 0x10103ea
- field public static final int autoRemoveFromRecents = 16843847; // 0x1010447
+ field public static final int autoRemoveFromRecents = 16843849; // 0x1010449
field public static final int autoStart = 16843445; // 0x10102b5
field public static final deprecated int autoText = 16843114; // 0x101016a
field public static final int autoUrlDetect = 16843404; // 0x101028c
@@ -356,8 +356,8 @@ package android {
field public static final int backgroundDimEnabled = 16843295; // 0x101021f
field public static final int backgroundSplit = 16843659; // 0x101038b
field public static final int backgroundStacked = 16843658; // 0x101038a
- field public static final int backgroundTint = 16843883; // 0x101046b
- field public static final int backgroundTintMode = 16843884; // 0x101046c
+ field public static final int backgroundTint = 16843885; // 0x101046d
+ field public static final int backgroundTintMode = 16843886; // 0x101046e
field public static final int backupAgent = 16843391; // 0x101027f
field public static final int banner = 16843762; // 0x10103f2
field public static final int baseline = 16843548; // 0x101031c
@@ -377,18 +377,18 @@ package android {
field public static final int bufferType = 16843086; // 0x101014e
field public static final int button = 16843015; // 0x1010107
field public static final int buttonBarButtonStyle = 16843567; // 0x101032f
- field public static final int buttonBarNegativeButtonStyle = 16843915; // 0x101048b
- field public static final int buttonBarNeutralButtonStyle = 16843914; // 0x101048a
- field public static final int buttonBarPositiveButtonStyle = 16843913; // 0x1010489
+ field public static final int buttonBarNegativeButtonStyle = 16843917; // 0x101048d
+ field public static final int buttonBarNeutralButtonStyle = 16843916; // 0x101048c
+ field public static final int buttonBarPositiveButtonStyle = 16843915; // 0x101048b
field public static final int buttonBarStyle = 16843566; // 0x101032e
field public static final int buttonStyle = 16842824; // 0x1010048
field public static final int buttonStyleInset = 16842826; // 0x101004a
field public static final int buttonStyleSmall = 16842825; // 0x1010049
field public static final int buttonStyleToggle = 16842827; // 0x101004b
- field public static final int buttonTint = 16843887; // 0x101046f
- field public static final int buttonTintMode = 16843888; // 0x1010470
+ field public static final int buttonTint = 16843889; // 0x1010471
+ field public static final int buttonTintMode = 16843890; // 0x1010472
field public static final int cacheColorHint = 16843009; // 0x1010101
- field public static final int calendarTextColor = 16843931; // 0x101049b
+ field public static final int calendarTextColor = 16843933; // 0x101049d
field public static final int calendarViewShown = 16843596; // 0x101034c
field public static final int calendarViewStyle = 16843613; // 0x101035d
field public static final int canRequestEnhancedWebAccessibility = 16843736; // 0x10103d8
@@ -406,8 +406,8 @@ package android {
field public static final int centerY = 16843171; // 0x10101a3
field public static final int checkBoxPreferenceStyle = 16842895; // 0x101008f
field public static final int checkMark = 16843016; // 0x1010108
- field public static final int checkMarkTint = 16843944; // 0x10104a8
- field public static final int checkMarkTintMode = 16843945; // 0x10104a9
+ field public static final int checkMarkTint = 16843946; // 0x10104aa
+ field public static final int checkMarkTintMode = 16843947; // 0x10104ab
field public static final int checkable = 16843237; // 0x10101e5
field public static final int checkableBehavior = 16843232; // 0x10101e0
field public static final int checkboxStyle = 16842860; // 0x101006c
@@ -426,31 +426,31 @@ package android {
field public static final int clipChildren = 16842986; // 0x10100ea
field public static final int clipOrientation = 16843274; // 0x101020a
field public static final int clipToPadding = 16842987; // 0x10100eb
- field public static final int closeIcon = 16843905; // 0x1010481
+ field public static final int closeIcon = 16843907; // 0x1010483
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 colorAccent = 16843829; // 0x1010435
+ field public static final int colorAccent = 16843831; // 0x1010437
field public static final int colorActivatedHighlight = 16843664; // 0x1010390
field public static final int colorBackground = 16842801; // 0x1010031
field public static final int colorBackgroundCacheHint = 16843435; // 0x10102ab
- field public static final int colorButtonNormal = 16843819; // 0x101042b
- field public static final int colorControlActivated = 16843818; // 0x101042a
- field public static final int colorControlHighlight = 16843820; // 0x101042c
- field public static final int colorControlNormal = 16843817; // 0x1010429
+ field public static final int colorButtonNormal = 16843821; // 0x101042d
+ field public static final int colorControlActivated = 16843820; // 0x101042c
+ field public static final int colorControlHighlight = 16843822; // 0x101042e
+ field public static final int colorControlNormal = 16843819; // 0x101042b
field public static final int colorFocusedHighlight = 16843663; // 0x101038f
field public static final int colorForeground = 16842800; // 0x1010030
field public static final int colorForegroundInverse = 16843270; // 0x1010206
field public static final int colorLongPressedHighlight = 16843662; // 0x101038e
field public static final int colorMultiSelectHighlight = 16843665; // 0x1010391
field public static final int colorPressedHighlight = 16843661; // 0x101038d
- field public static final int colorPrimary = 16843827; // 0x1010433
- field public static final int colorPrimaryDark = 16843828; // 0x1010434
+ field public static final int colorPrimary = 16843829; // 0x1010435
+ field public static final int colorPrimaryDark = 16843830; // 0x1010436
field public static final int columnCount = 16843639; // 0x1010377
field public static final int columnDelay = 16843215; // 0x10101cf
field public static final int columnOrderPreserved = 16843640; // 0x1010378
field public static final int columnWidth = 16843031; // 0x1010117
- field public static final int commitIcon = 16843909; // 0x1010485
+ field public static final int commitIcon = 16843911; // 0x1010487
field public static final int compatibleWidthLimitDp = 16843621; // 0x1010365
field public static final int completionHint = 16843122; // 0x1010172
field public static final int completionHintView = 16843123; // 0x1010173
@@ -461,11 +461,11 @@ package android {
field public static final int content = 16843355; // 0x101025b
field public static final int contentAuthority = 16843408; // 0x1010290
field public static final int contentDescription = 16843379; // 0x1010273
- field public static final int contentInsetEnd = 16843860; // 0x1010454
- field public static final int contentInsetLeft = 16843861; // 0x1010455
- field public static final int contentInsetRight = 16843862; // 0x1010456
- field public static final int contentInsetStart = 16843859; // 0x1010453
- field public static final int contentRatingSystemXml = 16843955; // 0x10104b3
+ field public static final int contentInsetEnd = 16843862; // 0x1010456
+ field public static final int contentInsetLeft = 16843863; // 0x1010457
+ field public static final int contentInsetRight = 16843864; // 0x1010458
+ field public static final int contentInsetStart = 16843861; // 0x1010455
+ field public static final int contentRatingSystemXml = 16843957; // 0x10104b5
field public static final int controlX1 = 16843798; // 0x1010416
field public static final int controlX2 = 16843800; // 0x1010418
field public static final int controlY1 = 16843799; // 0x1010417
@@ -478,12 +478,12 @@ package android {
field public static final int dashGap = 16843175; // 0x10101a7
field public static final int dashWidth = 16843174; // 0x10101a6
field public static final int data = 16842798; // 0x101002e
- field public static final int datePickerDialogTheme = 16843949; // 0x10104ad
- field public static final int datePickerMode = 16843956; // 0x10104b4
+ field public static final int datePickerDialogTheme = 16843951; // 0x10104af
+ field public static final int datePickerMode = 16843958; // 0x10104b6
field public static final int datePickerStyle = 16843612; // 0x101035c
field public static final int dateTextAppearance = 16843593; // 0x1010349
- field public static final int dayOfWeekBackgroundColor = 16843924; // 0x1010494
- field public static final int dayOfWeekTextAppearance = 16843925; // 0x1010495
+ field public static final int dayOfWeekBackgroundColor = 16843926; // 0x1010496
+ field public static final int dayOfWeekTextAppearance = 16843927; // 0x1010497
field public static final int debuggable = 16842767; // 0x101000f
field public static final int defaultValue = 16843245; // 0x10101ed
field public static final int delay = 16843212; // 0x10101cc
@@ -514,7 +514,7 @@ package android {
field public static final int dividerHorizontal = 16843564; // 0x101032c
field public static final int dividerPadding = 16843562; // 0x101032a
field public static final int dividerVertical = 16843530; // 0x101030a
- field public static final int documentLaunchMode = 16843845; // 0x1010445
+ field public static final int documentLaunchMode = 16843847; // 0x1010447
field public static final int drawSelectorOnTop = 16843004; // 0x10100fc
field public static final int drawable = 16843161; // 0x1010199
field public static final int drawableBottom = 16843118; // 0x101016e
@@ -543,8 +543,8 @@ package android {
field public static final int editTextStyle = 16842862; // 0x101006e
field public static final deprecated int editable = 16843115; // 0x101016b
field public static final int editorExtras = 16843300; // 0x1010224
- field public static final int elegantTextHeight = 16843869; // 0x101045d
- field public static final int elevation = 16843840; // 0x1010440
+ field public static final int elegantTextHeight = 16843871; // 0x101045f
+ field public static final int elevation = 16843842; // 0x1010442
field public static final int ellipsize = 16842923; // 0x10100ab
field public static final int ems = 16843096; // 0x1010158
field public static final int enabled = 16842766; // 0x101000e
@@ -554,10 +554,10 @@ package android {
field public static final int entries = 16842930; // 0x10100b2
field public static final int entryValues = 16843256; // 0x10101f8
field public static final int eventsInterceptionEnabled = 16843389; // 0x101027d
- field public static final int excludeClass = 16843842; // 0x1010442
+ field public static final int excludeClass = 16843844; // 0x1010444
field public static final int excludeFromRecents = 16842775; // 0x1010017
- field public static final int excludeId = 16843841; // 0x1010441
- field public static final int excludeName = 16843854; // 0x101044e
+ field public static final int excludeId = 16843843; // 0x1010443
+ field public static final int excludeName = 16843856; // 0x1010450
field public static final int exitFadeDuration = 16843533; // 0x101030d
field public static final int expandableListPreferredChildIndicatorLeft = 16842834; // 0x1010052
field public static final int expandableListPreferredChildIndicatorRight = 16842835; // 0x1010053
@@ -588,7 +588,7 @@ package android {
field public static final int fastScrollTrackDrawable = 16843577; // 0x1010339
field public static final int fillAfter = 16843197; // 0x10101bd
field public static final int fillBefore = 16843196; // 0x10101bc
- field public static final int fillColor = 16843806; // 0x101041e
+ field public static final int fillColor = 16843807; // 0x101041f
field public static final int fillEnabled = 16843343; // 0x101024f
field public static final int fillViewport = 16843130; // 0x101017a
field public static final int filter = 16843035; // 0x101011b
@@ -602,12 +602,12 @@ package android {
field public static final int focusableInTouchMode = 16842971; // 0x10100db
field public static final int focusedMonthDateColor = 16843587; // 0x1010343
field public static final int fontFamily = 16843692; // 0x10103ac
- field public static final int fontFeatureSettings = 16843960; // 0x10104b8
+ field public static final int fontFeatureSettings = 16843962; // 0x10104ba
field public static final int footerDividersEnabled = 16843311; // 0x101022f
field public static final int foreground = 16843017; // 0x1010109
field public static final int foregroundGravity = 16843264; // 0x1010200
- field public static final int foregroundTint = 16843885; // 0x101046d
- field public static final int foregroundTintMode = 16843886; // 0x101046e
+ field public static final int foregroundTint = 16843887; // 0x101046f
+ field public static final int foregroundTintMode = 16843888; // 0x1010470
field public static final int format = 16843013; // 0x1010105
field public static final int format12Hour = 16843722; // 0x10103ca
field public static final int format24Hour = 16843723; // 0x10103cb
@@ -621,13 +621,13 @@ package android {
field public static final int freezesText = 16843116; // 0x101016c
field public static final int fromAlpha = 16843210; // 0x10101ca
field public static final int fromDegrees = 16843187; // 0x10101b3
- field public static final int fromId = 16843850; // 0x101044a
+ field public static final int fromId = 16843852; // 0x101044c
field public static final int fromScene = 16843741; // 0x10103dd
field public static final int fromXDelta = 16843206; // 0x10101c6
field public static final int fromXScale = 16843202; // 0x10101c2
field public static final int fromYDelta = 16843208; // 0x10101c8
field public static final int fromYScale = 16843204; // 0x10101c4
- field public static final int fullBackupOnly = 16843891; // 0x1010473
+ field public static final int fullBackupOnly = 16843893; // 0x1010475
field public static final int fullBright = 16842954; // 0x10100ca
field public static final int fullDark = 16842950; // 0x10100c6
field public static final int functionalTest = 16842787; // 0x1010023
@@ -640,7 +640,7 @@ package android {
field public static final int gestureStrokeType = 16843385; // 0x1010279
field public static final int gestureStrokeWidth = 16843380; // 0x1010274
field public static final int glEsVersion = 16843393; // 0x1010281
- field public static final int goIcon = 16843906; // 0x1010482
+ field public static final int goIcon = 16843908; // 0x1010484
field public static final int gradientRadius = 16843172; // 0x10101a4
field public static final int grantUriPermissions = 16842779; // 0x101001b
field public static final int gravity = 16842927; // 0x10100af
@@ -653,16 +653,16 @@ package android {
field public static final int hapticFeedbackEnabled = 16843358; // 0x101025e
field public static final int hardwareAccelerated = 16843475; // 0x10102d3
field public static final int hasCode = 16842764; // 0x101000c
- field public static final int headerAmPmTextAppearance = 16843936; // 0x10104a0
+ field public static final int headerAmPmTextAppearance = 16843938; // 0x10104a2
field public static final int headerBackground = 16843055; // 0x101012f
- field public static final int headerBackgroundColor = 16843937; // 0x10104a1
- field public static final int headerDayOfMonthTextAppearance = 16843927; // 0x1010497
+ field public static final int headerBackgroundColor = 16843939; // 0x10104a3
+ field public static final int headerDayOfMonthTextAppearance = 16843929; // 0x1010499
field public static final int headerDividersEnabled = 16843310; // 0x101022e
- field public static final int headerMonthTextAppearance = 16843926; // 0x1010496
- field public static final int headerTimeTextAppearance = 16843935; // 0x101049f
- field public static final int headerYearTextAppearance = 16843928; // 0x1010498
+ field public static final int headerMonthTextAppearance = 16843928; // 0x1010498
+ field public static final int headerTimeTextAppearance = 16843937; // 0x10104a1
+ field public static final int headerYearTextAppearance = 16843930; // 0x101049a
field public static final int height = 16843093; // 0x1010155
- field public static final int hideOnContentScroll = 16843843; // 0x1010443
+ field public static final int hideOnContentScroll = 16843845; // 0x1010445
field public static final int hint = 16843088; // 0x1010150
field public static final int homeAsUpIndicator = 16843531; // 0x101030b
field public static final int homeLayout = 16843549; // 0x101031d
@@ -698,8 +698,8 @@ package android {
field public static final int indeterminateDuration = 16843069; // 0x101013d
field public static final int indeterminateOnly = 16843066; // 0x101013a
field public static final int indeterminateProgressStyle = 16843544; // 0x1010318
- field public static final int indeterminateTint = 16843881; // 0x1010469
- field public static final int indeterminateTintMode = 16843882; // 0x101046a
+ field public static final int indeterminateTint = 16843883; // 0x101046b
+ field public static final int indeterminateTintMode = 16843884; // 0x101046c
field public static final int indicatorEnd = 16843730; // 0x10103d2
field public static final int indicatorLeft = 16843021; // 0x101010d
field public static final int indicatorRight = 16843022; // 0x101010e
@@ -712,7 +712,7 @@ package android {
field public static final int innerRadiusRatio = 16843163; // 0x101019b
field public static final deprecated int inputMethod = 16843112; // 0x1010168
field public static final int inputType = 16843296; // 0x1010220
- field public static final int inset = 16843958; // 0x10104b6
+ field public static final int inset = 16843960; // 0x10104b8
field public static final int insetBottom = 16843194; // 0x10101ba
field public static final int insetLeft = 16843191; // 0x10101b7
field public static final int insetRight = 16843192; // 0x10101b8
@@ -786,8 +786,8 @@ package android {
field public static final int largeScreens = 16843398; // 0x1010286
field public static final int largestWidthLimitDp = 16843622; // 0x1010366
field public static final int launchMode = 16842781; // 0x101001d
- field public static final int launchTaskBehindBackgroundAnimation = 16843921; // 0x1010491
- field public static final int launchTaskBehindSourceAnimation = 16843922; // 0x1010492
+ field public static final int launchTaskBehindBackgroundAnimation = 16843923; // 0x1010493
+ field public static final int launchTaskBehindSourceAnimation = 16843924; // 0x1010494
field public static final int layerType = 16843604; // 0x1010354
field public static final int layout = 16842994; // 0x10100f2
field public static final int layoutAnimation = 16842988; // 0x10100ec
@@ -814,7 +814,7 @@ package android {
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 = 16843645; // 0x101037d
- field public static final int layout_columnWeight = 16843865; // 0x1010459
+ field public static final int layout_columnWeight = 16843867; // 0x101045b
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
@@ -826,7 +826,7 @@ package android {
field public static final int layout_marginTop = 16843000; // 0x10100f8
field public static final int layout_row = 16843643; // 0x101037b
field public static final int layout_rowSpan = 16843644; // 0x101037c
- field public static final int layout_rowWeight = 16843864; // 0x1010458
+ field public static final int layout_rowWeight = 16843866; // 0x101045a
field public static final int layout_scale = 16843155; // 0x1010193
field public static final int layout_span = 16843085; // 0x101014d
field public static final int layout_toEndOf = 16843704; // 0x10103b8
@@ -838,7 +838,7 @@ package android {
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 letterSpacing = 16843959; // 0x10104b7
+ field public static final int letterSpacing = 16843961; // 0x10104b9
field public static final int lineSpacingExtra = 16843287; // 0x1010217
field public static final int lineSpacingMultiplier = 16843288; // 0x1010218
field public static final int lines = 16843092; // 0x1010154
@@ -866,7 +866,7 @@ package android {
field public static final int manageSpaceActivity = 16842756; // 0x1010004
field public static final int mapViewStyle = 16842890; // 0x101008a
field public static final int marqueeRepeatLimit = 16843293; // 0x101021d
- field public static final int matchOrder = 16843855; // 0x101044f
+ field public static final int matchOrder = 16843857; // 0x1010451
field public static final int max = 16843062; // 0x1010136
field public static final int maxDate = 16843584; // 0x1010340
field public static final int maxEms = 16843095; // 0x1010157
@@ -875,11 +875,11 @@ package android {
field public static final int maxLength = 16843104; // 0x1010160
field public static final int maxLevel = 16843186; // 0x10101b2
field public static final int maxLines = 16843091; // 0x1010153
- field public static final int maxRecents = 16843846; // 0x1010446
+ field public static final int maxRecents = 16843848; // 0x1010448
field public static final int maxRows = 16843059; // 0x1010133
field public static final int maxSdkVersion = 16843377; // 0x1010271
field public static final int maxWidth = 16843039; // 0x101011f
- field public static final int maximumAngle = 16843903; // 0x101047f
+ field public static final int maximumAngle = 16843905; // 0x1010481
field public static final int measureAllChildren = 16843018; // 0x101010a
field public static final int measureWithLargestChild = 16843476; // 0x10102d4
field public static final int mediaRouteButtonStyle = 16843693; // 0x10103ad
@@ -895,19 +895,19 @@ package android {
field public static final int minResizeWidth = 16843669; // 0x1010395
field public static final int minSdkVersion = 16843276; // 0x101020c
field public static final int minWidth = 16843071; // 0x101013f
- field public static final int minimumHorizontalAngle = 16843901; // 0x101047d
- field public static final int minimumVerticalAngle = 16843902; // 0x101047e
+ field public static final int minimumHorizontalAngle = 16843903; // 0x101047f
+ field public static final int minimumVerticalAngle = 16843904; // 0x1010480
field public static final int mipMap = 16843725; // 0x10103cd
field public static final int mirrorForRtl = 16843726; // 0x10103ce
field public static final int mode = 16843134; // 0x101017e
field public static final int moreIcon = 16843061; // 0x1010135
- field public static final int multiArch = 16843918; // 0x101048e
+ field public static final int multiArch = 16843920; // 0x1010490
field public static final int multiprocess = 16842771; // 0x1010013
field public static final int name = 16842755; // 0x1010003
- field public static final int navigationBarColor = 16843858; // 0x1010452
+ field public static final int navigationBarColor = 16843860; // 0x1010454
field public static final int navigationMode = 16843471; // 0x10102cf
field public static final int negativeButtonText = 16843254; // 0x10101f6
- field public static final int nestedScrollingEnabled = 16843830; // 0x1010436
+ field public static final int nestedScrollingEnabled = 16843832; // 0x1010438
field public static final int nextFocusDown = 16842980; // 0x10100e4
field public static final int nextFocusForward = 16843580; // 0x101033c
field public static final int nextFocusLeft = 16842977; // 0x10100e1
@@ -918,9 +918,9 @@ package android {
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 int numbersBackgroundColor = 16843939; // 0x10104a3
- field public static final int numbersSelectorColor = 16843940; // 0x10104a4
- field public static final int numbersTextColor = 16843938; // 0x10104a2
+ field public static final int numbersBackgroundColor = 16843941; // 0x10104a5
+ field public static final int numbersSelectorColor = 16843942; // 0x10104a6
+ field public static final int numbersTextColor = 16843940; // 0x10104a4
field public static final deprecated int numeric = 16843109; // 0x1010165
field public static final int numericShortcut = 16843236; // 0x10101e4
field public static final int onClick = 16843375; // 0x101026f
@@ -935,14 +935,14 @@ package android {
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 overlapAnchor = 16843874; // 0x1010462
+ field public static final int overlapAnchor = 16843876; // 0x1010464
field public static final int overridesImplicitlyEnabledSubtype = 16843682; // 0x10103a2
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 paddingEnd = 16843700; // 0x10103b4
field public static final int paddingLeft = 16842966; // 0x10100d6
- field public static final int paddingMode = 16843863; // 0x1010457
+ field public static final int paddingMode = 16843865; // 0x1010459
field public static final int paddingRight = 16842968; // 0x10100d8
field public static final int paddingStart = 16843699; // 0x10103b3
field public static final int paddingTop = 16842967; // 0x10100d7
@@ -954,14 +954,14 @@ package android {
field public static final int parentActivityName = 16843687; // 0x10103a7
field public static final deprecated int password = 16843100; // 0x101015c
field public static final int path = 16842794; // 0x101002a
- field public static final int pathData = 16843807; // 0x101041f
+ field public static final int pathData = 16843808; // 0x1010420
field public static final int pathPattern = 16842796; // 0x101002c
field public static final int pathPrefix = 16842795; // 0x101002b
field public static final int permission = 16842758; // 0x1010006
field public static final int permissionFlags = 16843719; // 0x10103c7
field public static final int permissionGroup = 16842762; // 0x101000a
field public static final int permissionGroupFlags = 16843717; // 0x10103c5
- field public static final int persistableMode = 16843821; // 0x101042d
+ field public static final int persistableMode = 16843823; // 0x101042f
field public static final int persistent = 16842765; // 0x101000d
field public static final int persistentDrawingCache = 16842990; // 0x10100ee
field public static final deprecated int phoneNumber = 16843111; // 0x1010167
@@ -970,11 +970,11 @@ package android {
field public static final int popupAnimationStyle = 16843465; // 0x10102c9
field public static final int popupBackground = 16843126; // 0x1010176
field public static final int popupCharacters = 16843332; // 0x1010244
- field public static final int popupElevation = 16843916; // 0x101048c
+ field public static final int popupElevation = 16843918; // 0x101048e
field public static final int popupKeyboard = 16843331; // 0x1010243
field public static final int popupLayout = 16843323; // 0x101023b
field public static final int popupMenuStyle = 16843520; // 0x1010300
- field public static final int popupTheme = 16843946; // 0x10104aa
+ field public static final int popupTheme = 16843948; // 0x10104ac
field public static final int popupWindowStyle = 16842870; // 0x1010076
field public static final int port = 16842793; // 0x1010029
field public static final int positiveButtonText = 16843253; // 0x10101f5
@@ -989,8 +989,8 @@ package android {
field public static final int privateImeOptions = 16843299; // 0x1010223
field public static final int process = 16842769; // 0x1010011
field public static final int progress = 16843063; // 0x1010137
- field public static final int progressBackgroundTint = 16843877; // 0x1010465
- field public static final int progressBackgroundTintMode = 16843878; // 0x1010466
+ field public static final int progressBackgroundTint = 16843879; // 0x1010467
+ field public static final int progressBackgroundTintMode = 16843880; // 0x1010468
field public static final int progressBarPadding = 16843545; // 0x1010319
field public static final int progressBarStyle = 16842871; // 0x1010077
field public static final int progressBarStyleHorizontal = 16842872; // 0x1010078
@@ -1001,17 +1001,17 @@ package android {
field public static final int progressBarStyleSmallInverse = 16843400; // 0x1010288
field public static final int progressBarStyleSmallTitle = 16843279; // 0x101020f
field public static final int progressDrawable = 16843068; // 0x101013c
- field public static final int progressTint = 16843875; // 0x1010463
- field public static final int progressTintMode = 16843876; // 0x1010464
+ field public static final int progressTint = 16843877; // 0x1010465
+ field public static final int progressTintMode = 16843878; // 0x1010466
field public static final int prompt = 16843131; // 0x101017b
field public static final int propertyName = 16843489; // 0x10102e1
- field public static final int propertyXName = 16843892; // 0x1010474
- field public static final int propertyYName = 16843893; // 0x1010475
+ field public static final int propertyXName = 16843894; // 0x1010476
+ field public static final int propertyYName = 16843895; // 0x1010477
field public static final int protectionLevel = 16842761; // 0x1010009
field public static final int publicKey = 16843686; // 0x10103a6
field public static final int queryActionMsg = 16843227; // 0x10101db
field public static final int queryAfterZeroResults = 16843394; // 0x1010282
- field public static final int queryBackground = 16843911; // 0x1010487
+ field public static final int queryBackground = 16843913; // 0x1010489
field public static final int queryHint = 16843608; // 0x1010358
field public static final int quickContactBadgeStyleSmallWindowLarge = 16843443; // 0x10102b3
field public static final int quickContactBadgeStyleSmallWindowMedium = 16843442; // 0x10102b2
@@ -1026,8 +1026,8 @@ package android {
field public static final int ratingBarStyleIndicator = 16843280; // 0x1010210
field public static final int ratingBarStyleSmall = 16842877; // 0x101007d
field public static final int readPermission = 16842759; // 0x1010007
- field public static final int recognitionService = 16843932; // 0x101049c
- field public static final int relinquishTaskIdentity = 16843894; // 0x1010476
+ field public static final int recognitionService = 16843934; // 0x101049e
+ field public static final int relinquishTaskIdentity = 16843896; // 0x1010478
field public static final int repeatCount = 16843199; // 0x10101bf
field public static final int repeatMode = 16843200; // 0x10101c0
field public static final int reqFiveWayNav = 16843314; // 0x1010232
@@ -1039,7 +1039,7 @@ package android {
field public static final int required = 16843406; // 0x101028e
field public static final int requiredAccountType = 16843734; // 0x10103d6
field public static final int requiredForAllUsers = 16843728; // 0x10103d0
- field public static final int requiredForProfile = 16843816; // 0x1010428
+ field public static final int requiredForProfile = 16843818; // 0x101042a
field public static final int requiresFadingEdge = 16843685; // 0x10103a5
field public static final int requiresSmallestWidthDp = 16843620; // 0x1010364
field public static final int resizeMode = 16843619; // 0x1010363
@@ -1048,8 +1048,8 @@ package android {
field public static final int restoreAnyVersion = 16843450; // 0x10102ba
field public static final deprecated int restoreNeedsApplication = 16843421; // 0x101029d
field public static final int restrictedAccountType = 16843733; // 0x10103d5
- field public static final int restrictionType = 16843923; // 0x1010493
- field public static final int reversible = 16843851; // 0x101044b
+ field public static final int restrictionType = 16843925; // 0x1010495
+ field public static final int reversible = 16843853; // 0x101044d
field public static final int right = 16843183; // 0x10101af
field public static final int ringtonePreferenceStyle = 16842899; // 0x1010093
field public static final int ringtoneType = 16843257; // 0x10101f9
@@ -1089,7 +1089,7 @@ package android {
field public static final int scrollbars = 16842974; // 0x10100de
field public static final int scrollingCache = 16843006; // 0x10100fe
field public static final deprecated int searchButtonText = 16843269; // 0x1010205
- field public static final int searchIcon = 16843907; // 0x1010483
+ field public static final int searchIcon = 16843909; // 0x1010485
field public static final int searchMode = 16843221; // 0x10101d5
field public static final int searchSettingsDescription = 16843402; // 0x101028a
field public static final int searchSuggestAuthority = 16843222; // 0x10101d6
@@ -1098,19 +1098,19 @@ package android {
field public static final int searchSuggestPath = 16843223; // 0x10101d7
field public static final int searchSuggestSelection = 16843224; // 0x10101d8
field public static final int searchSuggestThreshold = 16843373; // 0x101026d
- field public static final int searchViewStyle = 16843904; // 0x1010480
+ field public static final int searchViewStyle = 16843906; // 0x1010482
field public static final int secondaryProgress = 16843064; // 0x1010138
- field public static final int secondaryProgressTint = 16843879; // 0x1010467
- field public static final int secondaryProgressTintMode = 16843880; // 0x1010468
+ field public static final int secondaryProgressTint = 16843881; // 0x1010469
+ field public static final int secondaryProgressTintMode = 16843882; // 0x101046a
field public static final int seekBarStyle = 16842875; // 0x101007b
field public static final int segmentedButtonStyle = 16843568; // 0x1010330
field public static final int selectAllOnFocus = 16843102; // 0x101015e
field public static final int selectable = 16843238; // 0x10101e6
field public static final int selectableItemBackground = 16843534; // 0x101030e
- field public static final int selectableItemBackgroundBorderless = 16843868; // 0x101045c
+ field public static final int selectableItemBackgroundBorderless = 16843870; // 0x101045e
field public static final int selectedDateVerticalBar = 16843591; // 0x1010347
field public static final int selectedWeekBackgroundColor = 16843586; // 0x1010342
- field public static final int sessionService = 16843837; // 0x101043d
+ field public static final int sessionService = 16843839; // 0x101043f
field public static final int settingsActivity = 16843301; // 0x1010225
field public static final int setupActivity = 16843766; // 0x10103f6
field public static final int shadowColor = 16843105; // 0x1010161
@@ -1127,13 +1127,13 @@ package android {
field public static final int showDividers = 16843561; // 0x1010329
field public static final int showOnLockScreen = 16843721; // 0x10103c9
field public static final int showSilent = 16843259; // 0x10101fb
- field public static final int showText = 16843950; // 0x10104ae
+ field public static final int showText = 16843952; // 0x10104b0
field public static final int showWeekNumber = 16843582; // 0x101033e
field public static final int shownWeekCount = 16843585; // 0x1010341
field public static final int shrinkColumns = 16843082; // 0x101014a
field public static final deprecated int singleLine = 16843101; // 0x101015d
field public static final int singleUser = 16843711; // 0x10103bf
- field public static final int slideEdge = 16843824; // 0x1010430
+ field public static final int slideEdge = 16843826; // 0x1010432
field public static final int smallIcon = 16843422; // 0x101029e
field public static final int smallScreens = 16843396; // 0x1010284
field public static final int smoothScrollbar = 16843313; // 0x1010231
@@ -1145,19 +1145,19 @@ package android {
field public static final int spinnerStyle = 16842881; // 0x1010081
field public static final int spinnersShown = 16843595; // 0x101034b
field public static final int splitMotionEvents = 16843503; // 0x10102ef
- field public static final int splitTrack = 16843852; // 0x101044c
+ field public static final int splitTrack = 16843854; // 0x101044e
field public static final int src = 16843033; // 0x1010119
field public static final int ssp = 16843747; // 0x10103e3
field public static final int sspPattern = 16843749; // 0x10103e5
field public static final int sspPrefix = 16843748; // 0x10103e4
field public static final int stackFromBottom = 16843005; // 0x10100fd
- field public static final int stackViewStyle = 16843838; // 0x101043e
+ field public static final int stackViewStyle = 16843840; // 0x1010440
field public static final int starStyle = 16842882; // 0x1010082
field public static final int startColor = 16843165; // 0x101019d
field public static final int startDelay = 16843746; // 0x10103e2
field public static final int startOffset = 16843198; // 0x10101be
field public static final deprecated int startYear = 16843132; // 0x101017c
- field public static final int stateListAnimator = 16843848; // 0x1010448
+ field public static final int stateListAnimator = 16843850; // 0x101044a
field public static final int stateNotNeeded = 16842774; // 0x1010016
field public static final int state_above_anchor = 16842922; // 0x10100aa
field public static final int state_accelerated = 16843547; // 0x101031b
@@ -1182,27 +1182,27 @@ package android {
field public static final int state_single = 16842915; // 0x10100a3
field public static final int state_window_focused = 16842909; // 0x101009d
field public static final int staticWallpaperPreview = 16843569; // 0x1010331
- field public static final int statusBarColor = 16843857; // 0x1010451
+ field public static final int statusBarColor = 16843859; // 0x1010453
field public static final int stepSize = 16843078; // 0x1010146
field public static final int stopWithTask = 16843626; // 0x101036a
field public static final int streamType = 16843273; // 0x1010209
field public static final int stretchColumns = 16843081; // 0x1010149
field public static final int stretchMode = 16843030; // 0x1010116
- field public static final int strokeColor = 16843808; // 0x1010420
- field public static final int strokeLineCap = 16843813; // 0x1010425
- field public static final int strokeLineJoin = 16843814; // 0x1010426
- field public static final int strokeMiterLimit = 16843815; // 0x1010427
- field public static final int strokeWidth = 16843809; // 0x1010421
- field public static final int submitBackground = 16843912; // 0x1010488
+ field public static final int strokeColor = 16843809; // 0x1010421
+ field public static final int strokeLineCap = 16843815; // 0x1010427
+ field public static final int strokeLineJoin = 16843816; // 0x1010428
+ field public static final int strokeMiterLimit = 16843817; // 0x1010429
+ field public static final int strokeWidth = 16843811; // 0x1010423
+ field public static final int submitBackground = 16843914; // 0x101048a
field public static final int subtitle = 16843473; // 0x10102d1
- field public static final int subtitleTextAppearance = 16843823; // 0x101042f
+ field public static final int subtitleTextAppearance = 16843825; // 0x1010431
field public static final int subtitleTextStyle = 16843513; // 0x10102f9
field public static final int subtypeExtraValue = 16843674; // 0x101039a
field public static final int subtypeId = 16843713; // 0x10103c1
field public static final int subtypeLocale = 16843673; // 0x1010399
field public static final int suggestActionMsg = 16843228; // 0x10101dc
field public static final int suggestActionMsgColumn = 16843229; // 0x10101dd
- field public static final int suggestionRowLayout = 16843910; // 0x1010486
+ field public static final int suggestionRowLayout = 16843912; // 0x1010488
field public static final int summary = 16843241; // 0x10101e9
field public static final int summaryColumn = 16843426; // 0x10102a2
field public static final int summaryOff = 16843248; // 0x10101f0
@@ -1213,7 +1213,7 @@ package android {
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 switchStyle = 16843839; // 0x101043f
+ field public static final int switchStyle = 16843841; // 0x1010441
field public static final int switchTextAppearance = 16843630; // 0x101036e
field public static final int switchTextOff = 16843628; // 0x101036c
field public static final int switchTextOn = 16843627; // 0x101036b
@@ -1227,7 +1227,7 @@ package android {
field public static final int targetClass = 16842799; // 0x101002f
field public static final int targetDescriptions = 16843680; // 0x10103a0
field public static final int targetId = 16843740; // 0x10103dc
- field public static final int targetName = 16843853; // 0x101044d
+ field public static final int targetName = 16843855; // 0x101044f
field public static final int targetPackage = 16842785; // 0x1010021
field public static final int targetSdkVersion = 16843376; // 0x1010270
field public static final int taskAffinity = 16842770; // 0x1010012
@@ -1251,7 +1251,7 @@ package android {
field public static final int textAppearanceLargeInverse = 16842819; // 0x1010043
field public static final int textAppearanceLargePopupMenu = 16843521; // 0x1010301
field public static final int textAppearanceListItem = 16843678; // 0x101039e
- field public static final int textAppearanceListItemSecondary = 16843826; // 0x1010432
+ field public static final int textAppearanceListItemSecondary = 16843828; // 0x1010434
field public static final int textAppearanceListItemSmall = 16843679; // 0x101039f
field public static final int textAppearanceMedium = 16842817; // 0x1010041
field public static final int textAppearanceMediumInverse = 16842820; // 0x1010044
@@ -1308,38 +1308,38 @@ package android {
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 thumbTint = 16843889; // 0x1010471
- field public static final int thumbTintMode = 16843890; // 0x1010472
+ field public static final int thumbTint = 16843891; // 0x1010473
+ field public static final int thumbTintMode = 16843892; // 0x1010474
field public static final int thumbnail = 16843429; // 0x10102a5
field public static final int tileMode = 16843265; // 0x1010201
- field public static final int tileModeX = 16843895; // 0x1010477
- field public static final int tileModeY = 16843896; // 0x1010478
- field public static final int timePickerDialogTheme = 16843934; // 0x101049e
- field public static final int timePickerMode = 16843957; // 0x10104b5
- field public static final int timePickerStyle = 16843933; // 0x101049d
+ field public static final int tileModeX = 16843897; // 0x1010479
+ field public static final int tileModeY = 16843898; // 0x101047a
+ field public static final int timePickerDialogTheme = 16843936; // 0x10104a0
+ field public static final int timePickerMode = 16843959; // 0x10104b7
+ field public static final int timePickerStyle = 16843935; // 0x101049f
field public static final int timeZone = 16843724; // 0x10103cc
field public static final int tint = 16843041; // 0x1010121
field public static final int tintMode = 16843797; // 0x1010415
field public static final int title = 16843233; // 0x10101e1
field public static final int titleCondensed = 16843234; // 0x10101e2
- field public static final int titleTextAppearance = 16843822; // 0x101042e
+ field public static final int titleTextAppearance = 16843824; // 0x1010430
field public static final int titleTextStyle = 16843512; // 0x10102f8
field public static final int toAlpha = 16843211; // 0x10101cb
field public static final int toDegrees = 16843188; // 0x10101b4
- field public static final int toId = 16843849; // 0x1010449
+ field public static final int toId = 16843851; // 0x101044b
field public static final int toScene = 16843742; // 0x10103de
field public static final int toXDelta = 16843207; // 0x10101c7
field public static final int toXScale = 16843203; // 0x10101c3
field public static final int toYDelta = 16843209; // 0x10101c9
field public static final int toYScale = 16843205; // 0x10101c5
- field public static final int toolbarStyle = 16843947; // 0x10104ab
+ field public static final int toolbarStyle = 16843949; // 0x10104ad
field public static final int top = 16843182; // 0x10101ae
field public static final int topBright = 16842955; // 0x10100cb
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 touchscreenBlocksFocus = 16843919; // 0x101048f
+ field public static final int touchscreenBlocksFocus = 16843921; // 0x1010491
field public static final int track = 16843631; // 0x101036f
field public static final int transcriptMode = 16843008; // 0x1010100
field public static final int transformPivotX = 16843552; // 0x1010320
@@ -1348,14 +1348,14 @@ package android {
field public static final int transitionGroup = 16843803; // 0x101041b
field public static final int transitionName = 16843802; // 0x101041a
field public static final int transitionOrdering = 16843744; // 0x10103e0
- field public static final int translateX = 16843866; // 0x101045a
- field public static final int translateY = 16843867; // 0x101045b
+ field public static final int translateX = 16843868; // 0x101045c
+ field public static final int translateY = 16843869; // 0x101045d
field public static final int translationX = 16843554; // 0x1010322
field public static final int translationY = 16843555; // 0x1010323
field public static final int translationZ = 16843796; // 0x1010414
- field public static final int trimPathEnd = 16843811; // 0x1010423
- field public static final int trimPathOffset = 16843812; // 0x1010424
- field public static final int trimPathStart = 16843810; // 0x1010422
+ field public static final int trimPathEnd = 16843813; // 0x1010425
+ field public static final int trimPathOffset = 16843814; // 0x1010426
+ field public static final int trimPathStart = 16843812; // 0x1010424
field public static final int type = 16843169; // 0x10101a1
field public static final int typeface = 16842902; // 0x1010096
field public static final int uiOptions = 16843672; // 0x1010398
@@ -1383,10 +1383,10 @@ package android {
field public static final int viewportHeight = 16843805; // 0x101041d
field public static final int viewportWidth = 16843804; // 0x101041c
field public static final int visibility = 16842972; // 0x10100dc
- field public static final int visibilityMode = 16843900; // 0x101047c
+ field public static final int visibilityMode = 16843902; // 0x101047e
field public static final int visible = 16843156; // 0x1010194
field public static final int vmSafeMode = 16843448; // 0x10102b8
- field public static final int voiceIcon = 16843908; // 0x1010484
+ field public static final int voiceIcon = 16843910; // 0x1010486
field public static final int voiceLanguage = 16843349; // 0x1010255
field public static final int voiceLanguageModel = 16843347; // 0x1010253
field public static final int voiceMaxResults = 16843350; // 0x1010256
@@ -1412,23 +1412,23 @@ package android {
field public static final int windowActionBar = 16843469; // 0x10102cd
field public static final int windowActionBarOverlay = 16843492; // 0x10102e4
field public static final int windowActionModeOverlay = 16843485; // 0x10102dd
- field public static final int windowAllowEnterTransitionOverlap = 16843836; // 0x101043c
- field public static final int windowAllowExitTransitionOverlap = 16843835; // 0x101043b
+ field public static final int windowAllowEnterTransitionOverlap = 16843838; // 0x101043e
+ field public static final int windowAllowExitTransitionOverlap = 16843837; // 0x101043d
field public static final int windowAnimationStyle = 16842926; // 0x10100ae
field public static final int windowBackground = 16842836; // 0x1010054
- field public static final int windowClipToOutline = 16843948; // 0x10104ac
+ field public static final int windowClipToOutline = 16843950; // 0x10104ae
field public static final int windowCloseOnTouchOutside = 16843611; // 0x101035b
field public static final int windowContentOverlay = 16842841; // 0x1010059
field public static final int windowContentTransitionManager = 16843795; // 0x1010413
field public static final int windowContentTransitions = 16843794; // 0x1010412
field public static final int windowDisablePreview = 16843298; // 0x1010222
- field public static final int windowDrawsSystemBarBackgrounds = 16843856; // 0x1010450
- field public static final int windowElevation = 16843920; // 0x1010490
+ field public static final int windowDrawsSystemBarBackgrounds = 16843858; // 0x1010452
+ field public static final int windowElevation = 16843922; // 0x1010492
field public static final int windowEnableSplitTouch = 16843543; // 0x1010317
field public static final int windowEnterAnimation = 16842932; // 0x10100b4
- field public static final int windowEnterTransition = 16843831; // 0x1010437
+ field public static final int windowEnterTransition = 16843833; // 0x1010439
field public static final int windowExitAnimation = 16842933; // 0x10100b5
- field public static final int windowExitTransition = 16843832; // 0x1010438
+ field public static final int windowExitTransition = 16843834; // 0x101043a
field public static final int windowFrame = 16842837; // 0x1010055
field public static final int windowFullscreen = 16843277; // 0x101020d
field public static final int windowHideAnimation = 16842935; // 0x10100b7
@@ -1439,12 +1439,12 @@ package android {
field public static final int windowNoDisplay = 16843294; // 0x101021e
field public static final int windowNoTitle = 16842838; // 0x1010056
field public static final int windowOverscan = 16843727; // 0x10103cf
- field public static final int windowReenterTransition = 16843952; // 0x10104b0
- field public static final int windowReturnTransition = 16843951; // 0x10104af
- field public static final int windowSharedElementEnterTransition = 16843833; // 0x1010439
- field public static final int windowSharedElementExitTransition = 16843834; // 0x101043a
- field public static final int windowSharedElementReenterTransition = 16843954; // 0x10104b2
- field public static final int windowSharedElementReturnTransition = 16843953; // 0x10104b1
+ field public static final int windowReenterTransition = 16843954; // 0x10104b2
+ field public static final int windowReturnTransition = 16843953; // 0x10104b1
+ field public static final int windowSharedElementEnterTransition = 16843835; // 0x101043b
+ field public static final int windowSharedElementExitTransition = 16843836; // 0x101043c
+ field public static final int windowSharedElementReenterTransition = 16843956; // 0x10104b4
+ field public static final int windowSharedElementReturnTransition = 16843955; // 0x10104b3
field public static final int windowShowAnimation = 16842934; // 0x10100b6
field public static final int windowShowWallpaper = 16843410; // 0x1010292
field public static final int windowSoftInputMode = 16843307; // 0x101022b
@@ -1452,15 +1452,15 @@ package android {
field public static final int windowTitleBackgroundStyle = 16842844; // 0x101005c
field public static final int windowTitleSize = 16842842; // 0x101005a
field public static final int windowTitleStyle = 16842843; // 0x101005b
- field public static final int windowTransitionBackgroundFadeDuration = 16843873; // 0x1010461
+ field public static final int windowTransitionBackgroundFadeDuration = 16843875; // 0x1010463
field public static final int windowTranslucentNavigation = 16843760; // 0x10103f0
field public static final int windowTranslucentStatus = 16843759; // 0x10103ef
field public static final int writePermission = 16842760; // 0x1010008
field public static final int x = 16842924; // 0x10100ac
field public static final int xlargeScreens = 16843455; // 0x10102bf
field public static final int y = 16842925; // 0x10100ad
- field public static final int yearListItemTextAppearance = 16843929; // 0x1010499
- field public static final int yearListSelectorColor = 16843930; // 0x101049a
+ field public static final int yearListItemTextAppearance = 16843931; // 0x101049b
+ field public static final int yearListSelectorColor = 16843932; // 0x101049c
field public static final int yesNoPreferenceStyle = 16842896; // 0x1010090
field public static final int zAdjustment = 16843201; // 0x10101c1
}
diff --git a/core/java/android/view/GhostView.java b/core/java/android/view/GhostView.java
index a79838f..3cbaf60 100644
--- a/core/java/android/view/GhostView.java
+++ b/core/java/android/view/GhostView.java
@@ -17,6 +17,7 @@ package android.view;
import android.graphics.Canvas;
import android.graphics.Matrix;
+import android.widget.FrameLayout;
/**
* This view draws another View in an Overlay without changing the parent. It will not be drawn
@@ -28,17 +29,13 @@ import android.graphics.Matrix;
*/
public class GhostView extends View {
private final View mView;
+ private int mReferences;
- private GhostView(View view, ViewGroup host, Matrix matrix) {
+ private GhostView(View view) {
super(view.getContext());
mView = view;
mView.mGhostView = this;
- mRenderNode.setAnimationMatrix(matrix);
final ViewGroup parent = (ViewGroup) mView.getParent();
- setLeft(0);
- setTop(0);
- setRight(host.getWidth());
- setBottom(host.getHeight());
setGhostedVisibility(View.INVISIBLE);
parent.mRecreateDisplayList = true;
parent.getDisplayList();
@@ -100,10 +97,13 @@ public class GhostView extends View {
ViewGroupOverlay overlay = viewGroup.getOverlay();
ViewOverlay.OverlayViewGroup overlayViewGroup = overlay.mOverlayViewGroup;
GhostView ghostView = view.mGhostView;
+ int previousRefCount = 0;
if (ghostView != null) {
- ViewGroup oldParent = (ViewGroup) ghostView.getParent();
- if (oldParent != overlayViewGroup) {
- oldParent.removeView(ghostView);
+ View oldParent = (View) ghostView.getParent();
+ ViewGroup oldGrandParent = (ViewGroup) oldParent.getParent();
+ if (oldGrandParent != overlayViewGroup) {
+ previousRefCount = ghostView.mReferences;
+ oldGrandParent.removeView(oldParent);
ghostView = null;
}
}
@@ -112,9 +112,19 @@ public class GhostView extends View {
matrix = new Matrix();
calculateMatrix(view, viewGroup, matrix);
}
- ghostView = new GhostView(view, (ViewGroup) overlayViewGroup.mHostView, matrix);
- overlay.add(ghostView);
+ ghostView = new GhostView(view);
+ ghostView.setMatrix(matrix);
+ FrameLayout parent = new FrameLayout(view.getContext());
+ parent.setClipChildren(false);
+ copySize(viewGroup, parent);
+ copySize(viewGroup, ghostView);
+ parent.addView(ghostView);
+ overlay.add(parent);
+ ghostView.mReferences = previousRefCount;
+ } else if (matrix != null) {
+ ghostView.setMatrix(matrix);
}
+ ghostView.mReferences++;
return ghostView;
}
@@ -125,12 +135,23 @@ public class GhostView extends View {
public static void removeGhost(View view) {
GhostView ghostView = view.mGhostView;
if (ghostView != null) {
- ViewGroup parent = (ViewGroup) ghostView.getParent();
- parent.removeView(ghostView);
+ ghostView.mReferences--;
+ if (ghostView.mReferences == 0) {
+ ViewGroup parent = (ViewGroup) ghostView.getParent();
+ ViewGroup grandParent = (ViewGroup) parent.getParent();
+ grandParent.removeView(parent);
+ }
}
}
public static GhostView getGhost(View view) {
return view.mGhostView;
}
+
+ private static void copySize(View from, View to) {
+ to.setLeft(0);
+ to.setTop(0);
+ to.setRight(from.getWidth());
+ to.setBottom(from.getHeight());
+ }
}
diff --git a/core/jni/android_hardware_camera2_DngCreator.cpp b/core/jni/android_hardware_camera2_DngCreator.cpp
index eaadfb2..a728455 100644
--- a/core/jni/android_hardware_camera2_DngCreator.cpp
+++ b/core/jni/android_hardware_camera2_DngCreator.cpp
@@ -428,7 +428,7 @@ InputStripSource::~InputStripSource() {}
status_t InputStripSource::writeToStream(Output& stream, uint32_t count) {
status_t err = OK;
- uint32_t fullSize = mRowStride * mHeight;
+ uint32_t fullSize = mWidth * mHeight * mBytesPerSample * mSamplesPerPixel;
jlong offset = mOffset;
if (fullSize != count) {
@@ -560,7 +560,7 @@ DirectStripSource::DirectStripSource(JNIEnv* env, const uint8_t* pixelBytes, uin
DirectStripSource::~DirectStripSource() {}
status_t DirectStripSource::writeToStream(Output& stream, uint32_t count) {
- uint32_t fullSize = mRowStride * mHeight;
+ uint32_t fullSize = mWidth * mHeight * mBytesPerSample * mSamplesPerPixel;
if (fullSize != count) {
ALOGE("%s: Amount to write %u doesn't match image size %u", __FUNCTION__, count,
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index e81ec69..f6c0d71 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -5209,10 +5209,14 @@
<attr name="name" />
<!-- The width a path stroke -->
<attr name="strokeWidth" format="float" />
+ <!-- The opacity of a path stroke @hide-->
+ <attr name="strokeOpacity" format="float" />
<!-- The color to stroke the path if not defined implies no stroke-->
<attr name="strokeColor" format="color" />
<!-- The color to fill the path if not defined implies no fill-->
<attr name="fillColor" format="color" />
+ <!-- The level of opacity of the filled area of the path @hide-->
+ <attr name="fillOpacity" format="float" />
<!-- The specification of the operations that define the path -->
<attr name="pathData" format="string" />
<!-- The fraction of the path to trim from the start from 0 to 1 -->
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 60aacf2..67352d7 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2118,9 +2118,11 @@
<public type="attr" name="transitionGroup" />
<public type="attr" name="viewportWidth" />
<public type="attr" name="viewportHeight" />
+ <public type="attr" name="fillOpacity" />
<public type="attr" name="fillColor" />
<public type="attr" name="pathData" />
<public type="attr" name="strokeColor" />
+ <public type="attr" name="strokeOpacity" />
<public type="attr" name="strokeWidth" />
<public type="attr" name="trimPathStart" />
<public type="attr" name="trimPathEnd" />
diff --git a/docs/html/preview/api-overview.jd b/docs/html/preview/api-overview.jd
index cf594dc..beea0ca 100644
--- a/docs/html/preview/api-overview.jd
+++ b/docs/html/preview/api-overview.jd
@@ -19,6 +19,7 @@ sdk.platform.apiLevel=20
<li><a href="#BehaviorNotifications">If your app implements notifications...</a></li>
<li><a href="#BehaviorMediaControl">If your app uses RemoteControlClient...</a></li>
<li><a href="#BehaviorGetRecentTasks">If your app uses ActivityManager.getRecentTasks()...</a></li>
+<li><a href="#64BitSupport">If you are using the Android Native Development Kit (NDK)...</a></li>
</ol>
</li>
<li><a href="#UI">User Interface</a>
@@ -246,6 +247,29 @@ non-sensitive tasks (such as Home). If your app is using this method to retrieve
its own tasks, use {@code android.app.ActivityManager.getAppTasks()} instead to
retrieve that information.</p>
+<h3 id="64BitSupport">If you are using the Android Native Development Kit (NDK)...</h3>
+
+<p>The L Developer Preview introduces support for 64-bit systems and other
+ preview NDK APIs. The 64-bit enhancement adds needed address space as Android
+ usage diversifies and increases performance while still supporting existing
+ 32-bit apps fully. Use of OpenSSL for cryptography in the platform is also
+ faster. In addition, this release introduces new native audio and media NDK
+ APIs and native OpenGL ES (GLES) 3.1 support.</p>
+
+<p>To use this enhancement, download and install NDK Revision 10 from the
+<a href="{@docRoot}tools/sdk/ndk/index.html">Android NDK page</a>. Refer to the
+Revision 10 <a href="{@docRoot}tools/sdk/ndk/index.html#Revisions">release notes</a>
+for more information about important changes and bug fixes to the NDK.</p>
+
+<p>If you are using the NDK and want to use the features provided in the L
+ Developer Preview, download the {@code android-ndk64-r10} package for your
+ target platform. Due to a
+ <a href="https://code.google.com/p/android/issues/detail?id=73705">known issue</a>,
+ you must still download the 64-bit package even if you only want to compile
+ apps for 32-bit systems. The package also includes
+ the {@code gcc-4.9} compiler for both 32- and 64-bit apps. The L Developer
+ Preview API library is located under the {@code platforms/android-L/} API directory.</p>
+
<h2 id="UI">User Interface</h2>
<h3 id="MaterialDesign">Material design support</h3>
diff --git a/docs/html/preview/support.jd b/docs/html/preview/support.jd
index 9d7844b..3220d63 100644
--- a/docs/html/preview/support.jd
+++ b/docs/html/preview/support.jd
@@ -106,3 +106,15 @@ Android work profile Chrome app.</li>
<li>Deleting a Android work profile may take several minutes to complete. You
cannot create a new Android work profile until the deletion operation is over.</li>
</ul>
+
+<h3 id="64bitsupport">64-bit support</h3>
+<ul>
+<li><p>If you are using the NDK to compile apps for 32- or 64-bit systems and
+want to use the features provided in the L Developer Preview, download the
+{@code android-ndk64-r10} package for your target platform from the
+<a href="{@docRoot}tools/sdk/ndk/index.html">Android NDK page</a>. The
+{@code android-ndk64-r10} package contains the L Developer Preview API
+library (located under the {@code platforms/android-L/} API directory) for both
+32- and 64-bit systems. The package also includes the {@code gcc-4.9} compiler
+for both 32- and 64-bit apps.</p></li>
+</ul>
diff --git a/graphics/java/android/graphics/drawable/RippleDrawable.java b/graphics/java/android/graphics/drawable/RippleDrawable.java
index f097239..ea9f732 100644
--- a/graphics/java/android/graphics/drawable/RippleDrawable.java
+++ b/graphics/java/android/graphics/drawable/RippleDrawable.java
@@ -157,6 +157,12 @@ public class RippleDrawable extends LayerDrawable {
private boolean mOverrideBounds;
/**
+ * Whether hotspots are being cleared. Used to prevent re-entry by
+ * animation finish listeners.
+ */
+ private boolean mClearingHotspots;
+
+ /**
* Constructor used for drawable inflation.
*/
RippleDrawable() {
@@ -524,6 +530,8 @@ public class RippleDrawable extends LayerDrawable {
}
private void clearHotspots() {
+ mClearingHotspots = true;
+
final int count = mAnimatingRipplesCount;
final Ripple[] ripples = mAnimatingRipples;
for (int i = 0; i < count; i++) {
@@ -532,11 +540,6 @@ public class RippleDrawable extends LayerDrawable {
final Ripple ripple = ripples[i];
ripples[i] = null;
ripple.cancel();
-
- // The active ripple may also be animating. Don't cancel it twice.
- if (mRipple == ripple) {
- mRipple = null;
- }
}
if (mRipple != null) {
@@ -549,6 +552,7 @@ public class RippleDrawable extends LayerDrawable {
mBackground = null;
}
+ mClearingHotspots = false;
mAnimatingRipplesCount = 0;
invalidateSelf();
}
@@ -647,15 +651,17 @@ public class RippleDrawable extends LayerDrawable {
* @param ripple the ripple to remove
*/
void removeRipple(Ripple ripple) {
- // Ripple ripple ripple ripple. Ripple ripple.
- final Ripple[] ripples = mAnimatingRipples;
- final int count = mAnimatingRipplesCount;
- final int index = getRippleIndex(ripple);
- if (index >= 0) {
- System.arraycopy(ripples, index + 1, ripples, index + 1 - 1, count - (index + 1));
- ripples[count - 1] = null;
- mAnimatingRipplesCount--;
- invalidateSelf();
+ if (!mClearingHotspots) {
+ // Ripple ripple ripple ripple. Ripple ripple.
+ final Ripple[] ripples = mAnimatingRipples;
+ final int count = mAnimatingRipplesCount;
+ final int index = getRippleIndex(ripple);
+ if (index >= 0) {
+ System.arraycopy(ripples, index + 1, ripples, index + 1 - 1, count - (index + 1));
+ ripples[count - 1] = null;
+ mAnimatingRipplesCount--;
+ invalidateSelf();
+ }
}
}
diff --git a/packages/SystemUI/res/drawable/recents_task_view_header_bg.xml b/packages/SystemUI/res/drawable/recents_task_view_header_bg.xml
new file mode 100644
index 0000000..745af33
--- /dev/null
+++ b/packages/SystemUI/res/drawable/recents_task_view_header_bg.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 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.
+-->
+
+<ripple xmlns:android="http://schemas.android.com/apk/res/android"
+ android:color="?android:attr/colorControlHighlight">
+ <item android:drawable="@android:color/transparent" />
+</ripple> \ No newline at end of file
diff --git a/packages/SystemUI/res/layout/recents_task_view.xml b/packages/SystemUI/res/layout/recents_task_view.xml
index 4a5fffe..6cfff2e 100644
--- a/packages/SystemUI/res/layout/recents_task_view.xml
+++ b/packages/SystemUI/res/layout/recents_task_view.xml
@@ -26,8 +26,7 @@
android:id="@+id/task_view_bar"
android:layout_width="match_parent"
android:layout_height="@dimen/recents_task_bar_height"
- android:layout_gravity="top|center_horizontal"
- android:background="@color/recents_task_bar_default_background_color">
+ android:layout_gravity="top|center_horizontal">
<com.android.systemui.recents.views.FixedSizeImageView
android:id="@+id/application_icon"
android:layout_width="@dimen/recents_task_view_application_icon_size"
@@ -69,7 +68,6 @@
android:layout_gravity="bottom|right"
android:layout_marginRight="15dp"
android:layout_marginBottom="15dp"
- android:translationZ="50dp"
android:contentDescription="@string/recents_lock_to_app_button_label"
android:background="@drawable/recents_lock_to_task_button_bg">
<ImageView
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index 26e5ce3..28d7e29 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -147,6 +147,8 @@
<integer name="recents_max_task_stack_view_dim">96</integer>
<!-- The number of tasks that RecentsTaskLoader should load. -->
<integer name="recents_max_num_tasks_to_load">50</integer>
+ <!-- The delay to enforce between each alt-tab key press. -->
+ <integer name="recents_alt_tab_key_delay">200</integer>
<!-- Transposes the recents layout in landscape. -->
<bool name="recents_transpose_layout_with_orientation">true</bool>
diff --git a/packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java b/packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java
index efb7a2c..354eb55 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java
@@ -345,8 +345,8 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta
* Creates the activity options for an app->recents transition. If this method sets the static
* screenshot, then we will use that for the transition.
*/
- ActivityOptions getThumbnailTransitionActivityOptions(ActivityManager.RunningTaskInfo topTask) {
-
+ ActivityOptions getThumbnailTransitionActivityOptions(ActivityManager.RunningTaskInfo topTask,
+ boolean isTopTaskHome) {
if (Constants.DebugFlags.App.EnableScreenshotAppTransition) {
// Recycle the last screenshot
consumeLastScreenshot();
@@ -365,7 +365,7 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta
Bitmap firstThumbnail = mSystemServicesProxy.getTaskThumbnail(topTask.id);
if (firstThumbnail != null) {
// Update the destination rect
- Rect toTaskRect = getThumbnailTransitionRect(topTask.id);
+ Rect toTaskRect = getThumbnailTransitionRect(topTask.id, isTopTaskHome);
if (toTaskRect.width() > 0 && toTaskRect.height() > 0) {
// Create the new thumbnail for the animation down
// XXX: We should find a way to optimize this so we don't need to create a new bitmap
@@ -389,7 +389,7 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta
}
/** Returns the transition rect for the given task id. */
- Rect getThumbnailTransitionRect(int runningTaskId) {
+ Rect getThumbnailTransitionRect(int runningTaskId, boolean isTopTaskHome) {
// Get the stack of tasks that we are animating into
TaskStack stack = RecentsTaskLoader.getShallowTaskStack(mSystemServicesProxy, -1);
if (stack.getTaskCount() == 0) {
@@ -401,7 +401,8 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta
TaskStackViewLayoutAlgorithm algo = tsv.getStackAlgorithm();
Rect taskStackBounds = new Rect(mTaskStackBounds);
taskStackBounds.bottom -= mSystemInsets.bottom;
- tsv.computeRects(mWindowRect.width(), mWindowRect.height(), taskStackBounds, mTriggeredFromAltTab);
+ tsv.computeRects(mWindowRect.width(), mWindowRect.height(), taskStackBounds,
+ mTriggeredFromAltTab, isTopTaskHome);
tsv.getScroller().setStackScrollToInitialState();
// Find the running task in the TaskStack
@@ -442,7 +443,7 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta
if (useThumbnailTransition) {
// Try starting with a thumbnail transition
- ActivityOptions opts = getThumbnailTransitionActivityOptions(topTask);
+ ActivityOptions opts = getThumbnailTransitionActivityOptions(topTask, isTopTaskHome);
if (opts != null) {
if (sLastScreenshot != null) {
startAlternateRecentsActivity(topTask, opts, EXTRA_FROM_APP_FULL_SCREENSHOT);
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
index 417049c..41e06de 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
@@ -61,6 +61,7 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
RecentsConfiguration mConfig;
boolean mVisible;
+ long mLastTabKeyEventTime;
// Top level views
RecentsView mRecentsView;
@@ -512,17 +513,33 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
- if (keyCode == KeyEvent.KEYCODE_TAB) {
- // Focus the next task in the stack
- final boolean backward = event.isShiftPressed();
- mRecentsView.focusNextTask(!backward);
- return true;
- } else if (keyCode == KeyEvent.KEYCODE_DPAD_UP) {
- mRecentsView.focusNextTask(true);
- return true;
- } else if (keyCode == KeyEvent.KEYCODE_DPAD_DOWN) {
- mRecentsView.focusNextTask(false);
- return true;
+ switch (keyCode) {
+ case KeyEvent.KEYCODE_TAB: {
+ boolean hasRepKeyTimeElapsed = (System.currentTimeMillis() -
+ mLastTabKeyEventTime) > mConfig.altTabKeyDelay;
+ if (event.getRepeatCount() <= 0 || hasRepKeyTimeElapsed) {
+ // Focus the next task in the stack
+ final boolean backward = event.isShiftPressed();
+ mRecentsView.focusNextTask(!backward);
+ mLastTabKeyEventTime = System.currentTimeMillis();
+ }
+ return true;
+ }
+ case KeyEvent.KEYCODE_DPAD_UP: {
+ mRecentsView.focusNextTask(true);
+ return true;
+ }
+ case KeyEvent.KEYCODE_DPAD_DOWN: {
+ mRecentsView.focusNextTask(false);
+ return true;
+ }
+ case KeyEvent.KEYCODE_DEL:
+ case KeyEvent.KEYCODE_FORWARD_DEL: {
+ mRecentsView.dismissFocusedTask();
+ return true;
+ }
+ default:
+ break;
}
// Pass through the debug trigger
mDebugTrigger.onKeyEvent(keyCode);
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
index 65e7076..3f5018d 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
@@ -112,6 +112,9 @@ public class RecentsConfiguration {
public boolean launchedFromHome;
public int launchedToTaskId;
+ /** Misc **/
+ public int altTabKeyDelay;
+
/** Dev options and global settings */
public boolean lockToAppEnabled;
public boolean developerOptionsEnabled;
@@ -250,6 +253,9 @@ public class RecentsConfiguration {
// Nav bar scrim
navBarScrimEnterDuration =
res.getInteger(R.integer.recents_nav_bar_scrim_enter_duration);
+
+ // Misc
+ altTabKeyDelay = res.getInteger(R.integer.recents_alt_tab_key_delay);
}
/** Updates the system insets */
diff --git a/packages/SystemUI/src/com/android/systemui/recents/misc/Utilities.java b/packages/SystemUI/src/com/android/systemui/recents/misc/Utilities.java
index bd5df28..4c6b389 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/misc/Utilities.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/misc/Utilities.java
@@ -89,6 +89,17 @@ public class Utilities {
return Math.abs((fgL + 0.05f) / (bgL + 0.05f));
}
+ /** Returns the base color overlaid with another overlay color with a specified alpha. */
+ public static int getColorWithOverlay(int baseColor, int overlayColor, float overlayAlpha) {
+ return Color.rgb(
+ (int) (overlayAlpha * Color.red(baseColor) +
+ (1f - overlayAlpha) * Color.red(overlayColor)),
+ (int) (overlayAlpha * Color.green(baseColor) +
+ (1f - overlayAlpha) * Color.green(overlayColor)),
+ (int) (overlayAlpha * Color.blue(baseColor) +
+ (1f - overlayAlpha) * Color.blue(overlayColor)));
+ }
+
/** Sets some private shadow properties. */
public static void setShadowProperty(String property, String value)
throws IllegalAccessException, InvocationTargetException {
diff --git a/packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java b/packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java
index 0269141..98bf151 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java
@@ -20,6 +20,7 @@ import android.graphics.Color;
import com.android.systemui.recents.Constants;
import com.android.systemui.recents.RecentsConfiguration;
import com.android.systemui.recents.misc.NamedCounter;
+import com.android.systemui.recents.misc.Utilities;
import java.util.ArrayList;
import java.util.Collections;
@@ -433,10 +434,8 @@ public class TaskStack {
float alpha = 1f;
for (int j = 0; j < taskCount; j++) {
Task t = tasksMap.get(group.mTaskKeys.get(j));
- t.colorPrimary = Color.rgb(
- (int) (alpha * Color.red(affiliationColor) + (1f - alpha) * 0xFF),
- (int) (alpha * Color.green(affiliationColor) + (1f - alpha) * 0xFF),
- (int) (alpha * Color.blue(affiliationColor) + (1f - alpha) * 0xFF));
+ t.colorPrimary = Utilities.getColorWithOverlay(affiliationColor, Color.WHITE,
+ alpha);
alpha -= alphaStep;
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java b/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java
index 34e8860..07a7e74 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java
@@ -316,12 +316,11 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV
/** Notifies each task view of the user interaction. */
public void onUserInteraction() {
// Get the first stack view
- TaskStackView stackView = null;
int childCount = getChildCount();
for (int i = 0; i < childCount; i++) {
View child = getChildAt(i);
if (child != mSearchBar) {
- stackView = (TaskStackView) child;
+ TaskStackView stackView = (TaskStackView) child;
stackView.onUserInteraction();
}
}
@@ -330,18 +329,28 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV
/** Focuses the next task in the first stack view */
public void focusNextTask(boolean forward) {
// Get the first stack view
- TaskStackView stackView = null;
int childCount = getChildCount();
for (int i = 0; i < childCount; i++) {
View child = getChildAt(i);
if (child != mSearchBar) {
- stackView = (TaskStackView) child;
+ TaskStackView stackView = (TaskStackView) child;
+ stackView.focusNextTask(forward);
break;
}
}
+ }
- if (stackView != null) {
- stackView.focusNextTask(forward);
+ /** Dismisses the focused task. */
+ public void dismissFocusedTask() {
+ // Get the first stack view
+ int childCount = getChildCount();
+ for (int i = 0; i < childCount; i++) {
+ View child = getChildAt(i);
+ if (child != mSearchBar) {
+ TaskStackView stackView = (TaskStackView) child;
+ stackView.dismissFocusedTask();
+ break;
+ }
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
index 46996bb..4fd9136 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
@@ -349,9 +349,10 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
}
/** Updates the min and max virtual scroll bounds */
- void updateMinMaxScroll(boolean boundScrollToNewMinMax, boolean launchedWithAltTab) {
+ void updateMinMaxScroll(boolean boundScrollToNewMinMax, boolean launchedWithAltTab,
+ boolean launchedFromHome) {
// Compute the min and max scroll values
- mLayoutAlgorithm.computeMinMaxScroll(mStack.getTasks(), launchedWithAltTab);
+ mLayoutAlgorithm.computeMinMaxScroll(mStack.getTasks(), launchedWithAltTab, launchedFromHome);
// Debug logging
if (boundScrollToNewMinMax) {
@@ -366,6 +367,9 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
/** Focuses the task at the specified index in the stack */
void focusTask(int taskIndex, boolean scrollToNewPosition) {
+ // Return early if the task is already focused
+ if (taskIndex == mFocusedTaskIndex) return;
+
if (0 <= taskIndex && taskIndex < mStack.getTaskCount()) {
mFocusedTaskIndex = taskIndex;
@@ -406,14 +410,24 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
void focusNextTask(boolean forward) {
// Find the next index to focus
int numTasks = mStack.getTaskCount();
- if (mFocusedTaskIndex < 0) {
- mFocusedTaskIndex = numTasks - 1;
- }
+ if (numTasks == 0) return;
+
+ int nextFocusIndex = numTasks - 1;
if (0 <= mFocusedTaskIndex && mFocusedTaskIndex < numTasks) {
- mFocusedTaskIndex = Math.max(0, Math.min(numTasks - 1,
+ nextFocusIndex = Math.max(0, Math.min(numTasks - 1,
mFocusedTaskIndex + (forward ? -1 : 1)));
}
- focusTask(mFocusedTaskIndex, true);
+ focusTask(nextFocusIndex, true);
+ }
+
+ /** Dismisses the focused task. */
+ public void dismissFocusedTask() {
+ // Return early if there is no focused task index
+ if (mFocusedTaskIndex < 0) return;
+
+ Task t = mStack.getTasks().get(mFocusedTaskIndex);
+ TaskView tv = getChildViewForTask(t);
+ tv.dismissTask();
}
@Override
@@ -436,12 +450,12 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
/** Computes the stack and task rects */
public void computeRects(int windowWidth, int windowHeight, Rect taskStackBounds,
- boolean launchedWithAltTab) {
+ boolean launchedWithAltTab, boolean launchedFromHome) {
// Compute the rects in the stack algorithm
mLayoutAlgorithm.computeRects(windowWidth, windowHeight, taskStackBounds);
// Update the scroll bounds
- updateMinMaxScroll(false, launchedWithAltTab);
+ updateMinMaxScroll(false, launchedWithAltTab, launchedFromHome);
}
/**
@@ -456,7 +470,8 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
// Compute our stack/task rects
Rect taskStackBounds = new Rect(mTaskStackBounds);
taskStackBounds.bottom -= mConfig.systemInsets.bottom;
- computeRects(width, height, taskStackBounds, mConfig.launchedWithAltTab);
+ computeRects(width, height, taskStackBounds, mConfig.launchedWithAltTab,
+ mConfig.launchedFromHome);
// If this is the first layout, then scroll to the front of the stack and synchronize the
// stack views immediately to load all the views
@@ -546,7 +561,11 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
// When Alt-Tabbing, we scroll to and focus the previous task
if (mConfig.launchedWithAltTab) {
- focusTask(Math.max(0, mStack.getTaskCount() - 2), false);
+ if (mConfig.launchedFromHome) {
+ focusTask(Math.max(0, mStack.getTaskCount() - 1), false);
+ } else {
+ focusTask(Math.max(0, mStack.getTaskCount() - 2), false);
+ }
}
}
@@ -661,7 +680,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
mCb.onTaskViewDismissed(removedTask);
// Update the min/max scroll and animate other task views into their new positions
- updateMinMaxScroll(true, mConfig.launchedWithAltTab);
+ updateMinMaxScroll(true, mConfig.launchedWithAltTab, mConfig.launchedFromHome);
requestSynchronizeStackViewsWithModel(200);
// Update the new front most task
@@ -859,11 +878,23 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
@Override
public void onTaskViewDismissed(TaskView tv) {
Task task = tv.getTask();
+ int taskIndex = mStack.indexOfTask(task);
+ boolean taskWasFocused = tv.isFocusedTask();
// Announce for accessibility
tv.announceForAccessibility(getContext().getString(R.string.accessibility_recents_item_dismissed,
tv.getTask().activityLabel));
// Remove the task from the view
mStack.removeTask(task);
+ // If the dismissed task was focused, then we should focus the next task in front
+ if (taskWasFocused) {
+ ArrayList<Task> tasks = mStack.getTasks();
+ int nextTaskIndex = Math.min(tasks.size() - 1, taskIndex);
+ if (nextTaskIndex >= 0) {
+ Task nextTask = tasks.get(nextTaskIndex);
+ TaskView nextTv = getChildViewForTask(nextTask);
+ nextTv.setFocusedTask();
+ }
+ }
}
@Override
@@ -876,6 +907,13 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
requestSynchronizeStackViewsWithModel();
}
+ @Override
+ public void onTaskViewFocusChanged(TaskView tv, boolean focused) {
+ if (focused) {
+ mFocusedTaskIndex = mStack.indexOfTask(tv.getTask());
+ }
+ }
+
/**** TaskStackViewScroller.TaskStackViewScrollerCallbacks ****/
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewLayoutAlgorithm.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewLayoutAlgorithm.java
index 6c8de72..495d00b 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewLayoutAlgorithm.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewLayoutAlgorithm.java
@@ -91,7 +91,8 @@ public class TaskStackViewLayoutAlgorithm {
/** Computes the minimum and maximum scroll progress values. This method may be called before
* the RecentsConfiguration is set, so we need to pass in the alt-tab state. */
- void computeMinMaxScroll(ArrayList<Task> tasks, boolean launchedWithAltTab) {
+ void computeMinMaxScroll(ArrayList<Task> tasks, boolean launchedWithAltTab,
+ boolean launchedFromHome) {
// Clear the progress map
mTaskProgressMap.clear();
@@ -101,10 +102,16 @@ public class TaskStackViewLayoutAlgorithm {
return;
}
+ // Note that we should account for the scale difference of the offsets at the screen bottom
int taskHeight = mTaskRect.height();
float pAtBottomOfStackRect = screenYToCurveProgress(mStackVisibleRect.bottom);
- float pWithinAffiliateOffset = pAtBottomOfStackRect -
- screenYToCurveProgress(mStackVisibleRect.bottom - mWithinAffiliationOffset);
+ float pWithinAffiliateTop = screenYToCurveProgress(mStackVisibleRect.bottom -
+ mWithinAffiliationOffset);
+ float scale = curveProgressToScale(pWithinAffiliateTop);
+ int scaleYOffset = (int) (((1f - scale) * taskHeight) / 2);
+ pWithinAffiliateTop = screenYToCurveProgress(mStackVisibleRect.bottom -
+ mWithinAffiliationOffset + scaleYOffset);
+ float pWithinAffiliateOffset = pAtBottomOfStackRect - pWithinAffiliateTop;
float pBetweenAffiliateOffset = pAtBottomOfStackRect -
screenYToCurveProgress(mStackVisibleRect.bottom - mBetweenAffiliationOffset);
float pTaskHeightOffset = pAtBottomOfStackRect -
@@ -133,8 +140,13 @@ public class TaskStackViewLayoutAlgorithm {
mMaxScrollP = pAtFrontMostCardTop - ((1f - pTaskHeightOffset - pNavBarOffset));
mMinScrollP = tasks.size() == 1 ? Math.max(mMaxScrollP, 0f) : 0f;
if (launchedWithAltTab) {
- // Center the second most task, since that will be focused first
- mInitialScrollP = pAtSecondFrontMostCardTop - 0.5f;
+ if (launchedFromHome) {
+ // Center the top most task, since that will be focused first
+ mInitialScrollP = pAtSecondFrontMostCardTop - 0.5f;
+ } else {
+ // Center the second top most task, since that will be focused first
+ mInitialScrollP = pAtSecondFrontMostCardTop - 0.5f;
+ }
} else {
mInitialScrollP = pAtFrontMostCardTop - 0.825f;
}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewScroller.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewScroller.java
index 0a12dab..2c0dc44 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewScroller.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewScroller.java
@@ -133,7 +133,7 @@ public class TaskStackViewScroller {
stopBoundScrollAnimation();
mScrollAnimator = ObjectAnimator.ofFloat(this, "stackScroll", curScroll, newScroll);
- mScrollAnimator.setDuration(250);
+ mScrollAnimator.setDuration(200);
// We would have to project the difference into the screen coords, and then use that as the
// duration
// mScrollAnimator.setDuration(Utilities.calculateTranslationAnimationDuration(newScroll -
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
index 3b9bcc4..236229e 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
@@ -48,6 +48,7 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
public void onTaskViewDismissed(TaskView tv);
public void onTaskViewClipStateChanged(TaskView tv);
public void onTaskViewFullScreenTransitionCompleted();
+ public void onTaskViewFocusChanged(TaskView tv, boolean focused);
}
RecentsConfiguration mConfig;
@@ -62,13 +63,14 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
Task mTask;
boolean mTaskDataLoaded;
boolean mIsFocused;
+ boolean mFocusAnimationsEnabled;
boolean mIsFullScreenView;
boolean mClipViewInStack;
AnimateableViewBounds mViewBounds;
Paint mLayerPaint = new Paint();
TaskViewThumbnail mThumbnailView;
- TaskViewHeader mBarView;
+ TaskViewHeader mHeaderView;
TaskViewFooter mFooterView;
View mActionButtonView;
TaskViewCallbacks mCb;
@@ -124,7 +126,7 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
@Override
protected void onFinishInflate() {
// Bind the views
- mBarView = (TaskViewHeader) findViewById(R.id.task_view_bar);
+ mHeaderView = (TaskViewHeader) findViewById(R.id.task_view_bar);
mThumbnailView = (TaskViewThumbnail) findViewById(R.id.task_view_thumbnail);
mActionButtonView = findViewById(R.id.lock_to_app_fab);
if (mFooterView != null) {
@@ -138,7 +140,7 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
int height = MeasureSpec.getSize(heightMeasureSpec);
// Measure the bar view, thumbnail, and footer
- mBarView.measure(MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY),
+ mHeaderView.measure(MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY),
MeasureSpec.makeMeasureSpec(mConfig.taskBarHeight, MeasureSpec.EXACTLY));
if (mFooterView != null) {
mFooterView.measure(MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY),
@@ -218,11 +220,11 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
/** Prepares this task view for the enter-recents animations. This is called earlier in the
* first layout because the actual animation into recents may take a long time. */
- public void prepareEnterRecentsAnimation(boolean isTaskViewLaunchTargetTask,
+ void prepareEnterRecentsAnimation(boolean isTaskViewLaunchTargetTask,
boolean occludesLaunchTarget, int offscreenY) {
if (mConfig.launchedFromAppWithScreenshot) {
if (isTaskViewLaunchTargetTask) {
- mBarView.prepareEnterRecentsAnimation();
+ mHeaderView.prepareEnterRecentsAnimation();
// Hide the footer during the transition in, and animate it out afterwards?
if (mFooterView != null) {
mFooterView.animateFooterVisibility(false, 0);
@@ -234,7 +236,7 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
} else if (mConfig.launchedFromAppWithThumbnail) {
if (isTaskViewLaunchTargetTask) {
// Hide the front most task bar view so we can animate it in
- mBarView.prepareEnterRecentsAnimation();
+ mHeaderView.prepareEnterRecentsAnimation();
// Hide the action button if it exists
mActionButtonView.setAlpha(0f);
// Set the dim to 0 so we can animate it in
@@ -256,8 +258,9 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
}
/** Animates this task view as it enters recents */
- public void startEnterRecentsAnimation(final ViewAnimation.TaskViewEnterContext ctx) {
+ void startEnterRecentsAnimation(final ViewAnimation.TaskViewEnterContext ctx) {
final TaskViewTransform transform = ctx.currentTaskTransform;
+ int startDelay = 0;
if (mConfig.launchedFromAppWithScreenshot) {
if (mTask.isLaunchTarget) {
@@ -269,6 +272,7 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
float scaledWindowInsetTop = (int) (taskScale * windowInsetTop);
float scaledTranslationY = taskRect.top + transform.translationY -
(scaledWindowInsetTop + scaledYOffset);
+ startDelay = mConfig.taskViewEnterFromHomeDelay;
// Animate the top clip
mViewBounds.animateClipTop(windowInsetTop, duration,
@@ -276,7 +280,7 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
@Override
public void onAnimationUpdate(ValueAnimator animation) {
int y = (Integer) animation.getAnimatedValue();
- mBarView.setTranslationY(y);
+ mHeaderView.setTranslationY(y);
}
});
// Animate the bottom or right clip
@@ -287,7 +291,7 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
mViewBounds.animateClipBottom(getMeasuredHeight() - (windowInsetTop + size), duration);
}
// Animate the task bar of the first task view
- mBarView.startEnterRecentsAnimation(0, null);
+ mHeaderView.startEnterRecentsAnimation(0, null);
animate()
.scaleX(taskScale)
.scaleY(taskScale)
@@ -304,9 +308,9 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
mViewBounds.setClipBottom(0);
mViewBounds.setClipRight(0);
// Reset the bar translation
- mBarView.setTranslationY(0);
+ mHeaderView.setTranslationY(0);
// Enable the thumbnail clip
- mThumbnailView.enableTaskBarClip(mBarView);
+ mThumbnailView.enableTaskBarClip(mHeaderView);
// Animate the footer into view (if it is the front most task)
animateFooterVisibility(true, mConfig.taskBarEnterAnimDuration);
@@ -324,7 +328,7 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
.start();
} else {
// Otherwise, just enable the thumbnail clip
- mThumbnailView.enableTaskBarClip(mBarView);
+ mThumbnailView.enableTaskBarClip(mHeaderView);
// Animate the footer into view
animateFooterVisibility(true, 0);
@@ -334,8 +338,8 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
} else if (mConfig.launchedFromAppWithThumbnail) {
if (mTask.isLaunchTarget) {
// Animate the task bar of the first task view
- mBarView.startEnterRecentsAnimation(mConfig.taskBarEnterAnimDelay,
- mThumbnailView.enableTaskBarClipAsRunnable(mBarView));
+ mHeaderView.startEnterRecentsAnimation(mConfig.taskBarEnterAnimDelay,
+ mThumbnailView.enableTaskBarClipAsRunnable(mHeaderView));
// Animate the dim into view as well
ObjectAnimator anim = ObjectAnimator.ofInt(this, "dim", getDimFromTaskProgress());
@@ -364,7 +368,7 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
.start();
} else {
// Enable the task bar clip
- mThumbnailView.enableTaskBarClip(mBarView);
+ mThumbnailView.enableTaskBarClip(mHeaderView);
// Animate the task up if it was occluding the launch target
if (ctx.currentTaskOccludesLaunchTarget) {
setTranslationY(transform.translationY + mConfig.taskViewAffiliateGroupEnterOffsetPx);
@@ -378,7 +382,7 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
.withEndAction(new Runnable() {
@Override
public void run() {
- mThumbnailView.enableTaskBarClip(mBarView);
+ mThumbnailView.enableTaskBarClip(mHeaderView);
// Decrement the post animation trigger
ctx.postAnimationTrigger.decrement();
}
@@ -387,6 +391,7 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
ctx.postAnimationTrigger.increment();
}
}
+ startDelay = mConfig.taskBarEnterAnimDelay;
} else if (mConfig.launchedFromHome) {
// Animate the tasks up
@@ -407,7 +412,7 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
.withEndAction(new Runnable() {
@Override
public void run() {
- mThumbnailView.enableTaskBarClip(mBarView);
+ mThumbnailView.enableTaskBarClip(mHeaderView);
// Decrement the post animation trigger
ctx.postAnimationTrigger.decrement();
}
@@ -417,18 +422,28 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
// Animate the footer into view
animateFooterVisibility(true, mConfig.taskViewEnterFromHomeDuration);
+ startDelay = delay;
} else {
// Otherwise, just enable the thumbnail clip
- mThumbnailView.enableTaskBarClip(mBarView);
+ mThumbnailView.enableTaskBarClip(mHeaderView);
// Animate the footer into view
animateFooterVisibility(true, 0);
}
+
+ // Enable the focus animations from this point onwards so that they aren't affected by the
+ // window transitions
+ postDelayed(new Runnable() {
+ @Override
+ public void run() {
+ enableFocusAnimations();
+ }
+ }, (startDelay / 2));
}
/** Animates this task view as it leaves recents by pressing home. */
- public void startExitToHomeAnimation(ViewAnimation.TaskViewExitContext ctx) {
+ void startExitToHomeAnimation(ViewAnimation.TaskViewExitContext ctx) {
animate()
.translationY(ctx.offscreenTranslationY)
.setStartDelay(0)
@@ -441,11 +456,11 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
}
/** Animates this task view as it exits recents */
- public void startLaunchTaskAnimation(final Runnable r, boolean isLaunchingTask,
- boolean occludesLaunchTarget) {
+ void startLaunchTaskAnimation(final Runnable r, boolean isLaunchingTask,
+ boolean occludesLaunchTarget) {
if (isLaunchingTask) {
// Disable the thumbnail clip and animate the bar out
- mBarView.startLaunchTaskAnimation(mThumbnailView.disableTaskBarClipAsRunnable(), r);
+ mHeaderView.startLaunchTaskAnimation(mThumbnailView.disableTaskBarClipAsRunnable(), r);
// Animate the dim
if (mDim > 0) {
@@ -464,7 +479,7 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
.start();
} else {
// Hide the dismiss button
- mBarView.startLaunchTaskDismissAnimation();
+ mHeaderView.startLaunchTaskDismissAnimation();
// If this is another view in the task grouping and is in front of the launch task,
// animate it away first
if (occludesLaunchTarget) {
@@ -480,7 +495,7 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
}
/** Animates the deletion of this task view */
- public void startDeleteTaskAnimation(final Runnable r) {
+ void startDeleteTaskAnimation(final Runnable r) {
// Disabling clipping with the stack while the view is animating away
setClipViewInStack(false);
@@ -508,19 +523,33 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
}
/** Animates this task view if the user does not interact with the stack after a certain time. */
- public void startNoUserInteractionAnimation() {
- mBarView.startNoUserInteractionAnimation();
+ void startNoUserInteractionAnimation() {
+ mHeaderView.startNoUserInteractionAnimation();
}
/** Mark this task view that the user does has not interacted with the stack after a certain time. */
- public void setNoUserInteractionState() {
- mBarView.setNoUserInteractionState();
+ void setNoUserInteractionState() {
+ mHeaderView.setNoUserInteractionState();
+ }
+
+ /** Dismisses this task. */
+ void dismissTask() {
+ // Animate out the view and call the callback
+ final TaskView tv = this;
+ startDeleteTaskAnimation(new Runnable() {
+ @Override
+ public void run() {
+ mCb.onTaskViewDismissed(tv);
+ }
+ });
+ // Hide the footer
+ animateFooterVisibility(false, mConfig.taskViewRemoveAnimDuration);
}
/** Sets whether this task view is full screen or not. */
void setIsFullScreen(boolean isFullscreen) {
mIsFullScreenView = isFullscreen;
- mBarView.setIsFullscreen(isFullscreen);
+ mHeaderView.setIsFullscreen(isFullscreen);
if (isFullscreen) {
// If we are full screen, then disable the bottom outline clip for the footer
mViewBounds.setOutlineClipBottom(0);
@@ -614,6 +643,12 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
*/
public void setFocusedTask() {
mIsFocused = true;
+ if (mFocusAnimationsEnabled) {
+ // Focus the header bar
+ mHeaderView.onTaskViewFocusChanged(true);
+ }
+ // Call the callback
+ mCb.onTaskViewFocusChanged(this, true);
// Workaround, we don't always want it focusable in touch mode, but we want the first task
// to be focused after the enter-recents animation, which can be triggered from either touch
// or keyboard
@@ -631,6 +666,12 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
super.onFocusChanged(gainFocus, direction, previouslyFocusedRect);
if (!gainFocus) {
mIsFocused = false;
+ if (mFocusAnimationsEnabled) {
+ // Un-focus the header bar
+ mHeaderView.onTaskViewFocusChanged(false);
+ }
+ // Call the callback
+ mCb.onTaskViewFocusChanged(this, false);
invalidate();
}
}
@@ -642,6 +683,16 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
return mIsFocused || isFocused();
}
+ /** Enables all focus animations. */
+ void enableFocusAnimations() {
+ boolean wasFocusAnimationsEnabled = mFocusAnimationsEnabled;
+ mFocusAnimationsEnabled = true;
+ if (mIsFocused && !wasFocusAnimationsEnabled) {
+ // Re-notify the header if we were focused and animations were not previously enabled
+ mHeaderView.onTaskViewFocusChanged(true);
+ }
+ }
+
/**** TaskCallbacks Implementation ****/
/** Binds this task view to the task */
@@ -662,24 +713,24 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
@Override
public void onTaskDataLoaded() {
- if (mThumbnailView != null && mBarView != null) {
+ if (mThumbnailView != null && mHeaderView != null) {
// Bind each of the views to the new task data
if (mIsFullScreenView) {
mThumbnailView.bindToScreenshot(AlternateRecentsComponent.getLastScreenshot());
} else {
mThumbnailView.rebindToTask(mTask);
}
- mBarView.rebindToTask(mTask);
+ mHeaderView.rebindToTask(mTask);
// Rebind any listeners
- mBarView.mApplicationIcon.setOnClickListener(this);
- mBarView.mDismissButton.setOnClickListener(this);
+ mHeaderView.mApplicationIcon.setOnClickListener(this);
+ mHeaderView.mDismissButton.setOnClickListener(this);
if (mFooterView != null) {
mFooterView.setOnClickListener(this);
}
mActionButtonView.setOnClickListener(this);
if (Constants.DebugFlags.App.EnableDevAppInfoOnLongPress) {
if (mConfig.developerOptionsEnabled) {
- mBarView.mApplicationIcon.setOnLongClickListener(this);
+ mHeaderView.mApplicationIcon.setOnLongClickListener(this);
}
}
}
@@ -688,20 +739,20 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
@Override
public void onTaskDataUnloaded() {
- if (mThumbnailView != null && mBarView != null) {
+ if (mThumbnailView != null && mHeaderView != null) {
// Unbind each of the views from the task data and remove the task callback
mTask.setCallbacks(null);
mThumbnailView.unbindFromTask();
- mBarView.unbindFromTask();
+ mHeaderView.unbindFromTask();
// Unbind any listeners
- mBarView.mApplicationIcon.setOnClickListener(null);
- mBarView.mDismissButton.setOnClickListener(null);
+ mHeaderView.mApplicationIcon.setOnClickListener(null);
+ mHeaderView.mDismissButton.setOnClickListener(null);
if (mFooterView != null) {
mFooterView.setOnClickListener(null);
}
mActionButtonView.setOnClickListener(null);
if (Constants.DebugFlags.App.EnableDevAppInfoOnLongPress) {
- mBarView.mApplicationIcon.setOnLongClickListener(null);
+ mHeaderView.mApplicationIcon.setOnLongClickListener(null);
}
}
mTaskDataLoaded = false;
@@ -734,18 +785,10 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
postDelayed(new Runnable() {
@Override
public void run() {
- if (Constants.DebugFlags.App.EnableTaskFiltering && v == mBarView.mApplicationIcon) {
+ if (Constants.DebugFlags.App.EnableTaskFiltering && v == mHeaderView.mApplicationIcon) {
mCb.onTaskViewAppIconClicked(tv);
- } else if (v == mBarView.mDismissButton) {
- // Animate out the view and call the callback
- startDeleteTaskAnimation(new Runnable() {
- @Override
- public void run() {
- mCb.onTaskViewDismissed(tv);
- }
- });
- // Hide the footer
- tv.animateFooterVisibility(false, mConfig.taskViewRemoveAnimDuration);
+ } else if (v == mHeaderView.mDismissButton) {
+ dismissTask();
} else {
mCb.onTaskViewClicked(tv, tv.getTask(),
(v == mFooterView || v == mActionButtonView));
@@ -758,7 +801,7 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
@Override
public boolean onLongClick(View v) {
- if (v == mBarView.mApplicationIcon) {
+ if (v == mHeaderView.mApplicationIcon) {
mCb.onTaskViewAppInfoClicked(this);
return true;
}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java
index 03fc16e..4b09549 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java
@@ -16,9 +16,16 @@
package com.android.systemui.recents.views;
+import android.animation.Animator;
+import android.animation.AnimatorListenerAdapter;
+import android.animation.ArgbEvaluator;
+import android.animation.ValueAnimator;
import android.content.Context;
+import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Outline;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
@@ -28,12 +35,14 @@ import android.graphics.drawable.RippleDrawable;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
+import android.view.ViewOutlineProvider;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import com.android.systemui.R;
import com.android.systemui.recents.Constants;
import com.android.systemui.recents.RecentsConfiguration;
+import com.android.systemui.recents.misc.Utilities;
import com.android.systemui.recents.model.Task;
@@ -46,10 +55,15 @@ class TaskViewHeader extends FrameLayout {
ImageView mApplicationIcon;
TextView mActivityDescription;
+ RippleDrawable mBackground;
+ ColorDrawable mBackgroundColor;
Drawable mLightDismissDrawable;
Drawable mDarkDismissDrawable;
+ ValueAnimator mBackgroundColorAnimator;
boolean mIsFullscreen;
+ boolean mCurrentPrimaryColorIsDark;
+ int mCurrentPrimaryColor;
static Paint sHighlightPaint;
@@ -69,6 +83,13 @@ class TaskViewHeader extends FrameLayout {
super(context, attrs, defStyleAttr, defStyleRes);
mConfig = RecentsConfiguration.getInstance();
setWillNotDraw(false);
+ setClipToOutline(true);
+ setOutlineProvider(new ViewOutlineProvider() {
+ @Override
+ public void getOutline(View view, Outline outline) {
+ outline.setRect(0, 0, getMeasuredWidth(), getMeasuredHeight());
+ }
+ });
// Load the dismiss resources
Resources res = context.getResources();
@@ -107,6 +128,15 @@ class TaskViewHeader extends FrameLayout {
mApplicationIcon.setBackground(null);
}
}
+
+ mBackgroundColor = new ColorDrawable(0);
+ // Copy the ripple drawable since we are going to be manipulating it
+ mBackground = (RippleDrawable)
+ getResources().getDrawable(R.drawable.recents_task_view_header_bg);
+ mBackground = (RippleDrawable) mBackground.mutate().getConstantState().newDrawable();
+ mBackground.setColor(ColorStateList.valueOf(0));
+ mBackground.setDrawableByLayerId(mBackground.getId(0), mBackgroundColor);
+ setBackground(mBackground);
}
@Override
@@ -130,6 +160,12 @@ class TaskViewHeader extends FrameLayout {
return false;
}
+ /** Returns the secondary color for a primary color. */
+ int getSecondaryColor(int primaryColor, boolean useLightOverlayColor) {
+ int overlayColor = useLightOverlayColor ? Color.WHITE : Color.BLACK;
+ return Utilities.getColorWithOverlay(primaryColor, overlayColor, 0.8f);
+ }
+
/** Binds the bar view to the task */
void rebindToTask(Task t) {
// If an activity icon is defined, then we use that as the primary icon to show in the bar,
@@ -147,8 +183,10 @@ class TaskViewHeader extends FrameLayout {
int existingBgColor = (getBackground() instanceof ColorDrawable) ?
((ColorDrawable) getBackground()).getColor() : 0;
if (existingBgColor != t.colorPrimary) {
- setBackgroundColor(t.colorPrimary);
+ mBackgroundColor.setColor(t.colorPrimary);
}
+ mCurrentPrimaryColor = t.colorPrimary;
+ mCurrentPrimaryColorIsDark = t.useLightOnPrimaryColor;
mActivityDescription.setTextColor(t.useLightOnPrimaryColor ?
mConfig.taskBarViewLightTextColor : mConfig.taskBarViewDarkTextColor);
mDismissButton.setImageDrawable(t.useLightOnPrimaryColor ?
@@ -165,12 +203,12 @@ class TaskViewHeader extends FrameLayout {
/** Prepares this task view for the enter-recents animations. This is called earlier in the
* first layout because the actual animation into recents may take a long time. */
- public void prepareEnterRecentsAnimation() {
+ void prepareEnterRecentsAnimation() {
setVisibility(View.INVISIBLE);
}
/** Animates this task bar as it enters recents */
- public void startEnterRecentsAnimation(int delay, Runnable postAnimRunnable) {
+ void startEnterRecentsAnimation(int delay, Runnable postAnimRunnable) {
// Animate the task bar of the first task view
setVisibility(View.VISIBLE);
setTranslationY(-getMeasuredHeight());
@@ -184,7 +222,7 @@ class TaskViewHeader extends FrameLayout {
}
/** Animates this task bar as it exits recents */
- public void startLaunchTaskAnimation(Runnable preAnimRunnable, final Runnable postAnimRunnable) {
+ void startLaunchTaskAnimation(Runnable preAnimRunnable, final Runnable postAnimRunnable) {
// Animate the task bar out of the first task view
animate()
.translationY(-getMeasuredHeight())
@@ -202,7 +240,7 @@ class TaskViewHeader extends FrameLayout {
}
/** Animates this task bar dismiss button when launching a task. */
- public void startLaunchTaskDismissAnimation() {
+ void startLaunchTaskDismissAnimation() {
if (mDismissButton.getVisibility() == View.VISIBLE) {
mDismissButton.animate().cancel();
mDismissButton.animate()
@@ -216,7 +254,7 @@ class TaskViewHeader extends FrameLayout {
}
/** Animates this task bar if the user does not interact with the stack after a certain time. */
- public void startNoUserInteractionAnimation() {
+ void startNoUserInteractionAnimation() {
mDismissButton.setVisibility(View.VISIBLE);
mDismissButton.setAlpha(0f);
mDismissButton.animate()
@@ -229,11 +267,78 @@ class TaskViewHeader extends FrameLayout {
}
/** Mark this task view that the user does has not interacted with the stack after a certain time. */
- public void setNoUserInteractionState() {
+ void setNoUserInteractionState() {
if (mDismissButton.getVisibility() != View.VISIBLE) {
mDismissButton.animate().cancel();
mDismissButton.setVisibility(View.VISIBLE);
mDismissButton.setAlpha(1f);
}
}
+
+ /** Notifies the associated TaskView has been focused. */
+ void onTaskViewFocusChanged(boolean focused) {
+ boolean isRunning = false;
+ if (mBackgroundColorAnimator != null) {
+ isRunning = mBackgroundColorAnimator.isRunning();
+ mBackgroundColorAnimator.removeAllUpdateListeners();
+ mBackgroundColorAnimator.cancel();
+ }
+ if (focused) {
+ int secondaryColor = getSecondaryColor(mCurrentPrimaryColor, mCurrentPrimaryColorIsDark);
+ int[][] states = new int[][] {
+ new int[] { android.R.attr.state_enabled },
+ new int[] { android.R.attr.state_pressed }
+ };
+ int[] newStates = new int[]{
+ android.R.attr.state_enabled,
+ android.R.attr.state_pressed
+ };
+ int[] colors = new int[] {
+ secondaryColor,
+ secondaryColor
+ };
+ mBackground.setColor(new ColorStateList(states, colors));
+ mBackground.setState(newStates);
+ // Pulse the background color
+ int currentColor = mBackgroundColor.getColor();
+ int lightPrimaryColor = getSecondaryColor(mCurrentPrimaryColor, mCurrentPrimaryColorIsDark);
+ mBackgroundColorAnimator = ValueAnimator.ofObject(new ArgbEvaluator(), lightPrimaryColor,
+ currentColor);
+ mBackgroundColorAnimator.addListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationStart(Animator animation) {
+ mBackground.setState(new int[] {});
+ }
+ });
+ mBackgroundColorAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
+ @Override
+ public void onAnimationUpdate(ValueAnimator animation) {
+ mBackgroundColor.setColor((Integer) animation.getAnimatedValue());
+ }
+ });
+ mBackgroundColorAnimator.setRepeatCount(ValueAnimator.INFINITE);
+ mBackgroundColorAnimator.setRepeatMode(ValueAnimator.REVERSE);
+ mBackgroundColorAnimator.setStartDelay(750);
+ mBackgroundColorAnimator.setDuration(750);
+ mBackgroundColorAnimator.start();
+ } else {
+ if (isRunning) {
+ // Restore the background color
+ int currentColor = mBackgroundColor.getColor();
+ mBackgroundColorAnimator = ValueAnimator.ofObject(new ArgbEvaluator(), currentColor,
+ mCurrentPrimaryColor);
+ mBackgroundColorAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
+ @Override
+ public void onAnimationUpdate(ValueAnimator animation) {
+ mBackgroundColor.setColor((Integer) animation.getAnimatedValue());
+ }
+ });
+ mBackgroundColorAnimator.setRepeatCount(0);
+ mBackgroundColorAnimator.setDuration(150);
+ mBackgroundColorAnimator.start();
+ } else {
+ mBackground.setState(new int[] {});
+ }
+ }
+ }
}
diff --git a/services/core/java/com/android/server/location/GpsLocationProvider.java b/services/core/java/com/android/server/location/GpsLocationProvider.java
index 058a23e..201d9b4 100644
--- a/services/core/java/com/android/server/location/GpsLocationProvider.java
+++ b/services/core/java/com/android/server/location/GpsLocationProvider.java
@@ -221,6 +221,14 @@ public class GpsLocationProvider implements LocationProviderInterface {
private static final int GPS_GEOFENCE_ERROR_INVALID_TRANSITION = -103;
private static final int GPS_GEOFENCE_ERROR_GENERIC = -149;
+ // Value of batterySaverGpsMode such that GPS isn't affected by battery saver mode.
+ private static final int BATTERY_SAVER_MODE_NO_CHANGE = 0;
+ // Value of batterySaverGpsMode such that GPS is disabled when battery saver mode
+ // is enabled and the screen is off.
+ private static final int BATTERY_SAVER_MODE_DISABLED_WHEN_SCREEN_OFF = 1;
+ // Secure setting for GPS behavior when battery saver mode is on.
+ private static final String BATTERY_SAVER_GPS_MODE = "batterySaverGpsMode";
+
/** simpler wrapper for ProviderRequest + Worksource */
private static class GpsRequest {
public ProviderRequest request;
@@ -308,6 +316,13 @@ public class GpsLocationProvider implements LocationProviderInterface {
private int mPositionMode;
+ // Current request from underlying location clients.
+ private ProviderRequest mProviderRequest = null;
+ // Current list of underlying location clients.
+ private WorkSource mWorkSource = null;
+ // True if gps should be disabled (used to support battery saver mode in settings).
+ private boolean mDisableGps = false;
+
// properties loaded from PROPERTIES_FILE
private Properties mProperties;
private String mSuplServerHost;
@@ -352,6 +367,7 @@ public class GpsLocationProvider implements LocationProviderInterface {
// Alarms
private final static String ALARM_WAKEUP = "com.android.internal.location.ALARM_WAKEUP";
private final static String ALARM_TIMEOUT = "com.android.internal.location.ALARM_TIMEOUT";
+ private final PowerManager mPowerManager;
private final AlarmManager mAlarmManager;
private final PendingIntent mWakeupIntent;
private final PendingIntent mTimeoutIntent;
@@ -441,23 +457,27 @@ public class GpsLocationProvider implements LocationProviderInterface {
checkSmsSuplInit(intent);
} else if (action.equals(Intents.WAP_PUSH_RECEIVED_ACTION)) {
checkWapSuplInit(intent);
- } else if (action.equals(ConnectivityManager.CONNECTIVITY_ACTION)) {
- int networkState;
- if (intent.getBooleanExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, false)) {
- networkState = LocationProvider.TEMPORARILY_UNAVAILABLE;
- } else {
- networkState = LocationProvider.AVAILABLE;
- }
-
- // retrieve NetworkInfo result for this UID
- NetworkInfo info =
- intent.getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO);
- ConnectivityManager connManager = (ConnectivityManager)
- mContext.getSystemService(Context.CONNECTIVITY_SERVICE);
- info = connManager.getNetworkInfo(info.getType());
-
- updateNetworkState(networkState, info);
- }
+ } else if (action.equals(ConnectivityManager.CONNECTIVITY_ACTION)) {
+ int networkState;
+ if (intent.getBooleanExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, false)) {
+ networkState = LocationProvider.TEMPORARILY_UNAVAILABLE;
+ } else {
+ networkState = LocationProvider.AVAILABLE;
+ }
+
+ // retrieve NetworkInfo result for this UID
+ NetworkInfo info =
+ intent.getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO);
+ ConnectivityManager connManager = (ConnectivityManager)
+ mContext.getSystemService(Context.CONNECTIVITY_SERVICE);
+ info = connManager.getNetworkInfo(info.getType());
+
+ updateNetworkState(networkState, info);
+ } else if (PowerManager.ACTION_POWER_SAVE_MODE_CHANGED.equals(action)
+ || Intent.ACTION_SCREEN_OFF.equals(action)
+ || Intent.ACTION_SCREEN_ON.equals(action)) {
+ updateLowPowerMode();
+ }
}
};
@@ -474,6 +494,22 @@ public class GpsLocationProvider implements LocationProviderInterface {
native_agps_ni_message(supl_init,supl_init.length);
}
+ private void updateLowPowerMode() {
+ final boolean disableGps;
+ switch (Settings.Secure.getInt(mContext.getContentResolver(), BATTERY_SAVER_GPS_MODE,
+ BATTERY_SAVER_MODE_DISABLED_WHEN_SCREEN_OFF)) {
+ case BATTERY_SAVER_MODE_DISABLED_WHEN_SCREEN_OFF:
+ disableGps = mPowerManager.isPowerSaveMode() && !mPowerManager.isInteractive();
+ break;
+ default:
+ disableGps = false;
+ }
+ if (disableGps != mDisableGps) {
+ mDisableGps = disableGps;
+ updateRequirements();
+ }
+ }
+
public static boolean isSupported() {
return native_is_supported();
}
@@ -526,8 +562,8 @@ public class GpsLocationProvider implements LocationProviderInterface {
mLocation.setExtras(mLocationExtras);
// Create a wake lock
- PowerManager powerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
- mWakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, WAKELOCK_KEY);
+ mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
+ mWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, WAKELOCK_KEY);
mWakeLock.setReferenceCounted(true);
mAlarmManager = (AlarmManager)mContext.getSystemService(Context.ALARM_SERVICE);
@@ -604,6 +640,9 @@ public class GpsLocationProvider implements LocationProviderInterface {
intentFilter.addAction(ALARM_WAKEUP);
intentFilter.addAction(ALARM_TIMEOUT);
intentFilter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
+ intentFilter.addAction(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED);
+ intentFilter.addAction(Intent.ACTION_SCREEN_OFF);
+ intentFilter.addAction(Intent.ACTION_SCREEN_ON);
mContext.registerReceiver(mBroadcastReciever, intentFilter, null, mHandler);
}
@@ -888,31 +927,43 @@ public class GpsLocationProvider implements LocationProviderInterface {
}
private void handleSetRequest(ProviderRequest request, WorkSource source) {
+ mProviderRequest = request;
+ mWorkSource = source;
+ updateRequirements();
+ }
+
+ // Called when the requirements for GPS may have changed
+ private void updateRequirements() {
+ if (mProviderRequest == null || mWorkSource == null) {
+ return;
+ }
+
boolean singleShot = false;
// see if the request is for a single update
- if (request.locationRequests != null && request.locationRequests.size() > 0) {
+ if (mProviderRequest.locationRequests != null
+ && mProviderRequest.locationRequests.size() > 0) {
// if any request has zero or more than one updates
// requested, then this is not single-shot mode
singleShot = true;
- for (LocationRequest lr : request.locationRequests) {
+ for (LocationRequest lr : mProviderRequest.locationRequests) {
if (lr.getNumUpdates() != 1) {
singleShot = false;
}
}
}
- if (DEBUG) Log.d(TAG, "setRequest " + request);
- if (request.reportLocation) {
+ if (DEBUG) Log.d(TAG, "setRequest " + mProviderRequest);
+ if (mProviderRequest.reportLocation && !mDisableGps) {
// update client uids
- updateClientUids(source);
+ updateClientUids(mWorkSource);
- mFixInterval = (int) request.interval;
+ mFixInterval = (int) mProviderRequest.interval;
// check for overflow
- if (mFixInterval != request.interval) {
- Log.w(TAG, "interval overflow: " + request.interval);
+ if (mFixInterval != mProviderRequest.interval) {
+ Log.w(TAG, "interval overflow: " + mProviderRequest.interval);
mFixInterval = Integer.MAX_VALUE;
}
@@ -1909,6 +1960,7 @@ public class GpsLocationProvider implements LocationProviderInterface {
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
StringBuilder s = new StringBuilder();
s.append(" mFixInterval=").append(mFixInterval).append("\n");
+ s.append(" mDisableGps (battery saver mode)=").append(mDisableGps).append("\n");
s.append(" mEngineCapabilities=0x").append(Integer.toHexString(mEngineCapabilities)).append(" (");
if (hasCapability(GPS_CAPABILITY_SCHEDULING)) s.append("SCHED ");
if (hasCapability(GPS_CAPABILITY_MSB)) s.append("MSB ");
@@ -2000,3 +2052,4 @@ public class GpsLocationProvider implements LocationProviderInterface {
private native boolean native_start_navigation_message_collection();
private native boolean native_stop_navigation_message_collection();
}
+