123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270 |
- .class Landroid/support/v4/app/BundleCompatDonut;
- .super Ljava/lang/Object;
- .source "BundleCompatDonut.java"
- # static fields
- .field private static final TAG:Ljava/lang/String; = "BundleCompatDonut"
- .field private static sGetIBinderMethod:Ljava/lang/reflect/Method;
- .field private static sGetIBinderMethodFetched:Z
- .field private static sPutIBinderMethod:Ljava/lang/reflect/Method;
- .field private static sPutIBinderMethodFetched:Z
- # direct methods
- .method constructor <init>()V
- .locals 0
- .prologue
- .line 29
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- return-void
- .end method
- .method public static getBinder(Landroid/os/Bundle;Ljava/lang/String;)Landroid/os/IBinder;
- .locals 8
- .param p0, "bundle" # Landroid/os/Bundle;
- .param p1, "key" # Ljava/lang/String;
- .prologue
- const/4 v2, 0x0
- const/4 v7, 0x1
- .line 39
- sget-boolean v1, Landroid/support/v4/app/BundleCompatDonut;->sGetIBinderMethodFetched:Z
- if-nez v1, :cond_0
- .line 41
- :try_start_0
- const-class v1, Landroid/os/Bundle;
- const-string v3, "getIBinder"
- const/4 v4, 0x1
- new-array v4, v4, [Ljava/lang/Class;
- const/4 v5, 0x0
- const-class v6, Ljava/lang/String;
- aput-object v6, v4, v5
- invoke-virtual {v1, v3, v4}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
- move-result-object v1
- sput-object v1, Landroid/support/v4/app/BundleCompatDonut;->sGetIBinderMethod:Ljava/lang/reflect/Method;
- .line 42
- sget-object v1, Landroid/support/v4/app/BundleCompatDonut;->sGetIBinderMethod:Ljava/lang/reflect/Method;
- const/4 v3, 0x1
- invoke-virtual {v1, v3}, Ljava/lang/reflect/Method;->setAccessible(Z)V
- :try_end_0
- .catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_0} :catch_0
- .line 46
- :goto_0
- sput-boolean v7, Landroid/support/v4/app/BundleCompatDonut;->sGetIBinderMethodFetched:Z
- .line 49
- :cond_0
- sget-object v1, Landroid/support/v4/app/BundleCompatDonut;->sGetIBinderMethod:Ljava/lang/reflect/Method;
- if-eqz v1, :cond_1
- .line 51
- :try_start_1
- sget-object v1, Landroid/support/v4/app/BundleCompatDonut;->sGetIBinderMethod:Ljava/lang/reflect/Method;
- const/4 v3, 0x1
- new-array v3, v3, [Ljava/lang/Object;
- const/4 v4, 0x0
- aput-object p1, v3, v4
- invoke-virtual {v1, p0, v3}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
- move-result-object v1
- check-cast v1, Landroid/os/IBinder;
- :try_end_1
- .catch Ljava/lang/reflect/InvocationTargetException; {:try_start_1 .. :try_end_1} :catch_1
- .catch Ljava/lang/IllegalAccessException; {:try_start_1 .. :try_end_1} :catch_1
- .catch Ljava/lang/IllegalArgumentException; {:try_start_1 .. :try_end_1} :catch_1
- .line 58
- :goto_1
- return-object v1
- .line 43
- :catch_0
- move-exception v0
- .line 44
- .local v0, "e":Ljava/lang/NoSuchMethodException;
- const-string v1, "BundleCompatDonut"
- const-string v3, "Failed to retrieve getIBinder method"
- invoke-static {v1, v3, v0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
- goto :goto_0
- .line 52
- .end local v0 # "e":Ljava/lang/NoSuchMethodException;
- :catch_1
- move-exception v0
- .line 54
- .local v0, "e":Ljava/lang/Exception;
- const-string v1, "BundleCompatDonut"
- const-string v3, "Failed to invoke getIBinder via reflection"
- invoke-static {v1, v3, v0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
- .line 55
- sput-object v2, Landroid/support/v4/app/BundleCompatDonut;->sGetIBinderMethod:Ljava/lang/reflect/Method;
- .end local v0 # "e":Ljava/lang/Exception;
- :cond_1
- move-object v1, v2
- .line 58
- goto :goto_1
- .end method
- .method public static putBinder(Landroid/os/Bundle;Ljava/lang/String;Landroid/os/IBinder;)V
- .locals 7
- .param p0, "bundle" # Landroid/os/Bundle;
- .param p1, "key" # Ljava/lang/String;
- .param p2, "binder" # Landroid/os/IBinder;
- .prologue
- const/4 v6, 0x1
- .line 62
- sget-boolean v1, Landroid/support/v4/app/BundleCompatDonut;->sPutIBinderMethodFetched:Z
- if-nez v1, :cond_0
- .line 64
- :try_start_0
- const-class v1, Landroid/os/Bundle;
- const-string v2, "putIBinder"
- const/4 v3, 0x2
- new-array v3, v3, [Ljava/lang/Class;
- const/4 v4, 0x0
- const-class v5, Ljava/lang/String;
- aput-object v5, v3, v4
- const/4 v4, 0x1
- const-class v5, Landroid/os/IBinder;
- aput-object v5, v3, v4
- invoke-virtual {v1, v2, v3}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
- move-result-object v1
- sput-object v1, Landroid/support/v4/app/BundleCompatDonut;->sPutIBinderMethod:Ljava/lang/reflect/Method;
- .line 66
- sget-object v1, Landroid/support/v4/app/BundleCompatDonut;->sPutIBinderMethod:Ljava/lang/reflect/Method;
- const/4 v2, 0x1
- invoke-virtual {v1, v2}, Ljava/lang/reflect/Method;->setAccessible(Z)V
- :try_end_0
- .catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_0} :catch_0
- .line 70
- :goto_0
- sput-boolean v6, Landroid/support/v4/app/BundleCompatDonut;->sPutIBinderMethodFetched:Z
- .line 73
- :cond_0
- sget-object v1, Landroid/support/v4/app/BundleCompatDonut;->sPutIBinderMethod:Ljava/lang/reflect/Method;
- if-eqz v1, :cond_1
- .line 75
- :try_start_1
- sget-object v1, Landroid/support/v4/app/BundleCompatDonut;->sPutIBinderMethod:Ljava/lang/reflect/Method;
- const/4 v2, 0x2
- new-array v2, v2, [Ljava/lang/Object;
- const/4 v3, 0x0
- aput-object p1, v2, v3
- const/4 v3, 0x1
- aput-object p2, v2, v3
- invoke-virtual {v1, p0, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
- :try_end_1
- .catch Ljava/lang/reflect/InvocationTargetException; {:try_start_1 .. :try_end_1} :catch_1
- .catch Ljava/lang/IllegalAccessException; {:try_start_1 .. :try_end_1} :catch_1
- .catch Ljava/lang/IllegalArgumentException; {:try_start_1 .. :try_end_1} :catch_1
- .line 82
- :cond_1
- :goto_1
- return-void
- .line 67
- :catch_0
- move-exception v0
- .line 68
- .local v0, "e":Ljava/lang/NoSuchMethodException;
- const-string v1, "BundleCompatDonut"
- const-string v2, "Failed to retrieve putIBinder method"
- invoke-static {v1, v2, v0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
- goto :goto_0
- .line 76
- .end local v0 # "e":Ljava/lang/NoSuchMethodException;
- :catch_1
- move-exception v0
- .line 78
- .local v0, "e":Ljava/lang/Exception;
- const-string v1, "BundleCompatDonut"
- const-string v2, "Failed to invoke putIBinder via reflection"
- invoke-static {v1, v2, v0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
- .line 79
- const/4 v1, 0x0
- sput-object v1, Landroid/support/v4/app/BundleCompatDonut;->sPutIBinderMethod:Ljava/lang/reflect/Method;
- goto :goto_1
- .end method
|