TW_INPUT_BLACKLIST := "hbtp_vm"
TW_MAX_BRIGHTNESS := 1023
TW_DEFAULT_BRIGHTNESS := 420
+TW_Y_OFFSET := 80
+TW_H_OFFSET := -80
TW_THEME := portrait_hdpi
TARGET_RECOVERY_DEVICE_MODULES += android.hardware.boot@1.0
TARGET_USE_CUSTOM_LUN_FILE_PATH := /config/usb_gadget/g1/functions/mass_storage.0/lun.%d/file
property_set("ro.display.series", "OnePlus 7 Pro");
}
-static bool file_exist (const std::string& name) {
- return ( access( name.c_str(), F_OK ) == 0 );
-}
-
void load_op7pro5g(const char *model) {
property_set("ro.product.model", model);
property_set("ro.build.product", "OnePlus7ProNR");
property_set("ro.display.series", "OnePlus 7 Pro 5G");
}
+void load_op7(const char *model) {
+ property_set("ro.product.model", model);
+ property_set("ro.build.product", "OnePlus7");
+ property_set("ro.product.device", "OnePlus7");
+ property_set("ro.vendor.product.device", "OnePlus7");
+ property_set("ro.display.series", "OnePlus 7");
+}
+
void vendor_load_properties() {
+ int project_name = stoi(android::base::GetProperty("ro.boot.project_name", ""));
int rf_version = stoi(android::base::GetProperty("ro.boot.rf_version", ""));
-
- switch (rf_version) {
- case 1:
- if (file_exist("/dev/block/bootdevice/by-name/5gdump")){
- /* 5g Europe */
- load_op7pro5g("GM1920");
- break;
- } else {
- /* China */
- load_op7pro("GM1910");
- break;
- }
- case 2:
- /* T-Mobile */
- load_op7pro("GM1915");
- break;
- case 3:
- /* India*/
- load_op7pro("GM1911");
- break;
- case 4:
- /* Europe */
- load_op7pro("GM1913");
- break;
- case 5:
- /* Global / US Unlocked */
- load_op7pro("GM1917");
- break;
- default:
- LOG(ERROR) << __func__ << ": unexcepted rf version!";
- }
+ switch(project_name){
+ case 18821:
+ switch (rf_version){
+ case 1:
+ /* China*/
+ load_op7pro("GM1910");
+ break;
+ case 3:
+ /* India*/
+ load_op7pro("GM1911");
+ break;
+ case 4:
+ /* Europe */
+ load_op7pro("GM1913");
+ break;
+ case 5:
+ /* Global / US Unlocked */
+ load_op7pro("GM1917");
+ break;
+ default:
+ /* Generic*/
+ load_op7pro("GM1917");
+ break;
+ }
+ case 18831:
+ /* T-Mobile */
+ load_op7pro("GM1915");
+ break;
+ case 18827:
+ /* 5g Europe */
+ load_op7pro5g("GM1920");
+ break;
+ case 18857:
+ switch (rf_version){
+ case 1:
+ /* China*/
+ load_op7("GM1900");
+ break;
+ case 3:
+ /* India*/
+ load_op7("GM1901");
+ break;
+ case 4:
+ /* Europe */
+ load_op7("GM1903");
+ break;
+ case 5:
+ /* Global / US Unlocked */
+ load_op7("GM1907");
+ break;
+ default:
+ /* Generic */
+ load_op7("GM1907");
+ break;
+ }
+ }
}
} // namespace init