Hide UI without flashing.

parent 526ef7c6
Pipeline #2956 passed with stage
in 9 minutes and 17 seconds
......@@ -157,7 +157,7 @@
android:value="org.briarproject.briar.android.navdrawer.NavDrawerActivity"/>
</activity>
<activity
<activity
android:name="org.briarproject.briar.android.privategroup.memberlist.GroupMemberListActivity"
android:label="@string/groups_member_list"
android:parentActivityName="org.briarproject.briar.android.privategroup.conversation.GroupActivity"
......@@ -400,7 +400,7 @@
<activity
android:name="org.briarproject.briar.android.panic.PanicResponderActivity"
android:noHistory="true"
android:theme="@style/Theme.AppCompat.NoActionBar">
android:theme="@style/TranslucentTheme">
<!-- this can never have launchMode singleTask or singleInstance! -->
<intent-filter>
<action android:name="info.guardianproject.panic.action.TRIGGER"/>
......@@ -410,12 +410,12 @@
<activity
android:name="org.briarproject.briar.android.logout.ExitActivity"
android:theme="@style/Theme.AppCompat.NoActionBar">
android:theme="@android:style/Theme.NoDisplay">
</activity>
<activity
android:name=".android.logout.HideUiActivity"
android:theme="@style/Theme.AppCompat.NoActionBar">
android:theme="@android:style/Theme.NoDisplay">
</activity>
<activity
......
package org.briarproject.briar.android.logout;
import android.os.Build;
import android.app.Activity;
import android.os.Bundle;
import org.briarproject.briar.android.activity.ActivityComponent;
import org.briarproject.briar.android.activity.BaseActivity;
import java.util.logging.Logger;
public class ExitActivity extends BaseActivity {
import static android.os.Build.VERSION.SDK_INT;
public class ExitActivity extends Activity {
private static final Logger LOG =
Logger.getLogger(ExitActivity.class.getName());
......@@ -16,14 +15,9 @@ public class ExitActivity extends BaseActivity {
@Override
public void onCreate(Bundle state) {
super.onCreate(state);
if (Build.VERSION.SDK_INT >= 21) finishAndRemoveTask();
if (SDK_INT >= 21) finishAndRemoveTask();
else finish();
LOG.info("Exiting");
System.exit(0);
}
@Override
public void injectActivity(ActivityComponent component) {
}
}
\ No newline at end of file
package org.briarproject.briar.android.logout;
import android.app.Activity;
import android.os.Bundle;
import org.briarproject.briar.android.activity.ActivityComponent;
import org.briarproject.briar.android.activity.BaseActivity;
public class HideUiActivity extends BaseActivity {
public class HideUiActivity extends Activity {
@Override
public void onCreate(Bundle state) {
super.onCreate(state);
finish();
}
@Override
public void injectActivity(ActivityComponent component) {
}
}
......@@ -2,7 +2,6 @@ package org.briarproject.briar.android.panic;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.preference.PreferenceManager;
......@@ -20,6 +19,7 @@ import info.guardianproject.panic.Panic;
import info.guardianproject.panic.PanicResponder;
import info.guardianproject.trustedintents.TrustedIntents;
import static android.os.Build.VERSION.SDK_INT;
import static org.briarproject.briar.android.panic.PanicPreferencesFragment.KEY_LOCK;
import static org.briarproject.briar.android.panic.PanicPreferencesFragment.KEY_PURGE;
......@@ -69,7 +69,7 @@ public class PanicResponderActivity extends BriarActivity {
}
}
if (Build.VERSION.SDK_INT >= 21) {
if (SDK_INT >= 21) {
finishAndRemoveTask();
} else {
finish();
......
......@@ -66,4 +66,13 @@
<item name="buttonBarNeutralButtonStyle">@style/Widget.AppCompat.Button.Borderless</item>
</style>
<style name="TranslucentTheme" parent="Theme.AppCompat.NoActionBar">
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowAnimationStyle">@android:style/Animation</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowNoTitle">true</item>
</style>
</resources>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment