backend: Cache build.prop values in device check block
These values are static, we don't need to keep getting them with getprop. Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
This commit is contained in:
1 parent
303e50e371
commit
cea9c5a247
1 file changed
+3
-1
@@ -100,9 +100,11 @@ unset LD_PRELOAD;
|
||||
|
||||
if [ "$(file_getprop /tmp/anykernel/anykernel.sh do.devicecheck)" == 1 ]; then
|
||||
ui_print "Checking device...";
|
||||
device="$(getprop ro.product.device)";
|
||||
product="$(getprop ro.build.product)";
|
||||
for i in 1 2 3 4 5; do
|
||||
testname="$(file_getprop /tmp/anykernel/anykernel.sh device.name$i)";
|
||||
if [ "$(getprop ro.product.device)" == "$testname" -o "$(getprop ro.build.product)" == "$testname" ]; then
|
||||
if [ "$device" == "$testname" -o "$product" == "$testname" ]; then
|
||||
ui_print "$testname";
|
||||
match=1;
|
||||
fi;
|
||||
|
||||
Reference in new issue
Block a user