Home
last modified time | relevance | path

Searched refs:ResTable_config (Results 1 – 25 of 50) sorted by relevance

12

/frameworks/base/libs/androidfw/tests/
DConfig_test.cpp28 static ResTable_config selectBest(const ResTable_config& target, in selectBest()
29 const Vector<ResTable_config>& configs) { in selectBest()
30 ResTable_config bestConfig; in selectBest()
34 const ResTable_config& thisConfig = configs[i]; in selectBest()
46 static ResTable_config buildDensityConfig(int density) { in buildDensityConfig()
47 ResTable_config config; in buildDensityConfig()
55 ResTable_config deviceConfig; in TEST()
57 deviceConfig.density = ResTable_config::DENSITY_XHIGH; in TEST()
60 Vector<ResTable_config> configs; in TEST()
62 ResTable_config expectedBest = in TEST()
[all …]
DSplit_test.cpp29 static void makeConfigFrench(ResTable_config* config) { in makeConfigFrench()
73 ResTable_config frenchConfig; in TEST_F()
82 ResTable_config expectedConfig; in TEST_F()
86 ResTable_config config; in TEST_F()
102 ResTable_config expectedConfig; in TEST_F()
114 ResTable_config config; in TEST_F()
126 ResTable_config expectedConfig; in TEST_F()
155 ResTable_config defaultConfig; in TEST_F()
178 EXPECT_EQ(static_cast<uint32_t>(ResTable_config::CONFIG_LOCALE | ResTable_typeSpec::SPEC_PUBLIC), in TEST_F()
183 ResTable_config baseConfig; in TEST_F()
[all …]
DSparseEntry_bench.cpp29 ResTable_config config; in BM_SparseEntryGetResourceSparseSmall()
38 ResTable_config config; in BM_SparseEntryGetResourceNotSparseSmall()
47 ResTable_config config; in BM_SparseEntryGetResourceSparseLarge()
56 ResTable_config config; in BM_SparseEntryGetResourceNotSparseLarge()
DLoadedArsc_test.cpp44 ResTable_config config; in TEST()
49 ResTable_config selected_config; in TEST()
66 ResTable_config desired_config; in TEST()
72 ResTable_config selected_config; in TEST()
154 ResTable_config desired_config; in TEST()
158 ResTable_config selected_config; in TEST()
DTestHelpers.h51 static inline bool operator==(const ResTable_config& a, const ResTable_config& b) {
55 static inline ::std::ostream& operator<<(::std::ostream& out, const ResTable_config& c) {
DAssetManager2_test.cpp81 ResTable_config desired_config; in TEST_F()
91 ResTable_config selected_config; in TEST_F()
111 ResTable_config desired_config; in TEST_F()
121 ResTable_config selected_config; in TEST_F()
149 ResTable_config selected_config; in TEST_F()
195 ResTable_config selected_config; in TEST_F()
310 ResTable_config selected_config; in TEST_F()
333 ResTable_config selected_config; in TEST_F()
351 static bool IsConfigurationPresent(const std::set<ResTable_config>& configurations, in IsConfigurationPresent()
352 const ResTable_config& configuration) { in IsConfigurationPresent()
[all …]
DConfigLocale_test.cpp26 ResTable_config config; in TEST()
49 ResTable_config config; in TEST()
64 ResTable_config config; in TEST()
80 ResTable_config config; in TEST()
104 ResTable_config config; in TEST()
116 const char* script, const char* variant, ResTable_config* out) { in fillIn()
117 memset(out, 0, sizeof(ResTable_config)); in fillIn()
140 ResTable_config l; in TEST()
141 ResTable_config r; in TEST()
179 ResTable_config test; in TEST()
[all …]
DBenchmarkHelpers.cpp24 void GetResourceBenchmarkOld(const std::vector<std::string>& paths, const ResTable_config* config, in GetResourceBenchmarkOld()
42 ResTable_config selected_config; in GetResourceBenchmarkOld()
/frameworks/base/tools/aapt/
DAaptConfig.cpp28 using android::ResTable_config;
268 if ((config->uiMode & ResTable_config::MASK_UI_MODE_TYPE) in applyVersionForCompatibility()
269 == ResTable_config::UI_MODE_TYPE_VR_HEADSET in applyVersionForCompatibility()
270 || config->colorMode & ResTable_config::MASK_WIDE_COLOR_GAMUT in applyVersionForCompatibility()
271 || config->colorMode & ResTable_config::MASK_HDR) { in applyVersionForCompatibility()
273 } else if (config->screenLayout2 & ResTable_config::MASK_SCREENROUND) { in applyVersionForCompatibility()
275 } else if (config->density == ResTable_config::DENSITY_ANY) { in applyVersionForCompatibility()
277 } else if (config->smallestScreenWidthDp != ResTable_config::SCREENWIDTH_ANY in applyVersionForCompatibility()
278 || config->screenWidthDp != ResTable_config::SCREENWIDTH_ANY in applyVersionForCompatibility()
279 || config->screenHeightDp != ResTable_config::SCREENHEIGHT_ANY) { in applyVersionForCompatibility()
[all …]
DAaptConfig.h55 bool parseMcc(const char* str, android::ResTable_config* out = NULL);
56 bool parseMnc(const char* str, android::ResTable_config* out = NULL);
57 bool parseLayoutDirection(const char* str, android::ResTable_config* out = NULL);
58 bool parseSmallestScreenWidthDp(const char* str, android::ResTable_config* out = NULL);
59 bool parseScreenWidthDp(const char* str, android::ResTable_config* out = NULL);
60 bool parseScreenHeightDp(const char* str, android::ResTable_config* out = NULL);
61 bool parseScreenLayoutSize(const char* str, android::ResTable_config* out = NULL);
62 bool parseScreenLayoutLong(const char* str, android::ResTable_config* out = NULL);
63 bool parseScreenRound(const char* name, android::ResTable_config* out = NULL);
64 bool parseWideColorGamut(const char* name, android::ResTable_config* out = NULL);
[all …]
DConfigDescription.h26 struct ConfigDescription : public android::ResTable_config {
29 size = sizeof(android::ResTable_config); in ConfigDescription()
32 ConfigDescription(const android::ResTable_config&o) { // NOLINT(implicit) in ConfigDescription()
33 *static_cast<android::ResTable_config*>(this) = o; in ConfigDescription()
34 size = sizeof(android::ResTable_config); in ConfigDescription()
38 *static_cast<android::ResTable_config*>(this) = o; in ConfigDescription()
41 ConfigDescription& operator=(const android::ResTable_config& o) {
42 *static_cast<android::ResTable_config*>(this) = o;
43 size = sizeof(android::ResTable_config);
48 *static_cast<android::ResTable_config*>(this) = o;
DResourceFilter.cpp42 entry.second &= ~ResTable_config::CONFIG_VERSION; in parse()
45 if ((entry.second & ResTable_config::CONFIG_DENSITY) != 0) { in parse()
48 entry.second &= ~ResTable_config::CONFIG_DENSITY; in parse()
71 scriptsMatch(const ResTable_config& config, const ResTable_config& entry) { in scriptsMatch()
98 WeakResourceFilter::match(const ResTable_config& config) const in match()
114 } else if ((diff & entry.second) == ResTable_config::CONFIG_LOCALE) { in match()
130 matchedAxis |= ResTable_config::CONFIG_LOCALE; in match()
132 } else if ((diff & entry.second) == ResTable_config::CONFIG_SMALLEST_SCREEN_SIZE) { in match()
137 matchedAxis |= ResTable_config::CONFIG_SMALLEST_SCREEN_SIZE; in match()
DResourceFilter.h23 virtual bool match(const android::ResTable_config& config) const = 0;
37 bool match(const android::ResTable_config& config) const;
86 bool match(const android::ResTable_config& config) const { in match()
112 bool match(const android::ResTable_config& config) const { in match()
129 bool match(const android::ResTable_config& config) const { in match()
/frameworks/base/tools/aapt2/
DConfigDescription.cpp29 using android::ResTable_config;
41 static bool parseMcc(const char* name, ResTable_config* out) { in parseMcc()
71 static bool parseMnc(const char* name, ResTable_config* out) { in parseMnc()
102 static bool parseLayoutDirection(const char* name, ResTable_config* out) { in parseLayoutDirection()
106 (out->screenLayout & ~ResTable_config::MASK_LAYOUTDIR) | in parseLayoutDirection()
107 ResTable_config::LAYOUTDIR_ANY; in parseLayoutDirection()
112 (out->screenLayout & ~ResTable_config::MASK_LAYOUTDIR) | in parseLayoutDirection()
113 ResTable_config::LAYOUTDIR_LTR; in parseLayoutDirection()
118 (out->screenLayout & ~ResTable_config::MASK_LAYOUTDIR) | in parseLayoutDirection()
119 ResTable_config::LAYOUTDIR_RTL; in parseLayoutDirection()
[all …]
DConfigDescription.h31 struct ConfigDescription : public android::ResTable_config {
54 ConfigDescription(const android::ResTable_config& o); // NOLINT(implicit)
58 ConfigDescription& operator=(const android::ResTable_config& o);
110 size = sizeof(android::ResTable_config); in ConfigDescription()
113 inline ConfigDescription::ConfigDescription(const android::ResTable_config& o) { in ConfigDescription()
114 *static_cast<android::ResTable_config*>(this) = o; in ConfigDescription()
115 size = sizeof(android::ResTable_config); in ConfigDescription()
119 *static_cast<android::ResTable_config*>(this) = o; in ConfigDescription()
127 const android::ResTable_config& o) {
128 *static_cast<android::ResTable_config*>(this) = o;
[all …]
DConfigDescription_test.cpp87 EXPECT_EQ(android::ResTable_config::UI_MODE_TYPE_CAR, config.uiMode); in TEST()
93 EXPECT_EQ(android::ResTable_config::SCREENROUND_YES, in TEST()
94 config.screenLayout2 & android::ResTable_config::MASK_SCREENROUND); in TEST()
99 EXPECT_EQ(android::ResTable_config::SCREENROUND_NO, in TEST()
100 config.screenLayout2 & android::ResTable_config::MASK_SCREENROUND); in TEST()
108 EXPECT_EQ(android::ResTable_config::WIDE_COLOR_GAMUT_YES, in TEST()
109 config.colorMode & android::ResTable_config::MASK_WIDE_COLOR_GAMUT); in TEST()
114 EXPECT_EQ(android::ResTable_config::WIDE_COLOR_GAMUT_NO, in TEST()
115 config.colorMode & android::ResTable_config::MASK_WIDE_COLOR_GAMUT); in TEST()
123 EXPECT_EQ(android::ResTable_config::HDR_YES, in TEST()
[all …]
/frameworks/base/native/android/
Dconfiguration.cpp83 return config->inputFlags&ResTable_config::MASK_KEYSHIDDEN; in AConfiguration_getKeysHidden()
87 return (config->inputFlags&ResTable_config::MASK_NAVHIDDEN) in AConfiguration_getNavHidden()
88 >> ResTable_config::SHIFT_NAVHIDDEN; in AConfiguration_getNavHidden()
96 return config->screenLayout&ResTable_config::MASK_SCREENSIZE; in AConfiguration_getScreenSize()
100 return (config->screenLayout&ResTable_config::MASK_SCREENLONG) in AConfiguration_getScreenLong()
101 >> ResTable_config::SHIFT_SCREENLONG; in AConfiguration_getScreenLong()
105 return (config->screenLayout2&ResTable_config::MASK_SCREENROUND); in AConfiguration_getScreenRound()
109 return config->uiMode&ResTable_config::MASK_UI_MODE_TYPE; in AConfiguration_getUiModeType()
113 return (config->uiMode&ResTable_config::MASK_UI_MODE_NIGHT) in AConfiguration_getUiModeNight()
114 >> ResTable_config::SHIFT_UI_MODE_NIGHT; in AConfiguration_getUiModeNight()
[all …]
/frameworks/base/tools/aapt/tests/
DAaptConfig_test.cpp84 EXPECT_EQ(android::ResTable_config::UI_MODE_TYPE_CAR, config.uiMode); in TEST()
90 EXPECT_EQ(android::ResTable_config::SCREENROUND_YES, in TEST()
91 config.screenLayout2 & android::ResTable_config::MASK_SCREENROUND); in TEST()
96 EXPECT_EQ(android::ResTable_config::SCREENROUND_NO, in TEST()
97 config.screenLayout2 & android::ResTable_config::MASK_SCREENROUND); in TEST()
105 EXPECT_EQ(android::ResTable_config::WIDE_COLOR_GAMUT_YES, in TEST()
106 config.colorMode & android::ResTable_config::MASK_WIDE_COLOR_GAMUT); in TEST()
111 EXPECT_EQ(android::ResTable_config::WIDE_COLOR_GAMUT_NO, in TEST()
112 config.colorMode & android::ResTable_config::MASK_WIDE_COLOR_GAMUT); in TEST()
120 EXPECT_EQ(android::ResTable_config::HDR_YES, in TEST()
[all …]
/frameworks/base/tools/aapt2/filter/
DConfigFilter.cpp29 diff_mask &= ~android::ResTable_config::CONFIG_VERSION; in AddConfig()
32 if ((diff_mask & android::ResTable_config::CONFIG_DENSITY) != 0) { in AddConfig()
34 diff_mask &= ~android::ResTable_config::CONFIG_DENSITY; in AddConfig()
93 } else if ((diff & diff_mask) == android::ResTable_config::CONFIG_LOCALE) { in Match()
106 matched_axis |= android::ResTable_config::CONFIG_LOCALE; in Match()
109 android::ResTable_config::CONFIG_SMALLEST_SCREEN_SIZE) { in Match()
116 matched_axis |= android::ResTable_config::CONFIG_SMALLEST_SCREEN_SIZE; in Match()
/frameworks/base/libs/androidfw/include/androidfw/
DAssetManager2.h115 void SetConfiguration(const ResTable_config& configuration);
117 inline const ResTable_config& GetConfiguration() const { return configuration_; } in GetConfiguration()
125 std::set<ResTable_config> GetResourceConfigurations(bool exclude_system = false,
197 Res_value* out_value, ResTable_config* out_selected_config,
213 ResTable_config* in_out_selected_config, uint32_t* in_out_flags,
249 LoadedArscEntry* out_entry, ResTable_config* out_selected_config,
282 ResTable_config configuration_;
332 ResTable_config* in_out_selected_config = nullptr,
DResourceTypes.h902 struct ResTable_config struct
1182 void copyFromDeviceNoSwap(const ResTable_config& o); argument
1184 void copyFromDtoH(const ResTable_config& o);
1188 int compare(const ResTable_config& o) const;
1189 int compareLogical(const ResTable_config& o) const;
1191 inline bool operator<(const ResTable_config& o) const { return compare(o) < 0; }
1218 int diff(const ResTable_config& o) const; argument
1221 bool isMoreSpecificThan(const ResTable_config& o) const;
1233 bool isBetterThan(const ResTable_config& o, const ResTable_config* requested) const;
1241 bool match(const ResTable_config& settings) const;
[all …]
DLoadedArsc.h68 bool FindEntry(uint8_t type_idx, uint16_t entry_idx, const ResTable_config& config,
69 LoadedArscEntry* out_entry, ResTable_config* out_selected_config,
97 void CollectConfigurations(bool exclude_mipmap, std::set<ResTable_config>* out_configs) const;
153 bool FindEntry(uint32_t resid, const ResTable_config& config, LoadedArscEntry* out_entry,
154 ResTable_config* selected_config, uint32_t* out_flags) const;
DAssetManager.h46 struct ResTable_config;
121 void setConfiguration(const ResTable_config& config, const char* locale = NULL);
123 void getConfiguration(ResTable_config* outConfig) const;
324 ResTable_config* mConfig;
/frameworks/base/libs/androidfw/
DResourceTypes.cpp1766 void ResTable_config::copyFromDeviceNoSwap(const ResTable_config& o) { in copyFromDeviceNoSwap()
1768 if (size >= sizeof(ResTable_config)) { in copyFromDeviceNoSwap()
1772 memset(((uint8_t*)this)+size, 0, sizeof(ResTable_config)-size); in copyFromDeviceNoSwap()
1824 void ResTable_config::packLanguage(const char* language) { in packLanguage()
1828 void ResTable_config::packRegion(const char* region) { in packRegion()
1832 size_t ResTable_config::unpackLanguage(char language[4]) const { in unpackLanguage()
1836 size_t ResTable_config::unpackRegion(char region[4]) const { in unpackRegion()
1841 void ResTable_config::copyFromDtoH(const ResTable_config& o) { in copyFromDtoH()
1843 size = sizeof(ResTable_config); in copyFromDtoH()
1856 void ResTable_config::swapHtoD() { in swapHtoD()
[all …]
DAssetManager2.cpp152 void AssetManager2::SetConfiguration(const ResTable_config& configuration) { in SetConfiguration()
161 std::set<ResTable_config> AssetManager2::GetResourceConfigurations(bool exclude_system, in GetResourceConfigurations()
164 std::set<ResTable_config> configurations; in GetResourceConfigurations()
265 ResTable_config* out_selected_config, in FindEntry()
270 ResTable_config density_override_config; in FindEntry()
273 ResTable_config* desired_config = &configuration_; in FindEntry()
296 ResTable_config best_config; in FindEntry()
304 ResTable_config current_config; in FindEntry()
340 ResTable_config config; in GetResourceName()
378 ResTable_config config; in GetResourceFlags()
[all …]

12