1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
< >
平台 RK3128 + Android 7.1 目标
原图: 最终效果: 1. 模块整理 主要是增删一些编译模块, 如, 删除TvSettings, 加上Settings
删除模块: RKTvLauncher MediaCenter TvProvider TvSettings rkmcapp-armeabi-v7a-debug 增加: Launcher3 RKVideoPlayer RkExplorer 2. Launcher3 Launcher3编译不出来, 检查下这几个OVERLAY 将对应的模块从配置中删除, 或直接注释掉. ./vendor/rockchip/common/apps/RockVRHome/Android.mk:LOCAL_OVERRIDES_PACKAGES := Launcher3 ./vendor/rockchip/common/apps/RKTvLauncher/Android.mk:#LOCAL_OVERRIDES_PACKAGES := Launcher3 ./vendor/rockchip/common/apps/MediaCenter/Android.mk:LOCAL_OVERRIDES_PACKAGES := Launcher3 ./vendor/rockchip/common/apps/itvlauncher/Android.mk:LOCAL_OVERRIDES_PACKAGES := Launcher3 ./vendor/rockchip/common/apps/ChangeLedStatus/Android.mk:LOCAL_OVERRIDES_PACKAGES := Launcher3 Launcher3 启动不了
1970-01-01 08:01:06.113 1039-1113/com.android.launcher3 W/WallpaperManager: WallpaperService not running 1970-01-01 08:01:06.121 1039-1113/com.android.launcher3 E/AndroidRuntime: FATAL EXCEPTION: pool-1-thread-2 Process: com.android.launcher3, PID: 1039 DeadSystemException: The system died; earlier logs will point to the root cause
2和3是由于缺少壁纸服务导致, 解决方法有两种.
if (!disableNonCoreServices/* && context.getResources().getBoolean( R.bool.config_enableWallpaperService)*/) { traceBeginAndSlog("StartWallpaperManagerService"); mSystemServiceManager.startService(WALLPAPER_SERVICE_CLASS); Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER); }
无法使用其它桌面: RKTvLauncher优先级设置为2, 高于Launcher3 rk3128_box:/ # dumpsys package com.rockchips.android.leanbacklauncher Activity Resolver Table: Non-Data Actions: android.intent.action.MAIN: cc04bd7 com.rockchips.android.leanbacklauncher/.MainActivity filter 5b7e55d Action: "android.intent.action.MAIN" Category: "android.intent.category.HOME" Category: "android.intent.category.DEFAULT" mPriority=2, mHasPartialTypes=false AutoVerify=false 445fcc4 com.rockchips.android.leanbacklauncher/.DummyActivity filter ce29ea0 Action: "android.intent.action.MAIN" Category: "android.intent.category.LEANBACK_LAUNCHER" AutoVerify=false com.rockchips.android.leanbacklauncher.SETTINGS: 86887ad com.rockchips.android.leanbacklauncher/.settings.HomeScreenSettingsActivity filter a1d2ed2 Action: "com.rockchips.android.leanbacklauncher.SETTINGS" Category: "android.intent.category.DEFAULT" AutoVerify=false aa6aae2 com.rockchips.android.leanbacklauncher/.settings.FullScreenSettingsActivity filter b1d1ba3 Action: "com.rockchips.android.leanbacklauncher.SETTINGS" Category: "android.intent.category.DEFAULT" AutoVerify=false 如上mPriority=2 解决这个问题, 可以删除RkTvLauncher 或提高 Launcher3的优先级. 3. 卡Android动画 原因: 在服务启动完成的后, 执行**startHomeActivityLocked中, 找不到Activity:
startHomeActivityLocked -> Slog.wtf(TAG, "No home screen found for " + intent, new Throwable());
//没有返回对应的Launcher组件. PackageManagerService.resolveIntent 同样的, 和android:directBootAware有关系, 在MID的SDK中, 正常流程下, 这时候会启动设置中的FallbackHome 而在BOX的SDK中, Settings 中FallbackHome被删除了HOME属性, 导致启动后找不到Home… 缺少了 加上即可 android:excludeFromRecents="true" android:screenOrientation="nosensor" android:theme="@style/FallbackHome"> 4. SystemUI 在BOX中, 状态栏和导航栏是不显示的, 修改以下代码让它显示出来:
diff --git a/frameworks/base/packages/SystemUI/src/com/android/systemui/statu***ar/SystemBars.java b/frameworks/base/packages/SystemUI/src/com/android/systemui/statu***ar/SystemBars.java old mode 100644 new mode 100755 index da6265d..e8c6d84 --- a/frameworks/base/packages/SystemUI/src/com/android/systemui/statu***ar/SystemBars.java +++ b/frameworks/base/packages/SystemUI/src/com/android/systemui/statu***ar/SystemBars.java @@ -87,9 +87,9 @@ public class SystemBars extends SystemUI implements ServiceMonitor.Callbacks { private void createStatusBarFromConfig() { if (DEBUG) Log.d(TAG, "createStatusBarFromConfig"); String clsName = mContext.getString(R.string.config_statusBarComponent); - if ("box".equals(SystemProperties.get("ro.target.product", "tablet"))){ + /*if ("box".equals(SystemProperties.get("ro.target.product", "tablet"))){ clsName = "com.android.systemui.statu***ar.tv.TvStatusBar"; - } + }*/ if (clsName == null || clsName.length() == 0) { throw andLog("No status bar component configured", null); }
diff --git a/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java b/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java index 7dfc835..dd737ce 100755 --- a/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java +++ b/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java @@ -2088,7 +2088,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { int longSizeDp = longSize * DisplayMetrics.DENSITY_DEFAULT / density; // Allow the navigation bar to move on non-square small devices (phones). - mNavigationBarCanMove = width != height && shortSizeDp < 600; + mNavigationBarCanMove = false;// width != height && shortSizeDp < 600; mHasNavigationBar = res.getBoolean(com.android.internal.R.bool.config_showNavigationBar); @@ -4524,6 +4524,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { } private int navigationBarPosition(int displayWidth, int displayHeight, int displayRotation) { + if(true)return NAV_BAR_BOTTOM; if (mNavigationBarCanMove && displayWidth > displayHeight) { if (displayRotation == Surface.ROTATION_270) { return NAV_BAR_LEFT; @@ -8270,6 +8271,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { pw.print(" mForceClearedSystemUiFlags=0x"); pw.println(Integer.toHexString(mForceClearedSystemUiFlags)); } + pw.print(" token punctuation">); pw.print(mHasNavigationBar); if (mLastFocusNeedsMenu) { pw.print(prefix); pw.print("token punctuation">); pw.println(mLastFocusNeedsMenu); 5. 壁纸 默认使用黑背景图片
6. 扩展
diff --git a/packages/apps/Launcher3/Android.mk b/packages/apps/Launcher3/Android.mk old mode 100644 new mode 100755 diff --git a/packages/apps/Launcher3/AndroidManifest.xml b/packages/apps/Launcher3/AndroidManifest.xml old mode 100644 new mode 100755 index 6c5990d..7816dfb --- a/packages/apps/Launcher3/AndroidManifest.xml +++ b/packages/apps/Launcher3/AndroidManifest.xml @@ -52,6 +52,7 @@ android: android: + android:directBootAware="true" android: android: android: diff --git a/packages/apps/Launcher3/src/com/android/launcher3/LauncherAppWidgetHost.java b/packages/apps/Launcher3/src/com/android/launcher3/LauncherAppWidgetHost.java old mode 100644 new mode 100755 index d3e5350..a4c5a3b --- a/packages/apps/Launcher3/src/com/android/launcher3/LauncherAppWidgetHost.java +++ b/packages/apps/Launcher3/src/com/android/launcher3/LauncherAppWidgetHost.java @@ -62,7 +62,7 @@ public class LauncherAppWidgetHost extends AppWidgetHost { // have been established by this point, and we will end up populating the // widgets upon bind anyway. See issue 14255011 for more context. } else { - throw new RuntimeException(e); + //throw new RuntimeException(e); } } } diff --git a/packages/apps/Launcher3/src/com/android/launcher3/Q***ContainerView.java b/packages/apps/Launcher3/src/com/android/launcher3/Q***ContainerView.java index ffed8fc..39170d9 100755 --- a/packages/apps/Launcher3/src/com/android/launcher3/Q***ContainerView.java +++ b/packages/apps/Launcher3/src/com/android/launcher3/Q***ContainerView.java @@ -249,7 +249,10 @@ public class Q***ContainerView extends FrameLayout { public static AppWidgetProviderInfo getSearchWidgetProvider(Context context) { SearchManager searchManager = (SearchManager) context.getSystemService(Context.SEARCH_SERVICE); - ComponentName searchComponent = searchManager.getGlobalSearchActivity(); + ComponentName searchComponent = null; + try{ + searchComponent = searchManager.getGlobalSearchActivity(); + }catch(Exception ignore){} if (searchComponent == null) return null; String providerPkg = searchComponent.getPackageName(); 主要解决
Launcher3 崩溃 1970-01-01 08:01:05.414 2963-2963/com.android.launcher3 D/AndroidRuntime: Shutting down VM 1970-01-01 08:01:05.417 2963-2963/com.android.launcher3 E/AndroidRuntime: FATAL EXCEPTION: main Process: com.android.launcher3, PID: 2963 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.launcher3/com.android.launcher3.Launcher}: java.lang.RuntimeException: java.lang.IllegalStateException: User 0 must be unlocked for widgets to be available at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2666) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2727) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1478) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6121) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802) Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: User 0 must be unlocked for widgets to be available at com.android.launcher3.LauncherAppWidgetHost.startListening(LauncherAppWidgetHost.java:65) at com.android.launcher3.Launcher.onCreate(Launcher.java:417) at android.app.Activity.performCreate(Activity.java:6709) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2619) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2727) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1478) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6121) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802) Caused by: java.lang.IllegalStateException: User 0 must be unlocked for widgets to be available at android.os.Parcel.readException(Parcel.java:1692) at android.os.Parcel.readException(Parcel.java:1637) at com.android.internal.appwidget.IAppWidgetService$Stub$Proxy.startListening(IAppWidgetService.java:494) at android.appwidget.AppWidgetHost.startListening(AppWidgetHost.java:191) at com.android.launcher3.LauncherAppWidgetHost.startListening(LauncherAppWidgetHost.java:56) at com.android.launcher3.Launcher.onCreate(Launcher.java:417) at android.app.Activity.performCreate(Activity.java:6709) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2619) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2727) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1478) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6121) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802)
"User " + userId + " must be unlocked for widgets to be available"); |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
基于米尔瑞芯微RK3576核心板/开发板的人脸疲劳检测应用方案
739 浏览 0 评论
968 浏览 1 评论
856 浏览 1 评论
2075 浏览 1 评论
3322 浏览 1 评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-25 14:03 , Processed in 0.641520 second(s), Total 70, Slave 54 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号