Reputation: 111
what is the difference between
System.getProperty("somestring")
vs
SystemProperties.get("somestring")
in android?
Upvotes: 1
Views: 1234
Reputation: 204798
android.os.SystemProperties
interacts with the Android properties system - some keys have completely static values defined in /system/build.prop
(such as ro.build.id
), some represent system settings (such as persist.sys.timezone
), and some are dynamic (such as sys.powerctl
which can be written to reboot). These are the same values you can access via adb shell propget
and adb shell propset
. This interface is not part of the public API.
java.util.System
is a public Java interface. Java system properties include keys such as java.io.tmpdir
and user.home
, which are expected by common Java code. They are not related to Android's system properties.
Upvotes: 2