diff options
27 files changed, 152 insertions, 135 deletions
diff --git a/api/current.txt b/api/current.txt index 1acc7a1..804a524 100644 --- a/api/current.txt +++ b/api/current.txt @@ -190,15 +190,15 @@ package android { field public static final int accountPreferences = 16843423; // 0x101029f field public static final int accountType = 16843407; // 0x101028f field public static final int action = 16842797; // 0x101002d - field public static final int actionBarDivider = 16843689; // 0x10103a9 - field public static final int actionBarItemBackground = 16843690; // 0x10103aa + field public static final int actionBarDivider = 16843675; // 0x101039b + field public static final int actionBarItemBackground = 16843676; // 0x101039c field public static final int actionBarSize = 16843499; // 0x10102eb - field public static final int actionBarSplitStyle = 16843670; // 0x1010396 + 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 actionBarWidgetTheme = 16843685; // 0x10103a5 + field public static final int actionBarWidgetTheme = 16843671; // 0x1010397 field public static final int actionButtonStyle = 16843480; // 0x10102d8 field public static final int actionDropDownStyle = 16843479; // 0x10102d7 field public static final int actionLayout = 16843515; // 0x10102fb @@ -211,10 +211,10 @@ package android { field public static final int actionModeCutDrawable = 16843537; // 0x1010311 field public static final int actionModePasteDrawable = 16843539; // 0x1010313 field public static final int actionModeSelectAllDrawable = 16843646; // 0x101037e - field public static final int actionModeSplitBackground = 16843691; // 0x10103ab - field public static final int actionModeStyle = 16843682; // 0x10103a2 + field public static final int actionModeSplitBackground = 16843677; // 0x101039d + field public static final int actionModeStyle = 16843668; // 0x1010394 field public static final int actionOverflowButtonStyle = 16843510; // 0x10102f6 - field public static final int actionProviderClass = 16843671; // 0x1010397 + field public static final int actionProviderClass = 16843657; // 0x1010389 field public static final int actionViewClass = 16843516; // 0x10102fc field public static final int activatedBackgroundIndicator = 16843517; // 0x10102fd field public static final int activityCloseEnterAnimation = 16842938; // 0x10100ba @@ -260,8 +260,8 @@ package android { field public static final int background = 16842964; // 0x10100d4 field public static final int backgroundDimAmount = 16842802; // 0x1010032 field public static final int backgroundDimEnabled = 16843295; // 0x101021f - field public static final int backgroundSplit = 16843673; // 0x1010399 - field public static final int backgroundStacked = 16843672; // 0x1010398 + field public static final int backgroundSplit = 16843659; // 0x101038b + field public static final int backgroundStacked = 16843658; // 0x101038a field public static final int backupAgent = 16843391; // 0x101027f field public static final int baseline = 16843548; // 0x101031c field public static final int baselineAlignBottom = 16843042; // 0x1010122 @@ -270,7 +270,6 @@ package android { field public static final int borderlessButtonStyle = 16843563; // 0x101032b field public static final int bottom = 16843184; // 0x10101b0 field public static final int bottomBright = 16842957; // 0x10100cd - field public static final int bottomChevronDrawable = 16843659; // 0x101038b field public static final int bottomDark = 16842953; // 0x10100c9 field public static final int bottomLeftRadius = 16843179; // 0x10101ab field public static final int bottomMedium = 16842958; // 0x10100ce @@ -318,15 +317,15 @@ package android { field public static final int codes = 16843330; // 0x1010242 field public static final int collapseColumns = 16843083; // 0x101014b field public static final int color = 16843173; // 0x10101a5 - field public static final int colorActivatedHighlight = 16843678; // 0x101039e + 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 colorFocusedHighlight = 16843677; // 0x101039d + 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 = 16843676; // 0x101039c - field public static final int colorMultiSelectHighlight = 16843679; // 0x101039f - field public static final int colorPressedHighlight = 16843675; // 0x101039b + 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 columnCount = 16843639; // 0x1010377 field public static final int columnDelay = 16843215; // 0x10101cf field public static final int columnOrderPreserved = 16843640; // 0x1010378 @@ -370,7 +369,7 @@ package android { field public static final int dialogTitle = 16843250; // 0x10101f2 field public static final int digits = 16843110; // 0x1010166 field public static final int direction = 16843217; // 0x10101d1 - field public static final int directionDescriptions = 16843695; // 0x10103af + field public static final int directionDescriptions = 16843681; // 0x10103a1 field public static final int directionPriority = 16843218; // 0x10101d2 field public static final int disableDependentsState = 16843249; // 0x10101f1 field public static final int disabledAlpha = 16842803; // 0x1010033 @@ -384,11 +383,11 @@ package android { field public static final int drawSelectorOnTop = 16843004; // 0x10100fc field public static final int drawable = 16843161; // 0x1010199 field public static final int drawableBottom = 16843118; // 0x101016e - field public static final int drawableEnd = 16843681; // 0x10103a1 + field public static final int drawableEnd = 16843667; // 0x1010393 field public static final int drawableLeft = 16843119; // 0x101016f field public static final int drawablePadding = 16843121; // 0x1010171 field public static final int drawableRight = 16843120; // 0x1010170 - field public static final int drawableStart = 16843680; // 0x10103a0 + field public static final int drawableStart = 16843666; // 0x1010392 field public static final int drawableTop = 16843117; // 0x101016d field public static final int drawingCacheQuality = 16842984; // 0x10100e8 field public static final int dropDownAnchor = 16843363; // 0x1010263 @@ -445,7 +444,6 @@ package android { field public static final int fastScrollTextColor = 16843609; // 0x1010359 field public static final int fastScrollThumbDrawable = 16843574; // 0x1010336 field public static final int fastScrollTrackDrawable = 16843577; // 0x1010339 - field public static final int feedbackCount = 16843665; // 0x1010391 field public static final int fillAfter = 16843197; // 0x10101bd field public static final int fillBefore = 16843196; // 0x10101bc field public static final int fillEnabled = 16843343; // 0x101024f @@ -498,7 +496,6 @@ package android { field public static final int hand_hour = 16843011; // 0x1010103 field public static final int hand_minute = 16843012; // 0x1010104 field public static final int handle = 16843354; // 0x101025a - field public static final int handleDrawable = 16843655; // 0x1010387 field public static final int handleProfiling = 16842786; // 0x1010022 field public static final int hapticFeedbackEnabled = 16843358; // 0x101025e field public static final int hardwareAccelerated = 16843475; // 0x10102d3 @@ -507,12 +504,10 @@ package android { field public static final int headerDividersEnabled = 16843310; // 0x101022e field public static final int height = 16843093; // 0x1010155 field public static final int hint = 16843088; // 0x1010150 - field public static final int hitRadius = 16843662; // 0x101038e field public static final int homeAsUpIndicator = 16843531; // 0x101030b field public static final int homeLayout = 16843549; // 0x101031d field public static final int horizontalDivider = 16843053; // 0x101012d field public static final int horizontalGap = 16843327; // 0x101023f - field public static final int horizontalOffset = 16843667; // 0x1010393 field public static final int horizontalScrollViewStyle = 16843603; // 0x1010353 field public static final int horizontalSpacing = 16843028; // 0x1010114 field public static final int host = 16842792; // 0x1010028 @@ -630,7 +625,6 @@ 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 leftChevronDrawable = 16843656; // 0x1010388 field public static final int lineSpacingExtra = 16843287; // 0x1010217 field public static final int lineSpacingMultiplier = 16843288; // 0x1010218 field public static final int lines = 16843092; // 0x1010154 @@ -642,10 +636,10 @@ package android { field public static final int listDividerAlertDialog = 16843525; // 0x1010305 field public static final int listPopupWindowStyle = 16843519; // 0x10102ff field public static final int listPreferredItemHeight = 16842829; // 0x101004d - field public static final int listPreferredItemHeightLarge = 16843668; // 0x1010394 - field public static final int listPreferredItemHeightSmall = 16843669; // 0x1010395 - field public static final int listPreferredItemPaddingLeft = 16843697; // 0x10103b1 - field public static final int listPreferredItemPaddingRight = 16843698; // 0x10103b2 + field public static final int listPreferredItemHeightLarge = 16843654; // 0x1010386 + field public static final int listPreferredItemHeightSmall = 16843655; // 0x1010387 + field public static final int listPreferredItemPaddingLeft = 16843683; // 0x10103a3 + field public static final int listPreferredItemPaddingRight = 16843684; // 0x10103a4 field public static final int listSelector = 16843003; // 0x10100fb field public static final int listSeparatorTextViewStyle = 16843272; // 0x1010208 field public static final int listViewStyle = 16842868; // 0x1010074 @@ -676,8 +670,8 @@ package android { field public static final int minHeight = 16843072; // 0x1010140 field public static final int minLevel = 16843185; // 0x10101b1 field public static final int minLines = 16843094; // 0x1010156 - field public static final int minResizeHeight = 16843684; // 0x10103a4 - field public static final int minResizeWidth = 16843683; // 0x10103a3 + field public static final int minResizeHeight = 16843670; // 0x1010396 + 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 mode = 16843134; // 0x101017e @@ -707,11 +701,10 @@ package android { field public static final int orderingFromXml = 16843239; // 0x10101e7 field public static final int orientation = 16842948; // 0x10100c4 field public static final int outAnimation = 16843128; // 0x1010178 - field public static final int outerRadius = 16843661; // 0x101038d field public static final int overScrollFooter = 16843459; // 0x10102c3 field public static final int overScrollHeader = 16843458; // 0x10102c2 field public static final int overScrollMode = 16843457; // 0x10102c1 - field public static final int overridesImplicitlyEnabledSubtype = 16843696; // 0x10103b0 + 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 @@ -790,7 +783,7 @@ package android { field public static final int reqNavigation = 16843306; // 0x101022a field public static final int reqTouchScreen = 16843303; // 0x1010227 field public static final int required = 16843406; // 0x101028e - field public static final int requiresFadingEdge = 16843699; // 0x10103b3 + field public static final int requiresFadingEdge = 16843685; // 0x10103a5 field public static final int requiresSmallestWidthDp = 16843620; // 0x1010364 field public static final int resizeMode = 16843619; // 0x1010363 field public static final int resizeable = 16843405; // 0x101028d @@ -798,7 +791,6 @@ package android { field public static final int restoreAnyVersion = 16843450; // 0x10102ba field public static final deprecated int restoreNeedsApplication = 16843421; // 0x101029d field public static final int right = 16843183; // 0x10101af - field public static final int rightChevronDrawable = 16843657; // 0x1010389 field public static final int ringtonePreferenceStyle = 16842899; // 0x1010093 field public static final int ringtoneType = 16843257; // 0x10101f9 field public static final int rotation = 16843558; // 0x1010326 @@ -874,7 +866,6 @@ package android { field public static final int smallIcon = 16843422; // 0x101029e field public static final int smallScreens = 16843396; // 0x1010284 field public static final int smoothScrollbar = 16843313; // 0x1010231 - field public static final int snapMargin = 16843664; // 0x1010390 field public static final int soundEffectsEnabled = 16843285; // 0x1010215 field public static final int spacing = 16843027; // 0x1010113 field public static final int spinnerDropDownItemStyle = 16842887; // 0x1010087 @@ -920,8 +911,8 @@ package android { field public static final int stretchMode = 16843030; // 0x1010116 field public static final int subtitle = 16843473; // 0x10102d1 field public static final int subtitleTextStyle = 16843513; // 0x10102f9 - field public static final int subtypeExtraValue = 16843688; // 0x10103a8 - field public static final int subtypeLocale = 16843687; // 0x10103a7 + field public static final int subtypeExtraValue = 16843674; // 0x101039a + 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 summary = 16843241; // 0x10101e9 @@ -943,8 +934,7 @@ package android { field public static final int tag = 16842961; // 0x10100d1 field public static final int targetActivity = 16843266; // 0x1010202 field public static final int targetClass = 16842799; // 0x101002f - field public static final int targetDescriptions = 16843694; // 0x10103ae - field public static final int targetDrawables = 16843654; // 0x1010386 + field public static final int targetDescriptions = 16843680; // 0x10103a0 field public static final int targetPackage = 16842785; // 0x1010021 field public static final int targetSdkVersion = 16843376; // 0x1010270 field public static final int taskAffinity = 16842770; // 0x1010012 @@ -959,15 +949,15 @@ package android { field public static final int tension = 16843370; // 0x101026a field public static final int testOnly = 16843378; // 0x1010272 field public static final int text = 16843087; // 0x101014f - field public static final int textAllCaps = 16843674; // 0x101039a + field public static final int textAllCaps = 16843660; // 0x101038c field public static final int textAppearance = 16842804; // 0x1010034 field public static final int textAppearanceButton = 16843271; // 0x1010207 field public static final int textAppearanceInverse = 16842805; // 0x1010035 field public static final int textAppearanceLarge = 16842816; // 0x1010040 field public static final int textAppearanceLargeInverse = 16842819; // 0x1010043 field public static final int textAppearanceLargePopupMenu = 16843521; // 0x1010301 - field public static final int textAppearanceListItem = 16843692; // 0x10103ac - field public static final int textAppearanceListItemSmall = 16843693; // 0x10103ad + field public static final int textAppearanceListItem = 16843678; // 0x101039e + field public static final int textAppearanceListItemSmall = 16843679; // 0x101039f field public static final int textAppearanceMedium = 16842817; // 0x1010041 field public static final int textAppearanceMediumInverse = 16842820; // 0x1010044 field public static final int textAppearanceSearchResultSubtitle = 16843424; // 0x10102a0 @@ -1036,7 +1026,6 @@ package android { field public static final int toYScale = 16843205; // 0x10101c5 field public static final int top = 16843182; // 0x10101ae field public static final int topBright = 16842955; // 0x10100cb - field public static final int topChevronDrawable = 16843658; // 0x101038a field public static final int topDark = 16842951; // 0x10100c7 field public static final int topLeftRadius = 16843177; // 0x10101a9 field public static final int topOffset = 16843352; // 0x1010258 @@ -1049,7 +1038,7 @@ package android { field public static final int translationY = 16843555; // 0x1010323 field public static final int type = 16843169; // 0x10101a1 field public static final int typeface = 16842902; // 0x1010096 - field public static final int uiOptions = 16843686; // 0x10103a6 + field public static final int uiOptions = 16843672; // 0x1010398 field public static final int uncertainGestureColor = 16843382; // 0x1010276 field public static final int unfocusedMonthDateColor = 16843588; // 0x1010344 field public static final int unselectedAlpha = 16843278; // 0x101020e @@ -1068,10 +1057,8 @@ package android { field public static final int verticalCorrection = 16843322; // 0x101023a field public static final int verticalDivider = 16843054; // 0x101012e field public static final int verticalGap = 16843328; // 0x1010240 - field public static final int verticalOffset = 16843666; // 0x1010392 field public static final int verticalScrollbarPosition = 16843572; // 0x1010334 field public static final int verticalSpacing = 16843029; // 0x1010115 - field public static final int vibrationDuration = 16843663; // 0x101038f field public static final int visibility = 16842972; // 0x10100dc field public static final int visible = 16843156; // 0x1010194 field public static final int vmSafeMode = 16843448; // 0x10102b8 @@ -1088,7 +1075,6 @@ package android { field public static final int wallpaperIntraOpenExitAnimation = 16843416; // 0x1010298 field public static final int wallpaperOpenEnterAnimation = 16843411; // 0x1010293 field public static final int wallpaperOpenExitAnimation = 16843412; // 0x1010294 - field public static final int waveDrawable = 16843660; // 0x101038c field public static final int webTextViewStyle = 16843449; // 0x10102b9 field public static final int webViewStyle = 16842885; // 0x1010085 field public static final int weekDayTextAppearance = 16843592; // 0x1010348 diff --git a/core/java/android/os/storage/IMountService.java b/core/java/android/os/storage/IMountService.java index e0130b5..d1dc6e5 100644 --- a/core/java/android/os/storage/IMountService.java +++ b/core/java/android/os/storage/IMountService.java @@ -169,13 +169,15 @@ public interface IMountService extends IInterface { * is an asynchronous operation. Applications should register * StorageEventListener for storage related status changes. */ - public void unmountVolume(String mountPoint, boolean force) throws RemoteException { + public void unmountVolume(String mountPoint, boolean force, boolean removeEncryption) + throws RemoteException { Parcel _data = Parcel.obtain(); Parcel _reply = Parcel.obtain(); try { _data.writeInterfaceToken(DESCRIPTOR); _data.writeString(mountPoint); _data.writeInt((force ? 1 : 0)); + _data.writeInt((removeEncryption ? 1 : 0)); mRemote.transact(Stub.TRANSACTION_unmountVolume, _data, _reply, 0); _reply.readException(); } finally { @@ -842,9 +844,9 @@ public interface IMountService extends IInterface { data.enforceInterface(DESCRIPTOR); String mountPoint; mountPoint = data.readString(); - boolean force; - force = 0 != data.readInt(); - unmountVolume(mountPoint, force); + boolean force = 0 != data.readInt(); + boolean removeEncrypt = 0 != data.readInt(); + unmountVolume(mountPoint, force, removeEncrypt); reply.writeNoException(); return true; } @@ -1234,8 +1236,14 @@ public interface IMountService extends IInterface { * Safely unmount external storage at given mount point. The unmount is an * asynchronous operation. Applications should register StorageEventListener * for storage related status changes. + * @param mountPoint the mount point + * @param force whether or not to forcefully unmount it (e.g. even if programs are using this + * data currently) + * @param removeEncryption whether or not encryption mapping should be removed from the volume. + * This value implies {@code force}. */ - public void unmountVolume(String mountPoint, boolean force) throws RemoteException; + public void unmountVolume(String mountPoint, boolean force, boolean removeEncryption) + throws RemoteException; /** * Unregisters an IMountServiceListener diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 637f646..eedf19f 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -8193,6 +8193,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal (mPrivateFlags & INVALIDATED) != INVALIDATED) { mPrivateFlags &= ~DRAWING_CACHE_VALID; mPrivateFlags |= INVALIDATED; + mPrivateFlags |= DIRTY; final ViewParent p = mParent; final AttachInfo ai = mAttachInfo; //noinspection PointlessBooleanExpression,ConstantConditions @@ -8239,6 +8240,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal (mPrivateFlags & INVALIDATED) != INVALIDATED) { mPrivateFlags &= ~DRAWING_CACHE_VALID; mPrivateFlags |= INVALIDATED; + mPrivateFlags |= DIRTY; final ViewParent p = mParent; final AttachInfo ai = mAttachInfo; //noinspection PointlessBooleanExpression,ConstantConditions @@ -8294,6 +8296,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal (mPrivateFlags & INVALIDATED) != INVALIDATED || isOpaque() != mLastIsOpaque) { mLastIsOpaque = isOpaque(); mPrivateFlags &= ~DRAWN; + mPrivateFlags |= DIRTY; if (invalidateCache) { mPrivateFlags |= INVALIDATED; mPrivateFlags &= ~DRAWING_CACHE_VALID; @@ -8334,6 +8337,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal ((View) mParent).mPrivateFlags |= INVALIDATED; } mPrivateFlags &= ~DRAWN; + mPrivateFlags |= DIRTY; mPrivateFlags |= INVALIDATED; mPrivateFlags &= ~DRAWING_CACHE_VALID; if (mParent != null && mAttachInfo != null) { diff --git a/core/java/android/view/animation/AnimationSet.java b/core/java/android/view/animation/AnimationSet.java index 58373bc..2cf8ea8 100644 --- a/core/java/android/view/animation/AnimationSet.java +++ b/core/java/android/view/animation/AnimationSet.java @@ -89,19 +89,19 @@ public class AnimationSet extends Animation { if (context.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) { - if (a.hasValue(com.android.internal.R.styleable.Animation_duration)) { + if (a.hasValue(com.android.internal.R.styleable.AnimationSet_duration)) { mFlags |= PROPERTY_DURATION_MASK; } - if (a.hasValue(com.android.internal.R.styleable.Animation_fillBefore)) { + if (a.hasValue(com.android.internal.R.styleable.AnimationSet_fillBefore)) { mFlags |= PROPERTY_FILL_BEFORE_MASK; } - if (a.hasValue(com.android.internal.R.styleable.Animation_fillAfter)) { + if (a.hasValue(com.android.internal.R.styleable.AnimationSet_fillAfter)) { mFlags |= PROPERTY_FILL_AFTER_MASK; } - if (a.hasValue(com.android.internal.R.styleable.Animation_repeatMode)) { + if (a.hasValue(com.android.internal.R.styleable.AnimationSet_repeatMode)) { mFlags |= PROPERTY_REPEAT_MODE_MASK; } - if (a.hasValue(com.android.internal.R.styleable.Animation_startOffset)) { + if (a.hasValue(com.android.internal.R.styleable.AnimationSet_startOffset)) { mFlags |= PROPERTY_START_OFFSET_MASK; } } diff --git a/core/java/com/android/internal/os/storage/ExternalStorageFormatter.java b/core/java/com/android/internal/os/storage/ExternalStorageFormatter.java index 4773ce4..3905c88 100644 --- a/core/java/com/android/internal/os/storage/ExternalStorageFormatter.java +++ b/core/java/com/android/internal/os/storage/ExternalStorageFormatter.java @@ -152,7 +152,8 @@ public class ExternalStorageFormatter extends Service Environment.getExternalStorageDirectory().toString() : mStorageVolume.getPath(); try { - mountService.unmountVolume(extStoragePath, true); + // Remove encryption mapping if this is an unmount for a factory reset. + mountService.unmountVolume(extStoragePath, true, mFactoryReset); } catch (RemoteException e) { Log.w(TAG, "Failed talking with mount service", e); } diff --git a/core/res/res/layout/preference_list_content_single.xml b/core/res/res/layout/preference_list_content_single.xml index 259869d..16afe13 100644 --- a/core/res/res/layout/preference_list_content_single.xml +++ b/core/res/res/layout/preference_list_content_single.xml @@ -35,12 +35,11 @@ android:layout_height="match_parent"> <ListView android:id="@android:id/list" + style="?attr/preferenceFragmentStyle" android:layout_width="match_parent" android:layout_height="0px" android:layout_weight="1" android:drawSelectorOnTop="false" - android:paddingLeft="@dimen/preference_fragment_padding_side" - android:paddingRight="@dimen/preference_fragment_padding_side" android:scrollbarStyle="@integer/preference_fragment_scrollbarStyle" android:cacheColorHint="@android:color/transparent" android:listPreferredItemHeight="48dp" diff --git a/core/res/res/values-w1024dp/dimens.xml b/core/res/res/values-sw600dp-w1024dp/dimens.xml index 4d6a4da..4d6a4da 100644 --- a/core/res/res/values-w1024dp/dimens.xml +++ b/core/res/res/values-sw600dp-w1024dp/dimens.xml diff --git a/core/res/res/values-w1280dp/dimens.xml b/core/res/res/values-sw600dp-w1280dp/dimens.xml index 28aea55..28aea55 100644 --- a/core/res/res/values-w1280dp/dimens.xml +++ b/core/res/res/values-sw600dp-w1280dp/dimens.xml diff --git a/core/res/res/values-sw600dp/dimens.xml b/core/res/res/values-sw600dp/dimens.xml index 2daaaa2..5dacb44 100644 --- a/core/res/res/values-sw600dp/dimens.xml +++ b/core/res/res/values-sw600dp/dimens.xml @@ -50,6 +50,9 @@ <!-- Preference activity, vertical padding for the header list --> <dimen name="preference_screen_header_vertical_padding">32dp</dimen> + <dimen name="preference_screen_side_margin">0dp</dimen> + <!-- Compensate for double margin : preference_screen_side_margin + 4 (frame background shadow) = -preference_screen_side_margin_negative --> + <dimen name="preference_screen_side_margin_negative">-4dp</dimen> </resources> diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index f90d67b..fc84f53 100755 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -705,6 +705,8 @@ <!-- Default style for PreferenceScreen. --> <attr name="preferenceScreenStyle" format="reference" /> + <!-- Default style for Headers pane in PreferenceActivity. --> + <attr name="preferenceFragmentStyle" format="reference" /> <!-- Default style for PreferenceCategory. --> <attr name="preferenceCategoryStyle" format="reference" /> <!-- Default style for Preference. --> @@ -3949,10 +3951,6 @@ <!-- ========================== --> <eat-comment /> - <declare-styleable name="AnimationSet"> - <attr name="shareInterpolator" format="boolean" /> - </declare-styleable> - <declare-styleable name="Animation"> <!-- Defines the interpolator used to smooth the animation movement in time. --> <attr name="interpolator" /> @@ -4002,6 +4000,15 @@ <attr name="detachWallpaper" format="boolean" /> </declare-styleable> + <declare-styleable name="AnimationSet"> + <attr name="shareInterpolator" format="boolean" /> + <attr name="fillBefore" /> + <attr name="fillAfter" /> + <attr name="duration" /> + <attr name="startOffset" /> + <attr name="repeatMode" /> + </declare-styleable> + <declare-styleable name="RotateAnimation"> <attr name="fromDegrees" /> <attr name="toDegrees" /> diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml index 4f162f2..f1fc42c 100644 --- a/core/res/res/values/dimens.xml +++ b/core/res/res/values/dimens.xml @@ -78,7 +78,7 @@ <!-- Preference activity side margins --> <dimen name="preference_screen_side_margin">0dp</dimen> <!-- Preference activity side margins negative--> - <dimen name="preference_screen_side_margin_negative">-4dp</dimen> + <dimen name="preference_screen_side_margin_negative">0dp</dimen> <!-- Preference activity top margin --> <dimen name="preference_screen_top_margin">0dp</dimen> <!-- Preference activity bottom margin --> diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml index 9327a0b..ba8be2e 100644 --- a/core/res/res/values/public.xml +++ b/core/res/res/values/public.xml @@ -1745,20 +1745,6 @@ <public type="attr" name="accessibilityFlags" /> <public type="attr" name="canRetrieveWindowContent" /> - <public type="attr" name="targetDrawables" /> - <public type="attr" name="handleDrawable" /> - <public type="attr" name="leftChevronDrawable" /> - <public type="attr" name="rightChevronDrawable" /> - <public type="attr" name="topChevronDrawable" /> - <public type="attr" name="bottomChevronDrawable" /> - <public type="attr" name="waveDrawable" /> - <public type="attr" name="outerRadius" /> - <public type="attr" name="hitRadius" /> - <public type="attr" name="vibrationDuration" /> - <public type="attr" name="snapMargin" /> - <public type="attr" name="feedbackCount" /> - <public type="attr" name="verticalOffset" /> - <public type="attr" name="horizontalOffset" /> <public type="attr" name="listPreferredItemHeightLarge" /> <public type="attr" name="listPreferredItemHeightSmall" /> diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml index 356a2ad..346a3d29 100644 --- a/core/res/res/values/styles.xml +++ b/core/res/res/values/styles.xml @@ -910,7 +910,12 @@ please see styles_device_defaults.xml. <style name="Preference"> <item name="android:layout">@android:layout/preference</item> </style> - + + <style name="PreferenceFragment"> + <item name="android:paddingLeft">0dp</item> + <item name="android:paddingRight">0dp</item> + </style> + <style name="Preference.Information"> <item name="android:layout">@android:layout/preference_information</item> <item name="android:enabled">false</item> @@ -961,6 +966,11 @@ please see styles_device_defaults.xml. <item name="android:layout">@android:layout/preference_holo</item> </style> + <style name="PreferenceFragment.Holo"> + <item name="android:paddingLeft">@dimen/preference_fragment_padding_side</item> + <item name="android:paddingRight">@dimen/preference_fragment_padding_side</item> + </style> + <style name="Preference.Holo.Information"> <item name="android:layout">@android:layout/preference_information_holo</item> <item name="android:enabled">false</item> diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml index d19c97f..c8f7fb8 100644 --- a/core/res/res/values/themes.xml +++ b/core/res/res/values/themes.xml @@ -275,6 +275,7 @@ please see themes_device_defaults.xml. <!-- Preference styles --> <item name="preferenceScreenStyle">@android:style/Preference.PreferenceScreen</item> + <item name="preferenceFragmentStyle">@style/PreferenceFragment</item> <item name="preferenceCategoryStyle">@android:style/Preference.Category</item> <item name="preferenceStyle">@android:style/Preference</item> <item name="preferenceInformationStyle">@android:style/Preference.Information</item> @@ -1071,6 +1072,7 @@ please see themes_device_defaults.xml. <!-- Preference styles --> <item name="preferenceScreenStyle">@android:style/Preference.Holo.PreferenceScreen</item> + <item name="preferenceFragmentStyle">@style/PreferenceFragment.Holo</item> <item name="preferenceCategoryStyle">@android:style/Preference.Holo.Category</item> <item name="preferenceStyle">@android:style/Preference.Holo</item> <item name="preferenceInformationStyle">@android:style/Preference.Holo.Information</item> @@ -1378,6 +1380,7 @@ please see themes_device_defaults.xml. <!-- Preference styles --> <item name="preferenceScreenStyle">@android:style/Preference.Holo.PreferenceScreen</item> + <item name="preferenceFragmentStyle">@style/PreferenceFragment.Holo</item> <item name="preferenceCategoryStyle">@android:style/Preference.Holo.Category</item> <item name="preferenceStyle">@android:style/Preference.Holo</item> <item name="preferenceInformationStyle">@android:style/Preference.Holo.Information</item> diff --git a/core/tests/coretests/src/android/content/pm/PackageManagerTests.java b/core/tests/coretests/src/android/content/pm/PackageManagerTests.java index 6c87c3b..68ddcc4 100755 --- a/core/tests/coretests/src/android/content/pm/PackageManagerTests.java +++ b/core/tests/coretests/src/android/content/pm/PackageManagerTests.java @@ -1057,7 +1057,7 @@ public class PackageManagerTests extends AndroidTestCase { try { // Wait on observer synchronized(observer) { - getMs().unmountVolume(path, true); + getMs().unmountVolume(path, true, false); long waitTime = 0; while((!observer.isDone()) && (waitTime < MAX_WAIT_TIME) ) { observer.wait(WAIT_TIME_INCR); diff --git a/core/tests/coretests/src/android/os/storage/AsecTests.java b/core/tests/coretests/src/android/os/storage/AsecTests.java index dda3010..5efbd88 100755 --- a/core/tests/coretests/src/android/os/storage/AsecTests.java +++ b/core/tests/coretests/src/android/os/storage/AsecTests.java @@ -421,7 +421,7 @@ public class AsecTests extends AndroidTestCase { try { // Wait on observer synchronized(observer) { - getMs().unmountVolume(path, false); + getMs().unmountVolume(path, false, false); long waitTime = 0; while((!observer.isDone()) && (waitTime < MAX_WAIT_TIME) ) { observer.wait(WAIT_TIME_INCR); @@ -486,7 +486,7 @@ public class AsecTests extends AndroidTestCase { // Wait on observer synchronized(observer) { for (int i = 0; i < 5; i++) { - getMs().unmountVolume(path, false); + getMs().unmountVolume(path, false, false); } long waitTime = 0; while((!observer.isDone()) && (waitTime < MAX_WAIT_TIME) ) { diff --git a/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/DownloadManagerBaseTest.java b/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/DownloadManagerBaseTest.java index acd2a18..334661d 100644 --- a/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/DownloadManagerBaseTest.java +++ b/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/DownloadManagerBaseTest.java @@ -491,9 +491,10 @@ public class DownloadManagerBaseTest extends InstrumentationTestCase { * * @param id The download id to query on (wait for) */ - private void waitForDownloadOrTimeout_skipNotification(long id) throws TimeoutException, + protected void waitForDownloadOrTimeout_skipNotification(long id) throws TimeoutException, InterruptedException { - waitForDownloadOrTimeout(id, WAIT_FOR_DOWNLOAD_POLL_TIME, MAX_WAIT_FOR_DOWNLOAD_TIME); + doWaitForDownloadsOrTimeout(new Query().setFilterById(id), + WAIT_FOR_DOWNLOAD_POLL_TIME, MAX_WAIT_FOR_DOWNLOAD_TIME); } /** @@ -505,8 +506,7 @@ public class DownloadManagerBaseTest extends InstrumentationTestCase { */ protected void waitForDownloadOrTimeout(long id) throws TimeoutException, InterruptedException { - waitForDownloadOrTimeout_skipNotification(id); - waitForReceiverNotifications(1); + waitForDownloadOrTimeout(id, WAIT_FOR_DOWNLOAD_POLL_TIME, MAX_WAIT_FOR_DOWNLOAD_TIME); } /** @@ -813,4 +813,4 @@ public class DownloadManagerBaseTest extends InstrumentationTestCase { } return cursor; } -}
\ No newline at end of file +} diff --git a/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/DownloadManagerTestApp.java b/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/DownloadManagerTestApp.java index ba5ee2c..654f747 100644 --- a/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/DownloadManagerTestApp.java +++ b/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/DownloadManagerTestApp.java @@ -208,7 +208,7 @@ public class DownloadManagerTestApp extends DownloadManagerBaseTest { // Wait until the download finishes; don't wait for a notification b/c // the download may well have been completed before the last reboot. - waitForDownloadOrTimeout(dlRequest); + waitForDownloadOrTimeout_skipNotification(dlRequest); Log.i(LOG_TAG, "Verifying download information..."); // Verify specific info about the file (size, name, etc)... diff --git a/include/storage/IMountService.h b/include/storage/IMountService.h index 472d8e5..43df7f0 100644 --- a/include/storage/IMountService.h +++ b/include/storage/IMountService.h @@ -37,8 +37,8 @@ public: virtual void setUsbMassStorageEnabled(const bool enable) = 0; virtual bool isUsbMassStorageEnabled() = 0; virtual int32_t mountVolume(const String16& mountPoint) = 0; - virtual int32_t - unmountVolume(const String16& mountPoint, const bool force) = 0; + virtual int32_t unmountVolume( + const String16& mountPoint, const bool force, const bool removeEncryption) = 0; virtual int32_t formatVolume(const String16& mountPoint) = 0; virtual int32_t getStorageUsers(const String16& mountPoint, int32_t** users) = 0; diff --git a/libs/storage/IMountService.cpp b/libs/storage/IMountService.cpp index 7fbf67a..8ddbeae 100644 --- a/libs/storage/IMountService.cpp +++ b/libs/storage/IMountService.cpp @@ -157,12 +157,13 @@ public: return reply.readInt32(); } - int32_t unmountVolume(const String16& mountPoint, const bool force) + int32_t unmountVolume(const String16& mountPoint, const bool force, const bool removeEncryption) { Parcel data, reply; data.writeInterfaceToken(IMountService::getInterfaceDescriptor()); data.writeString16(mountPoint); data.writeInt32(force ? 1 : 0); + data.writeInt32(removeEncryption ? 1 : 0); if (remote()->transact(TRANSACTION_unmountVolume, data, &reply) != NO_ERROR) { LOGD("unmountVolume could not contact remote\n"); return -1; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index 3c84331..3d05341 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -761,12 +761,10 @@ public class PhoneStatusBar extends StatusBar { } }); } else { - if ((notification.notification.flags & Notification.FLAG_ONGOING_EVENT) == 0) { - vetoButton.setVisibility(View.INVISIBLE); - } else { - vetoButton.setVisibility(View.GONE); - } + vetoButton.setVisibility(View.GONE); } + vetoButton.setContentDescription(mContext.getString( + R.string.accessibility_remove_notification)); // the large icon ImageView largeIcon = (ImageView)row.findViewById(R.id.large_icon); @@ -958,12 +956,7 @@ public class PhoneStatusBar extends StatusBar { } }); } else { - if ((sbn.notification.flags & Notification.FLAG_ONGOING_EVENT) == 0) { - vetoButton.setVisibility(View.INVISIBLE); - vetoButton.setContentDescription("VETO"); - } else { - vetoButton.setVisibility(View.GONE); - } + vetoButton.setVisibility(View.GONE); } vetoButton.setContentDescription(mContext.getString( R.string.accessibility_remove_notification)); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java index b50ebcd..3b097af 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java @@ -449,6 +449,7 @@ public class NetworkController extends BroadcastReceiver { case TelephonyManager.NETWORK_TYPE_HSDPA: case TelephonyManager.NETWORK_TYPE_HSUPA: case TelephonyManager.NETWORK_TYPE_HSPA: + case TelephonyManager.NETWORK_TYPE_HSPAP: if (mHspaDataDistinguishable) { mDataIconList = TelephonyIcons.DATA_H[mInetCondition]; mDataTypeIconId = R.drawable.stat_sys_data_connected_h; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java index 3ace258..c2f07d6 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java @@ -1753,12 +1753,7 @@ public class TabletStatusBar extends StatusBar implements } }); } else { - if ((sbn.notification.flags & Notification.FLAG_ONGOING_EVENT) == 0) { - vetoButton.setVisibility(View.INVISIBLE); - vetoButton.setContentDescription("VETO"); - } else { - vetoButton.setVisibility(View.GONE); - } + vetoButton.setVisibility(View.GONE); } vetoButton.setContentDescription(mContext.getString( R.string.accessibility_remove_notification)); diff --git a/services/java/com/android/server/MountService.java b/services/java/com/android/server/MountService.java index d806309..582f0ed 100644 --- a/services/java/com/android/server/MountService.java +++ b/services/java/com/android/server/MountService.java @@ -304,17 +304,19 @@ class MountService extends IMountService.Stub class UnmountCallBack { final String path; final boolean force; + final boolean removeEncryption; int retries; - UnmountCallBack(String path, boolean force) { + UnmountCallBack(String path, boolean force, boolean removeEncryption) { retries = 0; this.path = path; this.force = force; + this.removeEncryption = removeEncryption; } void handleFinished() { if (DEBUG_UNMOUNT) Slog.i(TAG, "Unmounting " + path); - doUnmountVolume(path, true); + doUnmountVolume(path, true, removeEncryption); } } @@ -322,7 +324,7 @@ class MountService extends IMountService.Stub final String method; UmsEnableCallBack(String path, String method, boolean force) { - super(path, force); + super(path, force, false); this.method = method; } @@ -336,13 +338,13 @@ class MountService extends IMountService.Stub class ShutdownCallBack extends UnmountCallBack { IMountShutdownObserver observer; ShutdownCallBack(String path, IMountShutdownObserver observer) { - super(path, true); + super(path, true, false); this.observer = observer; } @Override void handleFinished() { - int ret = doUnmountVolume(path, true); + int ret = doUnmountVolume(path, true, removeEncryption); if (observer != null) { try { observer.onShutDownComplete(ret); @@ -888,8 +890,10 @@ class MountService extends IMountService.Stub * This might even take a while and might be retried after timed delays * to make sure we dont end up in an instable state and kill some core * processes. + * If removeEncryption is set, force is implied, and the system will remove any encryption + * mapping set on the volume when unmounting. */ - private int doUnmountVolume(String path, boolean force) { + private int doUnmountVolume(String path, boolean force, boolean removeEncryption) { if (!getVolumeState(path).equals(Environment.MEDIA_MOUNTED)) { return VoldResponseCode.OpFailedVolNotMounted; } @@ -905,8 +909,10 @@ class MountService extends IMountService.Stub // Redundant probably. But no harm in updating state again. mPms.updateExternalMediaStatus(false, false); try { - mConnector.doCommand(String.format( - "volume unmount %s%s", path, (force ? " force" : ""))); + String arg = removeEncryption + ? " force_and_revert" + : (force ? " force" : ""); + mConnector.doCommand(String.format("volume unmount %s%s", path, arg)); // We unmounted the volume. None of the asec containers are available now. synchronized (mAsecMountSet) { mAsecMountSet.clear(); @@ -1371,12 +1377,16 @@ class MountService extends IMountService.Stub return doMountVolume(path); } - public void unmountVolume(String path, boolean force) { + public void unmountVolume(String path, boolean force, boolean removeEncryption) { validatePermission(android.Manifest.permission.MOUNT_UNMOUNT_FILESYSTEMS); waitForReady(); String volState = getVolumeState(path); - if (DEBUG_UNMOUNT) Slog.i(TAG, "Unmounting " + path + " force = " + force); + if (DEBUG_UNMOUNT) { + Slog.i(TAG, "Unmounting " + path + + " force = " + force + + " removeEncryption = " + removeEncryption); + } if (Environment.MEDIA_UNMOUNTED.equals(volState) || Environment.MEDIA_REMOVED.equals(volState) || Environment.MEDIA_SHARED.equals(volState) || @@ -1385,7 +1395,7 @@ class MountService extends IMountService.Stub // TODO return valid return code when adding observer call back. return; } - UnmountCallBack ucb = new UnmountCallBack(path, force); + UnmountCallBack ucb = new UnmountCallBack(path, force, removeEncryption); mHandler.sendMessage(mHandler.obtainMessage(H_UNMOUNT_PM_UPDATE, ucb)); } diff --git a/services/java/com/android/server/wm/ScreenRotationAnimation.java b/services/java/com/android/server/wm/ScreenRotationAnimation.java index 3c475a0..e25638f 100644 --- a/services/java/com/android/server/wm/ScreenRotationAnimation.java +++ b/services/java/com/android/server/wm/ScreenRotationAnimation.java @@ -304,8 +304,12 @@ class ScreenRotationAnimation { } if (!mStarted) { - mEnterAnimation.setStartTime(now); - mExitAnimation.setStartTime(now); + if (mEnterAnimation != null) { + mEnterAnimation.setStartTime(now); + } + if (mExitAnimation != null) { + mExitAnimation.setStartTime(now); + } mStarted = true; } diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java index 211c4da..df9698e 100644 --- a/services/java/com/android/server/wm/WindowManagerService.java +++ b/services/java/com/android/server/wm/WindowManagerService.java @@ -774,7 +774,7 @@ public class WindowManagerService extends IWindowManager.Stub // The window manager only throws security exceptions, so let's // log all others. if (!(e instanceof SecurityException)) { - Slog.e(TAG, "Window Manager Crash", e); + Log.wtf(TAG, "Window Manager Crash", e); } throw e; } @@ -7096,7 +7096,7 @@ public class WindowManagerService extends IWindowManager.Stub } } } catch (RuntimeException e) { - Slog.e(TAG, "Unhandled exception while force removing for memory", e); + Log.wtf(TAG, "Unhandled exception while force removing for memory", e); } try { @@ -7131,7 +7131,7 @@ public class WindowManagerService extends IWindowManager.Stub } } catch (RuntimeException e) { mInLayout = false; - Slog.e(TAG, "Unhandled exception while layout out windows", e); + Log.wtf(TAG, "Unhandled exception while laying out windows", e); } } @@ -8397,7 +8397,7 @@ public class WindowManagerService extends IWindowManager.Stub } } } catch (RuntimeException e) { - Slog.e(TAG, "Unhandled exception in Window Manager", e); + Log.wtf(TAG, "Unhandled exception in Window Manager", e); } Surface.closeTransaction(); @@ -9179,7 +9179,7 @@ public class WindowManagerService extends IWindowManager.Stub if (windows == null || windows.contains(w)) { pw.print(" Window #"); pw.print(i); pw.print(' '); pw.print(w); pw.println(":"); - w.dump(pw, " ", dumpAll); + w.dump(pw, " ", dumpAll || windows != null); } } if (mInputMethodDialogs.size() > 0) { diff --git a/tests/DataIdleTest/src/com/android/tests/dataidle/DataIdleTest.java b/tests/DataIdleTest/src/com/android/tests/dataidle/DataIdleTest.java index 637f0d2..54adc249 100644 --- a/tests/DataIdleTest/src/com/android/tests/dataidle/DataIdleTest.java +++ b/tests/DataIdleTest/src/com/android/tests/dataidle/DataIdleTest.java @@ -76,7 +76,7 @@ public class DataIdleTest extends InstrumentationTestCase { Long.MAX_VALUE, false); reportStats(stats); } catch (RemoteException e) { - Log.w(LOG_TAG, "Failed to fetch network stats for wifi."); + Log.w(LOG_TAG, "Failed to fetch network stats."); } } @@ -85,16 +85,22 @@ public class DataIdleTest extends InstrumentationTestCase { * @param stats {@link NetworkorStats} to print */ void reportStats(NetworkStats stats) { + Bundle result = new Bundle(); + long rxBytes = 0; + long txBytes = 0; for (int i = 0; i < stats.size(); ++i) { + // Label will be iface_uid_tag_set Entry statsEntry = stats.getValues(i, null); - Bundle result = new Bundle(); - result.putInt("uid", statsEntry.uid); - result.putInt("tag", statsEntry.tag); - result.putInt("set", statsEntry.set); - result.putString("iface", statsEntry.iface); - result.putLong("rxBytes", statsEntry.rxBytes); - result.putLong("txBytes", statsEntry.txBytes); - getInstrumentation().sendStatus(INSTRUMENTATION_IN_PROGRESS, result); + String labelTemplate = String.format("%s_%d_%d_%d", statsEntry.iface, statsEntry.uid, + statsEntry.tag, statsEntry.set) + "_%s"; + result.putLong(String.format(labelTemplate, "rxBytes"), statsEntry.rxBytes); + result.putLong(String.format(labelTemplate, "txBytes"), statsEntry.txBytes); + rxBytes += statsEntry.rxBytes; + txBytes += statsEntry.txBytes; } + result.putLong("Total rxBytes", rxBytes); + result.putLong("Total txBytes", txBytes); + getInstrumentation().sendStatus(INSTRUMENTATION_IN_PROGRESS, result); + } } |