Add SlimRom OpenPdroid; Hide folders+rearrange for ApG
[auto-patcher.git] / patches / pdroid / 4.1 / .aosp-mod / 20120817 / framework.jar.sh
blob852798a05c7befa406668901af6dbab6d82a52e3
1 #!/bin/bash
2 # inherit variables from the parent script by running it as ". script.sh"
4 # a hack to skim down : remove vendor-specific RIL
5 unset GARBAGE
6 TELEPHONY="tmp/${FILE}.out/smali/com/android/internal/telephony/"
7 if [[ -z $RIL ]]; then
8 GARBAGE=($(find "$TELEPHONY" -name "*RIL*" -a -not -name "RIL*"))
9 elif [[ $RIL == SonyQualcommRIL ]]; then # needs to be before *Qualcomm*RIL
10 GARBAGE=($(find "$TELEPHONY" -name "*RIL*" -a -not -name "RIL*" -a -not -name "${RIL}*"))
11 elif [[ $RIL == SamsungQualcommD2RIL ]]; then
12 GARBAGE=($(find "$TELEPHONY" -name "*RIL*" -a -not -name "RIL*" -a -not -name "${RIL}*" -a -not -name "SamsungQualcommUiccRIL*" -a -not -name "QualcommSharedRIL*" ))
13 elif [[ $RIL == *Qualcomm*RIL ]]; then
14 GARBAGE=($(find "$TELEPHONY" -name "*RIL*" -a -not -name "RIL*" -a -not -name "${RIL}*" -a -not -name "QualcommSharedRIL*" ))
15 else
16 GARBAGE=($(find "$TELEPHONY" -name "*RIL*" -a -not -name "RIL*" -a -not -name "${RIL}*"))
18 if [[ -n ${GARBAGE[@]} ]]; then
19 printtask "... remove unnecessary ${#GARBAGE[@]} files to avoid methods cap ..."
20 echo "DELETE RILS= ${GARBAGE[@]}" >> "$LOG"
21 \rm -rf ${GARBAGE[@]}