BatteryHistory.java:在Android源代码的master分支中找不到文件

发布于 2024-10-16 23:53:06 字数 593 浏览 6 评论 0原文

我编译了 master 分支并在模拟器中运行它。 “备件”菜单中的“电池历史记录”项不起作用。它导致“备件”的“强制关闭”。

DDMS 日志显示错误消息,例如:

04-11 11:13:14.080: E/AndroidRuntime(9593): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.android.settings/com.android.settings.battery_history.BatteryHistory}; have you declared this activity in your AndroidManifest.xml?

我发现“电池历史记录”使用类 com.android.settings.battery_history.BatteryHistory 但该类不再存在。它之前位于存储库 platform/packages/apps/Settings.git 中。我搜索了整个代码库,但找不到这个类。

该文件是否不再开源并被放入某些 JAR 文件中?

I compiled the master branch and run it in the emulator. The "Battery History" item in the "Spare Parts" menu, does not work. It results in "Force close" of "Spare parts".

DDMS log shows error message like:

04-11 11:13:14.080: E/AndroidRuntime(9593): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.android.settings/com.android.settings.battery_history.BatteryHistory}; have you declared this activity in your AndroidManifest.xml?

I found that "Battery History" uses the class com.android.settings.battery_history.BatteryHistory but this class does not exist any more. It was in the repository platform/packages/apps/Settings.git before. I search the whole code base and couldn't find this class.

Has this file become not open-source any more and been put into some JAR files?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

金兰素衣 2024-10-23 23:53:06

找到了答案。

com.android.settings.battery_history.BatteryHistory 类已被删除。 android.os.BatteryStats 用于类似的目的。同一次结帐中的 SpareParts 仍然使用过时的 BatteryHistory,因此它不起作用。

Found the answer.

Class com.android.settings.battery_history.BatteryHistory has been removed. android.os.BatteryStats is used for the similar purpose instead. The SpareParts in the same checkout still uses the outdated BatteryHistory, so it didn't work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文