[开发教程]HTC 4.4.x Sense 6.0 BlinkFeed 图片铺满 教程

文章目录

HTC 4.4.x Sense 6.0 BlinkFeed 图片铺满 教程 

如题,国行4.4.3以上Sense6的BlinkFeed新闻界面图片都未铺满,严重影响视觉!但是网上的修改方法都是针对4.4.2的,对4.4.3以上的系统无效,那么问题来了。。。话不多说,直接上教程!


操作步骤:

1.从手机或者ROM包中提取:system/priv-app/Prism.apk 并反编译。

2.打开文件 :com\htc\libmosaicview\FeedGridLayoutHelper.smali

然后搜索 “.method public static checkForNeedOverLay”(只搜索红色标注的代码)
你会发现以下一段内容

.method public static checkForNeedOverLay(Landroid/content/Context;Lcom/htc/libfeedframework/FeedData;I)Z
    .locals 7
    .param p0, "context"    # Landroid/content/Context;
    .param p1, "feedData"    # Lcom/htc/libfeedframework/FeedData;
    .param p2, "nAssignedColumn"    # I

    .prologue
    const/4 v6, 0x3

    const/4 v3, 0x0

    const/4 v2, 0x1

    .line 1205
    if-eqz p1, :cond_0

    invoke-virtual {p1, v2, v2}, Lcom/htc/libfeedframework/FeedData;->getViewType(II)I

    move-result v4

    const/16 v5, 0x68

    if-eq v4, v5, :cond_2

    :cond_0
    move v2, v3

    .line 1223
    :cond_1
    :goto_0
    return v2

    .line 1208
    :cond_2
    const-string/jumbo v4, "image_width"

    invoke-virtual {p1, v4, v3}, Lcom/htc/libfeedframework/FeedData;->getIntExtra(Ljava/lang/String;I)I

    move-result v1

    .line 1209
    .local v1, "nWidth":I
    const-string/jumbo v4, "image_height"

    invoke-virtual {p1, v4, v3}, Lcom/htc/libfeedframework/FeedData;->getIntExtra(Ljava/lang/String;I)I

    move-result v0

    .line 1210
    .local v0, "nHeight":I
    const/4 v4, 0x2

    if-ne p2, v4, :cond_3

    invoke-static {p0, p1, p2}, Lcom/htc/libmosaicview/FeedGridLayoutHelper;->getApproxLineCount(Landroid/content/Context;Lcom/htc/libfeedframework/FeedData;I)I

    move-result v4

    if-lt v4, v6, :cond_1

    .line 1213
    :cond_3
    if-ne p2, v2, :cond_5

    .line 1214
    if-eqz v1, :cond_1

    if-eqz v0, :cond_1

    .line 1217
    int-to-float v4, v1

    int-to-float v5, v0

    div-float/2addr v4, v5

    const v5, 0x3f99999a

    cmpl-float v4, v4, v5

    if-lez v4, :cond_4

    move v2, v3

    .line 1218
    goto :goto_0

    .line 1219
    :cond_4
    invoke-static {p0, p1, p2}, Lcom/htc/libmosaicview/FeedGridLayoutHelper;->getApproxLineCount(Landroid/content/Context;Lcom/htc/libfeedframework/FeedData;I)I

    move-result v4

    if-le v4, v6, :cond_1

    :cond_5
    move v2, v3

    .line 1223
    goto :goto_0
.end method

3.把以上整段代码替换为以下代码:

.method public static checkForNeedOverLay(Landroid/content/Context;Lcom/htc/libfeedframework/FeedData;I)Z
    .locals 1

    const/4 v0, 0x1

    return v0
.end method

4.最后回编译APK,然后替换掉ROM包或者手机:/system/priv-app里面的Prism.apk,修改好644权限,重启手机即可,或者重新刷机

原文链接:,转发请注明来源!