Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -U 10 -rNad classes-easyset5-sa/com/android/server/status/EasySetting$BrightnessSettingsObserver.smali classes-easyset5-toggle/com/android/server/status/EasySetting$BrightnessSettingsObserver.smali
- --- classes-easyset5-sa/com/android/server/status/EasySetting$BrightnessSettingsObserver.smali 1970-01-01 09:00:00.000000000 +0900
- +++ classes-easyset5-toggle/com/android/server/status/EasySetting$BrightnessSettingsObserver.smali 2011-12-13 16:48:22.704497731 +0900
- @@ -0,0 +1,122 @@
- +.class Lcom/android/server/status/EasySetting$BrightnessSettingsObserver;
- +.super Landroid/database/ContentObserver;
- +.source "EasySetting.java"
- +
- +
- +# annotations
- +.annotation system Ldalvik/annotation/EnclosingClass;
- + value = Lcom/android/server/status/EasySetting;
- +.end annotation
- +
- +.annotation system Ldalvik/annotation/InnerClass;
- + accessFlags = 0x0
- + name = "BrightnessSettingsObserver"
- +.end annotation
- +
- +
- +# instance fields
- +
- +.field final synthetic this$0:Lcom/android/server/status/EasySetting;
- +
- +
- +# direct methods
- +.method public constructor <init>(Lcom/android/server/status/EasySetting;)V
- + .registers 3
- + .parameter
- +
- + .prologue
- + .line 59
- + iput-object p1, p0, Lcom/android/server/status/EasySetting$BrightnessSettingsObserver;->this$0:Lcom/android/server/status/EasySetting;
- +
- + .line 57
- + new-instance v0, Landroid/os/Handler;
- +
- + invoke-direct {v0}, Landroid/os/Handler;-><init>()V
- +
- + invoke-direct {p0, v0}, Landroid/database/ContentObserver;-><init>(Landroid/os/Handler;)V
- +
- + return-void
- +.end method
- +
- +
- +# virtual methods
- +.method public register(Landroid/content/Context;)V
- + .registers 5
- +
- + .prologue
- + iget-object v0, p0, Lcom/android/server/status/EasySetting$BrightnessSettingsObserver;->this$0:Lcom/android/server/status/EasySetting;
- +
- + invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
- +
- + move-result-object v0
- +
- + const-string v1, "content://settings/system/screen_brightness"
- +
- + invoke-static {v1}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
- +
- + move-result-object v1
- +
- + const/4 v2, 0x0
- +
- + invoke-virtual {v0, v1, v2, p0}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
- +
- + return-void
- +.end method
- +
- +.method public onChange(Z)V
- + .registers 7
- + .parameter "selfChange"
- +
- + .prologue
- + iget-object v0, p0, Lcom/android/server/status/EasySetting$BrightnessSettingsObserver;->this$0:Lcom/android/server/status/EasySetting;
- +
- + iget-object v1, v0, Lcom/android/server/status/EasySetting;->mContext:Landroid/content/Context;
- +
- + invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
- +
- + move-result-object v1
- +
- + iget-object v0, v0, Lcom/android/server/status/EasySetting;->mBrightnessList:Ljava/util/ArrayList;
- +
- + const-string v2, "screen_brightness"
- +
- + invoke-static {v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;)I
- +
- + move-result v2
- +
- + invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
- +
- + move-result-object v2
- +
- + invoke-virtual {v0, v2}, Ljava/util/ArrayList;->indexOf(Ljava/lang/Object;)I
- +
- + move-result v1
- +
- + add-int/lit8 v1, v1, 0x1
- +
- + invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
- +
- + move-result v2
- +
- + if-eq v1, v2, :cond_on
- +
- + const/4 v1, 0x0
- +
- + goto :goto_off
- +
- + :cond_on
- +
- + const/4 v1, 0x1
- +
- + :goto_off
- +
- + iget-object v0, p0, Lcom/android/server/status/EasySetting$BrightnessSettingsObserver;->this$0:Lcom/android/server/status/EasySetting;
- +
- + iget-object v0, v0, Lcom/android/server/status/EasySetting;->mBrightnessOnOff:Lcom/android/server/status/EasySettingOnOff;
- +
- + invoke-virtual {v0}, Lcom/android/server/status/EasySettingOnOff;->completeProgress()V
- +
- + invoke-virtual {v0, v1}, Lcom/android/server/status/EasySettingOnOff;->setOn(Z)V
- +
- + return-void
- +.end method
- diff -U 10 -rNad classes-easyset5-sa/com/android/server/status/EasySetting.smali classes-easyset5-toggle/com/android/server/status/EasySetting.smali
- --- classes-easyset5-sa/com/android/server/status/EasySetting.smali 2011-12-09 09:43:52.073944751 +0900
- +++ classes-easyset5-toggle/com/android/server/status/EasySetting.smali 2011-12-13 16:51:27.666098707 +0900
- @@ -64,20 +64,22 @@
- .field private final mReceiver:Landroid/content/BroadcastReceiver;
- .field mSilentOnOff:Lcom/android/server/status/EasySettingOnOff;
- .field private mStatusBarManager:Landroid/app/StatusBarManager;
- .field mBrightnessOnOff:Lcom/android/server/status/EasySettingOnOff;
- .field mBrightnessList:Ljava/util/ArrayList;
- +.field private mBrightnessSettingsObserver:Lcom/android/server/status/EasySetting$BrightnessSettingsObserver;
- +
- .field mTelephonyManager:Landroid/telephony/TelephonyManager;
- .field mVibOnOff:Lcom/android/server/status/EasySettingOnOff;
- .field mWifiManager:Landroid/net/wifi/WifiManager;
- .field mWifiOnOff:Lcom/android/server/status/EasySettingOnOff;
- .field private telephony_service:Lcom/android/internal/telephony/ITelephony;
- @@ -223,20 +225,42 @@
- move-result-object v1
- check-cast v1, Lcom/android/server/status/EasySettingOnOff;
- iput-object v1, p0, Lcom/android/server/status/EasySetting;->mBrightnessOnOff:Lcom/android/server/status/EasySettingOnOff;
- if-eqz v1, :skip_brightness_setonclick
- invoke-virtual {v1, p0}, Lcom/android/server/status/EasySettingOnOff;->setOnClickListener(Landroid/view/View$OnClickListener;)V
- + iget-object v1, p0, Lcom/android/server/status/EasySetting;->mBrightnessList:Ljava/util/ArrayList;
- +
- + invoke-virtual {v1}, Ljava/util/ArrayList;->size()I
- +
- + move-result v1
- +
- + const/4 v2, 0x2
- +
- + if-ne v1, v2, :skip_brightness_setonclick
- +
- + new-instance v1, Lcom/android/server/status/EasySetting$BrightnessSettingsObserver;
- +
- + invoke-direct {v1, p0}, Lcom/android/server/status/EasySetting$BrightnessSettingsObserver;-><init>(Lcom/android/server/status/EasySetting;)V
- +
- + iput-object v1, p0, Lcom/android/server/status/EasySetting;->mBrightnessSettingsObserver:Lcom/android/server/status/EasySetting$BrightnessSettingsObserver;
- +
- + const/4 v2, 0x0
- +
- + invoke-virtual {v1, v2}, Lcom/android/server/status/EasySetting$BrightnessSettingsObserver;->onChange(Z)V
- +
- + invoke-virtual {v1, p1}, Lcom/android/server/status/EasySetting$BrightnessSettingsObserver;->register(Landroid/content/Context;)V
- +
- :skip_brightness_setonclick
- const v1, 0x10201ff
- invoke-virtual {p2, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
- move-result-object v1
- check-cast v1, Lcom/android/server/status/EasySettingOnOff;
- iput-object v1, p0, Lcom/android/server/status/EasySetting;->mSilentOnOff:Lcom/android/server/status/EasySettingOnOff;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement