@Override public long getItemId(int position) { return activityInfos.get(position).componentName.hashCode(); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((mComponentName == null) ? 0 : mComponentName.hashCode()); result = prime * result + ((mLastExecution == null) ? 0 : mLastExecution.hashCode()); result = prime * result + mRunCount; return result; }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((activity == null) ? 0 : activity.hashCode()); result = prime * result + (int) (time ^ (time >>> 32)); result = prime * result + Float.floatToIntBits(weight); return result; }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((activity == null) ? 0 : activity.hashCode()); result = prime * result + (int) (time ^ (time >>> 32)); result = prime * result + Float.floatToIntBits(weight); return result; }
@Override public long getItemId(int position) { return activityInfos.get(position).componentName.hashCode(); }
@Override public int hashCode() { return getComponentName().hashCode(); }
@Override public int hashCode() { return componentName.hashCode() + user.hashCode(); }
@Override @Implementation public int hashCode() { int result = extras != null ? extras.hashCode() : 0; result = 31 * result + (action != null ? action.hashCode() : 0); result = 31 * result + (componentName != null ? componentName.hashCode() : 0); result = 31 * result + (data != null ? data.hashCode() : 0); result = 31 * result + (type != null ? type.hashCode() : 0); result = 31 * result + flags; return result; }
protected LauncherEvent createLauncherEvent(View v, Intent intent) { LauncherEvent event = LoggerUtils.initLauncherEvent( Action.TOUCH, v, Target.CONTAINER); event.action.touch = Action.TAP; // Fill in grid(x,y), pageIndex of the child and container type of the parent // TODO: make this percolate up the view hierarchy if needed. int idx = 0; LaunchSourceProvider provider = getLaunchProviderRecursive(v); if (v == null || !(v.getTag() instanceof ItemInfo) || provider == null) { return null; } ItemInfo itemInfo = (ItemInfo) v.getTag(); provider.fillInLaunchSourceData(v, itemInfo, event.srcTarget[idx], event.srcTarget[idx + 1]); event.srcTarget[idx].intentHash = intent.hashCode(); ComponentName cn = intent.getComponent(); if (cn != null) { event.srcTarget[idx].packageNameHash = cn.getPackageName().hashCode(); event.srcTarget[idx].componentHash = cn.hashCode(); if (mPredictedApps != null) { event.srcTarget[idx].predictedRank = mPredictedApps.indexOf( new ComponentKey(cn, itemInfo.user)); } } return event; }
protected LauncherEvent createLauncherEvent(View v, Intent intent) { LauncherEvent event = LoggerUtils.initLauncherEvent( Action.TOUCH, v, Target.CONTAINER); event.action.touch = Action.TAP; // Fill in grid(x,y), pageIndex of the child and container type of the parent // TODO: make this percolate up the view hierarchy if needed. int idx = 0; LaunchSourceProvider provider = getLaunchProviderRecursive(v); if (v == null || !(v.getTag() instanceof ItemInfo) || provider == null) { return null; } ItemInfo itemInfo = (ItemInfo) v.getTag(); provider.fillInLaunchSourceData(v, itemInfo, event.srcTarget[idx], event.srcTarget[idx + 1]); event.srcTarget[idx].intentHash = intent.hashCode(); ComponentName cn = intent.getComponent(); if (cn != null) { event.srcTarget[idx].packageNameHash = cn.getPackageName().hashCode(); event.srcTarget[idx].componentHash = cn.hashCode(); if (mPredictedApps != null) { event.srcTarget[idx].predictedRank = mPredictedApps.indexOf( new ComponentKey(cn, itemInfo.user)); } } return event; }