diff options
author | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2013-02-13 14:24:59 +0000 |
---|---|---|
committer | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2013-02-15 00:30:09 +0000 |
commit | 4815d6e5a658bb1b301f7724c8e8fff6bc764bba (patch) | |
tree | 66f6e6484d239545197d73bcca8ad2505246c981 /tools | |
parent | eaa7d1835c8691dd656fea99ae3d61b039ebe1b7 (diff) | |
parent | 763ef60466ac752a3031719fb86b08486c9946b1 (diff) | |
download | frameworks_base-4815d6e5a658bb1b301f7724c8e8fff6bc764bba.zip frameworks_base-4815d6e5a658bb1b301f7724c8e8fff6bc764bba.tar.gz frameworks_base-4815d6e5a658bb1b301f7724c8e8fff6bc764bba.tar.bz2 |
Merge commit 'android-4.2.2_r1' into mr1.1-staging
Conflicts:
core/java/android/os/Trace.java
core/java/android/widget/Toast.java
core/res/res/values-cs/strings.xml
core/res/res/values-el/strings.xml
core/res/res/values-iw/strings.xml
core/res/res/values/config.xml
core/res/res/values/symbols.xml
media/java/android/media/AudioService.java
packages/SystemUI/res/values-sv/strings.xml
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryController.java
packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java
policy/src/com/android/internal/policy/impl/keyguard/KeyguardMessageArea.java
policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java
policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.java
services/java/com/android/server/NotificationManagerService.java
services/java/com/android/server/power/ElectronBeam.java
Change-Id: I60b8ddf20a1d7bcf9dc7b1a4ed841aaa4d953294
Diffstat (limited to 'tools')
-rw-r--r-- | tools/aapt/Bundle.h | 8 | ||||
-rw-r--r-- | tools/aapt/Command.cpp | 20 | ||||
-rw-r--r-- | tools/aapt/Main.cpp | 45 | ||||
-rw-r--r-- | tools/aapt/Main.h | 1 | ||||
-rw-r--r-- | tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java | 2 |
5 files changed, 67 insertions, 9 deletions
diff --git a/tools/aapt/Bundle.h b/tools/aapt/Bundle.h index a39f667..835f39f 100644 --- a/tools/aapt/Bundle.h +++ b/tools/aapt/Bundle.h @@ -39,6 +39,7 @@ typedef enum Command { kCommandRemove, kCommandPackage, kCommandCrunch, + kCommandSingleCrunch, } Command; /* @@ -63,6 +64,7 @@ public: mVersionCode(NULL), mVersionName(NULL), mCustomPackage(NULL), mExtraPackages(NULL), mMaxResVersion(NULL), mDebugMode(false), mNonConstantId(false), mProduct(NULL), mUseCrunchCache(false), mErrorOnFailedInsert(false), mOutputTextSymbols(NULL), + mSingleCrunchInputFile(NULL), mSingleCrunchOutputFile(NULL), mArgc(0), mArgv(NULL) {} ~Bundle(void) {} @@ -179,6 +181,10 @@ public: bool getUseCrunchCache() const { return mUseCrunchCache; } const char* getOutputTextSymbols() const { return mOutputTextSymbols; } void setOutputTextSymbols(const char* val) { mOutputTextSymbols = val; } + const char* getSingleCrunchInputFile() const { return mSingleCrunchInputFile; } + void setSingleCrunchInputFile(const char* val) { mSingleCrunchInputFile = val; } + const char* getSingleCrunchOutputFile() const { return mSingleCrunchOutputFile; } + void setSingleCrunchOutputFile(const char* val) { mSingleCrunchOutputFile = val; } /* * Set and get the file specification. @@ -287,6 +293,8 @@ private: bool mUseCrunchCache; bool mErrorOnFailedInsert; const char* mOutputTextSymbols; + const char* mSingleCrunchInputFile; + const char* mSingleCrunchOutputFile; /* file specification */ int mArgc; diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp index 0a5e590..c3a0930 100644 --- a/tools/aapt/Command.cpp +++ b/tools/aapt/Command.cpp @@ -7,6 +7,7 @@ #include "Bundle.h" #include "ResourceFilter.h" #include "ResourceTable.h" +#include "Images.h" #include "XMLNode.h" #include <utils/Log.h> @@ -1839,6 +1840,25 @@ int doCrunch(Bundle* bundle) return NO_ERROR; } +/* + * Do PNG Crunching on a single flag + * -i points to a single png file + * -o points to a single png output file + */ +int doSingleCrunch(Bundle* bundle) +{ + fprintf(stdout, "Crunching single PNG file: %s\n", bundle->getSingleCrunchInputFile()); + fprintf(stdout, "\tOutput file: %s\n", bundle->getSingleCrunchOutputFile()); + + String8 input(bundle->getSingleCrunchInputFile()); + String8 output(bundle->getSingleCrunchOutputFile()); + if (preProcessImageToCache(bundle, input, output) != NO_ERROR) { + // we can't return the status_t as it gets truncate to the lower 8 bits. + return 42; + } + return NO_ERROR; +} + char CONSOLE_DATA[2925] = { 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 95, 46, 32, 32, 32, 32, 32, 32, 32, 32, 32, diff --git a/tools/aapt/Main.cpp b/tools/aapt/Main.cpp index 946eaae..e776560 100644 --- a/tools/aapt/Main.cpp +++ b/tools/aapt/Main.cpp @@ -87,7 +87,11 @@ void usage(void) " Add specified files to Zip-compatible archive.\n\n", gProgName); fprintf(stderr, " %s c[runch] [-v] -S resource-sources ... -C output-folder ...\n" - " Do PNG preprocessing and store the results in output folder.\n\n", gProgName); + " Do PNG preprocessing on one or several resource folders\n" + " and store the results in the output folder.\n\n", gProgName); + fprintf(stderr, + " %s s[ingleCrunch] [-v] -i input-file -o outputfile\n" + " Do PNG preprocessing on a single file.\n\n", gProgName); fprintf(stderr, " %s v[ersion]\n" " Print program version.\n\n", gProgName); @@ -205,13 +209,14 @@ int handleCommand(Bundle* bundle) // printf(" %d: '%s'\n", i, bundle->getFileSpecEntry(i)); switch (bundle->getCommand()) { - case kCommandVersion: return doVersion(bundle); - case kCommandList: return doList(bundle); - case kCommandDump: return doDump(bundle); - case kCommandAdd: return doAdd(bundle); - case kCommandRemove: return doRemove(bundle); - case kCommandPackage: return doPackage(bundle); - case kCommandCrunch: return doCrunch(bundle); + case kCommandVersion: return doVersion(bundle); + case kCommandList: return doList(bundle); + case kCommandDump: return doDump(bundle); + case kCommandAdd: return doAdd(bundle); + case kCommandRemove: return doRemove(bundle); + case kCommandPackage: return doPackage(bundle); + case kCommandCrunch: return doCrunch(bundle); + case kCommandSingleCrunch: return doSingleCrunch(bundle); default: fprintf(stderr, "%s: requested command not yet supported\n", gProgName); return 1; @@ -251,6 +256,8 @@ int main(int argc, char* const argv[]) bundle.setCommand(kCommandPackage); else if (argv[1][0] == 'c') bundle.setCommand(kCommandCrunch); + else if (argv[1][0] == 's') + bundle.setCommand(kCommandSingleCrunch); else { fprintf(stderr, "ERROR: Unknown command '%s'\n", argv[1]); wantUsage = true; @@ -437,6 +444,28 @@ int main(int argc, char* const argv[]) convertPath(argv[0]); bundle.setCrunchedOutputDir(argv[0]); break; + case 'i': + argc--; + argv++; + if (!argc) { + fprintf(stderr, "ERROR: No argument supplied for '-i' option\n"); + wantUsage = true; + goto bail; + } + convertPath(argv[0]); + bundle.setSingleCrunchInputFile(argv[0]); + break; + case 'o': + argc--; + argv++; + if (!argc) { + fprintf(stderr, "ERROR: No argument supplied for '-o' option\n"); + wantUsage = true; + goto bail; + } + convertPath(argv[0]); + bundle.setSingleCrunchOutputFile(argv[0]); + break; case '0': argc--; argv++; diff --git a/tools/aapt/Main.h b/tools/aapt/Main.h index d20c601..a6b39ac 100644 --- a/tools/aapt/Main.h +++ b/tools/aapt/Main.h @@ -29,6 +29,7 @@ extern int doAdd(Bundle* bundle); extern int doRemove(Bundle* bundle); extern int doPackage(Bundle* bundle); extern int doCrunch(Bundle* bundle); +extern int doSingleCrunch(Bundle* bundle); extern int calcPercent(long uncompressedLen, long compressedLen); diff --git a/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java b/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java index 3e625f9..091c6e5 100644 --- a/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java +++ b/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java @@ -87,7 +87,7 @@ public class IWindowManagerImpl implements IWindowManager { // ---- unused implementation of IWindowManager ---- @Override - public void addAppToken(int arg0, IApplicationToken arg1, int arg2, int arg3, boolean arg4, + public void addAppToken(int arg0, int arg1p5, IApplicationToken arg1, int arg2, int arg3, boolean arg4, boolean arg5) throws RemoteException { // TODO Auto-generated method stub |