am 12da2c5e: Merge "Fix 6665117: ACTION_ASSIST visual improvements" into jb-dev

* commit '12da2c5eeeadd6c23da5d3003d0da3b6b73d5052':
  Fix 6665117: ACTION_ASSIST visual improvements
This commit is contained in:
Jim Miller
2012-06-18 13:32:05 -07:00
committed by Android Git Automerger
21 changed files with 37 additions and 30 deletions

View File

@@ -180,8 +180,8 @@ public class PointCloud {
float glowDistance = hypot(glowManager.x - point.x, glowManager.y - point.y);
float glowAlpha = 0.0f;
if (glowDistance < glowManager.radius) {
float cosf = FloatMath.cos(PI * 0.5f * glowDistance / glowManager.radius);
glowAlpha = glowManager.alpha * max(0.0f, (float) Math.pow(cosf, 0.5f));
float cosf = FloatMath.cos(PI * 0.25f * glowDistance / glowManager.radius);
glowAlpha = glowManager.alpha * max(0.0f, (float) Math.pow(cosf, 10.0f));
}
// Compute contribution from Wave
@@ -190,7 +190,7 @@ public class PointCloud {
float waveAlpha = 0.0f;
if (distanceToWaveRing < waveManager.width * 0.5f) {
float cosf = FloatMath.cos(PI * 0.5f * distanceToWaveRing / waveManager.width);
waveAlpha = waveManager.alpha * max(0.0f, (float) Math.pow(cosf, 15.0f));
waveAlpha = waveManager.alpha * max(0.0f, (float) Math.pow(cosf, 20.0f));
}
return (int) (max(glowAlpha, waveAlpha) * 255);

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -19,18 +19,18 @@
android:state_enabled="true"
android:state_active="false"
android:state_focused="false"
android:drawable="@drawable/ic_lockscreen_google_normal" />
android:drawable="@drawable/ic_action_assist_generic_normal" />
<item
android:state_enabled="true"
android:state_active="true"
android:state_focused="false"
android:drawable="@drawable/ic_lockscreen_google_activated" />
android:drawable="@drawable/ic_action_assist_generic_activated" />
<item
android:state_enabled="true"
android:state_active="false"
android:state_focused="true"
android:drawable="@drawable/ic_lockscreen_google_focused" />
android:drawable="@drawable/ic_action_assist_generic_activated" />
</selector>

View File

@@ -20,5 +20,5 @@
<size android:height="@dimen/keyguard_lockscreen_outerring_diameter"
android:width="@dimen/keyguard_lockscreen_outerring_diameter" />
<solid android:color="#00000000" />
<stroke android:color="#1affffff" android:width="2dp" />
</shape>
<stroke android:color="#00000000" android:width="2dp" />
</shape>

View File

@@ -23,7 +23,7 @@
<array name="lockscreen_targets_when_silent">
<item>@null</item>"
<item>@drawable/ic_lockscreen_unlock</item>
<item>@drawable/ic_lockscreen_search</item>
<item>@drawable/ic_action_assist_generic</item>
<item>@drawable/ic_lockscreen_soundon</item>
</array>
@@ -44,7 +44,7 @@
<array name="lockscreen_targets_when_soundon">
<item>@null</item>
<item>@drawable/ic_lockscreen_unlock</item>
<item>@drawable/ic_lockscreen_search</item>
<item>@drawable/ic_action_assist_generic</item>
<item>@drawable/ic_lockscreen_silent</item>
</array>
@@ -58,7 +58,7 @@
<array name="lockscreen_targets_with_camera">
<item>@null</item>
<item>@drawable/ic_lockscreen_unlock</item>
<item>@drawable/ic_lockscreen_search</item>
<item>@drawable/ic_action_assist_generic</item>
<item>@drawable/ic_lockscreen_camera</item>
</array>

View File

@@ -57,7 +57,7 @@
<array name="lockscreen_targets_with_camera">
<item>@drawable/ic_lockscreen_unlock</item>
<item>@drawable/ic_lockscreen_search</item>
<item>@drawable/ic_action_assist_generic</item>
<item>@drawable/ic_lockscreen_camera</item>
<item>@null</item>
</array>

View File

@@ -353,7 +353,7 @@
<!-- Resources for GlowPadView in LockScreen -->
<array name="lockscreen_targets_when_silent">
<item>@drawable/ic_lockscreen_unlock</item>
<item>@drawable/ic_lockscreen_search</item>
<item>@drawable/ic_action_assist_generic</item>
<item>@drawable/ic_lockscreen_soundon</item>
<item>@null</item>
</array>
@@ -374,7 +374,7 @@
<array name="lockscreen_targets_when_soundon">
<item>@drawable/ic_lockscreen_unlock</item>
<item>@drawable/ic_lockscreen_search</item>
<item>@drawable/ic_action_assist_generic</item>
<item>@drawable/ic_lockscreen_silent</item>
<item>@null</item>
</array>
@@ -388,7 +388,7 @@
<array name="lockscreen_targets_with_camera">
<item>@drawable/ic_lockscreen_unlock</item>
<item>@drawable/ic_lockscreen_search</item>
<item>@drawable/ic_action_assist_generic</item>
<item>@drawable/ic_lockscreen_camera</item>
<item>@null</item>
</array>

View File

@@ -1018,7 +1018,7 @@
<java-symbol type="drawable" name="ic_lockscreen_camera" />
<java-symbol type="drawable" name="ic_lockscreen_silent" />
<java-symbol type="drawable" name="ic_lockscreen_unlock" />
<java-symbol type="drawable" name="ic_lockscreen_search" />
<java-symbol type="drawable" name="ic_action_assist_generic" />
<java-symbol type="drawable" name="notification_bg" />
<java-symbol type="drawable" name="notification_bg_low" />
<java-symbol type="drawable" name="notification_template_icon_bg" />

View File

@@ -19,5 +19,5 @@
<size android:height="@dimen/navbar_search_outerring_diameter"
android:width="@dimen/navbar_search_outerring_diameter" />
<solid android:color="#00000000" />
<stroke android:color="#40ffffff" android:width="2dp" />
</shape>
<stroke android:color="#00000000" android:width="2dp" />
</shape>

View File

@@ -22,7 +22,7 @@
<array name="navbar_search_targets">
<item>@null</item>
<item>@null</item>
<item>@*android:drawable/ic_lockscreen_search</item>
<item>@*android:drawable/ic_action_assist_generic</item>
<item>@null</item>
</array>

View File

@@ -21,7 +21,7 @@
<array name="navbar_search_targets">
<item>@null</item>
<item>@*android:drawable/ic_lockscreen_search</item>
<item>@*android:drawable/ic_action_assist_generic</item>
<item>@null</item>
<item>@null</item>
</array>

View File

@@ -21,7 +21,7 @@
<array name="navbar_search_targets">
<item>@null</item>
<item>@*android:drawable/ic_lockscreen_search</item>
<item>@*android:drawable/ic_action_assist_generic</item>
<item>@null</item>
<item>@null</item>
</array>

View File

@@ -118,7 +118,7 @@ public class SearchPanelView extends FrameLayout implements
public void onTrigger(View v, final int target) {
final int resId = mGlowPadView.getResourceIdForTarget(target);
switch (resId) {
case com.android.internal.R.drawable.ic_lockscreen_search:
case com.android.internal.R.drawable.ic_action_assist_generic:
mWaitingForLaunch = true;
startAssistActivity();
vibrate();
@@ -155,7 +155,7 @@ public class SearchPanelView extends FrameLayout implements
if (component != null) {
if (!mGlowPadView.replaceTargetDrawablesIfPresent(component,
ASSIST_ICON_METADATA_NAME,
com.android.internal.R.drawable.ic_lockscreen_search)) {
com.android.internal.R.drawable.ic_action_assist_generic)) {
Slog.w(TAG, "Couldn't grab icon from component " + component);
}
} else {

View File

@@ -301,10 +301,17 @@ class LockScreen extends LinearLayout implements KeyguardScreen {
if (searchManager != null) {
ComponentName component = searchManager.getGlobalSearchActivity();
if (component != null) {
if (!mGlowPadView.replaceTargetDrawablesIfPresent(component,
ASSIST_ICON_METADATA_NAME,
com.android.internal.R.drawable.ic_lockscreen_search)) {
Slog.w(TAG, "Couldn't grab icon from package " + component);
// XXX Hack. We need to substitute the icon here but haven't formalized
// the public API. The "_google" metadata will be going away, so
// DON'T USE IT!
boolean replaced = mGlowPadView.replaceTargetDrawablesIfPresent(component,
ASSIST_ICON_METADATA_NAME + "_google",
com.android.internal.R.drawable.ic_action_assist_generic);
if (!replaced && !mGlowPadView.replaceTargetDrawablesIfPresent(component,
ASSIST_ICON_METADATA_NAME,
com.android.internal.R.drawable.ic_action_assist_generic)) {
Slog.w(TAG, "Couldn't grab icon from package " + component);
}
} else {
Slog.w(TAG, "No search icon specified in package " + component);
@@ -315,7 +322,7 @@ class LockScreen extends LinearLayout implements KeyguardScreen {
}
setEnabled(com.android.internal.R.drawable.ic_lockscreen_camera, !mCameraDisabled);
setEnabled(com.android.internal.R.drawable.ic_lockscreen_search, !mSearchDisabled);
setEnabled(com.android.internal.R.drawable.ic_action_assist_generic, !mSearchDisabled);
}
public void onGrabbed(View v, int handle) {
@@ -329,7 +336,7 @@ class LockScreen extends LinearLayout implements KeyguardScreen {
public void onTrigger(View v, int target) {
final int resId = mGlowPadView.getResourceIdForTarget(target);
switch (resId) {
case com.android.internal.R.drawable.ic_lockscreen_search:
case com.android.internal.R.drawable.ic_action_assist_generic:
Intent assistIntent = getAssistIntent();
if (assistIntent != null) {
launchActivity(assistIntent);
@@ -535,7 +542,7 @@ class LockScreen extends LinearLayout implements KeyguardScreen {
: false;
boolean searchTargetPresent = (mUnlockWidgetMethods instanceof GlowPadViewMethods)
? ((GlowPadViewMethods) mUnlockWidgetMethods)
.isTargetPresent(com.android.internal.R.drawable.ic_lockscreen_search)
.isTargetPresent(com.android.internal.R.drawable.ic_action_assist_generic)
: false;
if (disabledByAdmin) {