Modification of the Android application from a beginner to a beginner

Good afternoon!
I want to share with you the story of how I modified one of Adroid’s system applications, or rather its modification of LeWa OS . I met Android recently, just a month ago, and I’ll try to describe the whole course of my thoughts here, which will undoubtedly be useful to all those who want to improve Android, but don’t know where to start. I will try to make the post detailed, and therefore long.

For a start, a little history.


As soon as I received my first china phone, I decided to try different firmwares and as a result settled on Lewa. But her eyes were constantly appealed by one of her flaws - the contact list, or rather, fast navigation in English. There is not much information about this problem, so I started digging myself.




Set of tools


The first thing we need is to learn how to unpack programs. For this we need:
  • install java
  • APKTOOLS for unpacking * .apk
  • Read this post
  • Get the object of study. If you use Lewa, you need to pull /system/app/PIM.apk from the archive with the firmware or directly from the phone and all apk from the / system / framework / folder, usually it's framework-res.apk, lewa-res.apk and
    mediatek- res.apk. If you just want to practice, I can give my


Let's get started


So, the first thing we need is to parse our application, for this all apk must be copied to the folder with apktools. All apk that were in / system / framework / should be selected, hooked with the mouse and transferred to apktool-if.cmd thereby opening them using this bat'nik. PIM.apk must be opened in the same way with apktool-d.cmd. As a result, we get the folder with the unpacked application.

Learning the code


The first thing we need to understand is what and where to rule. Since my contact list is replete with Russian names, and in the speed of navigation, some English letters are reasonable to assume that the letters are simply hard-coded somewhere in the code, and are not dynamically generated based on what names you have in the contacts. Typically, such data is stored in the res folder, or rather in res \ values ​​\ arrays.xml, but in our case there is nothing similar there.
We think further - since it’s not there, it means there is somewhere in the code. All the code is in the smali dad, in fact there is not the source code, but the so-called Bytecode , and there are a lot of it. So where to look? I did so, in the res \ layout \ folder all the "windows" of our application are stored, what we need is somewhere in the contact list, so I randomly opened contact_list_content.xml и начал изучать.

contact_list_content.xml

Там меня заинтересовала строчка
. Что это за индексер такой?? Смотрим

alphabet_fast_indexer.xml

Тут ключевые стороки

Что это за элемент который прижимается к правой части экрана (android:layout_gravity=«right»), не то ли что мы ищем?
com.lewa.PIM.widget.AlphabetFastIndexer это ссылка на код PIM\smali\com\lewa\PIM\widget\AlphabetFastIndexer.smali, но изучать его неудобно, и тут на сцену выходит связка dex2jar-0.0.9.7 jd-gui-0.3.3.windows которые мы скачали из поста на форуме и так же научились ими пользоваться. Превращаем classes.dex в classes_dex2jar.jar и открываем через jd-gui.exe

AlphabetFastIndexer.smali Декомпилированный
package com.lewa.PIM.widget;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Typeface;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import java.util.ArrayList;
public class AlphabetFastIndexer extends View
{
  public static String[] b = { "★", "#", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" };
  private int choose = 0;
  private int mChooseColor;
  private boolean mHasFav = true;
  private ArrayList mLetters = new ArrayList();
  private int mPaddingBottom;
  private int mTextsize;
  OnTouchingLetterChangedListener onTouchingLetterChangedListener;
  private Paint paint = new Paint();
  private boolean showBkg = false;
  public AlphabetFastIndexer(Context paramContext)
  {
    super(paramContext);
    init(paramContext);
    setHasFavorite(false);
  }
  public AlphabetFastIndexer(Context paramContext, AttributeSet paramAttributeSet)
  {
    super(paramContext, paramAttributeSet);
    init(paramContext);
    setHasFavorite(false);
  }
  public AlphabetFastIndexer(Context paramContext, AttributeSet paramAttributeSet, int paramInt)
  {
    super(paramContext, paramAttributeSet, paramInt);
    init(paramContext);
    setHasFavorite(false);
  }
  private void init(Context paramContext)
  {
    this.mChooseColor = paramContext.getResources().getColor(17170450);
    this.mTextsize = paramContext.getResources().getDimensionPixelSize(2131361937);
    this.mPaddingBottom = paramContext.getResources().getDimensionPixelSize(2131361938);
  }
  public boolean dispatchTouchEvent(MotionEvent paramMotionEvent)
  {
    int i = paramMotionEvent.getAction();
    int j = (int)(paramMotionEvent.getY() / getHeight() * this.mLetters.size());
    switch (i)
    {
    default:
      return true;
    case 0:
      this.showBkg = true;
    case 2:
      drawThumb(j);
      return true;
    case 1:
    }
    this.showBkg = false;
    invalidate();
    return true;
  }
  public void drawThumb(int paramInt)
  {
    OnTouchingLetterChangedListener localOnTouchingLetterChangedListener = this.onTouchingLetterChangedListener;
    if ((this.choose != paramInt) && (localOnTouchingLetterChangedListener != null) && (paramInt >= 0) && (paramInt < this.mLetters.size()))
    {
      if (localOnTouchingLetterChangedListener != null)
        localOnTouchingLetterChangedListener.onTouchingLetterChanged((String)this.mLetters.get(paramInt));
      this.choose = paramInt;
      invalidate();
    }
  }
  public void drawThumb(String paramString)
  {
    if ((paramString != null) && (!paramString.equals(this.mLetters.get(this.choose))))
    {
      int i = this.mLetters.indexOf(paramString);
      if (i == -1)
        i = 0;
      if (this.choose != i)
      {
        this.choose = i;
        invalidate();
      }
    }
  }
  protected void onDraw(Canvas paramCanvas)
  {
    super.onDraw(paramCanvas);
    if (this.showBkg)
      paramCanvas.drawColor(Color.parseColor("#4C000000"));
    while (true)
    {
      int i = getHeight();
      int j = getWidth();
      int k = this.mLetters.size();
      int m = i / k;
      for (int n = 0; n < k; n++)
      {
        this.paint.setColor(-1);
        this.paint.setTypeface(Typeface.DEFAULT_BOLD);
        this.paint.setAntiAlias(true);
        this.paint.setTextSize(this.mTextsize);
        if (n == this.choose)
        {
          this.paint.setColor(this.mChooseColor);
          this.paint.setFakeBoldText(true);
        }
        String str = (String)this.mLetters.get(n);
        paramCanvas.drawText(str, j / 2 - this.paint.measureText(str) / 2.0F, m + m * n, this.paint);
        this.paint.reset();
      }
      paramCanvas.drawColor(Color.parseColor("#26000000"));
    }
  }
  protected void onMeasure(int paramInt1, int paramInt2)
  {
    if (this.mHasFav)
      paramInt2 -= this.mPaddingBottom;
    setMeasuredDimension(paramInt1, paramInt2);
  }
  public boolean onTouchEvent(MotionEvent paramMotionEvent)
  {
    return super.onTouchEvent(paramMotionEvent);
  }
  public void setHasFavorite(boolean paramBoolean)
  {
    int k;
    if (this.mHasFav != paramBoolean)
    {
      this.mHasFav = paramBoolean;
      this.mLetters.clear();
      String[] arrayOfString = b;
      int i = arrayOfString.length;
      int j = 0;
      if (j < i)
      {
        String str = arrayOfString[j];
        if ((!paramBoolean) && (str.equals("★")));
        while (true)
        {
          j++;
          break;
          this.mLetters.add(str);
        }
      }
      if (this.choose != 0)
      {
        if (!paramBoolean)
          break label117;
        k = 1 + this.choose;
        this.choose = k;
      }
      if (this.choose >= 0)
        break label128;
      this.choose = 0;
    }
    while (true)
    {
      requestLayout();
      return;
      label117: k = -1 + this.choose;
      break;
      label128: if (this.choose >= this.mLetters.size())
        this.choose = (-1 + this.mLetters.size());
    }
  }
  public void setOnTouchingLetterChangedListener(OnTouchingLetterChangedListener paramOnTouchingLetterChangedListener)
  {
    this.onTouchingLetterChangedListener = paramOnTouchingLetterChangedListener;
  }
  public static abstract interface OnTouchingLetterChangedListener
  {
    public abstract void onTouchingLetterChanged(String paramString);
  }
}

Here it is - public static String [] b = {"★", "#", "A", "B", "C", "D", "E", "F", "G", "H ”,“ I ”,“ J ”,“ K ”,“ L ”,“ M ”,“ N ”,“ O ”,“ P ”,“ Q ”,“ R ”,“ S ”,“ T ”, “U”, “V”, “W”, “X”, “Y”, “Z”}; !!! But you cannot edit right here, the decompiled code is approximate, and it is unlikely that it will be assembled back without errors, especially since we do not have the rest of the program. So edit the byte code in PIM \ smali \ com \ lewa \ PIM \ widget \ AlphabetFastIndexer.smali
AlphabetFastIndexer.smali
.class public Lcom/lewa/PIM/widget/AlphabetFastIndexer;
.super Landroid/view/View;
.source "AlphabetFastIndexer.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/lewa/PIM/widget/AlphabetFastIndexer$OnTouchingLetterChangedListener;
    }
.end annotation
# static fields
.field public static b:[Ljava/lang/String;
# instance fields
.field private choose:I
.field private mChooseColor:I
.field private mHasFav:Z
.field private mLetters:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field
.field private mPaddingBottom:I
.field private mTextsize:I
.field onTouchingLetterChangedListener:Lcom/lewa/PIM/widget/AlphabetFastIndexer$OnTouchingLetterChangedListener;
.field private paint:Landroid/graphics/Paint;
.field private showBkg:Z
# direct methods
.method static constructor ()V
    .locals 3
    .prologue
    .line 19
    const/16 v0, 0x1c
    new-array v0, v0, [Ljava/lang/String;
    const/4 v1, 0x0
    const-string v2, "\u2605"
    aput-object v2, v0, v1
    const/4 v1, 0x1
    const-string v2, "#"
    aput-object v2, v0, v1
    const/4 v1, 0x2
    const-string v2, "A"
    aput-object v2, v0, v1
    const/4 v1, 0x3
    const-string v2, "B"
    aput-object v2, v0, v1
    const/4 v1, 0x4
    const-string v2, "C"
    aput-object v2, v0, v1
    const/4 v1, 0x5
    const-string v2, "D"
    aput-object v2, v0, v1
    const/4 v1, 0x6
    const-string v2, "E"
    aput-object v2, v0, v1
    const/4 v1, 0x7
    const-string v2, "F"
    aput-object v2, v0, v1
    const/16 v1, 0x8
    const-string v2, "G"
    aput-object v2, v0, v1
    const/16 v1, 0x9
    const-string v2, "H"
    aput-object v2, v0, v1
    const/16 v1, 0xa
    const-string v2, "I"
    aput-object v2, v0, v1
    const/16 v1, 0xb
    const-string v2, "J"
    aput-object v2, v0, v1
    const/16 v1, 0xc
    const-string v2, "K"
    aput-object v2, v0, v1
    const/16 v1, 0xd
    const-string v2, "L"
    aput-object v2, v0, v1
    const/16 v1, 0xe
    const-string v2, "M"
    aput-object v2, v0, v1
    const/16 v1, 0xf
    const-string v2, "N"
    aput-object v2, v0, v1
    const/16 v1, 0x10
    const-string v2, "O"
    aput-object v2, v0, v1
    const/16 v1, 0x11
    const-string v2, "P"
    aput-object v2, v0, v1
    const/16 v1, 0x12
    const-string v2, "Q"
    aput-object v2, v0, v1
    const/16 v1, 0x13
    const-string v2, "R"
    aput-object v2, v0, v1
    const/16 v1, 0x14
    const-string v2, "S"
    aput-object v2, v0, v1
    const/16 v1, 0x15
    const-string v2, "T"
    aput-object v2, v0, v1
    const/16 v1, 0x16
    const-string v2, "U"
    aput-object v2, v0, v1
    const/16 v1, 0x17
    const-string v2, "V"
    aput-object v2, v0, v1
    const/16 v1, 0x18
    const-string v2, "W"
    aput-object v2, v0, v1
    const/16 v1, 0x19
    const-string v2, "X"
    aput-object v2, v0, v1
    const/16 v1, 0x1a
    const-string v2, "Y"
    aput-object v2, v0, v1
    const/16 v1, 0x1b
    const-string v2, "Z"
    aput-object v2, v0, v1
    sput-object v0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->b:[Ljava/lang/String;
    return-void
.end method
.method public constructor (Landroid/content/Context;)V
    .locals 2
    .parameter "context"
    .prologue
    const/4 v1, 0x0
    .line 44
    invoke-direct {p0, p1}, Landroid/view/View;->(Landroid/content/Context;)V
    .line 22
    iput v1, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->choose:I
    .line 23
    new-instance v0, Landroid/graphics/Paint;
    invoke-direct {v0}, Landroid/graphics/Paint;->()V
    iput-object v0, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->paint:Landroid/graphics/Paint;
    .line 27
    const/4 v0, 0x1
    iput-boolean v0, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->mHasFav:Z
    .line 29
    new-instance v0, Ljava/util/ArrayList;
    invoke-direct {v0}, Ljava/util/ArrayList;->()V
    iput-object v0, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->mLetters:Ljava/util/ArrayList;
    .line 112
    iput-boolean v1, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->showBkg:Z
    .line 45
    invoke-direct {p0, p1}, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->init(Landroid/content/Context;)V
    .line 46
    invoke-virtual {p0, v1}, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->setHasFavorite(Z)V
    .line 47
    return-void
.end method
.method public constructor (Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 2
    .parameter "context"
    .parameter "attrs"
    .prologue
    const/4 v1, 0x0
    .line 38
    invoke-direct {p0, p1, p2}, Landroid/view/View;->(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .line 22
    iput v1, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->choose:I
    .line 23
    new-instance v0, Landroid/graphics/Paint;
    invoke-direct {v0}, Landroid/graphics/Paint;->()V
    iput-object v0, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->paint:Landroid/graphics/Paint;
    .line 27
    const/4 v0, 0x1
    iput-boolean v0, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->mHasFav:Z
    .line 29
    new-instance v0, Ljava/util/ArrayList;
    invoke-direct {v0}, Ljava/util/ArrayList;->()V
    iput-object v0, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->mLetters:Ljava/util/ArrayList;
    .line 112
    iput-boolean v1, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->showBkg:Z
    .line 39
    invoke-direct {p0, p1}, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->init(Landroid/content/Context;)V
    .line 40
    invoke-virtual {p0, v1}, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->setHasFavorite(Z)V
    .line 41
    return-void
.end method
.method public constructor (Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 2
    .parameter "context"
    .parameter "attrs"
    .parameter "defStyle"
    .prologue
    const/4 v1, 0x0
    .line 32
    invoke-direct {p0, p1, p2, p3}, Landroid/view/View;->(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .line 22
    iput v1, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->choose:I
    .line 23
    new-instance v0, Landroid/graphics/Paint;
    invoke-direct {v0}, Landroid/graphics/Paint;->()V
    iput-object v0, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->paint:Landroid/graphics/Paint;
    .line 27
    const/4 v0, 0x1
    iput-boolean v0, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->mHasFav:Z
    .line 29
    new-instance v0, Ljava/util/ArrayList;
    invoke-direct {v0}, Ljava/util/ArrayList;->()V
    iput-object v0, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->mLetters:Ljava/util/ArrayList;
    .line 112
    iput-boolean v1, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->showBkg:Z
    .line 33
    invoke-direct {p0, p1}, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->init(Landroid/content/Context;)V
    .line 34
    invoke-virtual {p0, v1}, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->setHasFavorite(Z)V
    .line 35
    return-void
.end method
.method private init(Landroid/content/Context;)V
    .locals 2
    .parameter "context"
    .prologue
    .line 50
    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
    move-result-object v0
    const v1, 0x1060012
    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getColor(I)I
    move-result v0
    iput v0, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->mChooseColor:I
    .line 51
    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
    move-result-object v0
    const v1, 0x7f0a0091
    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
    move-result v0
    iput v0, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->mTextsize:I
    .line 52
    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
    move-result-object v0
    const v1, 0x7f0a0092
    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
    move-result v0
    iput v0, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->mPaddingBottom:I
    .line 53
    return-void
.end method
# virtual methods
.method public dispatchTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 6
    .parameter "event"
    .prologue
    const/4 v5, 0x1
    .line 116
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
    move-result v0
    .line 117
    .local v0, action:I
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F
    move-result v2
    .line 118
    .local v2, y:F
    invoke-virtual {p0}, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->getHeight()I
    move-result v3
    int-to-float v3, v3
    div-float v3, v2, v3
    iget-object v4, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->mLetters:Ljava/util/ArrayList;
    invoke-virtual {v4}, Ljava/util/ArrayList;->size()I
    move-result v4
    int-to-float v4, v4
    mul-float/2addr v3, v4
    float-to-int v1, v3
    .line 120
    .local v1, c:I
    packed-switch v0, :pswitch_data_0
    .line 143
    :goto_0
    return v5
    .line 122
    :pswitch_0
    iput-boolean v5, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->showBkg:Z
    .line 135
    :pswitch_1
    invoke-virtual {p0, v1}, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->drawThumb(I)V
    goto :goto_0
    .line 138
    :pswitch_2
    const/4 v3, 0x0
    iput-boolean v3, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->showBkg:Z
    .line 140
    invoke-virtual {p0}, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->invalidate()V
    goto :goto_0
    .line 120
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_2
        :pswitch_1
    .end packed-switch
.end method
.method public drawThumb(I)V
    .locals 2
    .parameter "position"
    .prologue
    .line 152
    iget-object v0, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->onTouchingLetterChangedListener:Lcom/lewa/PIM/widget/AlphabetFastIndexer$OnTouchingLetterChangedListener;
    .line 153
    .local v0, listener:Lcom/lewa/PIM/widget/AlphabetFastIndexer$OnTouchingLetterChangedListener;
    iget v1, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->choose:I
    if-eq v1, p1, :cond_1
    if-eqz v0, :cond_1
    .line 154
    if-ltz p1, :cond_1
    iget-object v1, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->mLetters:Ljava/util/ArrayList;
    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I
    move-result v1
    if-ge p1, v1, :cond_1
    .line 155
    if-eqz v0, :cond_0
    .line 156
    iget-object v1, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->mLetters:Ljava/util/ArrayList;
    invoke-virtual {v1, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
    move-result-object v1
    check-cast v1, Ljava/lang/String;
    invoke-interface {v0, v1}, Lcom/lewa/PIM/widget/AlphabetFastIndexer$OnTouchingLetterChangedListener;->onTouchingLetterChanged(Ljava/lang/String;)V
    .line 158
    :cond_0
    iput p1, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->choose:I
    .line 159
    invoke-virtual {p0}, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->invalidate()V
    .line 162
    :cond_1
    return-void
.end method
.method public drawThumb(Ljava/lang/String;)V
    .locals 3
    .parameter "letter"
    .prologue
    .line 165
    if-eqz p1, :cond_1
    iget-object v1, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->mLetters:Ljava/util/ArrayList;
    iget v2, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->choose:I
    invoke-virtual {v1, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
    move-result-object v1
    invoke-virtual {p1, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
    move-result v1
    if-nez v1, :cond_1
    .line 166
    iget-object v1, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->mLetters:Ljava/util/ArrayList;
    invoke-virtual {v1, p1}, Ljava/util/ArrayList;->indexOf(Ljava/lang/Object;)I
    move-result v0
    .line 167
    .local v0, i:I
    const/4 v1, -0x1
    if-ne v0, v1, :cond_0
    const/4 v0, 0x0
    .line 168
    :cond_0
    iget v1, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->choose:I
    if-eq v1, v0, :cond_1
    .line 169
    iput v0, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->choose:I
    .line 170
    invoke-virtual {p0}, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->invalidate()V
    .line 173
    .end local v0           #i:I
    :cond_1
    return-void
.end method
.method protected onDraw(Landroid/graphics/Canvas;)V
    .locals 12
    .parameter "canvas"
    .prologue
    const/4 v11, 0x1
    .line 83
    invoke-super {p0, p1}, Landroid/view/View;->onDraw(Landroid/graphics/Canvas;)V
    .line 84
    iget-boolean v8, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->showBkg:Z
    if-eqz v8, :cond_1
    .line 85
    const-string v8, "#4C000000"
    invoke-static {v8}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I
    move-result v8
    invoke-virtual {p1, v8}, Landroid/graphics/Canvas;->drawColor(I)V
    .line 90
    :goto_0
    invoke-virtual {p0}, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->getHeight()I
    move-result v0
    .line 91
    .local v0, height:I
    invoke-virtual {p0}, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->getWidth()I
    move-result v5
    .line 92
    .local v5, width:I
    iget-object v8, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->mLetters:Ljava/util/ArrayList;
    invoke-virtual {v8}, Ljava/util/ArrayList;->size()I
    move-result v4
    .line 93
    .local v4, size:I
    div-int v3, v0, v4
    .line 94
    .local v3, singleHeight:I
    const/4 v1, 0x0
    .local v1, i:I
    :goto_1
    if-ge v1, v4, :cond_2
    .line 95
    iget-object v8, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->paint:Landroid/graphics/Paint;
    const/4 v9, -0x1
    invoke-virtual {v8, v9}, Landroid/graphics/Paint;->setColor(I)V
    .line 96
    iget-object v8, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->paint:Landroid/graphics/Paint;
    sget-object v9, Landroid/graphics/Typeface;->DEFAULT_BOLD:Landroid/graphics/Typeface;
    invoke-virtual {v8, v9}, Landroid/graphics/Paint;->setTypeface(Landroid/graphics/Typeface;)Landroid/graphics/Typeface;
    .line 97
    iget-object v8, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->paint:Landroid/graphics/Paint;
    invoke-virtual {v8, v11}, Landroid/graphics/Paint;->setAntiAlias(Z)V
    .line 98
    iget-object v8, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->paint:Landroid/graphics/Paint;
    iget v9, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->mTextsize:I
    int-to-float v9, v9
    invoke-virtual {v8, v9}, Landroid/graphics/Paint;->setTextSize(F)V
    .line 99
    iget v8, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->choose:I
    if-ne v1, v8, :cond_0
    .line 100
    iget-object v8, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->paint:Landroid/graphics/Paint;
    iget v9, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->mChooseColor:I
    invoke-virtual {v8, v9}, Landroid/graphics/Paint;->setColor(I)V
    .line 101
    iget-object v8, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->paint:Landroid/graphics/Paint;
    invoke-virtual {v8, v11}, Landroid/graphics/Paint;->setFakeBoldText(Z)V
    .line 103
    :cond_0
    iget-object v8, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->mLetters:Ljava/util/ArrayList;
    invoke-virtual {v8, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
    move-result-object v2
    check-cast v2, Ljava/lang/String;
    .line 104
    .local v2, letterStr:Ljava/lang/String;
    div-int/lit8 v8, v5, 0x2
    int-to-float v8, v8
    iget-object v9, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->paint:Landroid/graphics/Paint;
    invoke-virtual {v9, v2}, Landroid/graphics/Paint;->measureText(Ljava/lang/String;)F
    move-result v9
    const/high16 v10, 0x4000
    div-float/2addr v9, v10
    sub-float v6, v8, v9
    .line 105
    .local v6, xPos:F
    mul-int v8, v3, v1
    add-int/2addr v8, v3
    int-to-float v7, v8
    .line 106
    .local v7, yPos:F
    iget-object v8, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->paint:Landroid/graphics/Paint;
    invoke-virtual {p1, v2, v6, v7, v8}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V
    .line 107
    iget-object v8, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->paint:Landroid/graphics/Paint;
    invoke-virtual {v8}, Landroid/graphics/Paint;->reset()V
    .line 94
    add-int/lit8 v1, v1, 0x1
    goto :goto_1
    .line 87
    .end local v0           #height:I
    .end local v1           #i:I
    .end local v2           #letterStr:Ljava/lang/String;
    .end local v3           #singleHeight:I
    .end local v4           #size:I
    .end local v5           #width:I
    .end local v6           #xPos:F
    .end local v7           #yPos:F
    :cond_1
    const-string v8, "#26000000"
    invoke-static {v8}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I
    move-result v8
    invoke-virtual {p1, v8}, Landroid/graphics/Canvas;->drawColor(I)V
    goto :goto_0
    .line 110
    .restart local v0       #height:I
    .restart local v1       #i:I
    .restart local v3       #singleHeight:I
    .restart local v4       #size:I
    .restart local v5       #width:I
    :cond_2
    return-void
.end method
.method protected onMeasure(II)V
    .locals 1
    .parameter "widthMeasureSpec"
    .parameter "heightMeasureSpec"
    .prologue
    .line 77
    iget-boolean v0, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->mHasFav:Z
    if-eqz v0, :cond_0
    iget v0, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->mPaddingBottom:I
    sub-int/2addr p2, v0
    .end local p2
    :cond_0
    invoke-virtual {p0, p1, p2}, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->setMeasuredDimension(II)V
    .line 78
    return-void
.end method
.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 1
    .parameter "event"
    .prologue
    .line 148
    invoke-super {p0, p1}, Landroid/view/View;->onTouchEvent(Landroid/view/MotionEvent;)Z
    move-result v0
    return v0
.end method
.method public setHasFavorite(Z)V
    .locals 6
    .parameter "hasFav"
    .prologue
    .line 56
    iget-boolean v4, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->mHasFav:Z
    if-eq v4, p1, :cond_4
    .line 57
    iput-boolean p1, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->mHasFav:Z
    .line 58
    iget-object v4, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->mLetters:Ljava/util/ArrayList;
    invoke-virtual {v4}, Ljava/util/ArrayList;->clear()V
    .line 59
    sget-object v0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->b:[Ljava/lang/String;
    .local v0, arr$:[Ljava/lang/String;
    array-length v2, v0
    .local v2, len$:I
    const/4 v1, 0x0
    .local v1, i$:I
    :goto_0
    if-ge v1, v2, :cond_1
    aget-object v3, v0, v1
    .line 60
    .local v3, letter:Ljava/lang/String;
    if-nez p1, :cond_0
    const-string v4, "\u2605"
    invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
    move-result v4
    if-eqz v4, :cond_0
    .line 59
    :goto_1
    add-int/lit8 v1, v1, 0x1
    goto :goto_0
    .line 62
    :cond_0
    iget-object v4, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->mLetters:Ljava/util/ArrayList;
    invoke-virtual {v4, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
    goto :goto_1
    .line 64
    .end local v3           #letter:Ljava/lang/String;
    :cond_1
    iget v4, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->choose:I
    if-eqz v4, :cond_2
    if-eqz p1, :cond_5
    iget v4, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->choose:I
    add-int/lit8 v4, v4, 0x1
    :goto_2
    iput v4, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->choose:I
    .line 65
    :cond_2
    iget v4, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->choose:I
    if-gez v4, :cond_6
    const/4 v4, 0x0
    iput v4, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->choose:I
    .line 68
    :cond_3
    :goto_3
    invoke-virtual {p0}, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->requestLayout()V
    .line 70
    .end local v0           #arr$:[Ljava/lang/String;
    .end local v1           #i$:I
    .end local v2           #len$:I
    :cond_4
    return-void
    .line 64
    .restart local v0       #arr$:[Ljava/lang/String;
    .restart local v1       #i$:I
    .restart local v2       #len$:I
    :cond_5
    iget v4, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->choose:I
    add-int/lit8 v4, v4, -0x1
    goto :goto_2
    .line 66
    :cond_6
    iget v4, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->choose:I
    iget-object v5, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->mLetters:Ljava/util/ArrayList;
    invoke-virtual {v5}, Ljava/util/ArrayList;->size()I
    move-result v5
    if-lt v4, v5, :cond_3
    iget-object v4, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->mLetters:Ljava/util/ArrayList;
    invoke-virtual {v4}, Ljava/util/ArrayList;->size()I
    move-result v4
    add-int/lit8 v4, v4, -0x1
    iput v4, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->choose:I
    goto :goto_3
.end method
.method public setOnTouchingLetterChangedListener(Lcom/lewa/PIM/widget/AlphabetFastIndexer$OnTouchingLetterChangedListener;)V
    .locals 0
    .parameter "onTouchingLetterChangedListener"
    .prologue
    .line 181
    iput-object p1, p0, Lcom/lewa/PIM/widget/AlphabetFastIndexer;->onTouchingLetterChangedListener:Lcom/lewa/PIM/widget/AlphabetFastIndexer$OnTouchingLetterChangedListener;
    .line 182
    return-void
.end method

Here we are interested in the next section
AlphabetFastIndexer.smali
const/16 v0, 0x1c
    new-array v0, v0, [Ljava/lang/String;
    const/4 v1, 0x0
    const-string v2, "\u2605"
    aput-object v2, v0, v1
    const/4 v1, 0x1
    const-string v2, "#"
    aput-object v2, v0, v1
    const/4 v1, 0x2
    const-string v2, "A"
    aput-object v2, v0, v1
    const/4 v1, 0x3
    const-string v2, "B"
    aput-object v2, v0, v1
    const/4 v1, 0x4
    const-string v2, "C"
    aput-object v2, v0, v1
    const/4 v1, 0x5
    const-string v2, "D"
    aput-object v2, v0, v1
    const/4 v1, 0x6
    const-string v2, "E"
    aput-object v2, v0, v1
    const/4 v1, 0x7
    const-string v2, "F"
    aput-object v2, v0, v1
    const/16 v1, 0x8
    const-string v2, "G"
    aput-object v2, v0, v1
    const/16 v1, 0x9
    const-string v2, "H"
    aput-object v2, v0, v1
    const/16 v1, 0xa
    const-string v2, "I"
    aput-object v2, v0, v1
    const/16 v1, 0xb
    const-string v2, "J"
    aput-object v2, v0, v1
    const/16 v1, 0xc
    const-string v2, "K"
    aput-object v2, v0, v1
    const/16 v1, 0xd
    const-string v2, "L"
    aput-object v2, v0, v1
    const/16 v1, 0xe
    const-string v2, "M"
    aput-object v2, v0, v1
    const/16 v1, 0xf
    const-string v2, "N"
    aput-object v2, v0, v1
    const/16 v1, 0x10
    const-string v2, "O"
    aput-object v2, v0, v1
    const/16 v1, 0x11
    const-string v2, "P"
    aput-object v2, v0, v1
    const/16 v1, 0x12
    const-string v2, "Q"
    aput-object v2, v0, v1
    const/16 v1, 0x13
    const-string v2, "R"
    aput-object v2, v0, v1
    const/16 v1, 0x14
    const-string v2, "S"
    aput-object v2, v0, v1
    const/16 v1, 0x15
    const-string v2, "T"
    aput-object v2, v0, v1
    const/16 v1, 0x16
    const-string v2, "U"
    aput-object v2, v0, v1
    const/16 v1, 0x17
    const-string v2, "V"
    aput-object v2, v0, v1
    const/16 v1, 0x18
    const-string v2, "W"
    aput-object v2, v0, v1
    const/16 v1, 0x19
    const-string v2, "X"
    aput-object v2, v0, v1
    const/16 v1, 0x1a
    const-string v2, "Y"
    aput-object v2, v0, v1
    const/16 v1, 0x1b
    const-string v2, "Z"
    aput-object v2, v0, v1


Everything is clear here, we change the letters to Russian, and since there are more Russian letters, you will have to add a few lines of the type
    const/16 v1, 0x1b 
    const-string v2, ""
    aput-object v2, v0, v1

const / 16 v1, 0x1b is the serial number of the letter, it will also grow with each new letter. Also in the beginning you might notice a runoff
const/16 v0, 0x1c

This is the size of the entire array, since we added a few letters, we also need to change it. I added 3 letters to this in my case it must be changed to
const/16 v0, 0x1f

As a result, I got the following code:
AlphabetFastIndexer.smali Fixed
const/16 v0, 0x1f
    new-array v0, v0, [Ljava/lang/String;
    const/4 v1, 0x0
    const-string v2, "\u2605"
    aput-object v2, v0, v1
    const/4 v1, 0x1
    const-string v2, "#"
    aput-object v2, v0, v1
    const/4 v1, 0x2
    const-string v2, "\u0410"
    aput-object v2, v0, v1
    const/4 v1, 0x3
    const-string v2, "\u0411"
    aput-object v2, v0, v1
    const/4 v1, 0x4
    const-string v2, "\u0412"
    aput-object v2, v0, v1
    const/4 v1, 0x5
    const-string v2, "\u0413"
    aput-object v2, v0, v1
    const/4 v1, 0x6
    const-string v2, "\u0414"
    aput-object v2, v0, v1
    const/4 v1, 0x7
    const-string v2, "\u0415"
    aput-object v2, v0, v1
    const/16 v1, 0x8
    const-string v2, "\u0416"
    aput-object v2, v0, v1
    const/16 v1, 0x9
    const-string v2, "\u0417"
    aput-object v2, v0, v1
    const/16 v1, 0xa
    const-string v2, "\u0418"
    aput-object v2, v0, v1
    const/16 v1, 0xb
    const-string v2, "\u041a"
    aput-object v2, v0, v1
    const/16 v1, 0xc
    const-string v2, "\u041b"
    aput-object v2, v0, v1
    const/16 v1, 0xd
    const-string v2, "\u041c"
    aput-object v2, v0, v1
    const/16 v1, 0xe
    const-string v2, "\u041d"
    aput-object v2, v0, v1
    const/16 v1, 0xf
    const-string v2, "\u041e"
    aput-object v2, v0, v1
    const/16 v1, 0x10
    const-string v2, "\u041f"
    aput-object v2, v0, v1
    const/16 v1, 0x11
    const-string v2, "\u0420"
    aput-object v2, v0, v1
    const/16 v1, 0x12
    const-string v2, "\u0421"
    aput-object v2, v0, v1
    const/16 v1, 0x13
    const-string v2, "\u0422"
    aput-object v2, v0, v1
    const/16 v1, 0x14
    const-string v2, "\u0423"
    aput-object v2, v0, v1
    const/16 v1, 0x15
    const-string v2, "\u0424"
    aput-object v2, v0, v1
    const/16 v1, 0x16
    const-string v2, "\u0425"
    aput-object v2, v0, v1
    const/16 v1, 0x17
    const-string v2, "\u0426"
    aput-object v2, v0, v1
    const/16 v1, 0x18
    const-string v2, "\u0427"
    aput-object v2, v0, v1
    const/16 v1, 0x19
    const-string v2, "\u0428"
    aput-object v2, v0, v1
    const/16 v1, 0x1a
    const-string v2, "\u0429"
    aput-object v2, v0, v1
    const/16 v1, 0x1b
    const-string v2, "\u042b"
    aput-object v2, v0, v1
    const/16 v1, 0x1c
    const-string v2, "\u042d"
    aput-object v2, v0, v1
    const/16 v1, 0x1d
    const-string v2, "\u042e"
    aput-object v2, v0, v1
    const/16 v1, 0x1e
    const-string v2, "\u042f"
    aput-object v2, v0, v1


"\ u042f" is the "Unicode" of our letters, so it’s more reliable)

After that, you can try to build the application by dragging the PIM folder to apktool-b.cmd, after a while PIM \ dist \ PIM.apk will appear

Now you can replace it with your PIM.apk phone how to do this is beyond the scope of this article. I can only say that it is possible to flash my patch , after replacing PIM.apk in it with my own.

PROFIT?


Not really ... Yes, the letters are Russian, but the search doesn’t work!
We study further the decompiled AlphabetFastIndexer.smali
there is nothing more interesting except
public static abstract interface OnTouchingLetterChangedListener
  {
    public abstract void onTouchingLetterChanged(String paramString);
  }

Although in theory it does not belong to our problem, I still decided to see what it is. public static abstract says that this interface is implemented somewhere in another file. We search and find a couple of files where OnTouchingLetterChangedListener is found :
PIM \ smali \ com \ lewa \ PIM \ contacts \ list \ ContactEntryListFragment.smali
PIM \ smali \ com \ lewa \ PIM \ mms \ choiceContacts \ MmsChoicePhoneNumbersContacts.smali


They are only long enough so they what interests us
ContactEntryListFragment.smali
Runnable FirstLettersRunnable = new Runnable()
  {
    public void run()
    {
      ContactEntryListFragment.this.marrFirstCharacters.clear();
      ContactEntryListFragment.this.marrFirstLetters.clear();
      Cursor localCursor = ContactEntryListFragment.this.mAdapter.getCursor(0);
      CharArrayBuffer localCharArrayBuffer1;
      CharArrayBuffer localCharArrayBuffer2;
      if ((localCursor != null) && (!localCursor.isClosed()) && (localCursor.getCount() > 0))
      {
        localCursor.moveToFirst();
        boolean bool = ContactEntryListFragment.this.mAdapter instanceof ContactEntryListAdapter;
        int i = 0;
        int j = 0;
        if (bool)
          j = ContactEntryListFragment.this.mAdapter.getStarredCount();
        do
        {
          localCharArrayBuffer1 = new CharArrayBuffer(128);
          localCharArrayBuffer2 = new CharArrayBuffer(128);
          if ((i >= j) || (localCursor.getInt(12) != 1))
            break;
          localCharArrayBuffer1.data[0] = '★';
          int k = 9733;
          i++;
          ContactEntryListFragment.this.marrFirstLetters.add(String.valueOf(k));
          ContactEntryListFragment.this.marrFirstCharacters.add(String.copyValueOf(localCharArrayBuffer1.data, 0, 1));
        }
        while (localCursor.moveToNext());
        if (ContactEntryListFragment.this.mAdapter != null)
          ContactEntryListFragment.this.mAdapter.notifyDataSetChanged();
      }
      ContactEntryListFragment.access$302(ContactEntryListFragment.this, true);
      return;
      localCursor.copyStringToBuffer(1, localCharArrayBuffer1);
      if ((localCharArrayBuffer1.data[0] >= 'a') && (localCharArrayBuffer1.data[0] <= 'z'))
      {
        char[] arrayOfChar = localCharArrayBuffer1.data;
        arrayOfChar[0] = ((char)('¢' + arrayOfChar[0]));
      }
      while (true)
      {
        localCursor.copyStringToBuffer(10, localCharArrayBuffer2);
        int m = Character.toUpperCase(localCharArrayBuffer2.data[0]);
        if ((m >= 65) && (m <= 90))
          break;
        m = 35;
        break;
        if ((localCharArrayBuffer1.data[0] < '€') && ((localCharArrayBuffer1.data[0] < 'A') || (localCharArrayBuffer1.data[0] > 'Z')))
          localCharArrayBuffer1.data[0] = '#';
      }
    }
  };


I don’t understand how and where this function is called from, but it is a fact - it collects the first letters of contacts and everything that does not apply to English letters equates to # And therefore nothing works for us ... specifically, this function is located in the "subfile" PIM \ smali \ com \ lewa \ PIM \ contacts \ list \ ContactEntryListFragment $ 3.smali

There you need to find a site
.method public run()V
    .locals 13
    .prologue
    .local p0, this:Lcom/lewa/PIM/contacts/list/ContactEntryListFragment$3;,"Lcom/lewa/PIM/contacts/list/ContactEntryListFragment.3;"
    const/16 v12, 0x5a
    const/16 v11, 0x41

0x41 and 0x5a are the letters 'A' and 'Z' they need to be changed to Russian:
.method public run()V
    .locals 13
    .prologue
    .local p0, this:Lcom/lewa/PIM/contacts/list/ContactEntryListFragment$3;,"Lcom/lewa/PIM/contacts/list/ContactEntryListFragment.3;"
    const/16 v12, 0x42f
    const/16 v11, 0x410

Then find

    aget-char v6, v6, v8
    const/16 v7, 0x61
    if-lt v6, v7, :cond_6
    iget-object v6, v3, Landroid/database/CharArrayBuffer;->data:[C
    aget-char v6, v6, v8
    const/16 v7, 0x7a
    if-gt v6, v7, :cond_6

0x61 - 'a'
0x7a - 'z'
Change

       aget-char v6, v6, v8
    const/16 v7, 0x430
    if-lt v6, v7, :cond_6
    iget-object v6, v3, Landroid/database/CharArrayBuffer;->data:[C
    aget-char v6, v6, v8
    const/16 v7, 0x44f
    if-gt v6, v7, :cond_6

The MmsChoicePhoneNumbersContacts.smali file has a similar story

ContactEntryListFragment.smali
    protected void onQueryComplete(int paramInt, Object paramObject, Cursor paramCursor)
    {
      switch (paramInt)
      {
      default:
        return;
      case 0:
      }
      MmsChoicePhoneNumbersContacts.this.mAdapter.changeCursor(paramCursor);
      if (paramCursor.getCount() > 0)
      {
        MmsChoicePhoneNumbersContacts.this.marrFirstCharacters.clear();
        MmsChoicePhoneNumbersContacts.this.marrFirstLetters.clear();
        paramCursor.moveToPosition(-1);
        if (paramCursor.moveToNext())
        {
          CharArrayBuffer localCharArrayBuffer1 = new CharArrayBuffer(128);
          paramCursor.copyStringToBuffer(4, localCharArrayBuffer1);
          if ((localCharArrayBuffer1.data[0] >= 'a') && (localCharArrayBuffer1.data[0] <= 'z'))
          {
            char[] arrayOfChar = localCharArrayBuffer1.data;
            arrayOfChar[0] = ((char)('¢' + arrayOfChar[0]));
          }
          while (true)
          {
            CharArrayBuffer localCharArrayBuffer2 = new CharArrayBuffer(128);
            paramCursor.copyStringToBuffer(11, localCharArrayBuffer2);
            char c = Character.toUpperCase(localCharArrayBuffer2.data[0]);
            if ((c < 'A') || (c > 'Z'))
              c = '#';
            MmsChoicePhoneNumbersContacts.this.marrFirstLetters.add(String.valueOf(c));
            MmsChoicePhoneNumbersContacts.this.marrFirstCharacters.add(String.copyValueOf(localCharArrayBuffer1.data, 0, 1));
            break;
            if ((localCharArrayBuffer1.data[0] < '€') && ((localCharArrayBuffer1.data[0] < 'A') || (localCharArrayBuffer1.data[0] > 'Z')))
              localCharArrayBuffer1.data[0] = '#';
          }
        }
        MmsChoicePhoneNumbersContacts.access$502(MmsChoicePhoneNumbersContacts.this, true);
        paramCursor.moveToFirst();
        MmsChoicePhoneNumbersContacts.this.mEmptyTextView.setVisibility(8);
        return;
      }
      MmsChoicePhoneNumbersContacts.this.mEmptyTextView.setVisibility(0);
    }

# virtual methods
.method protected onQueryComplete(ILjava/lang/Object;Landroid/database/Cursor;)V
    .locals 10
    .parameter "token"
    .parameter "cookie"
    .parameter "cursor"
    .prologue
    const/16 v9, 0x5a
    const/16 v8, 0x41

Change to
# virtual methods
.method protected onQueryComplete(ILjava/lang/Object;Landroid/database/Cursor;)V
    .locals 10
    .parameter "token"
    .parameter "cookie"
    .parameter "cursor"
    .prologue
    const/16 v9, 0x42f
    const/16 v8, 0x410

and accordingly
    aget-char v3, v3, v5
    const/16 v4, 0x61
    if-lt v3, v4, :cond_3
    iget-object v3, v1, Landroid/database/CharArrayBuffer;->data:[C
    aget-char v3, v3, v5
    const/16 v4, 0x7a
    if-gt v3, v4, :cond_3

on the
    aget-char v3, v3, v5
    const/16 v4, 0x430
    if-lt v3, v4, :cond_3
    iget-object v3, v1, Landroid/database/CharArrayBuffer;->data:[C
    aget-char v3, v3, v5
    const/16 v4, 0x44f
    if-gt v3, v4, :cond_3

Putting this case back and stuffing the phone. Now it works! Thank you all for your attention! PS I hope my train of thought helps someone. It would be ideal to find how groups are built in the contact list and screw this thing here. Then the letters that really exist in the contacts would be on this list, though in several languages ​​at the same time, but this is too tough for me.




Also popular now: