Permission
This commit is contained in:
		@@ -345,18 +345,11 @@ public class Action
 | 
			
		||||
					 * Old version. Those checks should not be necessary anymore. Also they didn't work
 | 
			
		||||
					 * because profiles were created with names like silent, vibrate  and normal.
 | 
			
		||||
					 */
 | 
			
		||||
//				if(this.getParameter2().equals("silent"))
 | 
			
		||||
//					Actions.setSound(context, AudioManager.RINGER_MODE_SILENT);
 | 
			
		||||
//				else if(this.getParameter2().equals("vibrate"))
 | 
			
		||||
//					Actions.setSound(context, AudioManager.RINGER_MODE_VIBRATE);
 | 
			
		||||
//				else if(this.getParameter2().equals("normal"))
 | 
			
		||||
//					Actions.setSound(context, AudioManager.RINGER_MODE_NORMAL);
 | 
			
		||||
//				else
 | 
			
		||||
//				{
 | 
			
		||||
 | 
			
		||||
					Profile p = Profile.getByName(this.getParameter2());
 | 
			
		||||
					if (p != null)
 | 
			
		||||
						p.activate(context);
 | 
			
		||||
//				}
 | 
			
		||||
 | 
			
		||||
					break;
 | 
			
		||||
				case triggerUrl:
 | 
			
		||||
					triggerUrl(context);
 | 
			
		||||
@@ -491,61 +484,23 @@ public class Action
 | 
			
		||||
	    	{
 | 
			
		||||
	    		Miscellaneous.logEvent("i", "HTTP Request", "Attempt " + String.valueOf(attempts++) + " of " + String.valueOf(Settings.httpAttempts), 3);
 | 
			
		||||
 | 
			
		||||
//				try
 | 
			
		||||
//				{
 | 
			
		||||
					// Either thorough checking or no encryption
 | 
			
		||||
					if(!Settings.httpAcceptAllCertificates | !urlString.toLowerCase(Locale.getDefault()).contains("https"))
 | 
			
		||||
//					{
 | 
			
		||||
//						URL url = new URL(urlString);
 | 
			
		||||
//						URLConnection urlConnection = url.openConnection();
 | 
			
		||||
//						urlConnection.setReadTimeout(Settings.httpAttemptsTimeout * 1000);
 | 
			
		||||
//						InputStream in = urlConnection.getInputStream();
 | 
			
		||||
//						response = Miscellaneous.convertStreamToString(in);
 | 
			
		||||
				// Either thorough checking or no encryption
 | 
			
		||||
				if(!Settings.httpAcceptAllCertificates || !urlString.toLowerCase(Locale.getDefault()).contains("https"))
 | 
			
		||||
					response = Miscellaneous.downloadURL(urlString, urlUsername, urlPassword);
 | 
			
		||||
				else
 | 
			
		||||
					response = Miscellaneous.downloadURLwithoutCertificateChecking(urlString, urlUsername, urlPassword);
 | 
			
		||||
 | 
			
		||||
						response = Miscellaneous.downloadURL(urlString, urlUsername, urlPassword);
 | 
			
		||||
//					}
 | 
			
		||||
					else
 | 
			
		||||
//					{
 | 
			
		||||
						response = Miscellaneous.downloadURLwithoutCertificateChecking(urlString, urlUsername, urlPassword);
 | 
			
		||||
//						post = new HttpGet(new URI(urlString));
 | 
			
		||||
//						final HttpParams httpParams = new BasicHttpParams();
 | 
			
		||||
//					    HttpConnectionParams.setConnectionTimeout(httpParams, Settings.httpAttemptsTimeout * 1000);
 | 
			
		||||
//						HttpClient client = new DefaultHttpClient(httpParams);
 | 
			
		||||
//
 | 
			
		||||
//						client = sslClient(client);
 | 
			
		||||
//						
 | 
			
		||||
//						// Execute HTTP Post Request					 
 | 
			
		||||
//						HttpResponse result = client.execute(post);
 | 
			
		||||
//						response = EntityUtils.toString(result.getEntity());
 | 
			
		||||
//					}
 | 
			
		||||
//				}
 | 
			
		||||
//				catch (URISyntaxException e)
 | 
			
		||||
//				{
 | 
			
		||||
//					Miscellaneous.logEvent("w", "HTTP RESULT", Log.getStackTraceString(e), 3);
 | 
			
		||||
//				}
 | 
			
		||||
//				catch (ClientProtocolException e)
 | 
			
		||||
//				{
 | 
			
		||||
//					Miscellaneous.logEvent("w", "HTTP RESULT", Log.getStackTraceString(e), 3);
 | 
			
		||||
//				}
 | 
			
		||||
//				catch (IOException e)
 | 
			
		||||
//				{
 | 
			
		||||
//					Miscellaneous.logEvent("w", "HTTP RESULT", Log.getStackTraceString(e), 3);
 | 
			
		||||
//					e.printStackTrace();
 | 
			
		||||
//				}
 | 
			
		||||
//				finally
 | 
			
		||||
//				{
 | 
			
		||||
					try
 | 
			
		||||
					{
 | 
			
		||||
						Thread.sleep(Settings.httpAttemptGap * 1000);
 | 
			
		||||
					}
 | 
			
		||||
					catch (InterruptedException e1)
 | 
			
		||||
					{
 | 
			
		||||
						Miscellaneous.logEvent("w", "HTTP RESULT", "Failed to pause between HTTP requests.", 5);
 | 
			
		||||
					}
 | 
			
		||||
//				}
 | 
			
		||||
				try
 | 
			
		||||
				{
 | 
			
		||||
					Thread.sleep(Settings.httpAttemptGap * 1000);
 | 
			
		||||
				}
 | 
			
		||||
				catch (InterruptedException e1)
 | 
			
		||||
				{
 | 
			
		||||
					Miscellaneous.logEvent("w", "HTTP RESULT", "Failed to pause between HTTP requests.", 5);
 | 
			
		||||
				}
 | 
			
		||||
	    	}
 | 
			
		||||
	    	
 | 
			
		||||
//	    	Miscellaneous.logEvent("i", "HTTPS RESULT", response, 3);
 | 
			
		||||
	    	Miscellaneous.logEvent("i", "HTTPS RESULT", response, 5);
 | 
			
		||||
			
 | 
			
		||||
			return response;
 | 
			
		||||
	    }
 | 
			
		||||
 
 | 
			
		||||
@@ -121,15 +121,6 @@ public class Miscellaneous extends Service
 | 
			
		||||
                if(url.toLowerCase().contains("https"))
 | 
			
		||||
                {
 | 
			
		||||
                	connection = (HttpsURLConnection) urlObject.openConnection();
 | 
			
		||||
                	
 | 
			
		||||
//                	if(Settings.httpAcceptAllCertificates)
 | 
			
		||||
//                	{
 | 
			
		||||
//                		SSLContext sc = SSLContext.getInstance("TLS");
 | 
			
		||||
//        	            sc.init(null, getInsecureTrustManager(), new java.security.SecureRandom());
 | 
			
		||||
//        	            HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
 | 
			
		||||
//    	                Miscellaneous.disableSSLCertificateChecking();
 | 
			
		||||
//        	            HttpsURLConnection.setDefaultHostnameVerifier(getInsecureHostnameVerifier());
 | 
			
		||||
//                	}
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
                	connection = (HttpURLConnection) urlObject.openConnection();
 | 
			
		||||
 
 | 
			
		||||
@@ -584,4 +584,5 @@
 | 
			
		||||
    <string name="automaticUpdateCheck">Nach Updates suchen</string>
 | 
			
		||||
    <string name="locationFound">Position gefunden. Der vorgeschlagene Mindestradius für Orte beträgt %1$d m.</string>
 | 
			
		||||
    <string name="locationFoundInaccurate">Es konnte nur eine ungenaue Position gefunden werden. Das funktioniert u.U. nicht zuverlässig. Der vorgeschlagene Mindestradius für Orte beträgt %1$d m.</string>
 | 
			
		||||
    <string name="pleaseGiveBgLocation">Gehen Sie auf dem nächsten Bildschirm bitte auf Berechtigungen, dann Position. Wählen Sie dort Immer erlauben aus, um Automation zu ermöglichen, die Position im Hintergrund zu ermitteln.</string>
 | 
			
		||||
</resources>
 | 
			
		||||
@@ -558,4 +558,17 @@ Incluya las paréntecis en su texto.\n\n[uniqueid] - el número único de su dis
 | 
			
		||||
    <string name="theseAreThePermissionsRequired">Esos son los permisos necesarios.</string>
 | 
			
		||||
    <string name="android9RecordAudioNotice">Si usa la condición nivel del ruido fondo: Desafortunadamente iniciando con Android 9 (Pie) Google decidió prohibir aplicaciones de fondo usando el micrófono. Por eso esta condición no tendrá un efecto y no iniciará algo.</string>
 | 
			
		||||
    <string name="android10WifiToggleNotice">Si usa la condición nivel del ruido fondo: Desafortunadamente iniciando con Android 9 (Pie) Google decidió prohibir aplicaciones de fondo usando el micrófono. Por eso esta condición no tendrá un efecto y no iniciará algo.</string>
 | 
			
		||||
    <string name="messageNotShownAgain">Esta nota no aparecerá otra vez.</string>
 | 
			
		||||
    <string name="noLocationCouldBeFound">No pude encontrar una posición despues un limite de 120 segundos..</string>
 | 
			
		||||
    <string name="pleaseGiveBgLocation">En la proxima pantalla por favor vaya a permisos, luego posición. Ahi elija \"Siempre permitir\" para permitir Automation determinar la posición en el fondo.</string>
 | 
			
		||||
    <string name="ConfigurationExportError">Hubo un error durante exportar la configuración.</string>
 | 
			
		||||
    <string name="rulesImportedSuccessfully">Reglas y sitios serán exportado con exito.</string>
 | 
			
		||||
    <string name="rulesImportError">Hubo un error durante importando reglas y sitios.</string>
 | 
			
		||||
    <string name="notAllFilesImported">No pude importar todos los archivos aplicables.</string>
 | 
			
		||||
    <string name="importExportExplanation">Despues de cliquear importar o exportar elija el directorio de que archivos serán importados o a que serán exportados. Si exporta archivos que ya existen serán sobreescribidos.</string>
 | 
			
		||||
    <string name="errorRunningRule">Hubo un error iniciar una regla.</string>
 | 
			
		||||
    <string name="locationEngineDisabledShort">La posición no mas sera determinado en el fondo. Cliquee aqui para averiguar más.</string>
 | 
			
		||||
    <string name="displayNewsOnMainScreen">Mostrar noticias de la app en la pantalla principal.</string>
 | 
			
		||||
    <string name="displayNewsOnMainScreenDescription">Noticias solo de esta app. Hablamos de 1-2 veces per año, no mas.</string>
 | 
			
		||||
    <string name="featureNotInFdroidVersion">Esta characteristica es basado en software libre. Por eso no esta disponsible in la versión F-Droid.</string>
 | 
			
		||||
</resources>
 | 
			
		||||
@@ -577,4 +577,5 @@
 | 
			
		||||
    <string name="writeLogFile">Memorizza un file di log</string>
 | 
			
		||||
    <string name="yes">Si</string>
 | 
			
		||||
    <string name="clone">Clonare</string>
 | 
			
		||||
    <string name="state">Status</string>
 | 
			
		||||
</resources>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user