Back to project page sms-backup-plus.
The source code is released under:
Apache License
If you think the Android project sms-backup-plus listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.zegoggles.smssync.service; /*from w ww . j a v a 2 s . c o m*/ import android.content.Intent; import com.zegoggles.smssync.R; public enum BackupType { BROADCAST_INTENT(R.string.source_3rd_party), INCOMING(R.string.source_incoming), REGULAR(R.string.source_regular), UNKNOWN(R.string.source_unknown), MANUAL(R.string.source_manual); public final int resId; BackupType(int resId) { this.resId = resId; } public static final String EXTRA = "com.zegoggles.smssync.BackupTypeAsString"; public static BackupType fromIntent(Intent intent) { if (intent.hasExtra(EXTRA)) { final String name = intent.getStringExtra(EXTRA); for (BackupType type : values()) { if (type.name().equals(name)) { return type; } } return UNKNOWN; } else { return UNKNOWN; } } public boolean isBackground() { return this != MANUAL; } }