var afResult = false
try
{
- Log.v(TAG, " findTouchAFPositionResult() : $replyString")
+ //Log.v(TAG, " findTouchAFPositionResult() : $replyString")
val resultObject = JSONObject(replyString)
val result = resultObject.getString("errMsg")
- val focused = resultObject.getBoolean("focused")
- if (result.contains("OK"))
+ try
+ {
+ val focused = resultObject.getBoolean("focused")
+ if (result.contains("OK"))
+ {
+ afResult = focused
+ Log.v(TAG, "AF drive Result : $afResult")
+ }
+ }
+ catch (e : Exception)
{
- afResult = focused
- Log.v(TAG, "AF Result : $afResult")
+ // GR3 は、 focusedを返してくれないので、
+ Log.v(TAG, " AF Result : $replyString")
+ afResult = result.contains("OK")
}
}
catch (e: Exception)
}
if ((!isCameraControl0)&&(!isCameraControl1))
{
- val area = liveviewView.findViewById<LiveImageView>(ID_VIEW_UPPER_AREA)
+ val area = liveviewView.findViewById<View>(ID_VIEW_UPPER_AREA)
area.visibility = View.GONE
}
if ((!isCameraControl2)&&(!isCameraControl3))
{
- val area = liveviewView.findViewById<LiveImageView>(ID_VIEW_LOWER_AREA)
+ val area = liveviewView.findViewById<View>(ID_VIEW_LOWER_AREA)
area.visibility = View.GONE
}
liveviewView.postInvalidate()