标签:android mobile backlight android-1-5-cupcake
我所看到的似乎表明,唯一的方法是使用在Cupcake(1.5)中被锁定的非官方API.这是真的?
解决方法:
看起来答案是“直到蛋糕”.
从Android Developers Blog: Future-Proofing Your Apps开始:
Technique to Avoid, #1: Using Internal APIs
Even though we’ve always strongly
advised against doing so, some
developers have chosen to use
unsupported or internal APIs. For
instance, many developers are using
the internal brightness control and
bluetooth toggle APIs that were
present in 1.0 and 1.1. A bug — which
is now fixed in Android 1.5 — allowed
apps to use those APIs without
requesting permission. As a result,
apps that use those APIs will break on
1.5. There are other changes to unsupported APIs in 1.5 besides these,
so if you’ve used internal APIs in
your apps, you need to update your
apps to stop doing so. Even if they
don’t break on Android 1.5, there’s a
good chance they will on some later
version. (There’s some good news,
though: because “flashlight” apps are
so popular, we’ve added the
“screenBrightness” field on the
WindowManager.LayoutParams class just
for that use case.)
标签:android,mobile,backlight,android-1-5-cupcake 来源: https://codeday.me/bug/20190701/1344847.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。