Precautions for SystemProperies

Source: Internet
Author: User

When SystemProperties is used, the system restarts constantly after it is started. Check the log filter function found by system android.

E/AndroidRuntime (14952): at android. OS. SystemProperties. get (SystemProperties. java: 64)

View the Framework source code SystemProperties. java: 64 and locate the following position:

/**

* Get the value for the given key.

* @ Return if the key isn't found, return def if it isn't null, or an empty string otherwise

* @ Throws IllegalArgumentException if the key exceeds 32 characters

*/

Public static String get (String key, String def ){

If (key. length ()> PROP_NAME_MAX ){

Throw new IllegalArgumentException ("key. length>" + PROP_NAME_MAX );

}

Return native_get (key, def );

}


The original SystemProperties key length cannot exceed 30 bytes. Solved since then

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.