mirror of
https://github.com/S3NEO/android_device_samsung_msm8226-common.git
synced 2024-11-06 21:55:45 +00:00
msm8226-common: switch to dynamic init functions
This commit is contained in:
parent
287c9358bc
commit
07e7eb47ed
4 changed files with 41 additions and 20 deletions
|
@ -92,10 +92,6 @@ TARGET_KEYMASTER_SKIP_WAITING_FOR_QSEE := true
|
|||
# SELinux
|
||||
include device/samsung/msm8226-common/sepolicy/sepolicy.mk
|
||||
|
||||
# Init
|
||||
TARGET_INIT_VENDOR_LIB := libinit_msm8226
|
||||
TARGET_RECOVERY_DEVICE_MODULES := libinit_msm8226
|
||||
|
||||
# Optimize
|
||||
PRODUCT_SYSTEM_SERVER_COMPILER_FILTER := speed-profile
|
||||
PRODUCT_ALWAYS_PREOPT_EXTRACTED_APK := true
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
# Copyright (C) 2016 The CyanogenMod Project
|
||||
# 2017 The LineageOS Project
|
||||
# 2017-2020 The LineageOS Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
@ -20,12 +20,9 @@ include $(CLEAR_VARS)
|
|||
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_C_INCLUDES := system/core/init
|
||||
LOCAL_CFLAGS := -Wall -DANDROID_TARGET=\"$(TARGET_BOARD_PLATFORM)\"
|
||||
LOCAL_CFLAGS := -Wall
|
||||
LOCAL_SRC_FILES := init_msm8226.cpp
|
||||
ifneq ($(TARGET_LIBINIT_MSM8226_DEFINES_FILE),)
|
||||
LOCAL_SRC_FILES += ../../../../$(TARGET_LIBINIT_MSM8226_DEFINES_FILE)
|
||||
endif
|
||||
LOCAL_MODULE := libinit_msm8226
|
||||
LOCAL_MODULE := libinit_helpers_sam8226
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libbase
|
||||
|
||||
|
|
|
@ -31,16 +31,42 @@
|
|||
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
|
||||
#include <sys/_system_properties.h>
|
||||
|
||||
|
||||
#include "property_service.h"
|
||||
|
||||
#include "init_msm8226.h"
|
||||
|
||||
using android::init::property_set;
|
||||
|
||||
__attribute__ ((weak))
|
||||
void init_target_properties()
|
||||
void cdma_properties(char const operator_alpha[],
|
||||
char const operator_numeric[],
|
||||
char const default_cdma_sub[],
|
||||
char const default_network[])
|
||||
{
|
||||
// Dynamic CDMA Properties
|
||||
property_set("ro.cdma.home.operator.alpha", operator_alpha);
|
||||
property_set("ro.cdma.home.operator.numeric", operator_numeric);
|
||||
property_set("ro.telephony.default_cdma_sub", default_cdma_sub);
|
||||
property_set("ro.telephony.default_network", default_network);
|
||||
|
||||
// Static CDMA Properties
|
||||
property_set("ril.subscription.types", "NV,RUIM");
|
||||
property_set("telephony.lteOnCdmaDevice", "1");
|
||||
}
|
||||
|
||||
void gsm_properties(const char default_network[],
|
||||
char const lteOnGsmDevice[])
|
||||
{
|
||||
// Dynamic GSM Properties
|
||||
property_set("ro.telephony.default_network", default_network);
|
||||
property_set("telephony.lteOnGsmDevice", lteOnGsmDevice);
|
||||
}
|
||||
|
||||
void wifi_properties(char const carrier[],
|
||||
char const noril[])
|
||||
{
|
||||
// Dynamic Wi-Fi Properties
|
||||
property_set("ro.carrier", carrier);
|
||||
property_set("ro.radio.noril", noril);
|
||||
}
|
||||
|
||||
void property_override(char const prop[], char const value[])
|
||||
|
@ -60,9 +86,3 @@ void property_override_dual(char const system_prop[],
|
|||
property_override(system_prop, value);
|
||||
property_override(vendor_prop, value);
|
||||
}
|
||||
|
||||
|
||||
void vendor_load_properties()
|
||||
{
|
||||
init_target_properties();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Copyright (c) 2016, The CyanogenMod Project
|
||||
Copyright (c) 2018, The LineageOS Project
|
||||
Copyright (c) 2018-2020, The LineageOS Project
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
|
@ -31,6 +31,14 @@
|
|||
#ifndef __INIT_MSM8226__H__
|
||||
#define __INIT_MSM8226__H__
|
||||
|
||||
void cdma_properties(char const operator_alpha[],
|
||||
char const operator_numeric[],
|
||||
char const default_cdma_sub[],
|
||||
char const default_network[]);
|
||||
void gsm_properties(char const default_network[],
|
||||
char const lteOnGsmDevice[]);
|
||||
void wifi_properties(char const carrier[],
|
||||
char const noril[]);
|
||||
void init_target_properties();
|
||||
void property_override(char const prop[], char const value[]);
|
||||
void property_override_dual(char const system_prop[],
|
||||
|
|
Loading…
Reference in a new issue