when a user unregisters, record his user agent for posterity
This commit is contained in:
parent
fdcf317963
commit
8fc6f9c442
|
@ -49,6 +49,19 @@ public class PushFeedbackProcessor extends AccountDatabaseCrawlerListener {
|
|||
device.getUninstalledFeedbackTimestamp() + TimeUnit.DAYS.toMillis(2) <= Util.todayInMillis())
|
||||
{
|
||||
if (device.getLastSeen() + TimeUnit.DAYS.toMillis(2) <= Util.todayInMillis()) {
|
||||
String type = "unknown";
|
||||
if (!Util.isEmpty(device.getApnId()) && device.getId() == 1) {
|
||||
type = "iPhone";
|
||||
} else if (!Util.isEmpty(device.getApnId()) && device.getId() != 1) {
|
||||
type = "iPad";
|
||||
} else if (!Util.isEmpty(device.getGcmId())) {
|
||||
type = "Android";
|
||||
} else if (device.getFetchesMessages() && "OWA".equals(device.getUserAgent())) {
|
||||
type = "Android Tweaker";
|
||||
} else if (device.getFetchesMessages()) {
|
||||
type = "Desktop";
|
||||
}
|
||||
device.setUserAgent(type);
|
||||
device.setGcmId(null);
|
||||
device.setApnId(null);
|
||||
device.setVoipApnId(null);
|
||||
|
|
Loading…
Reference in New Issue