Remove unused code
* Remove Giga crash handler * Some refactoring * Remove unused download dialog * Remove duplicated intent creation
This commit is contained in:
parent
11541310d6
commit
bab3dd417e
3 changed files with 11 additions and 262 deletions
|
|
@ -89,30 +89,22 @@ public class DownloadManagerService extends Service {
|
|||
}
|
||||
}
|
||||
|
||||
Intent i = new Intent();
|
||||
i.setAction(Intent.ACTION_MAIN);
|
||||
i.setClass(this, DownloadActivity.class);
|
||||
Intent openDownloadListIntent = new Intent(this, DownloadActivity.class)
|
||||
.setAction(Intent.ACTION_MAIN);
|
||||
|
||||
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0,
|
||||
openDownloadListIntent,
|
||||
PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
|
||||
Drawable icon = ContextCompat.getDrawable(this, R.mipmap.ic_launcher);
|
||||
|
||||
Builder builder = new Builder(this)
|
||||
.setContentIntent(PendingIntent.getActivity(this, 0, i, 0))
|
||||
.setContentIntent(pendingIntent)
|
||||
.setSmallIcon(android.R.drawable.stat_sys_download)
|
||||
.setLargeIcon(((BitmapDrawable) icon).getBitmap())
|
||||
.setContentTitle(getString(R.string.msg_running))
|
||||
.setContentText(getString(R.string.msg_running_detail));
|
||||
|
||||
PendingIntent pendingIntent =
|
||||
PendingIntent.getActivity(
|
||||
this,
|
||||
0,
|
||||
new Intent(this, DownloadActivity.class)
|
||||
.setAction(DownloadActivity.INTENT_LIST),
|
||||
PendingIntent.FLAG_UPDATE_CURRENT
|
||||
);
|
||||
|
||||
builder.setContentIntent(pendingIntent);
|
||||
|
||||
mNotification = builder.build();
|
||||
|
||||
HandlerThread thread = new HandlerThread("ServiceMessenger");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue