Update file size formatting.

Per UX, default strings should have space between value and units
resulting in "12.3 GB".  Add a formatting variant that returns the
various components for callers who want to build their own strings.

For now there is only one mounted emulated volume at a time, and
it's always the primary storage, so give it the default rootId to
keep old Uris working.

Change-Id: Ifcc72a91a6b397ee65dc92642153286186eb64ac
This commit is contained in:
Jeff Sharkey
2015-06-15 21:09:10 -07:00
parent 567b6f86e7
commit 8806907cc9

View File

@@ -53,6 +53,8 @@ public class TrafficStats {
public static final long GB_IN_BYTES = MB_IN_BYTES * 1024; public static final long GB_IN_BYTES = MB_IN_BYTES * 1024;
/** @hide */ /** @hide */
public static final long TB_IN_BYTES = GB_IN_BYTES * 1024; public static final long TB_IN_BYTES = GB_IN_BYTES * 1024;
/** @hide */
public static final long PB_IN_BYTES = TB_IN_BYTES * 1024;
/** /**
* Special UID value used when collecting {@link NetworkStatsHistory} for * Special UID value used when collecting {@link NetworkStatsHistory} for