-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
duanqizhi
committed
Feb 12, 2014
1 parent
7976b3a
commit 652bf39
Showing
4 changed files
with
337 additions
and
126 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<merge> | ||
|
||
<item action="ADD" | ||
position="BELOW" | ||
anchor="# static fields" > | ||
.field private static mIsLowMemoryReadStatus:I | ||
</item> | ||
|
||
<item action="ADD" | ||
nearby=".method static constructor <clinit>()V" | ||
position="OVER" | ||
anchor="return-void" > | ||
const/4 v0, -0x1 | ||
|
||
sput v0, Landroid/app/ActivityManager;->mIsLowMemoryReadStatus:I | ||
</item> | ||
|
||
<item action="ADD" | ||
position="OVER" | ||
anchor="EOF"> | ||
.method public isLowRamDevice()Z | ||
.locals 1 | ||
|
||
.prologue | ||
invoke-static {}, Landroid/app/ActivityManager;->isLowRamDeviceStatic()Z | ||
|
||
move-result v0 | ||
|
||
return v0 | ||
.end method | ||
|
||
.method public static isLowRamDeviceStatic()Z | ||
.locals 9 | ||
|
||
.prologue | ||
const/4 v4, 0x0 | ||
|
||
const/4 v3, 0x1 | ||
|
||
.line 394 | ||
sget v2, Landroid/app/ActivityManager;->mIsLowMemoryReadStatus:I | ||
|
||
const/4 v5, -0x1 | ||
|
||
if-ne v2, v5, :cond_1 | ||
|
||
.line 395 | ||
new-instance v1, Lcom/android/internal/util/MemInfoReader; | ||
|
||
invoke-direct {v1}, Lcom/android/internal/util/MemInfoReader;-><init>()V | ||
|
||
.line 396 | ||
.local v1, reader:Lcom/android/internal/util/MemInfoReader; | ||
invoke-virtual {v1}, Lcom/android/internal/util/MemInfoReader;->readMemInfo()V | ||
|
||
.line 397 | ||
const-string v2, "true" | ||
|
||
const-string v5, "ro.config.low_ram" | ||
|
||
const-string v6, "false" | ||
|
||
invoke-static {v5, v6}, Landroid/os/SystemProperties;->get(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; | ||
|
||
move-result-object v5 | ||
|
||
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z | ||
|
||
move-result v2 | ||
|
||
if-nez v2, :cond_0 | ||
|
||
invoke-virtual {v1}, Lcom/android/internal/util/MemInfoReader;->getTotalSize()J | ||
|
||
move-result-wide v5 | ||
|
||
const-wide/32 v7, 0x20000000 | ||
|
||
cmp-long v2, v5, v7 | ||
|
||
if-gez v2, :cond_2 | ||
|
||
:cond_0 | ||
move v0, v3 | ||
|
||
.line 399 | ||
.local v0, isLow:Z | ||
:goto_0 | ||
if-eqz v0, :cond_3 | ||
|
||
move v2, v3 | ||
|
||
:goto_1 | ||
sput v2, Landroid/app/ActivityManager;->mIsLowMemoryReadStatus:I | ||
|
||
.line 401 | ||
:cond_1 | ||
sget v2, Landroid/app/ActivityManager;->mIsLowMemoryReadStatus:I | ||
|
||
if-ne v2, v3, :cond_4 | ||
|
||
:goto_2 | ||
return v3 | ||
|
||
.end local v0 #isLow:Z | ||
:cond_2 | ||
move v0, v4 | ||
|
||
.line 397 | ||
goto :goto_0 | ||
|
||
.restart local v0 #isLow:Z | ||
:cond_3 | ||
move v2, v4 | ||
|
||
.line 399 | ||
goto :goto_1 | ||
|
||
:cond_4 | ||
move v3, v4 | ||
|
||
.line 401 | ||
goto :goto_2 | ||
.end method | ||
</item> | ||
|
||
</merge> |
Oops, something went wrong.