not equals direction
This commit is contained in:
parent
9b84b8dad7
commit
1e7ccf5200
@ -356,6 +356,7 @@ public class ActivityControlCenter extends Activity
|
|||||||
systemInfoText.append("Device: " + android.os.Build.DEVICE + Miscellaneous.lineSeparator);
|
systemInfoText.append("Device: " + android.os.Build.DEVICE + Miscellaneous.lineSeparator);
|
||||||
systemInfoText.append("Model: " + android.os.Build.MODEL + Miscellaneous.lineSeparator);
|
systemInfoText.append("Model: " + android.os.Build.MODEL + Miscellaneous.lineSeparator);
|
||||||
systemInfoText.append("Product: " + android.os.Build.PRODUCT + Miscellaneous.lineSeparator);
|
systemInfoText.append("Product: " + android.os.Build.PRODUCT + Miscellaneous.lineSeparator);
|
||||||
|
systemInfoText.append("Rooted: " + String.valueOf(Miscellaneous.isPhoneRooted()));
|
||||||
systemInfoText.append("Country: " + Miscellaneous.getUserCountry(Miscellaneous.getAnyContext()) + Miscellaneous.lineSeparator);
|
systemInfoText.append("Country: " + Miscellaneous.getUserCountry(Miscellaneous.getAnyContext()) + Miscellaneous.lineSeparator);
|
||||||
systemInfoText.append("OS language: " + Locale.getDefault().getDisplayName() + Miscellaneous.lineSeparator);
|
systemInfoText.append("OS language: " + Locale.getDefault().getDisplayName() + Miscellaneous.lineSeparator);
|
||||||
systemInfoText.append("Logfile written: " + String.valueOf(Settings.writeLogFile) + Miscellaneous.lineSeparator);
|
systemInfoText.append("Logfile written: " + String.valueOf(Settings.writeLogFile) + Miscellaneous.lineSeparator);
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
package com.jens.automation2;
|
package com.jens.automation2;
|
||||||
|
|
||||||
import static com.jens.automation2.Trigger.triggerParameter2Split;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
@ -18,8 +16,6 @@ import android.view.View;
|
|||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.CheckBox;
|
|
||||||
import android.widget.CompoundButton;
|
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.Spinner;
|
import android.widget.Spinner;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
@ -49,7 +45,6 @@ public class ActivityManageActionCloseNotification extends Activity
|
|||||||
TextView tvSelectedApplication;
|
TextView tvSelectedApplication;
|
||||||
|
|
||||||
private static List<PackageInfo> pInfos = null;
|
private static List<PackageInfo> pInfos = null;
|
||||||
public static Trigger resultingTrigger;
|
|
||||||
|
|
||||||
private static String[] directions;
|
private static String[] directions;
|
||||||
|
|
||||||
@ -271,6 +266,7 @@ public class ActivityManageActionCloseNotification extends Activity
|
|||||||
directions = new String[] {
|
directions = new String[] {
|
||||||
getResources().getString(R.string.directionStringEquals),
|
getResources().getString(R.string.directionStringEquals),
|
||||||
getResources().getString(R.string.directionStringContains),
|
getResources().getString(R.string.directionStringContains),
|
||||||
|
getResources().getString(R.string.directionStringDoesNotContain),
|
||||||
getResources().getString(R.string.directionStringStartsWith),
|
getResources().getString(R.string.directionStringStartsWith),
|
||||||
getResources().getString(R.string.directionStringEndsWith),
|
getResources().getString(R.string.directionStringEndsWith),
|
||||||
getResources().getString(R.string.directionStringNotEquals)
|
getResources().getString(R.string.directionStringNotEquals)
|
||||||
|
@ -481,6 +481,8 @@ public class Miscellaneous extends Service
|
|||||||
return !haystack.equalsIgnoreCase(needle);
|
return !haystack.equalsIgnoreCase(needle);
|
||||||
case Trigger.directionContains:
|
case Trigger.directionContains:
|
||||||
return haystack.toLowerCase().contains(needle.toLowerCase());
|
return haystack.toLowerCase().contains(needle.toLowerCase());
|
||||||
|
case Trigger.directionNotContains:
|
||||||
|
return !haystack.toLowerCase().contains(needle.toLowerCase());
|
||||||
case Trigger.directionStartsWith:
|
case Trigger.directionStartsWith:
|
||||||
return haystack.toLowerCase().startsWith(needle.toLowerCase());
|
return haystack.toLowerCase().startsWith(needle.toLowerCase());
|
||||||
case Trigger.directionEndsWith:
|
case Trigger.directionEndsWith:
|
||||||
@ -710,14 +712,6 @@ public class Miscellaneous extends Service
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// alertDialog.setNegativeButton(context.getResources().getString(R.string.cancel), new DialogInterface.OnClickListener()
|
|
||||||
// {
|
|
||||||
// public void onClick(DialogInterface dialog, int whichButton)
|
|
||||||
// {
|
|
||||||
// // Canceled.
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
return alertDialog.create();
|
return alertDialog.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1646,6 +1646,7 @@ public class Trigger
|
|||||||
|
|
||||||
public static final String directionEquals = "eq";
|
public static final String directionEquals = "eq";
|
||||||
public static final String directionContains = "ct";
|
public static final String directionContains = "ct";
|
||||||
|
public static final String directionNotContains = "nc";
|
||||||
public static final String directionStartsWith = "sw";
|
public static final String directionStartsWith = "sw";
|
||||||
public static final String directionEndsWith = "ew";
|
public static final String directionEndsWith = "ew";
|
||||||
public static final String directionNotEquals = "ne";
|
public static final String directionNotEquals = "ne";
|
||||||
@ -1675,6 +1676,8 @@ public class Trigger
|
|||||||
return directionEquals;
|
return directionEquals;
|
||||||
else if(direction.equalsIgnoreCase(Miscellaneous.getAnyContext().getString(R.string.directionStringContains)))
|
else if(direction.equalsIgnoreCase(Miscellaneous.getAnyContext().getString(R.string.directionStringContains)))
|
||||||
return directionContains;
|
return directionContains;
|
||||||
|
else if(direction.equalsIgnoreCase(Miscellaneous.getAnyContext().getString(R.string.directionStringDoesNotContain)))
|
||||||
|
return directionNotContains;
|
||||||
else if(direction.equalsIgnoreCase(Miscellaneous.getAnyContext().getString(R.string.directionStringStartsWith)))
|
else if(direction.equalsIgnoreCase(Miscellaneous.getAnyContext().getString(R.string.directionStringStartsWith)))
|
||||||
return directionStartsWith;
|
return directionStartsWith;
|
||||||
else if(direction.equalsIgnoreCase(Miscellaneous.getAnyContext().getString(R.string.directionStringEndsWith)))
|
else if(direction.equalsIgnoreCase(Miscellaneous.getAnyContext().getString(R.string.directionStringEndsWith)))
|
||||||
|
@ -819,4 +819,5 @@
|
|||||||
<string name="sendBroadcast">Send broadcast</string>
|
<string name="sendBroadcast">Send broadcast</string>
|
||||||
<string name="enterBroadcast">Enter a broadcast action.</string>
|
<string name="enterBroadcast">Enter a broadcast action.</string>
|
||||||
<string name="broadcastExplanation">This action allows to send a broadcast across the Android OS messaging system. This is not user-visible, but apps who listen for that specific broadcast can respond to it being sent.</string>
|
<string name="broadcastExplanation">This action allows to send a broadcast across the Android OS messaging system. This is not user-visible, but apps who listen for that specific broadcast can respond to it being sent.</string>
|
||||||
|
<string name="directionStringDoesNotContain">does not contain</string>
|
||||||
</resources>
|
</resources>
|
Loading…
Reference in New Issue
Block a user