Hide UI without flashing.

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