ns client quickfix now catch all
This commit is contained in:
parent
c64c5f5401
commit
0d1ff3d721
|
@ -29,9 +29,13 @@ public class BroadcastAckAlarm {
|
|||
intent.putExtras(bundle);
|
||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||
context.sendBroadcast(intent);
|
||||
List<ResolveInfo> x = context.getPackageManager().queryBroadcastReceivers(intent, 0);
|
||||
try {
|
||||
List<ResolveInfo> x = context.getPackageManager().queryBroadcastReceivers(intent, 0);
|
||||
log.debug("ACKALARM " + x.size() + " receivers");
|
||||
} catch (Exception e){
|
||||
//for testing
|
||||
}
|
||||
|
||||
log.debug("ACKALARM " + x.size() + " receivers");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -26,8 +26,13 @@ public class BroadcastAlarm {
|
|||
intent.putExtras(bundle);
|
||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||
context.sendBroadcast(intent);
|
||||
|
||||
try{
|
||||
List<ResolveInfo> x = context.getPackageManager().queryBroadcastReceivers(intent, 0);
|
||||
|
||||
log.debug("ALARM " + x.size() + " receivers");
|
||||
} catch (Exception e){
|
||||
//for testing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,8 +27,12 @@ public class BroadcastAnnouncement {
|
|||
intent.putExtras(bundle);
|
||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||
context.sendBroadcast(intent);
|
||||
try {
|
||||
List<ResolveInfo> x = context.getPackageManager().queryBroadcastReceivers(intent, 0);
|
||||
|
||||
log.debug("ANNOUNCEMENT " + x.size() + " receivers");
|
||||
} catch (Exception e){
|
||||
//for testing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,8 +27,12 @@ public class BroadcastCals {
|
|||
intent.putExtras(bundle);
|
||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||
context.sendBroadcast(intent);
|
||||
try {
|
||||
List<ResolveInfo> x = context.getPackageManager().queryBroadcastReceivers(intent, 0);
|
||||
|
||||
log.debug("CAL " + x.size() + " receivers");
|
||||
} catch (Exception e){
|
||||
//for testing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,8 +26,12 @@ public class BroadcastClearAlarm {
|
|||
intent.putExtras(bundle);
|
||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||
context.sendBroadcast(intent);
|
||||
try {
|
||||
List<ResolveInfo> x = context.getPackageManager().queryBroadcastReceivers(intent, 0);
|
||||
|
||||
log.debug("CLEARALARM " + x.size() + " receivers");
|
||||
} catch (Exception e){
|
||||
//for testing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,9 +26,13 @@ public class BroadcastDeviceStatus {
|
|||
intent.putExtras(bundle);
|
||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||
context.sendBroadcast(intent);
|
||||
try {
|
||||
List<ResolveInfo> x = context.getPackageManager().queryBroadcastReceivers(intent, 0);
|
||||
|
||||
log.debug("DEVICESTATUS " + x.size() + " receivers");
|
||||
} catch (Exception e){
|
||||
//for testing
|
||||
}
|
||||
}
|
||||
public static void handleNewDeviceStatus(JSONArray statuses, Context context, boolean isDelta) {
|
||||
List<JSONArray> splitted = BroadcastTreatment.splitArray(statuses);
|
||||
|
@ -40,9 +44,13 @@ public class BroadcastDeviceStatus {
|
|||
intent.putExtras(bundle);
|
||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||
context.sendBroadcast(intent);
|
||||
try {
|
||||
List<ResolveInfo> x = context.getPackageManager().queryBroadcastReceivers(intent, 0);
|
||||
|
||||
log.debug("DEVICESTATUS " + part.length() + " records " + x.size() + " receivers");
|
||||
} catch (Exception e){
|
||||
//for testing
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,8 +27,12 @@ public class BroadcastMbgs {
|
|||
intent.putExtras(bundle);
|
||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||
context.sendBroadcast(intent);
|
||||
try {
|
||||
List<ResolveInfo> x = context.getPackageManager().queryBroadcastReceivers(intent, 0);
|
||||
|
||||
log.debug("MBG " + x.size() + " receivers");
|
||||
} catch (Exception e){
|
||||
//for testing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,9 +28,13 @@ public class BroadcastProfile {
|
|||
intent.putExtras(bundle);
|
||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||
context.sendBroadcast(intent);
|
||||
try {
|
||||
List<ResolveInfo> x = context.getPackageManager().queryBroadcastReceivers(intent, 0);
|
||||
|
||||
log.debug("PROFILE " + x.size() + " receivers");
|
||||
} catch (Exception e){
|
||||
//for testing
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -28,9 +28,13 @@ public class BroadcastSgvs {
|
|||
intent.putExtras(bundle);
|
||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||
context.sendBroadcast(intent);
|
||||
try {
|
||||
List<ResolveInfo> x = context.getPackageManager().queryBroadcastReceivers(intent, 0);
|
||||
|
||||
log.debug("SGV " + x.size() + " receivers");
|
||||
} catch (Exception e){
|
||||
//for testing
|
||||
}
|
||||
}
|
||||
|
||||
public static void handleNewSgv(JSONArray sgvs, Context context, boolean isDelta) {
|
||||
|
@ -41,9 +45,13 @@ public class BroadcastSgvs {
|
|||
intent.putExtras(bundle);
|
||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||
context.sendBroadcast(intent);
|
||||
try {
|
||||
List<ResolveInfo> x = context.getPackageManager().queryBroadcastReceivers(intent, 0);
|
||||
|
||||
log.debug("SGV " + x.size() + " receivers");
|
||||
} catch (Exception e){
|
||||
//for testing
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -38,8 +38,12 @@ public class BroadcastStatus {
|
|||
intent.putExtras(bundle);
|
||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||
context.sendBroadcast(intent);
|
||||
try {
|
||||
List<ResolveInfo> x = context.getPackageManager().queryBroadcastReceivers(intent, 0);
|
||||
|
||||
log.debug("STATUS: " + x.size() + " receivers");
|
||||
} catch (Exception e){
|
||||
//for testing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,9 +32,13 @@ public class BroadcastTreatment {
|
|||
intent.putExtras(bundle);
|
||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||
context.sendBroadcast(intent);
|
||||
try {
|
||||
List<ResolveInfo> x = context.getPackageManager().queryBroadcastReceivers(intent, 0);
|
||||
|
||||
log.debug("TREAT_ADD " + treatment.getEventType() + " " + x.size() + " receivers");
|
||||
} catch (Exception e){
|
||||
//for testing
|
||||
}
|
||||
}
|
||||
|
||||
public static void handleNewTreatment(JSONArray treatments, Context context, boolean isDelta) {
|
||||
|
@ -50,9 +54,9 @@ public class BroadcastTreatment {
|
|||
try {
|
||||
List<ResolveInfo> x = context.getPackageManager().queryBroadcastReceivers(intent, 0);
|
||||
log.debug("TREAT_ADD " + part.length() + " " + x.size() + " receivers");
|
||||
} catch (Throwable exception){
|
||||
log.debug("TREAT_ADD " + part.length() + " ERROR: no receiver size, CAUSE: " + exception.getMessage());
|
||||
}
|
||||
} catch (Exception e){
|
||||
//for testing
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -65,11 +69,11 @@ public class BroadcastTreatment {
|
|||
intent.putExtras(bundle);
|
||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||
context.sendBroadcast(intent);
|
||||
try {
|
||||
List<ResolveInfo> x = context.getPackageManager().queryBroadcastReceivers(intent, 0);
|
||||
|
||||
try {
|
||||
log.debug("TREAT_CHANGE " + treatment.getString("_id") + " " + x.size() + " receivers");
|
||||
} catch (JSONException e) {
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -83,9 +87,13 @@ public class BroadcastTreatment {
|
|||
intent.putExtras(bundle);
|
||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||
context.sendBroadcast(intent);
|
||||
try {
|
||||
List<ResolveInfo> x = context.getPackageManager().queryBroadcastReceivers(intent, 0);
|
||||
|
||||
log.debug("TREAT_CHANGE " + part.length() + " " + x.size() + " receivers");
|
||||
} catch (Exception e){
|
||||
//for testing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -97,11 +105,13 @@ public class BroadcastTreatment {
|
|||
intent.putExtras(bundle);
|
||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||
context.sendBroadcast(intent);
|
||||
try {
|
||||
List<ResolveInfo> x = context.getPackageManager().queryBroadcastReceivers(intent, 0);
|
||||
|
||||
try {
|
||||
|
||||
log.debug("TREAT_REMOVE " + treatment.getString("_id") + " " + x.size() + " receivers");
|
||||
} catch (JSONException e) {
|
||||
} catch (Exception e){
|
||||
//for testing
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -113,9 +123,13 @@ public class BroadcastTreatment {
|
|||
intent.putExtras(bundle);
|
||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||
context.sendBroadcast(intent);
|
||||
try {
|
||||
List<ResolveInfo> x = context.getPackageManager().queryBroadcastReceivers(intent, 0);
|
||||
|
||||
log.debug("TREAT_REMOVE " + treatments.length() + " treatments " + x.size() + " receivers");
|
||||
} catch (Exception e){
|
||||
//for testing
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -26,8 +26,12 @@ public class BroadcastUrgentAlarm {
|
|||
intent.putExtras(bundle);
|
||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||
context.sendBroadcast(intent);
|
||||
try {
|
||||
List<ResolveInfo> x = context.getPackageManager().queryBroadcastReceivers(intent, 0);
|
||||
|
||||
log.debug("URGENTALARM " + x.size() + " receivers");
|
||||
} catch (Exception e){
|
||||
//for testing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue