Prevent screenshots (including the Recents menu).

Thanks to the team that audited CryptoCat for this idea. :-)
This commit is contained in:
akwizgran
2014-04-07 20:33:53 +01:00
parent f489da1a21
commit 639a5e8e76
5 changed files with 14 additions and 0 deletions

View File

@@ -9,6 +9,7 @@ import static android.view.Gravity.CENTER_HORIZONTAL;
import static android.view.View.GONE;
import static android.view.View.INVISIBLE;
import static android.view.View.VISIBLE;
import static android.view.WindowManager.LayoutParams.FLAG_SECURE;
import static android.widget.LinearLayout.VERTICAL;
import static java.util.logging.Level.INFO;
import static org.briarproject.android.util.CommonLayoutParams.MATCH_MATCH;
@@ -74,6 +75,8 @@ public class SetupActivity extends RoboActivity implements OnClickListener {
public void onCreate(Bundle state) {
super.onCreate(state);
getWindow().setFlags(FLAG_SECURE, FLAG_SECURE);
LinearLayout layout = new LinearLayout(this);
layout.setLayoutParams(MATCH_MATCH);
layout.setOrientation(VERTICAL);