mirror of
https://github.com/chararomandroid/android_device_samsung_a20
synced 2026-08-22 20:15:32 -04:00
universal7885: Major (de)commonize due to prev commit
This commit is contained in:
parent
e88568c670
commit
07b209df81
31 changed files with 606 additions and 66 deletions
|
|
@ -13,10 +13,10 @@
|
|||
// limitations under the License.
|
||||
|
||||
cc_library_static {
|
||||
name: "libinit_universal7884B",
|
||||
name: "libinit_universal7885",
|
||||
recovery_available: true,
|
||||
whole_static_libs: ["libbase"],
|
||||
header_libs: ["libbase_headers"],
|
||||
srcs: ["init_universal7884B.cpp"],
|
||||
srcs: ["init_universal7885.cpp"],
|
||||
include_dirs: ["system/core/init"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,6 +71,14 @@ void set_ro_build_prop(const std::string &prop, const std::string &value, bool p
|
|||
}
|
||||
}
|
||||
|
||||
bool hasEnding (std::string const &fullString, std::string const &ending) {
|
||||
if (fullString.length() >= ending.length()) {
|
||||
return (0 == fullString.compare (fullString.length() - ending.length(), ending.length(), ending));
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void vendor_load_properties() {
|
||||
string model;
|
||||
|
||||
|
|
@ -79,8 +87,8 @@ void vendor_load_properties() {
|
|||
model = GetProperty("ro.boot.em.model", "");
|
||||
}
|
||||
|
||||
if (model == "SM-A205FN" || model == "SM-A205GN" || model == "SM-A202K" || model == "SM-A205YN") {
|
||||
property_override("ro.boot.product.hardware.sku", "NFC");
|
||||
if (hasEnding(model, "N") || hasEnding(model, "S") || hasEnding(model, "K")) {
|
||||
property_override("ro.boot.product.hardware.sku", "NFC");
|
||||
}
|
||||
|
||||
set_ro_build_prop("model", model);
|
||||
Loading…
Reference in a new issue