diff --git a/app/gradle/wrapper/gradle-wrapper.jar b/app/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000..f6b961fd5a Binary files /dev/null and b/app/gradle/wrapper/gradle-wrapper.jar differ diff --git a/app/gradle/wrapper/gradle-wrapper.properties b/app/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000..e181f1d8d9 --- /dev/null +++ b/app/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Wed Feb 13 13:50:33 CET 2019 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip diff --git a/app/gradlew b/app/gradlew new file mode 100644 index 0000000000..cccdd3d517 --- /dev/null +++ b/app/gradlew @@ -0,0 +1,172 @@ +#!/usr/bin/env sh + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/app/gradlew.bat b/app/gradlew.bat new file mode 100644 index 0000000000..f9553162f1 --- /dev/null +++ b/app/gradlew.bat @@ -0,0 +1,84 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/app/src/fcm/java/org/flyve/mdm/agent/firebase/InstanceIDService.java b/app/src/fcm/java/org/flyve/mdm/agent/firebase/InstanceIDService.java index 96e99d1a73..455c455667 100644 --- a/app/src/fcm/java/org/flyve/mdm/agent/firebase/InstanceIDService.java +++ b/app/src/fcm/java/org/flyve/mdm/agent/firebase/InstanceIDService.java @@ -1,3 +1,26 @@ +/* + * Copyright Teclib. All rights reserved. + * + * Flyve MDM is a mobile device management software. + * + * Flyve MDM is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version. + * + * Flyve MDM is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * ------------------------------------------------------------------------------ + * @author Rafael Hernandez + * @copyright Copyright Teclib. All rights reserved. + * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html + * @link https://github.com/flyve-mdm/android-mdm-agent + * @link https://flyve-mdm.com + * ------------------------------------------------------------------------------ + */ + package org.flyve.mdm.agent.firebase; import android.util.Log; diff --git a/app/src/fcm/java/org/flyve/mdm/agent/firebase/MessagingService.java b/app/src/fcm/java/org/flyve/mdm/agent/firebase/MessagingService.java index 4a339cad1f..30612ebb40 100644 --- a/app/src/fcm/java/org/flyve/mdm/agent/firebase/MessagingService.java +++ b/app/src/fcm/java/org/flyve/mdm/agent/firebase/MessagingService.java @@ -1,3 +1,26 @@ +/* + * Copyright Teclib. All rights reserved. + * + * Flyve MDM is a mobile device management software. + * + * Flyve MDM is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version. + * + * Flyve MDM is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * ------------------------------------------------------------------------------ + * @author Rafael Hernandez + * @copyright Copyright Teclib. All rights reserved. + * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html + * @link https://github.com/flyve-mdm/android-mdm-agent + * @link https://flyve-mdm.com + * ------------------------------------------------------------------------------ + */ + package org.flyve.mdm.agent.firebase; import android.app.NotificationManager; diff --git a/app/src/fcm/java/org/flyve/mdm/agent/ui/PushPoliciesActivity.java b/app/src/fcm/java/org/flyve/mdm/agent/ui/PushPoliciesActivity.java index 526ff5b1fe..dfc84ec345 100644 --- a/app/src/fcm/java/org/flyve/mdm/agent/ui/PushPoliciesActivity.java +++ b/app/src/fcm/java/org/flyve/mdm/agent/ui/PushPoliciesActivity.java @@ -1,3 +1,26 @@ +/* + * Copyright Teclib. All rights reserved. + * + * Flyve MDM is a mobile device management software. + * + * Flyve MDM is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version. + * + * Flyve MDM is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * ------------------------------------------------------------------------------ + * @author Rafael Hernandez + * @copyright Copyright Teclib. All rights reserved. + * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html + * @link https://github.com/flyve-mdm/android-mdm-agent + * @link https://flyve-mdm.com + * ------------------------------------------------------------------------------ + */ + package org.flyve.mdm.agent.ui; import android.os.Bundle; diff --git a/app/src/main/java/org/flyve/mdm/agent/core/deeplink/DeeplinkSchema.java b/app/src/main/java/org/flyve/mdm/agent/core/deeplink/DeeplinkSchema.java index e7ad454e81..99f5649cce 100644 --- a/app/src/main/java/org/flyve/mdm/agent/core/deeplink/DeeplinkSchema.java +++ b/app/src/main/java/org/flyve/mdm/agent/core/deeplink/DeeplinkSchema.java @@ -36,58 +36,114 @@ public class DeeplinkSchema { public DeeplinkSchema() { } + /** + * Get the message of the Url + * @return String url + */ public String getUrl() { return url; } + /** + * Set the message of Url + * @param url String Url + */ public void setUrl(String url) { this.url = url; } + /** + * Get the message of UserToken + * @return String UserToken + */ public String getUserToken() { return userToken; } + /** + * Set the message of UserToken + * @param userToken + */ public void setUserToken(String userToken) { this.userToken = userToken; } + /** + * Get the message of InvitationToken + * @return String InvitationToken + */ public String getInvitationToken() { return invitationToken; } + /** + * Set the message of InvitationToken + * @param invitationToken + */ public void setInvitationToken(String invitationToken) { this.invitationToken = invitationToken; } + /** + * Get the message of the Name + * @return String Name + */ public String getName() { return name; } + /** + * Set the message of the Name + * @param name + */ public void setName(String name) { this.name = name; } + /** + * Get the message of the Phone + * @return String phone + */ public String getPhone() { return phone; } + /** + * Set the message of the Phone + * @param phone + */ public void setPhone(String phone) { this.phone = phone; } + /** + * Get the message of Website + * @return String Website + */ public String getWebsite() { return website; } + /** + * Set the message of Website + * @param website + */ public void setWebsite(String website) { this.website = website; } + /** + * Get the message of Email + * @return String email + */ public String getEmail() { return email; } + /** + * Set the message of Email + * @param email + */ public void setEmail(String email) { this.email = email; } diff --git a/app/src/main/java/org/flyve/mdm/agent/core/user/UserSchema.java b/app/src/main/java/org/flyve/mdm/agent/core/user/UserSchema.java index 45c8f63376..57cfe62c19 100644 --- a/app/src/main/java/org/flyve/mdm/agent/core/user/UserSchema.java +++ b/app/src/main/java/org/flyve/mdm/agent/core/user/UserSchema.java @@ -42,74 +42,146 @@ public class UserSchema { public UserSchema() { } + /** + * Get the list of Emails + * @return List emails + */ public List getEmails() { return emails; } + /** + * Set the list of Emails + * @param emails + */ public void setEmails(List emails) { this.emails = emails; } + /** + * Get the message of FirstName + * @return String FirstName + */ public String getFirstName() { return firstName; } + /** + * Set the message of FirstName + * @param firstName + */ public void setFirstName(String firstName) { this.firstName = firstName; } + /** + * Get the message of LastName + * @return String lastName + */ public String getLastName() { return lastName; } + /** + * Set the message of LastName + * @param lastName + */ public void setLastName(String lastName) { this.lastName = lastName; } + /** + * Get the message of Phone + * @return String phone + */ public String getPhone() { return phone; } + /** + * Set the message of Phone + * @param phone + */ public void setPhone(String phone) { this.phone = phone; } + /** + * Get the message of Phone2 + * @return String phone2 + */ public String getPhone2() { return phone2; } + /** + * Set the message of Phone2 + * @param phone2 + */ public void setPhone2(String phone2) { this.phone2 = phone2; } + /** + * Get the message of MobilePhone + * @return String MobilePhone + */ public String getMobilePhone() { return mobilePhone; } + /** + * Set the message of MobilePhone + * @param mobilePhone + */ public void setMobilePhone(String mobilePhone) { this.mobilePhone = mobilePhone; } + /** + * Get the message of Picture + * @return String picture + */ public String getPicture() { return picture; } + /** + * Set the message of Picture + * @param picture + */ public void setPicture(String picture) { this.picture = picture; } + /** + * Get the message of Language + * @return String language + */ public String getLanguage() { return language; } + /** + * Set the message of Language + * @param language + */ public void setLanguage(String language) { this.language = language; } + /** + * Get the message of AdministrativeNumber + * @return String administrativeNumber + */ public String getAdministrativeNumber() { return administrativeNumber; } + /** + * Set the message of AdministrativeNumber + * @param administrativeNumber + */ public void setAdministrativeNumber(String administrativeNumber) { this.administrativeNumber = administrativeNumber; } diff --git a/app/src/main/java/org/flyve/mdm/agent/data/database/setup/AppDataBase.java b/app/src/main/java/org/flyve/mdm/agent/data/database/setup/AppDataBase.java index 3d105f22c8..dde6c74305 100644 --- a/app/src/main/java/org/flyve/mdm/agent/data/database/setup/AppDataBase.java +++ b/app/src/main/java/org/flyve/mdm/agent/data/database/setup/AppDataBase.java @@ -54,6 +54,11 @@ public abstract class AppDataBase extends RoomDatabase { public abstract MDMLogDao MDMLogDao(); public abstract TopicsDao TopicsDao(); + /** + * Get the context of AppDatabase + * @param context + * @return instance + */ public static AppDataBase getAppDatabase(Context context) { if (instance == null) { instance = Room.databaseBuilder(context.getApplicationContext(), diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/AirplaneModePolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/AirplaneModePolicy.java index 3ff71e54a8..1caff91976 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/AirplaneModePolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/AirplaneModePolicy.java @@ -36,10 +36,18 @@ public class AirplaneModePolicy extends BasePolicies { public static final String POLICY_NAME = "disableAirplaneMode"; + /** + * Simple constructor + * @param context + */ public AirplaneModePolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/BluetoothPolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/BluetoothPolicy.java index 58f80f4e3a..53d229b5cb 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/BluetoothPolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/BluetoothPolicy.java @@ -36,10 +36,18 @@ public class BluetoothPolicy extends BasePolicies { public static final String POLICY_NAME = "disableBluetooth"; + /** + * A simple constructor + * @param context + */ public BluetoothPolicy(Context context) { super(context, POLICY_NAME); } - + + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/CameraPolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/CameraPolicy.java index a47cc94c0f..ace63981f6 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/CameraPolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/CameraPolicy.java @@ -37,10 +37,18 @@ public class CameraPolicy extends BasePolicies { public static final String POLICY_NAME = "disableCamera"; + /** + * A simple constructor + * @param context + */ public CameraPolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/GPSPolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/GPSPolicy.java index be3264ebfb..71cafc6907 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/GPSPolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/GPSPolicy.java @@ -36,10 +36,18 @@ public class GPSPolicy extends BasePolicies { public static final String POLICY_NAME = "disableGPS"; + /** + * A simple constructor + * @param context + */ public GPSPolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/HostpotTetheringPolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/HostpotTetheringPolicy.java index 921607fbbd..85c09f463a 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/HostpotTetheringPolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/HostpotTetheringPolicy.java @@ -36,10 +36,18 @@ public class HostpotTetheringPolicy extends BasePolicies { public static final String POLICY_NAME = "disableHostpotTethering"; + /** + * A simple constructor + * @param context + */ public HostpotTetheringPolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/MaximumFailedPasswordForWipePolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/MaximumFailedPasswordForWipePolicy.java index 115a17f0b6..bda10c6560 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/MaximumFailedPasswordForWipePolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/MaximumFailedPasswordForWipePolicy.java @@ -37,10 +37,18 @@ public class MaximumFailedPasswordForWipePolicy extends BasePolicies { public static final String POLICY_NAME = "maximumFailedPasswordsForWipe"; + /** + * A simple constructor + * @param context + */ public MaximumFailedPasswordForWipePolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/MaximumTimeToLockPolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/MaximumTimeToLockPolicy.java index c9de34ee4a..4694cc27a6 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/MaximumTimeToLockPolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/MaximumTimeToLockPolicy.java @@ -37,10 +37,18 @@ public class MaximumTimeToLockPolicy extends BasePolicies { public static final String POLICY_NAME = "maximumTimeToLock"; + /** + * A simple constructor + * @param context + */ public MaximumTimeToLockPolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/MobileLinePolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/MobileLinePolicy.java index 4b8602512c..928d2ce212 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/MobileLinePolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/MobileLinePolicy.java @@ -36,11 +36,18 @@ public class MobileLinePolicy extends BasePolicies { public static final String POLICY_NAME = "disableMobileLine"; + /** + * A simple constructor + * @param context + */ public MobileLinePolicy(Context context) { super(context, POLICY_NAME); } - + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/NFCPolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/NFCPolicy.java index fa76f54e08..01bd9425cb 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/NFCPolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/NFCPolicy.java @@ -36,10 +36,18 @@ public class NFCPolicy extends BasePolicies { public static final String POLICY_NAME = "disableNFC"; + /** + * A simple constructor + * @param context + */ public NFCPolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/PasswordEnablePolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/PasswordEnablePolicy.java index 9b5810f45a..9d44d939c2 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/PasswordEnablePolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/PasswordEnablePolicy.java @@ -38,10 +38,18 @@ public class PasswordEnablePolicy extends BasePolicies { public static final String POLICY_NAME = "passwordEnabled"; + /** + * A simple constructor + * @param context + */ public PasswordEnablePolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/PasswordMinLengthPolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/PasswordMinLengthPolicy.java index 7e7621100b..eea84d92d1 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/PasswordMinLengthPolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/PasswordMinLengthPolicy.java @@ -37,10 +37,18 @@ public class PasswordMinLengthPolicy extends BasePolicies { public static final String POLICY_NAME = "passwordMinLength"; + /** + * A simple constructor + * @param context + */ public PasswordMinLengthPolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/PasswordMinLetterPolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/PasswordMinLetterPolicy.java index 0b67dd6fe5..be38596bfc 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/PasswordMinLetterPolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/PasswordMinLetterPolicy.java @@ -37,10 +37,18 @@ public class PasswordMinLetterPolicy extends BasePolicies { public static final String POLICY_NAME = "passwordMinLetters"; + /** + * A simple constructor + * @param context + */ public PasswordMinLetterPolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/PasswordMinLowerCasePolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/PasswordMinLowerCasePolicy.java index c04d522114..554cda425f 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/PasswordMinLowerCasePolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/PasswordMinLowerCasePolicy.java @@ -37,10 +37,18 @@ public class PasswordMinLowerCasePolicy extends BasePolicies { public static final String POLICY_NAME = "passwordMinLowerCase"; + /** + * A simple constructor + * @param context + */ public PasswordMinLowerCasePolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/PasswordMinNonLetterPolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/PasswordMinNonLetterPolicy.java index 792527ed7b..810470984d 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/PasswordMinNonLetterPolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/PasswordMinNonLetterPolicy.java @@ -37,10 +37,18 @@ public class PasswordMinNonLetterPolicy extends BasePolicies { public static final String POLICY_NAME = "passwordMinNonLetter"; + /** + * A simple constructor + * @param context + */ public PasswordMinNonLetterPolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/PasswordMinNumericPolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/PasswordMinNumericPolicy.java index 46f54d0364..ff3f76ca2f 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/PasswordMinNumericPolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/PasswordMinNumericPolicy.java @@ -37,10 +37,18 @@ public class PasswordMinNumericPolicy extends BasePolicies { public static final String POLICY_NAME = "passwordMinNumeric"; + /** + * A simple constructor + * @param context + */ public PasswordMinNumericPolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/PasswordMinSymbolsPolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/PasswordMinSymbolsPolicy.java index ccb8f0ef6f..d8fe90a14d 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/PasswordMinSymbolsPolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/PasswordMinSymbolsPolicy.java @@ -37,10 +37,18 @@ public class PasswordMinSymbolsPolicy extends BasePolicies { public static final String POLICY_NAME = "passwordMinSymbols"; + /** + * A simple constructor + * @param context + */ public PasswordMinSymbolsPolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/PasswordMinUpperCasePolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/PasswordMinUpperCasePolicy.java index c73687c781..afe6b401f5 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/PasswordMinUpperCasePolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/PasswordMinUpperCasePolicy.java @@ -37,10 +37,18 @@ public class PasswordMinUpperCasePolicy extends BasePolicies { public static final String POLICY_NAME = "passwordMinUpperCase"; + /** + * A simple constructor + * @param context + */ public PasswordMinUpperCasePolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/PasswordQualityPolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/PasswordQualityPolicy.java index f860e3a58a..eabbe12d5a 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/PasswordQualityPolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/PasswordQualityPolicy.java @@ -37,10 +37,18 @@ public class PasswordQualityPolicy extends BasePolicies { public static final String POLICY_NAME = "passwordEnabled"; + /** + * A simple constructor + * @param context + */ public PasswordQualityPolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/RoamingPolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/RoamingPolicy.java index 20786bb018..0ec2c2a362 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/RoamingPolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/RoamingPolicy.java @@ -36,10 +36,18 @@ public class RoamingPolicy extends BasePolicies { public static final String POLICY_NAME = "disableRoaming"; + /** + * A simple constructor + * @param context + */ public RoamingPolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/SMSPolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/SMSPolicy.java index 47ea7f7117..617dab37ae 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/SMSPolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/SMSPolicy.java @@ -33,10 +33,18 @@ public class SMSPolicy extends BasePolicies { public static final String POLICY_NAME = "disableSmsMms"; + /** + * A simple constructor + * @param context + */ public SMSPolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { //TODO create a SMS / MMS policy diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/ScreenCapturePolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/ScreenCapturePolicy.java index b2c0ecb063..b7e75e09fe 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/ScreenCapturePolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/ScreenCapturePolicy.java @@ -37,10 +37,18 @@ public class ScreenCapturePolicy extends BasePolicies { public static final String POLICY_NAME = "disableScreenCapture"; + /** + * A simple constructor + * @param context + */ public ScreenCapturePolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/SpeakerphonePolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/SpeakerphonePolicy.java index 87e460221b..94f5f4ea7f 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/SpeakerphonePolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/SpeakerphonePolicy.java @@ -36,10 +36,18 @@ public class SpeakerphonePolicy extends BasePolicies { public static final String POLICY_NAME = "disableSpeakerphone"; + /** + * A simple constructor + * @param context + */ public SpeakerphonePolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/StatusBarPolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/StatusBarPolicy.java index a06ff78ec2..13ffcfa193 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/StatusBarPolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/StatusBarPolicy.java @@ -37,10 +37,18 @@ public class StatusBarPolicy extends BasePolicies { public static final String POLICY_NAME = "disableStatusBar"; + /** + * A simple constructor + * @param context + */ public StatusBarPolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/StorageEncryptionPolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/StorageEncryptionPolicy.java index dcf874d7f3..acec2398fa 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/StorageEncryptionPolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/StorageEncryptionPolicy.java @@ -37,10 +37,18 @@ public class StorageEncryptionPolicy extends BasePolicies { public static final String POLICY_NAME = "storageEncryption"; + /** + * A simple constructor + * @param context + */ public StorageEncryptionPolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/StreamAccessibilityPolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/StreamAccessibilityPolicy.java index d1d9b0e5e8..4f62fe1f91 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/StreamAccessibilityPolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/StreamAccessibilityPolicy.java @@ -38,10 +38,18 @@ public class StreamAccessibilityPolicy extends BasePolicies { public static final String POLICY_NAME = "disableStreamAccessibility"; + /** + * A simple constructor + * @param context + */ public StreamAccessibilityPolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { if (Build.VERSION.SDK_INT <= 26) { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/StreamAlarmPolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/StreamAlarmPolicy.java index fca6e41e38..f75e013903 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/StreamAlarmPolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/StreamAlarmPolicy.java @@ -36,10 +36,18 @@ public class StreamAlarmPolicy extends BasePolicies { public static final String POLICY_NAME = "disableStreamAlarm"; + /** + * A simple constructor + * @param context + */ public StreamAlarmPolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/StreamDTMFPolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/StreamDTMFPolicy.java index 143824f446..1fecef906e 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/StreamDTMFPolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/StreamDTMFPolicy.java @@ -37,10 +37,18 @@ public class StreamDTMFPolicy extends BasePolicies { public static final String POLICY_NAME = "disableStreamDTMF"; + /** + * A simple constructor + * @param context + */ public StreamDTMFPolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/StreamMusicPolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/StreamMusicPolicy.java index 9225f81822..ac1290cfba 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/StreamMusicPolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/StreamMusicPolicy.java @@ -37,10 +37,18 @@ public class StreamMusicPolicy extends BasePolicies { public static final String POLICY_NAME = "disableStreamMusic"; + /** + * A simple constructor + * @param context + */ public StreamMusicPolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/StreamNotificationPolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/StreamNotificationPolicy.java index 0a4db6ca3a..6bd43d949f 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/StreamNotificationPolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/StreamNotificationPolicy.java @@ -37,10 +37,18 @@ public class StreamNotificationPolicy extends BasePolicies { public static final String POLICY_NAME = "disableStreamNotification"; + /** + * A simple constructor + * @param context + */ public StreamNotificationPolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/StreamRingPolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/StreamRingPolicy.java index 1a31e3da7c..b31c8a7647 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/StreamRingPolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/StreamRingPolicy.java @@ -37,10 +37,18 @@ public class StreamRingPolicy extends BasePolicies { public static final String POLICY_NAME = "disableStreamRing"; + /** + * A simple constructor + * @param context + */ public StreamRingPolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/StreamVoiceCallPolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/StreamVoiceCallPolicy.java index 9c4ec84be8..9e2c7f7b1b 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/StreamVoiceCallPolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/StreamVoiceCallPolicy.java @@ -37,10 +37,18 @@ public class StreamVoiceCallPolicy extends BasePolicies { public static final String POLICY_NAME = "disableStreamVoiceCall"; + /** + * A simple constructor + * @param context + */ public StreamVoiceCallPolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/UsbAdbPolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/UsbAdbPolicy.java index 24e75962d3..9cdbc8dd43 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/UsbAdbPolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/UsbAdbPolicy.java @@ -36,10 +36,18 @@ public class UsbAdbPolicy extends BasePolicies { public static final String POLICY_NAME = "disableUsbAdb"; + /** + * A simple constructor + * @param context + */ public UsbAdbPolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/UsbMtpPolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/UsbMtpPolicy.java index d208462705..9ae9ffc0d5 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/UsbMtpPolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/UsbMtpPolicy.java @@ -36,10 +36,18 @@ public class UsbMtpPolicy extends BasePolicies { public static final String POLICY_NAME = "disableUsbMtp"; + /** + * A simple constructor + * @param context + */ public UsbMtpPolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/UsbPtpPolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/UsbPtpPolicy.java index 338d69c30a..6b29aae8b1 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/UsbPtpPolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/UsbPtpPolicy.java @@ -36,10 +36,18 @@ public class UsbPtpPolicy extends BasePolicies { public static final String POLICY_NAME = "disableUsbPtp"; + /** + * A simple constructor + * @param context + */ public UsbPtpPolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/VPNPolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/VPNPolicy.java index efb90748a4..1d1178e09a 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/VPNPolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/VPNPolicy.java @@ -37,10 +37,18 @@ public class VPNPolicy extends BasePolicies { public static final String POLICY_NAME = "disableCreateVpnProfiles"; + /** + * A simple constructor + * @param context + */ public VPNPolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/policies/WifiPolicy.java b/app/src/main/java/org/flyve/mdm/agent/policies/WifiPolicy.java index 0c4a5dd72c..b86d3442b7 100644 --- a/app/src/main/java/org/flyve/mdm/agent/policies/WifiPolicy.java +++ b/app/src/main/java/org/flyve/mdm/agent/policies/WifiPolicy.java @@ -36,10 +36,18 @@ public class WifiPolicy extends BasePolicies { public static final String POLICY_NAME = "disableWifi"; + /** + * A simple constructor + * @param context + */ public WifiPolicy(Context context) { super(context, POLICY_NAME); } + /** + * Return if the policy is true or is not. + * @return + */ @Override protected boolean process() { try { diff --git a/app/src/main/java/org/flyve/mdm/agent/ui/FragmentAbout.java b/app/src/main/java/org/flyve/mdm/agent/ui/FragmentAbout.java index 1c83d1d660..19afd6eadb 100644 --- a/app/src/main/java/org/flyve/mdm/agent/ui/FragmentAbout.java +++ b/app/src/main/java/org/flyve/mdm/agent/ui/FragmentAbout.java @@ -38,9 +38,9 @@ public class FragmentAbout extends Fragment { /** * Called when the activity is starting, inflates the activity's UI - * @param inflater - * @param container - * @param savedInstanceState + * @param inflater the object that can be used to inflate any views in the fragment + * @param container the parent View the fragment's UI should be attached to + * @param savedInstanceState this fragment is being re-constructed from a previous saved state */ @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, @@ -63,6 +63,16 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, return v; } + /** + * Show the information of the Application + * @param version + * @param build + * @param date + * @param commit + * @param commitFull + * @param github + * @return + */ private String aboutStr(String version, String build, String date, String commit, String commitFull, String github) { String str = "Flyve MDM Agent, version "+ version +", build "+ build +".
"; str += "Built on "+ date +". Last commit "+ commit +".
"; diff --git a/app/src/main/java/org/flyve/mdm/agent/ui/FragmentActivity.java b/app/src/main/java/org/flyve/mdm/agent/ui/FragmentActivity.java index 002ed106bc..39c02962bf 100644 --- a/app/src/main/java/org/flyve/mdm/agent/ui/FragmentActivity.java +++ b/app/src/main/java/org/flyve/mdm/agent/ui/FragmentActivity.java @@ -44,6 +44,13 @@ public class FragmentActivity extends Fragment { public static ViewPager viewPager; private int selectTab = 0; + /** + * Create the Fragment view + * @param inflater the object that can be used to inflate any views in the fragment + * @param container the parent View the fragment's UI should be attached to + * @param savedInstanceState this fragment is being re-constructed from a previous saved state + * @return View the View for the fragment's UI + */ @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.fragment_activity, null); @@ -59,12 +66,20 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa return v; } + /** + * Indicates the number of the Tab + * @param extra + */ public void setup(String extra) { if(extra.equalsIgnoreCase("DeployApp")) { selectTab = 2; } } + /** + * Include fragments, FragmentLog, FragmentPolicies, FragmentApplications, FragmentFiles, FargmentTopics + * @param viewPager + */ private void setupViewPager(ViewPager viewPager) { ViewPagerAdapter adapter = new ViewPagerAdapter(getChildFragmentManager()); diff --git a/app/src/main/java/org/flyve/mdm/agent/ui/FragmentAppList.java b/app/src/main/java/org/flyve/mdm/agent/ui/FragmentAppList.java index f920a73e50..db892554e6 100644 --- a/app/src/main/java/org/flyve/mdm/agent/ui/FragmentAppList.java +++ b/app/src/main/java/org/flyve/mdm/agent/ui/FragmentAppList.java @@ -52,6 +52,13 @@ public void onResume(){ loadData(); } + /** + * Create the Fragment view + * @param inflater the object that can be used to inflate any views in the fragment + * @param container the parent View the fragment's UI should be attached to + * @param savedInstanceState this fragment is being re-constructed from a previous saved state + * @return View the View for the fragment's UI + */ @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { diff --git a/app/src/main/java/org/flyve/mdm/agent/ui/FragmentConfiguration.java b/app/src/main/java/org/flyve/mdm/agent/ui/FragmentConfiguration.java index 340dd32f16..0f925f87af 100644 --- a/app/src/main/java/org/flyve/mdm/agent/ui/FragmentConfiguration.java +++ b/app/src/main/java/org/flyve/mdm/agent/ui/FragmentConfiguration.java @@ -43,6 +43,13 @@ public class FragmentConfiguration extends Fragment { private AppData cache; + /** + * Create the Fragment view + * @param inflater the object that can be used to inflate any views in the fragment + * @param container the parent View the fragment's UI should be attached to + * @param savedInstanceState this fragment is being re-constructed from a previous saved state + * @return View the View for the fragment's UI + */ @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { diff --git a/app/src/main/java/org/flyve/mdm/agent/ui/FragmentFeedback.java b/app/src/main/java/org/flyve/mdm/agent/ui/FragmentFeedback.java index 28f8e98f03..d5e37ccc15 100644 --- a/app/src/main/java/org/flyve/mdm/agent/ui/FragmentFeedback.java +++ b/app/src/main/java/org/flyve/mdm/agent/ui/FragmentFeedback.java @@ -79,6 +79,13 @@ public class FragmentFeedback extends Fragment { private Switch[] swPolicy; private EditText editMessage; + /** + * Create the Fragment view + * @param inflater the object that can be used to inflate any views in the fragment + * @param container the parent View the fragment's UI should be attached to + * @param savedInstanceState this fragment is being re-constructed from a previous saved state + * @return View the View for the fragment's UI + */ @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { diff --git a/app/src/main/java/org/flyve/mdm/agent/ui/FragmentFileList.java b/app/src/main/java/org/flyve/mdm/agent/ui/FragmentFileList.java index 07e5776456..0dabb16656 100644 --- a/app/src/main/java/org/flyve/mdm/agent/ui/FragmentFileList.java +++ b/app/src/main/java/org/flyve/mdm/agent/ui/FragmentFileList.java @@ -53,6 +53,13 @@ public void onResume(){ loadData(); } + /** + * Create the Fragment view + * @param inflater the object that can be used to inflate any views in the fragment + * @param container the parent View the fragment's UI should be attached to + * @param savedInstanceState this fragment is being re-constructed from a previous saved state + * @return View the View for the fragment's UI + */ @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { @@ -84,6 +91,9 @@ public void onItemClick(AdapterView adapterView, View view, int i, long l) { return v; } + /** + * Load Files Data + */ private void loadData() { pb.setVisibility(View.VISIBLE); diff --git a/app/src/main/java/org/flyve/mdm/agent/ui/FragmentPolicies.java b/app/src/main/java/org/flyve/mdm/agent/ui/FragmentPolicies.java index e884401e1d..2dd2a3f6ca 100644 --- a/app/src/main/java/org/flyve/mdm/agent/ui/FragmentPolicies.java +++ b/app/src/main/java/org/flyve/mdm/agent/ui/FragmentPolicies.java @@ -43,6 +43,13 @@ public class FragmentPolicies extends Fragment { + /** + * Create the Fragment view + * @param inflater the object that can be used to inflate any views in the fragment + * @param container the parent View the fragment's UI should be attached to + * @param savedInstanceState this fragment is being re-constructed from a previous saved state + * @return View the View for the fragment's UI + */ @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.fragment_policies, null); diff --git a/app/src/main/java/org/flyve/mdm/agent/ui/FragmentTestPolicies.java b/app/src/main/java/org/flyve/mdm/agent/ui/FragmentTestPolicies.java index 14671b0271..7e7bb27b18 100644 --- a/app/src/main/java/org/flyve/mdm/agent/ui/FragmentTestPolicies.java +++ b/app/src/main/java/org/flyve/mdm/agent/ui/FragmentTestPolicies.java @@ -60,6 +60,13 @@ public class FragmentTestPolicies extends Fragment { private CustomPolicies customPolicies; private static final int PRIORITY = 0; + /** + * Create the Fragment view + * @param inflater the object that can be used to inflate any views in the fragment + * @param container the parent View the fragment's UI should be attached to + * @param savedInstanceState this fragment is being re-constructed from a previous saved state + * @return View the View for the fragment's UI + */ @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { diff --git a/app/src/main/java/org/flyve/mdm/agent/ui/FragmentTopics.java b/app/src/main/java/org/flyve/mdm/agent/ui/FragmentTopics.java index fd2357ba6b..10f3525638 100644 --- a/app/src/main/java/org/flyve/mdm/agent/ui/FragmentTopics.java +++ b/app/src/main/java/org/flyve/mdm/agent/ui/FragmentTopics.java @@ -42,6 +42,13 @@ public class FragmentTopics extends Fragment { + /** + * Create the Fragment view + * @param inflater the object that can be used to inflate any views in the fragment + * @param container the parent View the fragment's UI should be attached to + * @param savedInstanceState this fragment is being re-constructed from a previous saved state + * @return View the View for the fragment's UI + */ @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.fragment_topics, null);