Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Copyright (c) 2013, The Linux Foundation. All rights reserved.
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
- * Neither the name of The Linux Foundation nor the names of its
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- #include <stdlib.h>
- #include "vendor_init.h"
- #include "property_service.h"
- #include "log.h"
- #include "util.h"
- void gsm_properties();
- void cdma_properties(char cdma_subscription[],
- char default_network[],
- char operator_numeric[],
- char operator_alpha[],
- char sms_pseudo_multipart[]);
- void vendor_load_properties()
- {
- char platform[PROP_VALUE_MAX];
- char bootloader[PROP_VALUE_MAX];
- char device[PROP_VALUE_MAX];
- char devicename[PROP_VALUE_MAX];
- int rc;
- rc = property_get("ro.board.platform", platform);
- if (!rc || strncmp(platform, ANDROID_TARGET, PROP_VALUE_MAX))
- return;
- property_get("ro.bootloader", bootloader);
- if (strstr(bootloader, "L710")) {
- /* d2spi */
- cdma_properties("1", "8", "311230", "C Spire", "1");
- property_set("ro.build.fingerprint", "samsung/d2spi/d2spr:4.4.2/KOT49H/L710WWAMD:user/release-keys");
- property_set("ro.build.description", "d2spi-user 4.4.2 KOT49H L710WWAMD5 release-keys");
- property_set("ro.cdma.home.operator.numeric", "311230");
- property_set("ro.product.model", "SCH-L710");
- property_set("ro.product.device", "d2spi");
- }
- property_get("ro.product.device", device);
- ERROR("Found bootloader id %s setting build properties for %s device\n", bootloader, device);
- }
- void gsm_properties()
- {
- property_set("ro.telephony.default_network", "9");
- property_set("telephony.lteOnGsmDevice", "1");
- }
- void cdma_properties(char default_cdma_sub[], char default_network[],
- char operator_numeric[], char operator_alpha[],
- char sms_pseudo_multipart[])
- {
- property_set("ro.telephony.default_cdma_sub", default_cdma_sub);
- property_set("ro.telephony.default_network", default_network);
- property_set("ro.cdma.home.operator.numeric", operator_numeric);
- property_set("ro.cdma.home.operator.alpha", operator_alpha);
- property_set("telephony.sms.pseudo_multipart", sms_pseudo_multipart);
- property_set("telephony.lteOnCdmaDevice", "1");
- property_set("ril.subscription.types", "NV,RUIM");
- property_set("ro.cdma.subscribe_on_ruim_ready", "true");
- property_set("ro.ril.svdo", "true");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement