summaryrefslogtreecommitdiffstats
path: root/include/androidfw/AssetManager.h
diff options
context:
space:
mode:
authorRicardo Cerqueira <cyanogenmod@cerqueira.org>2012-11-20 21:17:17 +0000
committerRicardo Cerqueira <cyanogenmod@cerqueira.org>2012-11-24 14:09:39 +0000
commitad3c9416092f09213d32eee8b59287766eae5d19 (patch)
tree0bc1e318ca15560299c662e37c6c4fedf0bcf1e6 /include/androidfw/AssetManager.h
parent7d114fb838017d86ece76e18a7e1b0d8534595fa (diff)
downloadframeworks_base-ad3c9416092f09213d32eee8b59287766eae5d19.zip
frameworks_base-ad3c9416092f09213d32eee8b59287766eae5d19.tar.gz
frameworks_base-ad3c9416092f09213d32eee8b59287766eae5d19.tar.bz2
Squashed commit of the theme engine support.
Updated 4.2 support for the old T-Mobile theme engine, as usual needs the provider and switcher apps installed as well. I'm finally dropping the 400+ commit history on this, since everybody else keeps picking it up from CM as a single patch anyway... But for the record, nothing of this would be possible without Josh, Ed, and the rest of the TMo guys who wrote and maintained it until 2.2: amit chabra <amit.chabra@t-mobile.com> Amit Kohli <amit.kohli@t-mobile.com> Chris Cogar <chriscogar@t-mobile.com> Dirk Sigurdson <dirk.sigurdson@t-mobile.com> Ed Carrigan <edward.carrigan@t-mobile.com> Gaurav Sharma <gaurav.sharma3@t-mobile.com> Hui Feng <hui.feng@t-mobile.com> John Ritz <john.ritz1@t-mobile.com> Josh Guilfoyle <josh.guilfoyle@t-mobile.com> Mark Roberts <mark.roberts48@t-mobile.com> Pankaj Kumar <Pankaj.kumar6@t-mobile.com> Samuel Cheung <samuel.cheung@t-mobile.com> Sergey Ten <sergey.ten6@t-mobile.com> Change-Id: I7148d51be48f28a2dc4bdf9ec9018f04b268ffc4
Diffstat (limited to 'include/androidfw/AssetManager.h')
-rw-r--r--include/androidfw/AssetManager.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/include/androidfw/AssetManager.h b/include/androidfw/AssetManager.h
index d153c31..2717de9 100644
--- a/include/androidfw/AssetManager.h
+++ b/include/androidfw/AssetManager.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2006 The Android Open Source Project
+ * This code has been modified. Portions copyright (C) 2010, T-Mobile USA, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,6 +23,7 @@
#include <androidfw/Asset.h>
#include <androidfw/AssetDir.h>
+#include <androidfw/PackageRedirectionMap.h>
#include <utils/KeyedVector.h>
#include <utils/SortedVector.h>
#include <utils/String16.h>
@@ -92,7 +94,7 @@ public:
* then on success, *cookie is set to the value corresponding to the
* newly-added asset source.
*/
- bool addAssetPath(const String8& path, void** cookie);
+ bool addAssetPath(const String8& path, void** cookie, bool asSkin=false);
/*
* Convenience for adding the standard system assets. Uses the
@@ -218,14 +220,28 @@ public:
*/
void getLocales(Vector<String8>* locales) const;
+ /*
+ * Remove existing source for assets.
+ *
+ * Also updates the ResTable object to reflect the change.
+ *
+ * Returns "true" on success, "false" on failure.
+ */
+ bool detachThemePath(const String8& packageName, void *cookie);
+ bool attachThemePath(const String8& path, void** cookie);
+ void addRedirections(PackageRedirectionMap* resMap);
+ void clearRedirections();
+
private:
struct asset_path
{
String8 path;
FileType type;
String8 idmap;
+ bool asSkin;
};
+ void updateResTableFromAssetPath(ResTable* rt, const asset_path& ap, void* cookie) const;
Asset* openInPathLocked(const char* fileName, AccessMode mode,
const asset_path& path);
Asset* openNonAssetInPathLocked(const char* fileName, AccessMode mode,