android.os.SystemProperties在哪里? [英] Where is android.os.SystemProperties?

查看:244
本文介绍了android.os.SystemProperties在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在查看Android Camera代码,当我尝试导入android.os.SystemProperties时,找不到它.

I'm looking at the Android Camera code, and when I try importing android.os.SystemProperties, it cannot be found.

这是我正在查看的文件:
https://android.googlesource.com/platform/packages/apps/Camera/+/eclair-release/src/com/android/camera/VideoCamera.java

Here is the file I'm looking at:
https://android.googlesource.com/platform/packages/apps/Camera/+/eclair-release/src/com/android/camera/VideoCamera.java

我创建了一个新的2.1项目,并尝试再次导入该名称空间,但是仍然找不到.我检查了 https://developer.android.com ,但未列出SystemProperties.

I created a new 2.1 project and tried importing this namespace again, but It still cannot be found. I checked https://developer.android.com and SystemProperties was not listed.

我错过了什么吗?

推荐答案

这是Android源代码中的类:

This is the class in the Android source code:

https://android.googlesource.com/platform/frameworks/base/+/eclair-release/core/java/android/os/SystemProperties.java

在JavaDoc类中看到{@hide}吗?这意味着该类不会作为公共SDK的一部分导出.

See {@hide} in the class JavaDoc? That means this class won't be exported as part of the public SDK.

相机应用将其内部使用,因此不会使用公共SDK进行构建.

The camera app uses it as it's internal and they won't use the public SDK to build it.

您也许仍然可以上这堂课

You may still be able to get at this class

  1. 通过反射或

  1. by reflection or

,通过获取源代码,删除@hide并自己制作 定制的SDK.

by getting the source, removing @hide and making your own customized SDK.

但是从定义上讲,您现在几乎要使用"off SDK",因此您的应用很可能会被破坏或在OS版本上表现出不同的行为,因为Android人士会不遗余力地不更改版本之间的此类.

However pretty much by definition you are now going 'off SDK' and therefore your app may well be broken or get different behavior on OS versions as the Android folks will make little effort not to change this class between versions.

这篇关于android.os.SystemProperties在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆