Marco Maisto
Dec 11, 2018
12:29 pm

Block incoming calls

Good morning,

We are trying to block all incoming calls on the device without success.

We are using the method:

EnterpriseDeviceManager edm = EnterpriseDeviceManager.getInstance(context);
PhoneRestrictionPolicy phoneRestrictionPolicy = edm.getPhoneRestrictionPolicy();
phoneRestrictionPolicy.setIncomingCallRestriction(".");

and we have tried also

phoneRestrictionPolicy.setIncomingCallRestriction(".*");

and

phoneRestrictionPolicy.addIncomingCallRestriction(".")

phoneRestrictionPolicy.addIncomingCallRestriction(".*")

but none of them seems to work, because we still can call the particular device (the device is a Galaxy Tab A).

Actually, when we try to run the command:

phoneRestrictionPolicy.getIncomingCallRestriction(true);

in the returning value, we can see correctly all the patterns (.|.*) but the calls still come in.

Moreover, we have tried to set the incoming call restrictions for a single number, but it didn't work either.

In the opposite, the method:

phoneRestrictionPolicy.allowIncomingSms(false);

is working perfectly as expected (no SMS received). Isn't there an equivalent method for incoming calls?

Are we doing something wrong?

 

Thank you so much and have a nice day.