Skip to content

Commit

Permalink
Ensure all prop changes bypass property_service
Browse files Browse the repository at this point in the history
- resetprop only bypasses for ro.* properties by default
  • Loading branch information
osm0sis authored Jul 5, 2024
1 parent 0bc9a45 commit 662b9c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module/common_func.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ resetprop_if_diff() {
local EXPECTED="$2"
local CURRENT="$(resetprop "$NAME")"

[ -z "$CURRENT" ] || [ "$CURRENT" = "$EXPECTED" ] || resetprop "$NAME" "$EXPECTED"
[ -z "$CURRENT" ] || [ "$CURRENT" = "$EXPECTED" ] || resetprop -n "$NAME" "$EXPECTED"
}

# resetprop_if_match <prop name> <value match string> <new value>
Expand All @@ -13,7 +13,7 @@ resetprop_if_match() {
local CONTAINS="$2"
local VALUE="$3"

[[ "$(resetprop "$NAME")" = *"$CONTAINS"* ]] && resetprop "$NAME" "$VALUE"
[[ "$(resetprop "$NAME")" = *"$CONTAINS"* ]] && resetprop -n "$NAME" "$VALUE"
}

# stub for boot-time
Expand Down

0 comments on commit 662b9c5

Please sign in to comment.