Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复无法设置默认浏览器的问题,By jchjian [email protected] #24

Open
wants to merge 1 commit into
base: v7-android-4.4.4
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 136 additions & 0 deletions services.jar.out/smali/com/android/server/PreferredComponent.smali
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,142 @@
return-object v0
.end method

.method public sameSet(Ljava/util/List;)Z
.locals 12
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List",
"<",
"Landroid/content/pm/ResolveInfo;",
">;)Z"
}
.end annotation

.prologue
.local p1, "query":Ljava/util/List;, "Ljava/util/List<Landroid/content/pm/ResolveInfo;>;"
const/4 v8, 0x1

const/4 v9, 0x0

iget-object v10, p0, Lcom/android/server/PreferredComponent;->mSetPackages:[Ljava/lang/String;

if-nez v10, :cond_2

if-nez p1, :cond_1

:cond_0
:goto_0
return v8

:cond_1
move v8, v9

goto :goto_0

:cond_2
if-nez p1, :cond_3

move v8, v9

goto :goto_0

:cond_3
invoke-interface {p1}, Ljava/util/List;->size()I

move-result v0

.local v0, "NQ":I
iget-object v10, p0, Lcom/android/server/PreferredComponent;->mSetPackages:[Ljava/lang/String;

array-length v1, v10

.local v1, "NS":I
const/4 v6, 0x0

.local v6, "numMatch":I
const/4 v4, 0x0

.local v4, "i":I
:goto_1
if-ge v4, v0, :cond_7

invoke-interface {p1, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;

move-result-object v7

check-cast v7, Landroid/content/pm/ResolveInfo;

.local v7, "ri":Landroid/content/pm/ResolveInfo;
iget-object v2, v7, Landroid/content/pm/ResolveInfo;->activityInfo:Landroid/content/pm/ActivityInfo;

.local v2, "ai":Landroid/content/pm/ActivityInfo;
const/4 v3, 0x0

.local v3, "good":Z
const/4 v5, 0x0

.local v5, "j":I
:goto_2
if-ge v5, v1, :cond_4

iget-object v10, p0, Lcom/android/server/PreferredComponent;->mSetPackages:[Ljava/lang/String;

aget-object v10, v10, v5

iget-object v11, v2, Landroid/content/pm/ActivityInfo;->packageName:Ljava/lang/String;

invoke-virtual {v10, v11}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v10

if-eqz v10, :cond_5

iget-object v10, p0, Lcom/android/server/PreferredComponent;->mSetClasses:[Ljava/lang/String;

aget-object v10, v10, v5

iget-object v11, v2, Landroid/content/pm/ActivityInfo;->name:Ljava/lang/String;

invoke-virtual {v10, v11}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v10

if-eqz v10, :cond_5

add-int/lit8 v6, v6, 0x1

const/4 v3, 0x1

:cond_4
if-nez v3, :cond_6

move v8, v9

goto :goto_0

:cond_5
add-int/lit8 v5, v5, 0x1

goto :goto_2

:cond_6
add-int/lit8 v4, v4, 0x1

goto :goto_1

.end local v2 # "ai":Landroid/content/pm/ActivityInfo;
.end local v3 # "good":Z
.end local v5 # "j":I
.end local v7 # "ri":Landroid/content/pm/ResolveInfo;
:cond_7
if-eq v6, v1, :cond_0

move v8, v9

goto :goto_0
.end method

.method public sameSet(Ljava/util/List;I)Z
.locals 11
.param p2, "priority" # I
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31057,9 +31057,7 @@

move-object/from16 v0, p4

move/from16 v1, p5

invoke-virtual {v5, v0, v1}, Lcom/android/server/PreferredComponent;->sameSet(Ljava/util/List;I)Z
invoke-virtual {v5, v0}, Lcom/android/server/PreferredComponent;->sameSet(Ljava/util/List;)Z

move-result v5

Expand Down