summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/drawable-hdpi/ic_partial_secure.pngbin0 -> 315 bytes
-rw-r--r--res/drawable-hdpi/ic_secure.pngbin0 -> 398 bytes
-rw-r--r--res/drawable-mdpi/ic_partial_secure.pngbin0 -> 332 bytes
-rw-r--r--res/drawable-mdpi/ic_secure.pngbin0 -> 414 bytes
-rw-r--r--res/layout/url_bar.xml2
-rw-r--r--src/com/android/browser/BrowserActivity.java6
-rw-r--r--src/com/android/browser/SuggestionsAdapter.java24
-rw-r--r--src/com/android/browser/TitleBarXLarge.java5
8 files changed, 19 insertions, 18 deletions
diff --git a/res/drawable-hdpi/ic_partial_secure.png b/res/drawable-hdpi/ic_partial_secure.png
new file mode 100644
index 0000000..76ba96a
--- /dev/null
+++ b/res/drawable-hdpi/ic_partial_secure.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_secure.png b/res/drawable-hdpi/ic_secure.png
new file mode 100644
index 0000000..4f15fc4
--- /dev/null
+++ b/res/drawable-hdpi/ic_secure.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_partial_secure.png b/res/drawable-mdpi/ic_partial_secure.png
new file mode 100644
index 0000000..b3ca0cc
--- /dev/null
+++ b/res/drawable-mdpi/ic_partial_secure.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_secure.png b/res/drawable-mdpi/ic_secure.png
new file mode 100644
index 0000000..70d7edd
--- /dev/null
+++ b/res/drawable-mdpi/ic_secure.png
Binary files differ
diff --git a/res/layout/url_bar.xml b/res/layout/url_bar.xml
index e85ad83..8b4a3c0 100644
--- a/res/layout/url_bar.xml
+++ b/res/layout/url_bar.xml
@@ -60,7 +60,7 @@
<ImageView
android:id="@+id/lock"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
style="@style/HoloIcon"
android:visibility="gone" />
<EditText
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index ff9a418..df2d0ea 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -199,10 +199,8 @@ public class BrowserActivity extends Activity
return;
}
- mSecLockIcon = Resources.getSystem().getDrawable(
- android.R.drawable.ic_secure);
- mMixLockIcon = Resources.getSystem().getDrawable(
- android.R.drawable.ic_partial_secure);
+ mSecLockIcon = getResources().getDrawable(R.drawable.ic_secure);
+ mMixLockIcon = getResources().getDrawable(R.drawable.ic_partial_secure);
// Create the tab control and our initial tab
mTabControl = new TabControl(this);
diff --git a/src/com/android/browser/SuggestionsAdapter.java b/src/com/android/browser/SuggestionsAdapter.java
index 30e46fe..903768c 100644
--- a/src/com/android/browser/SuggestionsAdapter.java
+++ b/src/com/android/browser/SuggestionsAdapter.java
@@ -79,6 +79,8 @@ public class SuggestionsAdapter extends BaseAdapter implements Filterable, OnCli
public void onSelect(String txt);
+ public void onFilterComplete(int count);
+
}
public SuggestionsAdapter(Context ctx, CompletionListener listener) {
@@ -179,7 +181,7 @@ public class SuggestionsAdapter extends BaseAdapter implements Filterable, OnCli
if (item != null) {
bindView(iv, item);
} else {
- iv.setVisibility((mResults.getLeftCount() == 0) ? View.GONE :
+ iv.setVisibility((mResults.getLeftCount() == 0) ? View.GONE :
View.INVISIBLE);
}
item = getItem(position + mResults.getLineCount());
@@ -190,7 +192,7 @@ public class SuggestionsAdapter extends BaseAdapter implements Filterable, OnCli
if (item != null) {
bindView(iv, item);
} else {
- iv.setVisibility((mResults.getRightCount() == 0) ? View.GONE :
+ iv.setVisibility((mResults.getRightCount() == 0) ? View.GONE :
View.INVISIBLE);
}
return view;
@@ -244,7 +246,6 @@ public class SuggestionsAdapter extends BaseAdapter implements Filterable, OnCli
class SuggestFilter extends Filter {
- int count;
SuggestionResults results;
@Override
@@ -269,14 +270,13 @@ public class SuggestionsAdapter extends BaseAdapter implements Filterable, OnCli
return res;
}
results = new SuggestionResults();
- count = 0;
if (constraint != null) {
for (CursorSource sc : mSources) {
sc.runQuery(constraint);
}
mixResults();
}
- res.count = count;
+ res.count = results.getLineCount();
res.values = results;
return res;
}
@@ -284,9 +284,9 @@ public class SuggestionsAdapter extends BaseAdapter implements Filterable, OnCli
void mixResults() {
for (int i = 0; i < mSources.size(); i++) {
CursorSource s = mSources.get(i);
- int n = Math.min(s.getCount(), (mLandscapeMode ? mLinesLandscape
+ int n = Math.min(s.getCount(), (mLandscapeMode ? mLinesLandscape
: mLinesPortrait));
- boolean more = true;
+ boolean more = false;
for (int j = 0; j < n; j++) {
results.addResult(s.getItem());
more = s.moveToNext();
@@ -305,12 +305,12 @@ public class SuggestionsAdapter extends BaseAdapter implements Filterable, OnCli
}
}
}
-
}
@Override
protected void publishResults(CharSequence constraint, FilterResults fresults) {
mResults = (SuggestionResults) fresults.values;
+ mListener.onFilterComplete(fresults.count);
notifyDataSetChanged();
}
@@ -454,10 +454,10 @@ public class SuggestionsAdapter extends BaseAdapter implements Filterable, OnCli
selection = COMBINED_SELECTION;
}
Uri.Builder ub = BrowserContract.Combined.CONTENT_URI.buildUpon();
- ub.appendQueryParameter(BrowserContract.PARAM_LIMIT,
+ ub.appendQueryParameter(BrowserContract.PARAM_LIMIT,
Integer.toString(mLinesPortrait));
mCursor =
- mContext.getContentResolver().query(ub.build(), COMBINED_PROJECTION,
+ mContext.getContentResolver().query(ub.build(), COMBINED_PROJECTION,
selection,
(constraint != null) ? args : null,
BrowserContract.Combined.VISITS + " DESC, " +
@@ -538,10 +538,10 @@ public class SuggestionsAdapter extends BaseAdapter implements Filterable, OnCli
String[] args = new String[] {constraint.toString()};
String selection = BrowserContract.Searches.SEARCH + " LIKE ?";
Uri.Builder ub = BrowserContract.Searches.CONTENT_URI.buildUpon();
- ub.appendQueryParameter(BrowserContract.PARAM_LIMIT,
+ ub.appendQueryParameter(BrowserContract.PARAM_LIMIT,
Integer.toString(mLinesPortrait));
mCursor =
- mContext.getContentResolver().query(ub.build(), SEARCHES_PROJECTION,
+ mContext.getContentResolver().query(ub.build(), SEARCHES_PROJECTION,
selection,
args, BrowserContract.Searches.DATE + " DESC");
if (mCursor != null) {
diff --git a/src/com/android/browser/TitleBarXLarge.java b/src/com/android/browser/TitleBarXLarge.java
index 93a6fb5..7310f75 100644
--- a/src/com/android/browser/TitleBarXLarge.java
+++ b/src/com/android/browser/TitleBarXLarge.java
@@ -105,6 +105,7 @@ public class TitleBarXLarge extends TitleBarBase
mUrlFocused.setUrlInputListener(this);
mUrlUnfocused.setOnFocusChangeListener(this);
mUrlFocused.setContainer(mFocusContainer);
+ mUnfocusContainer.setOnClickListener(this);
}
public void onFocusChange(View v, boolean hasFocus) {
@@ -119,7 +120,9 @@ public class TitleBarXLarge extends TitleBarBase
@Override
public void onClick(View v) {
- if (mBackButton == v) {
+ if (mUnfocusContainer == v) {
+ mUrlUnfocused.requestFocus();
+ } else if (mBackButton == v) {
mBrowserActivity.getTopWindow().goBack();
} else if (mForwardButton == v) {
mBrowserActivity.getTopWindow().goForward();