|
25 | 25 |
|
26 | 26 | public class BConstant { |
27 | 27 |
|
28 | | - public static final String ENGINE_VERSION="3.2.2"; |
| 28 | + public static final String ENGINE_VERSION="3.3.0"; |
29 | 29 |
|
30 | | - public static final String F_URL = "url"; |
31 | | - public static final String F_WIDGET = "widget"; |
32 | | - public static final String F_MULTIPLEWINDOW = "MultipleWindow"; |
33 | | - public static final String F_WIDGETONE = "widgetone"; |
34 | | - public static final String F_USER_AGENT = "userAgent"; |
35 | | - public static final String F_CONTENT_DISPOSITION = "contentDisposition"; |
36 | | - public static final String F_MIMETYPE = "mimeType"; |
37 | | - public static final String F_CONTENTLENGTH = "contentLength"; |
38 | | - public static final String F_DIALOG_TYPE = "dialogType"; |
39 | | - public static final String F_ASSETS_ROOT = "android_asset/"; |
40 | | - public static final String F_SDCARD_ROOT = "file:///sdcard/"; |
41 | | - public static final String F_PUSH_WIN_NAME = "winName"; |
42 | | - public static final String F_PUSH_NOTI_FUN_NAME = "funName"; |
| 30 | + public static final String F_URL = "url"; |
| 31 | + public static final String F_WIDGET = "widget"; |
| 32 | + public static final String F_MULTIPLEWINDOW = "MultipleWindow"; |
| 33 | + public static final String F_WIDGETONE = "widgetone"; |
| 34 | + public static final String F_USER_AGENT = "userAgent"; |
| 35 | + public static final String F_CONTENT_DISPOSITION = "contentDisposition"; |
| 36 | + public static final String F_MIMETYPE = "mimeType"; |
| 37 | + public static final String F_CONTENTLENGTH = "contentLength"; |
| 38 | + public static final String F_DIALOG_TYPE = "dialogType"; |
| 39 | + public static final String F_ASSETS_ROOT = "android_asset/"; |
| 40 | + public static final String F_SDCARD_ROOT = "file:///sdcard/"; |
| 41 | + public static final String F_PUSH_APPID = "appId"; |
| 42 | + public static final String F_PUSH_WIN_NAME = "winName"; |
| 43 | + public static final String F_PUSH_NOTI_FUN_NAME = "funName"; |
43 | 44 |
|
44 | | - public static Application app=null; |
| 45 | + public static Application app = null; |
45 | 46 |
|
46 | | - public static String byteChange(int size) { |
47 | | - DecimalFormat df = new DecimalFormat("0.00"); |
48 | | - float f; |
49 | | - if (size < 1024 * 1024) { |
50 | | - f = (float) ((float) size / (float) 1024); |
51 | | - return (df.format(new Float(f).doubleValue()) + " KB"); |
52 | | - } else { |
53 | | - f = (float) ((float) size / (float) (1024 * 1024)); |
54 | | - return (df.format(new Float(f).doubleValue()) + " MB"); |
55 | | - } |
| 47 | + public static String byteChange(int size) { |
| 48 | + DecimalFormat df = new DecimalFormat("0.00"); |
| 49 | + float f; |
| 50 | + if (size < 1024 * 1024) { |
| 51 | + f = (float) ((float) size / (float) 1024); |
| 52 | + return (df.format(new Float(f).doubleValue()) + " KB"); |
| 53 | + } else { |
| 54 | + f = (float) ((float) size / (float) (1024 * 1024)); |
| 55 | + return (df.format(new Float(f).doubleValue()) + " MB"); |
| 56 | + } |
56 | 57 |
|
57 | | - } |
| 58 | + } |
58 | 59 |
|
59 | | - public static String getSizeText(int downLoadSize, int fileSize) { |
60 | | - return byteChange(downLoadSize) + "/" + byteChange(fileSize); |
61 | | - } |
| 60 | + public static String getSizeText(int downLoadSize, int fileSize) { |
| 61 | + return byteChange(downLoadSize) + "/" + byteChange(fileSize); |
| 62 | + } |
62 | 63 |
|
63 | | - public static enum downLoadStatus { |
64 | | - /** |
65 | | - * Indicates that the task has not been executed yet. |
66 | | - */ |
67 | | - WAIT, |
68 | | - /** |
69 | | - * Indicates that the task is running. |
70 | | - */ |
71 | | - RUNNING, |
72 | | - PAUSED, |
73 | | - /** |
74 | | - * Indicates that {@link AsyncTask#onPostExecute} has finished. |
75 | | - */ |
76 | | - FINISHED, |
77 | | - } |
| 64 | + public static enum downLoadStatus { |
| 65 | + /** |
| 66 | + * Indicates that the task has not been executed yet. |
| 67 | + */ |
| 68 | + WAIT, |
| 69 | + /** |
| 70 | + * Indicates that the task is running. |
| 71 | + */ |
| 72 | + RUNNING, |
| 73 | + PAUSED, |
| 74 | + /** |
| 75 | + * Indicates that {@link AsyncTask#onPostExecute} has finished. |
| 76 | + */ |
| 77 | + FINISHED, |
| 78 | + } |
78 | 79 |
|
79 | 80 |
|
80 | 81 | } |
0 commit comments