android 修改properties属性最大长度

文章目录

    • 背景
    • 方法

背景

系统需要添加客户指定的属性值,但长度超出原生Android定义的范围,导致编译报错。

方法

修改属性值长度限制

原生Android定义:
properties属性名称不能超过32个字符
properties属性值不能超过92个字符

platform/system/core/debuggerd/test/sys/system_properties.h

#ifndef _DEBUGGERD_TEST_SYS_SYSTEM_PROPERTIES_H
#define _DEBUGGERD_TEST_SYS_SYSTEM_PROPERTIES_H

// This is just enough to get the property code to compile on
// the host.

#define PROP_NAME_MAX   32 //修改此处
#define PROP_VALUE_MAX  92 //修改此处

#endif // _DEBUGGERD_TEST_SYS_SYSTEM_PROPERTIES_H

你可能感兴趣的:(Android)