Merge change I4bd71b0f into eclair
* changes: Fix http://b/issue?id=2203681
This commit is contained in:
commit
bbe41b551c
2 files changed
+39
-24
No files matched your search
@@ -16,10 +16,7 @@
|
|||||||
|
|
||||||
<favorites xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher2">
|
<favorites xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher2">
|
||||||
|
|
||||||
com.android.camera
|
|
||||||
|
|
||||||
<!-- Left screen [1] -->
|
<!-- Left screen [1] -->
|
||||||
|
|
||||||
<favorite
|
<favorite
|
||||||
launcher:packageName="com.android.camera"
|
launcher:packageName="com.android.camera"
|
||||||
launcher:className="com.android.camera.Camera"
|
launcher:className="com.android.camera.Camera"
|
||||||
@@ -40,7 +37,7 @@ com.android.camera
|
|||||||
launcher:x="0"
|
launcher:x="0"
|
||||||
launcher:y="0" />
|
launcher:y="0" />
|
||||||
|
|
||||||
<favorite
|
<favorite
|
||||||
launcher:packageName="com.android.contacts"
|
launcher:packageName="com.android.contacts"
|
||||||
launcher:className="com.android.contacts.DialtactsActivity"
|
launcher:className="com.android.contacts.DialtactsActivity"
|
||||||
launcher:screen="2"
|
launcher:screen="2"
|
||||||
@@ -84,14 +81,14 @@ com.android.camera
|
|||||||
|
|
||||||
<!-- Right screen [3] -->
|
<!-- Right screen [3] -->
|
||||||
|
|
||||||
<appwidget
|
<appwidget
|
||||||
launcher:packageName="com.android.settings"
|
launcher:packageName="com.android.settings"
|
||||||
launcher:className="com.android.settings.widget.SettingsAppWidgetProvider"
|
launcher:className="com.android.settings.widget.SettingsAppWidgetProvider"
|
||||||
launcher:screen="3"
|
launcher:screen="3"
|
||||||
launcher:x="0"
|
launcher:x="0"
|
||||||
launcher:y="0"
|
launcher:y="0"
|
||||||
launcher:spanX="4"
|
launcher:spanX="4"
|
||||||
launcher:spanY="1" />
|
launcher:spanY="1" />
|
||||||
|
|
||||||
<favorite
|
<favorite
|
||||||
launcher:packageName="com.google.android.gm"
|
launcher:packageName="com.google.android.gm"
|
||||||
|
|||||||
@@ -110,6 +110,8 @@ public class AllAppsView extends RSSurfaceView
|
|||||||
private int mDownIconIndex = -1;
|
private int mDownIconIndex = -1;
|
||||||
private int mCurrentIconIndex = -1;
|
private int mCurrentIconIndex = -1;
|
||||||
|
|
||||||
|
private boolean mShouldGainFocus;
|
||||||
|
|
||||||
|
|
||||||
static class Defines {
|
static class Defines {
|
||||||
public static final int ALLOC_PARAMS = 0;
|
public static final int ALLOC_PARAMS = 0;
|
||||||
@@ -192,6 +194,10 @@ public class AllAppsView extends RSSurfaceView
|
|||||||
mRollo.setApps(mAllAppsList);
|
mRollo.setApps(mAllAppsList);
|
||||||
Log.d(TAG, "surfaceChanged... calling mRollo.setApps");
|
Log.d(TAG, "surfaceChanged... calling mRollo.setApps");
|
||||||
}
|
}
|
||||||
|
if (mShouldGainFocus) {
|
||||||
|
gainFocus();
|
||||||
|
mShouldGainFocus = false;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
mRollo.mHasSurface = true;
|
mRollo.mHasSurface = true;
|
||||||
mRollo.dirtyCheck();
|
mRollo.dirtyCheck();
|
||||||
@@ -249,24 +255,36 @@ public class AllAppsView extends RSSurfaceView
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (gainFocus) {
|
if (gainFocus) {
|
||||||
if (!mArrowNavigation && mRollo.mState.iconCount > 0) {
|
if (mRollo != null) {
|
||||||
// Select the first icon when we gain keyboard focus
|
gainFocus();
|
||||||
mArrowNavigation = true;
|
} else {
|
||||||
mRollo.selectIcon(Math.round(mRollo.mMessageProc.mPosX) * Defines.COLUMNS_PER_PAGE,
|
mShouldGainFocus = true;
|
||||||
SELECTED_FOCUSED);
|
|
||||||
mRollo.mState.save();
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (mArrowNavigation) {
|
if (mRollo != null) {
|
||||||
// Clear selection when we lose focus
|
if (mArrowNavigation) {
|
||||||
mRollo.clearSelectedIcon();
|
// Clear selection when we lose focus
|
||||||
mRollo.setHomeSelected(SELECTED_NONE);
|
mRollo.clearSelectedIcon();
|
||||||
mRollo.mState.save();
|
mRollo.setHomeSelected(SELECTED_NONE);
|
||||||
mArrowNavigation = false;
|
mRollo.mState.save();
|
||||||
|
mArrowNavigation = false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
mShouldGainFocus = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void gainFocus() {
|
||||||
|
if (!mArrowNavigation && mRollo.mState.iconCount > 0) {
|
||||||
|
// Select the first icon when we gain keyboard focus
|
||||||
|
mArrowNavigation = true;
|
||||||
|
mRollo.selectIcon(Math.round(mRollo.mMessageProc.mPosX) * Defines.COLUMNS_PER_PAGE,
|
||||||
|
SELECTED_FOCUSED);
|
||||||
|
mRollo.mState.save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user