[android] Code style fix according to code review.

This commit is contained in:
vng 2013-03-24 19:59:52 +03:00 committed by Alex Zolotarev
parent 6ae525bdd0
commit 0aab737327
3 changed files with 10 additions and 9 deletions

View file

@ -42,7 +42,7 @@ public class BookmarkActivity extends AbstractBookmarkActivity
private List<Icon> mIcons;
private ImageView mChooserImage;
private EditText mDescr;
private Icon m_icon = null;
private Icon mIcon = null;
@Override
public void onCreate(Bundle savedInstanceState)
@ -51,10 +51,11 @@ public class BookmarkActivity extends AbstractBookmarkActivity
setContentView(R.layout.add_or_edit_bookmark);
// Note that Point result from the intent is actually a pair of (category index, bookmark index in category).
assert(getIntent().getExtras().containsKey(PIN));
final Point p = ((ParcelablePoint)getIntent().getParcelableExtra(PIN)).getPoint();
final Point cab = ((ParcelablePoint)getIntent().getParcelableExtra(PIN)).getPoint();
mPin = mManager.getBookmark(p.x, p.y);
mPin = mManager.getBookmark(cab.x, cab.y);
mCurrentCategoryId = mPin.getCategoryId();
setTitle(mPin.getName());
@ -63,8 +64,8 @@ public class BookmarkActivity extends AbstractBookmarkActivity
private void updateColorChooser(Icon icon)
{
m_icon = icon;
mChooserImage.setImageBitmap(m_icon.getIcon());
mIcon = icon;
mChooserImage.setImageBitmap(mIcon.getIcon());
}
private void refreshValuesInViews()
@ -136,7 +137,7 @@ public class BookmarkActivity extends AbstractBookmarkActivity
private void assignPinParams()
{
if (mPin != null)
mPin.setParams(mName.getText().toString(), m_icon, mDescr.getText().toString());
mPin.setParams(mName.getText().toString(), mIcon, mDescr.getText().toString());
}
@Override

View file

@ -43,7 +43,8 @@ public class ChooseBookmarkCategoryActivity extends AbstractBookmarkCategoryActi
m_handler.switchToAddButton();
mAdapter.chooseItem(position);
Point cab = ((ParcelablePoint)getIntent().getParcelableExtra(BookmarkActivity.PIN)).getPoint();
// Note that Point result from the intent is actually a pair of (category index, bookmark index in category).
final Point cab = ((ParcelablePoint)getIntent().getParcelableExtra(BookmarkActivity.PIN)).getPoint();
Bookmark bmk = mManager.getBookmark(cab.x, cab.y);
bmk.setCategoryId(position);
getIntent().putExtra(BookmarkActivity.PIN, new ParcelablePoint(position, bmk.getBookmarkId()));
@ -160,6 +161,7 @@ public class ChooseBookmarkCategoryActivity extends AbstractBookmarkCategoryActi
private void createNewCategory(String name)
{
// Note that Point result from the intent is actually a pair of (category index, bookmark index in category).
final Point cab = ((ParcelablePoint)getIntent().getParcelableExtra(BookmarkActivity.PIN)).getPoint();
final int index = mManager.createCategory(mManager.getBookmark(cab.x, cab.y), name);

View file

@ -108,8 +108,6 @@ namespace
return pm;
}
*/
char const * SEARCH_CATEGORY = "Search";
}
void SearchPanel::OnSearchResult(ResultsT * res)