diff --git a/doc/210340068 潘孝峰小组.docx b/doc/210340068_潘孝峰小组.docx similarity index 80% rename from doc/210340068 潘孝峰小组.docx rename to doc/210340068_潘孝峰小组.docx index 68ed02d..edf06d9 100644 Binary files a/doc/210340068 潘孝峰小组.docx and b/doc/210340068_潘孝峰小组.docx differ diff --git a/doc/用例描述,用例顺序图,分析类图.doc b/doc/用例描述,用例顺序图,分析类图.doc new file mode 100644 index 0000000..0aa478e Binary files /dev/null and b/doc/用例描述,用例顺序图,分析类图.doc differ diff --git a/src/gtask/remote/GTaskASyncTask.java b/src/gtask/remote/GTaskASyncTask.java index 0e332f3..b3b61e7 100644 --- a/src/gtask/remote/GTaskASyncTask.java +++ b/src/gtask/remote/GTaskASyncTask.java @@ -64,6 +64,10 @@ public class GTaskASyncTask extends AsyncTask { } private void showNotification(int tickerId, String content) { + Notification notification = new Notification(R.drawable.notification, mContext + .getString(tickerId), System.currentTimeMillis()); + notification.defaults = Notification.DEFAULT_LIGHTS; + notification.flags = Notification.FLAG_AUTO_CANCEL; PendingIntent pendingIntent; if (tickerId != R.string.ticker_success) { pendingIntent = PendingIntent.getActivity(mContext, 0, new Intent(mContext, @@ -73,21 +77,11 @@ public class GTaskASyncTask extends AsyncTask { pendingIntent = PendingIntent.getActivity(mContext, 0, new Intent(mContext, NotesListActivity.class), 0); } - - - Notification.Builder builder = new Notification.Builder(mContext) - .setAutoCancel(true) - .setContentTitle(mContext.getString(R.string.app_name)) - .setContentText(content) - .setContentIntent(pendingIntent) - .setWhen(System.currentTimeMillis()) - .setOngoing(true); - Notification notification=builder.getNotification(); + notification.setLatestEventInfo(mContext, mContext.getString(R.string.app_name), content, + pendingIntent); mNotifiManager.notify(GTASK_SYNC_NOTIFICATION_ID, notification); } - - @Override protected Integer doInBackground(Void... unused) { publishProgess(mContext.getString(R.string.sync_progress_login, NotesPreferenceActivity diff --git a/src/model/Note.java b/src/model/Note.java index f291329..6706cf6 100644 --- a/src/model/Note.java +++ b/src/model/Note.java @@ -251,4 +251,3 @@ public class Note { } } } - \ No newline at end of file