某APP无法使用谷歌服务问题

结论 APP未适配高版本安卓

于是我们在真机中测试先,发现RK3588开发板同样 , 但是 as的模拟器 确实可以的. 也就是这一块各家厂商都不一样
官网的资料显示,正确的做法应该是

我们添加后测试 ,发现无论什么设备都可以正常获取,查看下APP是否有申明vending的

结果发现 APP果然没有.

修复补丁

# frameworks/base/services/core/java/com/android/server/pm/AppsFilter.java

    /**
     * Returns true if the calling package should not be able to see the target package, false if no
     * filtering should be done.
     *
     * @param callingUid       the uid of the caller attempting to access a package
     * @param callingSetting   the setting attempting to access a package or null if it could not be
     *                         found
     * @param targetPkgSetting the package being accessed
     * @param userId           the user in which this access is being attempted
     */
    private boolean shouldFilterApplicationInternal(int callingUid, SettingBase callingSetting,
            PackageSetting targetPkgSetting, int targetUserId) {
        if (DEBUG_TRACING) {
            Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "shouldFilterApplicationInternal");
        }
        // 强制返回
        if (!SystemProperties.getBoolean(SYS_ENABLE_APPSFILTER, false)) return false;
        ...
    }
posted @ 2023-11-16 11:50  梦过无声  阅读(71)  评论(0)    收藏  举报