Skip to content

add per-app setting for hiding carrier/network information#340

Open
maade93791 wants to merge 7 commits intoGrapheneOS:16-qpr2from
maade93791:16-qpr2-carrier-info
Open

add per-app setting for hiding carrier/network information#340
maade93791 wants to merge 7 commits intoGrapheneOS:16-qpr2from
maade93791:16-qpr2-carrier-info

Conversation

@maade93791
Copy link
Copy Markdown
Member

the current implementation handles gsm.{operator,sim} sysprops and TelephonyManager calls that expose information for the currently installed SIM/eSIM state, its carrier and the network the connected to. also enforce CountryDetector.getCountry() to rely only on last known location and device locale, when feature is enabled.

to be merged with: GrapheneOS/platform_packages_apps_Settings#425

@chenxiaolong
Copy link
Copy Markdown

I'm not sure how large the scope of this feature is, but is the intention to completely block all access to these properties? (eg. including apps that use bionic libc's __system_property_get() or reading /dev/__properties__/* directly?)

@maade93791
Copy link
Copy Markdown
Member Author

@chenxiaolong its being worked on.

@RankoR RankoR requested a review from muhomorr April 27, 2026 17:30
@maade93791 maade93791 force-pushed the 16-qpr2-carrier-info branch from f7495f7 to c319b26 Compare May 4, 2026 15:57
@maade93791
Copy link
Copy Markdown
Member Author


/** @hide */
public class AswHideCarrierInfo extends AppSwitch {
public static final AswHideCarrierInfo I = new AswHideCarrierInfo();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use more descriptive var names, I think

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

other AppSwtich implementations use this naming scheme (e.g. AswBlockPlayIntegrityApi, AswDenyNativeDebug and so on), i went off that.

}

@Override
public Boolean getImmutableValue(Context ctx, int userId, ApplicationInfo appInfo,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Methods that may return null should be marked with @Nullable

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

base AppSwitch class doesnt declare that, didnt include it for consistency

@maade93791 maade93791 force-pushed the 16-qpr2-carrier-info branch from c319b26 to 9befca8 Compare May 9, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants