问题
I noticed a new field was added in API level 19 (Kitkat) called CallLog.Calls.NUMBER_PRESENTATION.
The documentation says
The number presenting rules set by the network.
Allowed values: PRESENTATION_ALLOWED PRESENTATION_RESTRICTED PRESENTATION_UNKNOWN PRESENTATION_PAYPHONE
Does anyone know what is this used for / according to what is this set?
回答1:
I've checked it out.
Seems it allows you to know, for example, what the caller has set to display on your phone.
This means, that if the caller chose not to have its phone be shown, it could be PRESENTATION_RESTRICTED
.
For normal phone numbers, I can see it's PRESENTATION_ALLOWED
. No idea when the other values appear though.
The reason I reached this, BTW, is because for some reason, on private numbers (AKA "unknown numbers"), where the phone number of the caller is hidden, on Galaxy S7 I actually get a phone number "-2", which doesn't make sense (should be null or empty).
来源:https://stackoverflow.com/questions/20786818/whats-the-use-of-androids-new-calllog-calls-number-presentation-field