[Android Themes] uns8816:
Some ROM’s in

SystemUI.apk / smali / com / android / systemui / recent / RecentsPanelView.smali

no method .method public show (ZLjava / util / ArrayList; ZZ) V

in this case the edit RecentsPanelView.smali follows.

At the end of RecentsPanelView.smali add the following lines:

.method private showMemDisplay()Z
.locals 7

.prologue
const/16 v5, 0x8

const/4 v3, 0x1

const/4 v4, 0x0

.line 994
iget-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mContext:Landroid/content/Context;

invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v0

const-string v1, "adi_beanning_rom_ram_progrees_bar"

invoke-static {v0, v1, v4}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v0

if-ne v0, v3, :cond_0

move v2, v3

.line 997
:goto_0
const v0, 0x7f0900f0

invoke-virtual {p0, v0}, Lcom/android/systemui/recent/RecentsPanelView;->findViewById(I)Landroid/view/View;

move-result-object v0

check-cast v0, Landroid/widget/TextView;

.line 998
const v1, 0x7f0900ef

invoke-virtual {p0, v1}, Lcom/android/systemui/recent/RecentsPanelView;->findViewById(I)Landroid/view/View;

move-result-object v1

check-cast v1, Landroid/widget/ProgressBar;

.line 1000
if-nez v2, :cond_1

.line 1001
invoke-virtual {v0, v5}, Landroid/widget/TextView;->setVisibility(I)V

.line 1002
invoke-virtual {v1, v5}, Landroid/widget/ProgressBar;->setVisibility(I)V

.line 1015
:goto_1
return v4

:cond_0
move v2, v4

.line 994
goto :goto_0

.line 1006
:cond_1
invoke-virtual {v0, v4}, Landroid/widget/TextView;->setVisibility(I)V

.line 1007
invoke-virtual {v1, v4}, Landroid/widget/ProgressBar;->setVisibility(I)V

.line 1009
invoke-virtual {p0}, Lcom/android/systemui/recent/RecentsPanelView;->getTotalMemory()I

move-result v2

.line 1010
invoke-virtual {v1, v2}, Landroid/widget/ProgressBar;->setMax(I)V

.line 1012
invoke-direct {p0}, Lcom/android/systemui/recent/RecentsPanelView;->getAvailMemory()Ljava/lang/String;

move-result-object v4

invoke-static {v4}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

move-result v4

.line 1013
new-instance v5, Ljava/lang/StringBuilder;

invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

const-string v6, "Free RAM: "

invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v5

invoke-static {v4}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

move-result-object v6

invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v5

const-string v6, "MB"

invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v5

invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

move-result-object v5

invoke-virtual {v0, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

.line 1014
sub-int v0, v2, v4

invoke-virtual {v1, v0}, Landroid/widget/ProgressBar;->setProgress(I)V

move v4, v3

.line 1015
goto :goto_1
.end method

.method public getTotalMemory()I
.locals 4

.prologue
.line 1027
const-string v1, "/proc/meminfo"

.line 1030
const/4 v0, 0x0

.line 1032
:try_start_0
new-instance v2, Ljava/io/FileReader;

invoke-direct {v2, v1}, Ljava/io/FileReader;-><init>(Ljava/lang/String;)V

.line 1033
new-instance v1, Ljava/io/BufferedReader;

const/16 v3, 0x2000

invoke-direct {v1, v2, v3}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;I)V

.line 1034
invoke-virtual {v1}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;

move-result-object v2

.line 1035
const-string v3, "\\s+"

invoke-virtual {v2, v3}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

move-result-object v2

.line 1036
const/4 v3, 0x1

aget-object v2, v2, v3

invoke-static {v2}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer;

move-result-object v2

invoke-virtual {v2}, Ljava/lang/Integer;->intValue()I

move-result v0

mul-int/lit16 v0, v0, 0x400

.line 1037
invoke-virtual {v1}, Ljava/io/BufferedReader;->close()V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

.line 1040
:goto_0
const/high16 v1, 0x10

div-int/2addr v0, v1

return v0

.line 1038
:catch_0
move-exception v1

goto :goto_0
.end method

.method private getAvailMemory()Ljava/lang/String;
.locals 8

.prologue
.line 1019
new-instance v3, Landroid/app/ActivityManager$MemoryInfo;

invoke-direct {v3}, Landroid/app/ActivityManager$MemoryInfo;-><init>()V

.line 1020
.local v3, memInfo:Landroid/app/ActivityManager$MemoryInfo;
iget-object v4, p0, Lcom/android/systemui/recent/RecentsPanelView;->mContext:Landroid/content/Context;

const-string v5, "activity"

invoke-virtual {v4, v5}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

move-result-object v0

check-cast v0, Landroid/app/ActivityManager;

.line 1021
.local v0, am:Landroid/app/ActivityManager;
invoke-virtual {v0, v3}, Landroid/app/ActivityManager;->getMemoryInfo(Landroid/app/ActivityManager$MemoryInfo;)V

.line 1022
iget-wide v4, v3, Landroid/app/ActivityManager$MemoryInfo;->availMem:J

const-wide/32 v6, 0x100000

div-long v1, v4, v6

.line 1023
.local v1, availableMem:J
invoke-static {v1, v2}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

move-result-object v4

return-object v4
.end method

Change this 0x7f0900f0

with the IDS value you got in your public.xml

and this 0x7f0900ef with

<public type="id" name="recents_memory_bar" id="0x7f??????" />

- Next

Search this method

.method public handleSwipe(Landroid/view/View;)V

after line:

invoke-virtual {p0, v2}, Lcom/android/systemui/recent/RecentsPanelView;->setContentDescription(Ljava/lang/CharSequence;)V

add the line:

invoke-direct {p0}, Lcom/android/systemui/recent/RecentsPanelView;->showMemDisplay()Z

- Next

Search this method

.method public show(ZZ)V

after lines:

.locals 1

.parameter "show"

.parameter "animate"

.prologue

add the line:

invoke-direct {p0}, Lcom/android/systemui/recent/RecentsPanelView;->showMemDisplay()Z

- Done and recompile your SystemUI.apk