aosp – Where can I find the list of networks considered not roaming?

The decision if a SIM is connected to a roaming network (a network of another country, for example) is done by the framework with the information obtained on this network.
First, we need to know that there are two types:

  • Domestic Roaming -> A network of the same country (same MCC) as the SIM but that it is of other operator (different MNC).
  • International Roaming -> A network of another country (different MCC)

A lot of OEMs (BQ, Samsung, Xiaomi…) treat Domestic Roaming as not roaming because, for example, all the MVNO use Domestic Roaming.

By default, AOSP has a way to add networks so they will always be considered roaming (as well as adding networks that will never be considered roaming)

For AOSP, it works like this:

In of framework/opt/telephony:

 * Do not set roaming state in case of oprators considered non-roaming.
 * Can use mcc or mcc+mnc as item of
 * {@link CarrierConfigManager#KEY_NON_ROAMING_OPERATOR_STRING_ARRAY}.
 * For example, 302 or 21407. If mcc or mcc+mnc match with operator,
 * don't set roaming state.
 * @param s ServiceState hold current ons
 * @return false for roaming state set
private boolean isOperatorConsideredNonRoaming(ServiceState s) {
    String operatorNumeric = s.getOperatorNumeric();
    PersistableBundle config = getCarrierConfig();
    String() numericArray = config.getStringArray(
    if (ArrayUtils.isEmpty(numericArray) || operatorNumeric == null) {
        return false;
    for (String numeric : numericArray) {
        if (!TextUtils.isEmpty(numeric) && operatorNumeric.startsWith(numeric)) {
            return true;
    return false;

and at the same way:

private boolean isOperatorConsideredRoaming(ServiceState s) {
    String operatorNumeric = s.getOperatorNumeric();
    PersistableBundle config = getCarrierConfig();
    String() numericArray = config.getStringArray(
    if (ArrayUtils.isEmpty(numericArray) || operatorNumeric == null) {
        return false;
    for (String numeric : numericArray) {
        if (!TextUtils.isEmpty(numeric) && operatorNumeric.startsWith(numeric)) {
            return true;
    return false;

If we search information about KEY_ROAMING_OPERATOR_STRING_ARRAY and KEY_NON_ROAMING_OPERATOR_STRING_ARRAY in Android Developers we found that
enter image description here

So you could add in carrier_config_21407 (Movistar Spain) a list of roaming and not roaming list:

<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
    <string-array name="gsm_nonroaming_networks_string_array" num="1">
      <item value="26804" /> //for example, LycaMobile Portugal

The carrier config files are found in platform/packages/apps/CarrierConfig. There are two possible formats:

dnd 5e – Are the spells learned from the “Touched” feats considered class spells when cast using spell slots?

The Fey Touched and Shadow Touched feats published in Tasha’s Cauldron of Everything each grant the use of two spells. Among other things, they say:

  1. You learn the (spells).
  2. You can cast each of these spells without expending a spell slot (once per long rest).
  3. You can also cast these spells using spell slots you have of the appropriate level.

The spellcasting ability for these spells is specific to the feat, so it may or may not be the same as the ability of a class that grants spell slots.

Casting classes all have their own quirks regulating their spellcasting features, but these shouldn’t be relevant to how the Touched feats’ spells are cast in #2 because that casting isn’t using a spellcasting feature. This is clear because even non-casting classes can cast the spells in this way, so only the generic spellcasting rules apply there.

(This is related to why racial feat spells can’t be cast with a focus, as discussed at If a spellcaster’s racial trait grants a spell that requires material components, can they use their class’ focus to cast that spell?)

However, things get more complicated when the feats’ spells are cast as described in #3, because the spell slots referenced there do come from a class spellcasting feature. In that case, does the caster simply use the spell slot as “fuel” and otherwise cast the spell exactly as it had been cast for #2? Or is this inherently different, with the caster actually using their class spellcasting feature and therefore having to follow all of its specific rules?

Furthermore, is the answer different depending on whether the specific Touched feat spell being cast is on the caster’s class’ spell list or not?

Potentially Related:

Does Magic Initiate allow the chosen spell to effectively be “always prepared” if the spell is on their spell list?

What makes a spell being cast considered to be a {class} spell?

Are spells learned from feats considered to be associated with your class?

Should ICCID be considered as PII?

How can one decide if SIM card’s [ICCID][1] should be treated as PII?

My understanding is that ICCID similar to MAC address. It’s clear why the second is PII – sniffing a LAN one can see which traffic belongs to a specific card. But I’m not sure if there is a way to use ICCID to compromise an individual.

python – Python3 – Is setting attribute in @property getter considered bad practice?

I’d like to know if the following is seen as bad practice:

(for context I have considered using some form of ORM however I believe the project is too small to justify it. For the sake of brevity too I’ll only include partial code)

I have a base class for which all child classes inherit, in turn the child classes are representations of database rows. All child tables have some common attributes such as A ID, modified_date etc.

I see there being two states in which a Child class can be instantiated:

  1. New child objectno object exists in database
  2. Existing child objectobject exists in database
class Base:
    def __init__(self):
        self._modified_date: Union(None, datetime) = None

    def modified_date(self):
        if self._modified_date:
            return self._modified_date
            self._modified_date =
            return self._modified_date

class Child(Base):
    def __init__(self, some_child_attribute=None, modified_date=None):
        self._modified_date = modified_date
        self._some_child_attribute = some_child_attribute

Here my logic is that because “Child” class has not passed a modified_date parameter, it must be a new object, therefore when I call the modified_date getter, it should create a new date and then return the value.

So TLDR; is setting an attribute in a getter bad practice and why?

Apologies if this doesn’t make sense or there is an answer to this question already, my searching did not return anything.

entity framework – Is it considered a bad practice to include methods in classes that comprise an EF model?

There is no technical limitation here. EF entity classes can have methods. Those methods do not impact the de/serialization of the entities, so there’s no conflict.

That being said, it raises red flags and is generally not a good idea.

For one, your persistence logic and business/domain logic should be separated layers. Since the EF entity belongs to the persistance layer, and validation (or general operations) belong to the business/domain layer, these logically shouldn’t find themselves in the same class definition.

Is it better to create a repository for the class, and implement validation in the repository?

EF brings with it some basic data validation, but I would not use that as my business validation, but rather as a last line of defense in case the business logic fails us in some unexpected way.

I would instead validate the DTO which is passed to the business layer, and use that as my main validation logic. When validation passes, the business layer can then talk to the persistence layer and the persistence layer (usually a repository) doesn’t need to explicitly validate anything further.

That being said, if you have an application with several data stores, and those stores have different validation rules, there can be value from having the persistence layer do its own round of validation. But that’s not the most common scenario. The main business validation should generally be situated in the business layer, not the persistence layer.

Or to create validation classes per entity?

Generally speaking, I do separate my domain models from their validation logic. As far as I’m concerned, these are two separate responsibilities and it’s beneficial to keep them separated.

This ensures that validation rules can be altered without impacting the model itself. This can be useful either during development, or if your application has a dynamic validation set that can be altered during runtime (for example, we make applications where the admin end users can set their own validation rules, so we dynamically “pick and mix” our validators).

As per Ben Cottrell’s suggestion in the comments, I would also suggest looking at FluentValidation as it helps you in keeping your validation logic separate from the rest of your logic.

I think there is no “best” approach, but in your opinion, where should the Validation method be implemented?

Context is key here. If this is a quick and dirty home project with no long life expectancy, just bang it in wherever it works. I do not apply my own clean coding advice to small tools I hack together once in a while, as the effort does not outweigh the benefit if I don’t intend to use the application for a long time.

If this is a professional project or a personal project where long term longevity is a relevant consideration, at the very least keep the persistence and business/domain logic separated.

If this is an enterprise-grade project, I’d advocate keeping the (business/domain) validators separate from the business logic/DTOs themselves to further promote maintainability and loose coupling.

dnd 5e – Is the Adult Gold Dragon’s Weakening Breath considered a curse, disease, or poison?

Weakening Breath is not curable by Panacea

The 5th edition version of the Weakening Breath breath weapon is not labeled as a curse, disease, or poison. As such, it can’t be cured by Panacea, which says:

You remove all curses, diseases, and poisons affecting a creature that you touch with the transmuter’s stone.

In addition, spells like lesser restoration:

You touch a creature and can end either one disease or one condition afflicting it. The condition can be blinded, deafened, paralyzed, or poisoned.

…and greater restoration:

You imbue a creature you touch with positive energy to undo a debilitating effect. You can reduce the target’s exhaustion level by one, or end one of the following effects on the target:

  • One effect that charmed or petrified the target
  • One curse, including the target’s attunement to a cursed magic item
  • Any reduction to one of the target’s ability scores
  • One effect reducing the target’s hit point maximum

…which can remove most conditions between themselves, can’t remove it either.

Past editions

This is a marked change from past editions, where the Weakening Breath was easier to handle.

AD&D 1e:

The attack of a gold dragon can be a claw/claw/bite routine or one of two breath weapons — fire in a 9” x 3” cone, or chlorine gas in a 5” x 4” x 3” cloud.

Chlorine gas is just a poison that the neutralize poison spell could handle:

AD&D 2e:

A gold dragon has two breath weapons: a cone of fire 90′ long, 5′ wide, at the dragon’s mouth, and 30′ wide at the end or a cloud of potent chlorine gas 50′ long, 40′ wide, and 30′ high.

Very little changes for the gold dragon in this edition, and the same spell helps here once more.

D&D 3.x:

A gold dragon has two types of breath weapon, a cone of fire and a cone of weakening gas. Creatures within a cone of weakening gas must succeed on a Fortitude save or take 1 point of Strength damage per age category of the dragon.

We finally have the term “weakening”, but in this case it is ability damage (something that doesn’t exist in the same magnitude anymore). The move away from ability damage in 5e extended to the gold dragon’s breath weapon. Back in 3.x, though, it was more common, and both lesser restoration and restoration spells could help with the effects.

D&D 4e:

Close blast 5; +19 vs. Reflex; 2d8 + 7 fire damage, and the target is weakened (save ends). Miss: Half damage

In 4e, this recharge power combines both breath weapons, making the fire breath include the weakened condition. You can use First Aid to allow an ally to make a saving throw against the condition, but there may also be powers (though I couldn’t find one) that can end the effect immediately.

As you can see, past editions made the gold dragon’s alternate breath weapon easier to counteract at least to some extent, while 5th edition’s version must simply be waited out.