Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
packages_apps_Launcher3
Commits
99568591
Commit
99568591
authored
9 years ago
by
Sunny Goyal
Browse files
Options
Download
Email Patches
Plain Diff
Adding viewId for the QSB
Change-Id: I4ad6bc8c0d94e60a4d354dfc29f456ca561fc500
parent
22aa3813
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
src/com/android/launcher3/Launcher.java
src/com/android/launcher3/Launcher.java
+7
-1
No files found.
src/com/android/launcher3/Launcher.java
View file @
99568591
...
...
@@ -207,6 +207,8 @@ public class Launcher extends Activity
private
static
final
String
QSB_WIDGET_ID
=
"qsb_widget_id"
;
private
static
final
String
QSB_WIDGET_PROVIDER
=
"qsb_widget_provider"
;
// Item id to use for QSB widget.
private
static
final
int
QSB_ITEM_ID
=
-
1
;
public
static
final
String
USER_HAS_MIGRATED
=
"launcher.user_migrated_from_old_data"
;
...
...
@@ -674,7 +676,10 @@ public class Launcher extends Activity
public
int
getViewIdForItem
(
ItemInfo
info
)
{
// This cast is safe given the > 2B range for int.
int
itemId
=
(
int
)
info
.
id
;
return
getViewIdForItemId
((
int
)
info
.
id
);
}
public
int
getViewIdForItemId
(
int
itemId
)
{
if
(
mItemIdToViewId
.
containsKey
(
itemId
))
{
return
mItemIdToViewId
.
get
(
itemId
);
}
...
...
@@ -3509,6 +3514,7 @@ public class Launcher extends Activity
mQsb
=
mAppWidgetHost
.
createView
(
this
,
widgetId
,
searchProvider
);
mQsb
.
updateAppWidgetOptions
(
opts
);
mQsb
.
setPadding
(
0
,
0
,
0
,
0
);
mQsb
.
setId
(
getViewIdForItemId
(
QSB_ITEM_ID
));
mSearchDropTargetBar
.
addView
(
mQsb
);
mSearchDropTargetBar
.
setQsbSearchBar
(
mQsb
);
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment