protected int getCurrentItem() { String shotMode = this.mGet.getSettingValue(Setting.KEY_CAMERA_SHOT_MODE); String intelliAuto = this.mGet.getSettingValue(Setting.KEY_SMART_MODE); String sceneMode = this.mGet.getSettingValue(Setting.KEY_SCENE_MODE); if (this.mListAdapter == null || this.mGridAdapter == null || this.mTitleText == null || this.mDescText == null) { return 0; } int i; ModeItem item; if (CameraConstants.SMART_MODE_ON.equals(intelliAuto)) { for (i = 0; i < this.mModeItemList.size(); i++) { item = (ModeItem) this.mModeItemList.get(i); if (Setting.KEY_SMART_MODE.equals(item.getKey())) { this.mTitleText.setText(item.getTitle()); this.mDescText.setText(item.getDescription()); this.mListAdapter.setSelectedItem(i); this.mGridAdapter.setSelectedItem(i); return i; } } } else if (CameraConstants.TYPE_SHOTMODE_NORMAL.equals(shotMode) && LGT_Limit.ISP_AUTOMODE_AUTO.equals(sceneMode)) { item = (ModeItem) this.mModeItemList.get(0); this.mTitleText.setText(item.getTitle()); this.mDescText.setText(item.getDescription()); this.mListAdapter.setSelectedItem(0); this.mGridAdapter.setSelectedItem(0); return 0; } else if (CameraConstants.TYPE_SHOTMODE_NORMAL.equals(shotMode)) { for (i = 0; i < this.mModeItemList.size(); i++) { item = (ModeItem) this.mModeItemList.get(i); if (sceneMode.equals(item.getValue())) { this.mTitleText.setText(item.getTitle()); this.mDescText.setText(item.getDescription()); this.mListAdapter.setSelectedItem(i); this.mGridAdapter.setSelectedItem(i); return i; } } } else { for (i = 0; i < this.mModeItemList.size(); i++) { item = (ModeItem) this.mModeItemList.get(i); if (shotMode.equals(item.getValue())) { this.mTitleText.setText(item.getTitle()); this.mDescText.setText(item.getDescription()); this.mListAdapter.setSelectedItem(i); this.mGridAdapter.setSelectedItem(i); return i; } } } return 0; }
protected String getCurrentItemTitle() { if (this.mModeItemList != null) { String shotMode = this.mGet.getSettingValue(Setting.KEY_CAMERA_SHOT_MODE); String intelliAuto = this.mGet.getSettingValue(Setting.KEY_SMART_MODE); String sceneMode = this.mGet.getSettingValue(Setting.KEY_SCENE_MODE); int i; ModeItem item; if (CameraConstants.SMART_MODE_ON.equals(intelliAuto)) { for (i = 0; i < this.mModeItemList.size(); i++) { item = (ModeItem) this.mModeItemList.get(i); if (item != null && Setting.KEY_SMART_MODE.equals(item.getKey())) { return item.getTitle(); } } } else if (CameraConstants.TYPE_SHOTMODE_NORMAL.equals(shotMode) && LGT_Limit.ISP_AUTOMODE_AUTO.equals(sceneMode)) { item = (ModeItem) this.mModeItemList.get(0); if (item != null) { return item.getTitle(); } } else if (CameraConstants.TYPE_SHOTMODE_NORMAL.equals(shotMode)) { for (i = 0; i < this.mModeItemList.size(); i++) { item = (ModeItem) this.mModeItemList.get(i); if (item != null && sceneMode.equals(item.getValue())) { return item.getTitle(); } } } else { for (i = 0; i < this.mModeItemList.size(); i++) { item = (ModeItem) this.mModeItemList.get(i); if (item != null && shotMode.equals(item.getValue())) { return item.getTitle(); } } } } return this.mGet.getString(R.string.normal); }