summaryrefslogtreecommitdiffstats
path: root/include/utils
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-03-02 22:54:33 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-02 22:54:33 -0800
commit0bb03408de8886e8d17013219967d42fb9c8cf8c (patch)
tree6edc73880d91bac5532cdbece4072f7c6ec7d257 /include/utils
parent7222586f99599fb2de31293277b79e8d4a3acdc2 (diff)
downloadframeworks_native-0bb03408de8886e8d17013219967d42fb9c8cf8c.zip
frameworks_native-0bb03408de8886e8d17013219967d42fb9c8cf8c.tar.gz
frameworks_native-0bb03408de8886e8d17013219967d42fb9c8cf8c.tar.bz2
auto import from //depot/cupcake/@137055
Diffstat (limited to 'include/utils')
-rw-r--r--include/utils/ResourceTypes.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/include/utils/ResourceTypes.h b/include/utils/ResourceTypes.h
index d83a33c..7d3fcf2 100644
--- a/include/utils/ResourceTypes.h
+++ b/include/utils/ResourceTypes.h
@@ -1101,16 +1101,22 @@ struct ResTable_config
return false;
}
- // Return true if 'this' can be considered a match for the parameters in
+ // Return true if 'this' can be considered a match for the parameters in
// 'settings'.
+ // Note this is asymetric. A default piece of data will match every request
+ // but a request for the default should not match odd specifics
+ // (ie, request with no mcc should not match a particular mcc's data)
+ // settings is the requested settings
inline bool match(const ResTable_config& settings) const {
if (imsi != 0) {
- if (settings.mcc != 0 && mcc != 0
- && mcc != settings.mcc) {
+ if ((settings.mcc != 0 && mcc != 0
+ && mcc != settings.mcc) ||
+ (settings.mcc == 0 && mcc != 0)) {
return false;
}
- if (settings.mnc != 0 && mnc != 0
- && mnc != settings.mnc) {
+ if ((settings.mnc != 0 && mnc != 0
+ && mnc != settings.mnc) ||
+ (settings.mnc == 0 && mnc != 0)) {
return false;
}
}