blob: ef42cdbf5ad7d24b1a239a8efcd1a36a4b41158f [file] [log] [blame]
#ifndef COMMON_ENV_H
#define COMMON_ENV_H
#include <string>
namespace deploy {
// The global environment we are running on. In production this is invalid,
// but when running tests it represents the test enviroment.
class Env {
public:
// Force Env to reinitalize itself based on env variables.
static void Reset();
// Whether there is a custom environment set
static bool IsValid();
// A port where to communicate with a FakeDevice grpc server
static int port();
// Where the root folder is located. Empty in production.
static std::string root();
// The file where to save logcat to.
static std::string logcat();
// The shell binary to use when invoking commands.
static std::string shell();
// The API level of the current device.
static int api_level();
// The build type of the current device (user, userdebug, eng)
static std::string build_type();
// The uid of the android system. (Not the same as the actual running uid)
static int uid();
// Changes the current uid of the android system. No effect in production.
static void set_uid(int uid);
};
} // namespace deploy
#endif // COMMON_ENV_H