diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-04-08 14:09:01 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-04-08 14:09:01 +0200 |
commit | bcf0a5482643f6d00b15db364d7c5544e25f7414 (patch) | |
tree | b74596b34c57bbd83a8c9b42ba260f8434253b25 /src/main/java/de/pixart/messenger/ui/XmppActivity.java | |
parent | 25d05543e9932bae0b606fc1783051e305c218f8 (diff) |
make camera feature optional
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/XmppActivity.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/XmppActivity.java b/src/main/java/de/pixart/messenger/ui/XmppActivity.java index 8bfe7d2fa..5e2e4856b 100644 --- a/src/main/java/de/pixart/messenger/ui/XmppActivity.java +++ b/src/main/java/de/pixart/messenger/ui/XmppActivity.java @@ -94,14 +94,13 @@ public abstract class XmppActivity extends AppCompatActivity { public boolean xmppConnectionServiceBound = false; protected boolean registeredListeners = false; - protected int mPrimaryBackgroundColor; - protected int mSecondaryBackgroundColor; protected int mColorRed; protected int mColorWarningButton; protected int mColorWhite; protected int mColorOrange; protected int mColorGreen; - protected int mPrimaryColor; + + private boolean isCameraFeatureAvailable = false; protected boolean mUseSubject = true; @@ -410,14 +409,12 @@ public abstract class XmppActivity extends AppCompatActivity { super.onCreate(savedInstanceState); metrics = getResources().getDisplayMetrics(); ExceptionHelper.init(getApplicationContext()); + this.isCameraFeatureAvailable = getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA); mColorRed = ContextCompat.getColor(this, R.color.red800); mColorWarningButton = ContextCompat.getColor(this, R.color.warning_button); mColorWhite = ContextCompat.getColor(this, R.color.white70); mColorOrange = ContextCompat.getColor(this, R.color.orange500); mColorGreen = ContextCompat.getColor(this, R.color.realgreen); - mPrimaryColor = ContextCompat.getColor(this, R.color.primary); - mPrimaryBackgroundColor = ContextCompat.getColor(this, R.color.grey50); - mSecondaryBackgroundColor = ContextCompat.getColor(this, R.color.grey200); this.mTheme = findTheme(); setTheme(this.mTheme); this.mUsingEnterKey = usingEnterKey(); @@ -428,10 +425,13 @@ public abstract class XmppActivity extends AppCompatActivity { } } - // todo theme -// public boolean isDarkTheme() { -// return this.mTheme == R.style.ConversationsTheme_Dark; -// } + protected boolean isCameraFeatureAvailable() { + return this.isCameraFeatureAvailable; + } + + public boolean isDarkTheme() { + return this.mTheme == R.style.ConversationsTheme_Dark; + } public int getThemeResource(int r_attr_name, int r_drawable_def) { int[] attrs = { r_attr_name }; |