Fix for issues created by OEM

- yellow line while gesturing
- crash moving google task around
- anr when first installing app
pull/14/head
Tim Su 15 years ago
parent 7d6bcee9b0
commit eaebec0850

@ -124,7 +124,7 @@ public class GtasksTaskListUpdater {
Node root = buildTreeModel(list);
Node target = findNode(root, targetTaskId);
if(target != null && target.parent != null) {
if(moveBeforeTaskId == -1) {
target.parent.children.remove(target);
root.children.add(target);
@ -136,6 +136,7 @@ public class GtasksTaskListUpdater {
sibling.parent.children.add(index, target);
}
}
}
traverseTreeAndWriteValues(root, new AtomicInteger(0), -1);
}

@ -6,6 +6,7 @@
android:layout_height="wrap_content"
android:layout_weight="100"
android:gestureColor="#00000000"
android:uncertainGestureColor="#00000000"
android:eventsInterceptionEnabled="true"
android:orientation="vertical">

@ -131,6 +131,7 @@ public class StartupService {
// invoke upgrade service
boolean justUpgraded = latestSetVersion != version;
if(justUpgraded && version > 0) {
if(latestSetVersion > 0)
upgradeService.performUpgrade(context, latestSetVersion);
AstridPreferences.setCurrentVersion(version);
}
@ -182,24 +183,35 @@ public class StartupService {
* Create tasks for first time users
*/
private void onFirstTime() {
Resources r = ContextManager.getResources();
final Resources r = ContextManager.getResources();
try {
new Thread(new Runnable() {
@Override
public void run() {
database.openForWriting();
if(taskService.countTasks() > 0)
return;
// change count below as well
addIntroTask(r, R.string.intro_task_1_summary, R.string.intro_task_1_note);
addIntroTask(r, R.string.intro_task_2_summary, R.string.intro_task_2_note);
addIntroTask(r, R.string.intro_task_3_summary, R.string.intro_task_3_note);
for(int i = 0; i < INTRO_TASKS.length; i += 2)
addIntroTask(r, INTRO_TASKS[i], INTRO_TASKS[i + 1]);
}
}).start();
} catch (Exception e) {
exceptionService.reportError("on-first-time", e); //$NON-NLS-1$
}
}
public static final int INTRO_TASK_SIZE = 3;
private static final int[] INTRO_TASKS = new int[] {
R.string.intro_task_1_summary,
R.string.intro_task_1_note,
R.string.intro_task_2_summary,
R.string.intro_task_2_note,
R.string.intro_task_3_summary,
R.string.intro_task_3_note,
};
public static final int INTRO_TASK_SIZE = INTRO_TASKS.length / 2;
private void addIntroTask(Resources r, int summary, int note) {
Task task = new Task();

@ -77,9 +77,9 @@ public final class UpgradeService {
if(from == 135)
AddOnService.recordOem();
// pop up a progress dialog
// long running tasks: pop up a progress dialog
final ProgressDialog dialog;
if(context instanceof Activity)
if(from < V3_0_0 && context instanceof Activity)
dialog = DialogUtilities.progressDialog(context,
context.getString(R.string.DLG_upgrading));
else

Loading…
Cancel
Save