Last active
December 25, 2016 14:26
-
-
Save fenrir-naru/51145c714881d410b7603390310cf40f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| .class public Lcom/android/fmradio/FmUtils; | |
| .super Ljava/lang/Object; | |
| .source "FmUtils.java" | |
| # static fields | |
| .field private static final CONVERT_RATE:I = 0xa | |
| .field public static final DEFAULT_STATION:I = 0x3e8 | |
| .field public static final DEFAULT_STATION_FLOAT:F | |
| .field private static final FM_IS_FIRST_ENTER_STATION_LIST:Ljava/lang/String; = "fm_is_first_enter_station_list" | |
| .field private static final FM_IS_FIRST_TIME_PLAY:Ljava/lang/String; = "fm_is_first_time_play" | |
| .field private static final FM_IS_SPEAKER_MODE:Ljava/lang/String; = "fm_is_speaker_mode" | |
| .field private static final FM_LOCATION_LATITUDE:Ljava/lang/String; = "fm_location_latitude" | |
| .field private static final FM_LOCATION_LONGITUDE:Ljava/lang/String; = "fm_location_longitude" | |
| .field private static final HIGHEST_STATION:I = 0x438 | |
| .field public static final LOCATION_DISTANCE_EXCEED:D = 160934.4 | |
| .field private static final LOWEST_STATION:I = 0x2f8 | |
| .field public static final LOW_SPACE_THRESHOLD:J = 0x80000L | |
| .field private static final STEP:I = 0x1 | |
| .field private static final TAG:Ljava/lang/String; = "FmUtils" | |
| .field private static sStorageManager:Landroid/os/storage/StorageManager; | |
| # direct methods | |
| .method static constructor <clinit>()V | |
| .locals 1 | |
| .prologue | |
| .line 44 | |
| const/16 v0, 0x3e8 | |
| invoke-static {v0}, Lcom/android/fmradio/FmUtils;->computeFrequency(I)F | |
| move-result v0 | |
| sput v0, Lcom/android/fmradio/FmUtils;->DEFAULT_STATION_FLOAT:F | |
| .line 67 | |
| const/4 v0, 0x0 | |
| sput-object v0, Lcom/android/fmradio/FmUtils;->sStorageManager:Landroid/os/storage/StorageManager; | |
| .line 39 | |
| return-void | |
| .end method | |
| .method public constructor <init>()V | |
| .locals 0 | |
| .prologue | |
| .line 39 | |
| invoke-direct {p0}, Ljava/lang/Object;-><init>()V | |
| return-void | |
| .end method | |
| .method public static computeDecreaseStation(I)I | |
| .locals 2 | |
| .param p0, "station" # I | |
| .prologue | |
| .line 105 | |
| add-int/lit8 v0, p0, -0x1 | |
| .line 106 | |
| .local v0, "result":I | |
| const/16 v1, 0x2f8 | |
| if-ge v0, v1, :cond_0 | |
| .line 107 | |
| const/16 v0, 0x438 | |
| .line 109 | |
| :cond_0 | |
| return v0 | |
| .end method | |
| .method public static computeFrequency(I)F | |
| .locals 2 | |
| .param p0, "station" # I | |
| .prologue | |
| .line 131 | |
| int-to-float v0, p0 | |
| const/high16 v1, 0x41200000 # 10.0f | |
| div-float/2addr v0, v1 | |
| return v0 | |
| .end method | |
| .method public static computeIncreaseStation(I)I | |
| .locals 2 | |
| .param p0, "station" # I | |
| .prologue | |
| .line 90 | |
| add-int/lit8 v0, p0, 0x1 | |
| .line 91 | |
| .local v0, "result":I | |
| const/16 v1, 0x438 | |
| if-le v0, v1, :cond_0 | |
| .line 92 | |
| const/16 v0, 0x2f8 | |
| .line 94 | |
| :cond_0 | |
| return v0 | |
| .end method | |
| .method public static computeStation(F)I | |
| .locals 1 | |
| .param p0, "frequency" # F | |
| .prologue | |
| .line 120 | |
| const/high16 v0, 0x41200000 # 10.0f | |
| mul-float/2addr v0, p0 | |
| float-to-int v0, v0 | |
| return v0 | |
| .end method | |
| .method public static createNotificationLargeIcon(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/Bitmap; | |
| .locals 14 | |
| .param p0, "c" # Landroid/content/Context; | |
| .param p1, "text" # Ljava/lang/String; | |
| .prologue | |
| const/4 v11, 0x1 | |
| const-wide/high16 v12, 0x3fe0000000000000L # 0.5 | |
| const/4 v10, 0x0 | |
| .line 276 | |
| invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources; | |
| move-result-object v5 | |
| .line 277 | |
| .local v5, "res":Landroid/content/res/Resources; | |
| const v8, 0x1050005 | |
| invoke-virtual {v5, v8}, Landroid/content/res/Resources;->getDimension(I)F | |
| move-result v8 | |
| float-to-int v7, v8 | |
| .line 278 | |
| .local v7, "width":I | |
| const v8, 0x1050006 | |
| invoke-virtual {v5, v8}, Landroid/content/res/Resources;->getDimension(I)F | |
| move-result v8 | |
| float-to-int v0, v8 | |
| .line 279 | |
| .local v0, "height":I | |
| new-instance v1, Landroid/widget/LinearLayout; | |
| invoke-direct {v1, p0}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V | |
| .line 280 | |
| .local v1, "iconLayout":Landroid/widget/LinearLayout; | |
| invoke-virtual {v1, v11}, Landroid/widget/LinearLayout;->setOrientation(I)V | |
| .line 281 | |
| invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources; | |
| move-result-object v8 | |
| const v9, 0x7f05000a | |
| invoke-virtual {v8, v9}, Landroid/content/res/Resources;->getColor(I)I | |
| move-result v8 | |
| invoke-virtual {v1, v8}, Landroid/widget/LinearLayout;->setBackgroundColor(I)V | |
| .line 282 | |
| invoke-virtual {v1, v11}, Landroid/widget/LinearLayout;->setDrawingCacheEnabled(Z)V | |
| .line 283 | |
| invoke-virtual {v1, v10, v10, v7, v0}, Landroid/widget/LinearLayout;->layout(IIII)V | |
| .line 284 | |
| new-instance v2, Landroid/widget/TextView; | |
| invoke-direct {v2, p0}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V | |
| .line 285 | |
| .local v2, "iconText":Landroid/widget/TextView; | |
| const/high16 v8, 0x41c00000 # 24.0f | |
| invoke-virtual {v2, v8}, Landroid/widget/TextView;->setTextSize(F)V | |
| .line 286 | |
| const v8, 0x7f050008 | |
| invoke-virtual {v5, v8}, Landroid/content/res/Resources;->getColor(I)I | |
| move-result v8 | |
| invoke-virtual {v2, v8}, Landroid/widget/TextView;->setTextColor(I)V | |
| .line 287 | |
| invoke-virtual {v2, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V | |
| .line 288 | |
| invoke-static {v10, v10}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I | |
| move-result v8 | |
| .line 289 | |
| invoke-static {v10, v10}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I | |
| move-result v9 | |
| .line 288 | |
| invoke-virtual {v2, v8, v9}, Landroid/widget/TextView;->measure(II)V | |
| .line 290 | |
| invoke-virtual {v2}, Landroid/widget/TextView;->getMeasuredWidth()I | |
| move-result v8 | |
| sub-int v8, v7, v8 | |
| int-to-double v8, v8 | |
| mul-double/2addr v8, v12 | |
| double-to-int v4, v8 | |
| .line 291 | |
| .local v4, "left":I | |
| invoke-virtual {v2}, Landroid/widget/TextView;->getMeasuredHeight()I | |
| move-result v8 | |
| sub-int v8, v0, v8 | |
| int-to-double v8, v8 | |
| mul-double/2addr v8, v12 | |
| double-to-int v6, v8 | |
| .line 292 | |
| .local v6, "top":I | |
| invoke-virtual {v2}, Landroid/widget/TextView;->getMeasuredWidth()I | |
| move-result v8 | |
| add-int/2addr v8, v4 | |
| .line 293 | |
| invoke-virtual {v2}, Landroid/widget/TextView;->getMeasuredHeight()I | |
| move-result v9 | |
| add-int/2addr v9, v6 | |
| .line 292 | |
| invoke-virtual {v2, v4, v6, v8, v9}, Landroid/widget/TextView;->layout(IIII)V | |
| .line 294 | |
| invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V | |
| .line 295 | |
| invoke-virtual {v1, v10, v10, v7, v0}, Landroid/widget/LinearLayout;->layout(IIII)V | |
| .line 297 | |
| invoke-virtual {v1}, Landroid/widget/LinearLayout;->buildDrawingCache()V | |
| .line 298 | |
| invoke-virtual {v1}, Landroid/widget/LinearLayout;->getDrawingCache()Landroid/graphics/Bitmap; | |
| move-result-object v8 | |
| invoke-static {v8}, Landroid/graphics/Bitmap;->createBitmap(Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap; | |
| move-result-object v3 | |
| .line 299 | |
| .local v3, "largeIcon":Landroid/graphics/Bitmap; | |
| invoke-virtual {v1}, Landroid/widget/LinearLayout;->destroyDrawingCache()V | |
| .line 300 | |
| return-object v3 | |
| .end method | |
| .method private static ensureStorageManager(Landroid/content/Context;)V | |
| .locals 1 | |
| .param p0, "context" # Landroid/content/Context; | |
| .prologue | |
| .line 168 | |
| sget-object v0, Lcom/android/fmradio/FmUtils;->sStorageManager:Landroid/os/storage/StorageManager; | |
| if-nez v0, :cond_0 | |
| .line 169 | |
| const-string/jumbo v0, "storage" | |
| invoke-virtual {p0, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object; | |
| move-result-object v0 | |
| check-cast v0, Landroid/os/storage/StorageManager; | |
| sput-object v0, Lcom/android/fmradio/FmUtils;->sStorageManager:Landroid/os/storage/StorageManager; | |
| .line 167 | |
| :cond_0 | |
| return-void | |
| .end method | |
| .method public static formatStation(I)Ljava/lang/String; | |
| .locals 4 | |
| .param p0, "station" # I | |
| .prologue | |
| .line 142 | |
| int-to-float v2, p0 | |
| const/high16 v3, 0x41200000 # 10.0f | |
| div-float v1, v2, v3 | |
| .line 143 | |
| .local v1, "frequency":F | |
| new-instance v0, Ljava/text/DecimalFormat; | |
| const-string/jumbo v2, "0.0" | |
| invoke-direct {v0, v2}, Ljava/text/DecimalFormat;-><init>(Ljava/lang/String;)V | |
| .line 144 | |
| .local v0, "decimalFormat":Ljava/text/DecimalFormat; | |
| float-to-double v2, v1 | |
| invoke-virtual {v0, v2, v3}, Ljava/text/DecimalFormat;->format(D)Ljava/lang/String; | |
| move-result-object v2 | |
| return-object v2 | |
| .end method | |
| .method public static getDefaultStoragePath()Ljava/lang/String; | |
| .locals 1 | |
| .prologue | |
| .line 153 | |
| invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File; | |
| move-result-object v0 | |
| invoke-virtual {v0}, Ljava/io/File;->getPath()Ljava/lang/String; | |
| move-result-object v0 | |
| return-object v0 | |
| .end method | |
| .method public static getDefaultStorageState(Landroid/content/Context;)Ljava/lang/String; | |
| .locals 3 | |
| .param p0, "context" # Landroid/content/Context; | |
| .prologue | |
| .line 162 | |
| invoke-static {p0}, Lcom/android/fmradio/FmUtils;->ensureStorageManager(Landroid/content/Context;)V | |
| .line 163 | |
| sget-object v1, Lcom/android/fmradio/FmUtils;->sStorageManager:Landroid/os/storage/StorageManager; | |
| invoke-static {}, Lcom/android/fmradio/FmUtils;->getDefaultStoragePath()Ljava/lang/String; | |
| move-result-object v2 | |
| invoke-virtual {v1, v2}, Landroid/os/storage/StorageManager;->getVolumeState(Ljava/lang/String;)Ljava/lang/String; | |
| move-result-object v0 | |
| .line 164 | |
| .local v0, "state":Ljava/lang/String; | |
| return-object v0 | |
| .end method | |
| .method public static getIsSpeakerModeOnFocusLost(Landroid/content/Context;)Z | |
| .locals 3 | |
| .param p0, "context" # Landroid/content/Context; | |
| .prologue | |
| .line 309 | |
| invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences; | |
| move-result-object v0 | |
| .line 311 | |
| .local v0, "prefs":Landroid/content/SharedPreferences; | |
| const-string/jumbo v1, "fm_is_speaker_mode" | |
| const/4 v2, 0x0 | |
| invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z | |
| move-result v1 | |
| return v1 | |
| .end method | |
| .method public static getLastSearchedLocation(Landroid/content/Context;)[D | |
| .locals 9 | |
| .param p0, "context" # Landroid/content/Context; | |
| .prologue | |
| .line 213 | |
| invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences; | |
| move-result-object v4 | |
| .line 215 | |
| .local v4, "prefs":Landroid/content/SharedPreferences; | |
| const-string/jumbo v7, "fm_location_latitude" | |
| const-string/jumbo v8, "0.0" | |
| invoke-interface {v4, v7, v8}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; | |
| move-result-object v5 | |
| .line 216 | |
| .local v5, "strLatitude":Ljava/lang/String; | |
| const-string/jumbo v7, "fm_location_longitude" | |
| const-string/jumbo v8, "0.0" | |
| invoke-interface {v4, v7, v8}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; | |
| move-result-object v6 | |
| .line 217 | |
| .local v6, "strLongitude":Ljava/lang/String; | |
| invoke-static {v5}, Ljava/lang/Double;->valueOf(Ljava/lang/String;)Ljava/lang/Double; | |
| move-result-object v7 | |
| invoke-virtual {v7}, Ljava/lang/Double;->doubleValue()D | |
| move-result-wide v0 | |
| .line 218 | |
| .local v0, "latitude":D | |
| invoke-static {v6}, Ljava/lang/Double;->valueOf(Ljava/lang/String;)Ljava/lang/Double; | |
| move-result-object v7 | |
| invoke-virtual {v7}, Ljava/lang/Double;->doubleValue()D | |
| move-result-wide v2 | |
| .line 219 | |
| .local v2, "longitude":D | |
| const/4 v7, 0x2 | |
| new-array v7, v7, [D | |
| const/4 v8, 0x0 | |
| aput-wide v0, v7, v8 | |
| const/4 v8, 0x1 | |
| aput-wide v2, v7, v8 | |
| return-object v7 | |
| .end method | |
| .method public static getPlaylistPath(Landroid/content/Context;)Ljava/lang/String; | |
| .locals 4 | |
| .param p0, "context" # Landroid/content/Context; | |
| .prologue | |
| .line 181 | |
| invoke-static {p0}, Lcom/android/fmradio/FmUtils;->ensureStorageManager(Landroid/content/Context;)V | |
| .line 182 | |
| sget-object v2, Lcom/android/fmradio/FmUtils;->sStorageManager:Landroid/os/storage/StorageManager; | |
| invoke-virtual {v2}, Landroid/os/storage/StorageManager;->getVolumePaths()[Ljava/lang/String; | |
| move-result-object v0 | |
| .line 183 | |
| .local v0, "externalStoragePaths":[Ljava/lang/String; | |
| new-instance v2, Ljava/lang/StringBuilder; | |
| invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V | |
| const/4 v3, 0x0 | |
| aget-object v3, v0, v3 | |
| invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; | |
| move-result-object v2 | |
| const-string/jumbo v3, "/Playlists/" | |
| invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; | |
| move-result-object v2 | |
| invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; | |
| move-result-object v1 | |
| .line 184 | |
| .local v1, "path":Ljava/lang/String; | |
| return-object v1 | |
| .end method | |
| .method public static hasEnoughSpace(Ljava/lang/String;)Z | |
| .locals 12 | |
| .param p0, "recordingSdcard" # Ljava/lang/String; | |
| .prologue | |
| .line 195 | |
| const/4 v6, 0x0 | |
| .line 197 | |
| .local v6, "ret":Z | |
| :try_start_0 | |
| new-instance v5, Landroid/os/StatFs; | |
| invoke-direct {v5, p0}, Landroid/os/StatFs;-><init>(Ljava/lang/String;)V | |
| .line 198 | |
| .local v5, "fs":Landroid/os/StatFs; | |
| invoke-virtual {v5}, Landroid/os/StatFs;->getAvailableBlocks()I | |
| move-result v7 | |
| int-to-long v2, v7 | |
| .line 199 | |
| .local v2, "blocks":J | |
| invoke-virtual {v5}, Landroid/os/StatFs;->getBlockSize()I | |
| :try_end_0 | |
| .catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_0 | |
| move-result v7 | |
| int-to-long v0, v7 | |
| .line 200 | |
| .local v0, "blockSize":J | |
| mul-long v8, v2, v0 | |
| .line 201 | |
| .local v8, "spaceLeft":J | |
| const-wide/32 v10, 0x80000 | |
| cmp-long v7, v8, v10 | |
| if-lez v7, :cond_0 | |
| const/4 v6, 0x1 | |
| .line 205 | |
| .end local v0 # "blockSize":J | |
| .end local v2 # "blocks":J | |
| .end local v5 # "fs":Landroid/os/StatFs; | |
| .end local v8 # "spaceLeft":J | |
| :goto_0 | |
| return v6 | |
| .line 201 | |
| .restart local v0 # "blockSize":J | |
| .restart local v2 # "blocks":J | |
| .restart local v5 # "fs":Landroid/os/StatFs; | |
| .restart local v8 # "spaceLeft":J | |
| :cond_0 | |
| const/4 v6, 0x0 | |
| goto :goto_0 | |
| .line 202 | |
| .end local v0 # "blockSize":J | |
| .end local v2 # "blocks":J | |
| .end local v5 # "fs":Landroid/os/StatFs; | |
| .end local v8 # "spaceLeft":J | |
| :catch_0 | |
| move-exception v4 | |
| .line 203 | |
| .local v4, "e":Ljava/lang/IllegalArgumentException; | |
| const-string/jumbo v7, "FmUtils" | |
| new-instance v10, Ljava/lang/StringBuilder; | |
| invoke-direct {v10}, Ljava/lang/StringBuilder;-><init>()V | |
| const-string/jumbo v11, "hasEnoughSpace, sdcard may be unmounted:" | |
| invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; | |
| move-result-object v10 | |
| invoke-virtual {v10, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; | |
| move-result-object v10 | |
| invoke-virtual {v10}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; | |
| move-result-object v10 | |
| invoke-static {v7, v10}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I | |
| goto :goto_0 | |
| .end method | |
| .method public static isFirstEnterStationList(Landroid/content/Context;)Z | |
| .locals 5 | |
| .param p0, "context" # Landroid/content/Context; | |
| .prologue | |
| .line 259 | |
| invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences; | |
| move-result-object v2 | |
| .line 260 | |
| .local v2, "prefs":Landroid/content/SharedPreferences; | |
| const-string/jumbo v3, "fm_is_first_enter_station_list" | |
| const/4 v4, 0x1 | |
| invoke-interface {v2, v3, v4}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z | |
| move-result v1 | |
| .line 261 | |
| .local v1, "isFirstEnter":Z | |
| if-eqz v1, :cond_0 | |
| .line 262 | |
| invoke-interface {v2}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor; | |
| move-result-object v0 | |
| .line 263 | |
| .local v0, "editor":Landroid/content/SharedPreferences$Editor; | |
| const-string/jumbo v3, "fm_is_first_enter_station_list" | |
| const/4 v4, 0x0 | |
| invoke-interface {v0, v3, v4}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor; | |
| .line 264 | |
| invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z | |
| .line 266 | |
| .end local v0 # "editor":Landroid/content/SharedPreferences$Editor; | |
| :cond_0 | |
| return v1 | |
| .end method | |
| .method public static isFirstTimePlayFm(Landroid/content/Context;)Z | |
| .locals 4 | |
| .param p0, "context" # Landroid/content/Context; | |
| .prologue | |
| .line 239 | |
| invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences; | |
| move-result-object v1 | |
| .line 240 | |
| .local v1, "prefs":Landroid/content/SharedPreferences; | |
| const-string/jumbo v2, "fm_is_first_time_play" | |
| const/4 v3, 0x1 | |
| invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z | |
| move-result v0 | |
| .line 241 | |
| .local v0, "isFirstTime":Z | |
| return v0 | |
| .end method | |
| .method public static isValidStation(I)Z | |
| .locals 2 | |
| .param p0, "station" # I | |
| .prologue | |
| .line 78 | |
| const/16 v1, 0x2f8 | |
| if-lt p0, v1, :cond_0 | |
| const/16 v1, 0x438 | |
| if-gt p0, v1, :cond_0 | |
| const/4 v0, 0x1 | |
| .line 79 | |
| .local v0, "isValid":Z | |
| :goto_0 | |
| return v0 | |
| .line 78 | |
| .end local v0 # "isValid":Z | |
| :cond_0 | |
| const/4 v0, 0x0 | |
| .restart local v0 # "isValid":Z | |
| goto :goto_0 | |
| .end method | |
| .method public static setIsFirstTimePlayFm(Landroid/content/Context;)V | |
| .locals 4 | |
| .param p0, "context" # Landroid/content/Context; | |
| .prologue | |
| .line 249 | |
| invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences; | |
| move-result-object v1 | |
| .line 250 | |
| .local v1, "prefs":Landroid/content/SharedPreferences; | |
| invoke-interface {v1}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor; | |
| move-result-object v0 | |
| .line 251 | |
| .local v0, "editor":Landroid/content/SharedPreferences$Editor; | |
| const-string/jumbo v2, "fm_is_first_time_play" | |
| const/4 v3, 0x0 | |
| invoke-interface {v0, v2, v3}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor; | |
| .line 252 | |
| invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z | |
| .line 248 | |
| return-void | |
| .end method | |
| .method public static setIsSpeakerModeOnFocusLost(Landroid/content/Context;Z)V | |
| .locals 3 | |
| .param p0, "context" # Landroid/content/Context; | |
| .param p1, "isSpeaker" # Z | |
| .prologue | |
| .line 320 | |
| invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences; | |
| move-result-object v1 | |
| .line 321 | |
| .local v1, "prefs":Landroid/content/SharedPreferences; | |
| invoke-interface {v1}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor; | |
| move-result-object v0 | |
| .line 322 | |
| .local v0, "editor":Landroid/content/SharedPreferences$Editor; | |
| const-string/jumbo v2, "fm_is_speaker_mode" | |
| invoke-interface {v0, v2, p1}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor; | |
| .line 323 | |
| invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z | |
| .line 319 | |
| return-void | |
| .end method | |
| .method public static setLastSearchedLocation(Landroid/content/Context;DD)V | |
| .locals 5 | |
| .param p0, "context" # Landroid/content/Context; | |
| .param p1, "latitude" # D | |
| .param p3, "longitude" # D | |
| .prologue | |
| .line 226 | |
| invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences; | |
| move-result-object v1 | |
| .line 227 | |
| .local v1, "prefs":Landroid/content/SharedPreferences; | |
| invoke-interface {v1}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor; | |
| move-result-object v0 | |
| .line 228 | |
| .local v0, "editor":Landroid/content/SharedPreferences$Editor; | |
| invoke-static {p1, p2}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double; | |
| move-result-object v4 | |
| invoke-virtual {v4}, Ljava/lang/Double;->toString()Ljava/lang/String; | |
| move-result-object v2 | |
| .line 229 | |
| .local v2, "strLatitude":Ljava/lang/String; | |
| invoke-static {p3, p4}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double; | |
| move-result-object v4 | |
| invoke-virtual {v4}, Ljava/lang/Double;->toString()Ljava/lang/String; | |
| move-result-object v3 | |
| .line 230 | |
| .local v3, "strLongitude":Ljava/lang/String; | |
| const-string/jumbo v4, "fm_location_latitude" | |
| invoke-interface {v0, v4, v2}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor; | |
| .line 231 | |
| const-string/jumbo v4, "fm_location_longitude" | |
| invoke-interface {v0, v4, v3}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor; | |
| .line 232 | |
| invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z | |
| .line 225 | |
| return-void | |
| .end method |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment