지누지눙
14.07.02
조회 수 15367
추천 수 19
댓글 9

내가제로쿨님의 우연치 않은(?) 시도에


무음 활성화 카메라를 완성했네요


(작업 파일은 앱 자료실에 올려놨습니다)



제로쿨님의 실험적 도전정신에 찬사를 보냅니다



1. feature.xml (/system/csc) Camera 항목에서


<CscFeature_Camera_ShutterSoundMenu>true</CscFeature_Camera_ShutterSoundMenu>

<CscFeature_Camera_EnableCameraDuringCall>true</CscFeature_Camera_EnableCameraDuringCall>


위 두 항목을 true로 바꿔 줍니다


EnableCameraDuringCall은 제로쿨님이 알아내신 겁니다

통화중 촬영을 가능케 하는것 같은데 셔터음 무음도 되게 하는것 같네요



2. SamsungCamera.apk 디컴 후 CameraSettings.smali 에서 (/smali/com/sec/android/app/camera)


.method public setCameraShutterSound(I)V 을 찾고 아래 내용 전체를 복사해 바꿔 줍니다


.method public setCameraShutterSound(I)V
    .locals 4
    .param p1, "shuttersound"    # I

    .prologue
    .line 2599
    invoke-virtual {p0}, Lcom/sec/android/app/camera/CameraSettings;->getPreferences()Lcom/sec/android/app/camera/ComboPreferences;

    move-result-object v1

    const-string v2, "pref_camera_shuttersound_key"

    const/4 v3, 0x1

    invoke-virtual {v1, v2, v3}, Lcom/sec/android/app/camera/ComboPreferences;->getInt(Ljava/lang/String;I)I

    move-result v1

    iput v1, p0, Lcom/sec/android/app/camera/CameraSettings;->mShutterSound:I

    .line 2600
    iget v1, p0, Lcom/sec/android/app/camera/CameraSettings;->mShutterSound:I

    if-eq v1, p1, :cond_42

    .line 2601
    const-string v1, "CameraSettings"

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "setCameraShutterSound "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I

    .line 2602
    iput p1, p0, Lcom/sec/android/app/camera/CameraSettings;->mShutterSound:I

    .line 2603
    invoke-virtual {p0}, Lcom/sec/android/app/camera/CameraSettings;->getPreferences()Lcom/sec/android/app/camera/ComboPreferences;

    move-result-object v1

    invoke-virtual {v1}, Lcom/sec/android/app/camera/ComboPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v0

    .line 2604
    .local v0, "editor":Landroid/content/SharedPreferences$Editor;
    const-string v1, "pref_camera_shuttersound_key"

    iget v2, p0, Lcom/sec/android/app/camera/CameraSettings;->mShutterSound:I

    invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    .line 2605
    invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 2607
    const/16 v1, 0x15

    invoke-virtual {p0, v1, p1}, Lcom/sec/android/app/camera/CameraSettings;->notifyCameraSettingsChanged(II)V

    .line 2609
    .end local v0    # "editor":Landroid/content/SharedPreferences$Editor;
    :cond_42
    return-void
.end method


* classes.dex 를 추출해 baksmali 한 분은 locals 4 를 registers 6 로 바꿔 주세요


위 구문은 예전 강좌를 참고해 4.1 때 소스를 가져온 겁니다 

셔터음 메뉴 활성화 후 토글을 가능케 합니다


댓글 9
댓글 쓰기 권한이 없습니다.
강좌 정렬 목록 검색 쓰기
등록된 글이 없습니다.
1