2
這個代碼應該列出最近呼叫最近同號跳過,但它們被顯示出來,請大家幫忙有條件的number1 == number2(Long類型)永遠不會是真的嗎?
//code
Long number0=(long) 0;
// loop through cursor
while(mCallCursor.moveToNext()){
Long number1 = mCallCursor.getLong(0);
if(number1==number0)
continue;
else
number0=number1;
if(mCallCursor.getString(2)!=null){
String name = mCallCursor.getString(2);
System.out.println(name);
}
else
System.out.println(number1);
}