/** * Initialization of the Activity after it is first created. Must at least * call {@link android.app.Activity#setContentView setContentView()} to * describe what is to be displayed in the screen. */ @Override protected void onCreate(Bundle savedInstanceState) { // Be sure to call the super class. super.onCreate(savedInstanceState); // See assets/res/any/layout/secure_window_activity.xml for this // view layout definition, which is being set here as // the content of our screen. setContentView(R.layout.secure_window_activity); // Make the window secure. This must be done at the time the activity // is created. It cannot be changed later. getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE); } }
/** * Initialization of the Activity after it is first created. Must at least * call {@link android.app.Activity#setContentView setContentView()} to * describe what is to be displayed in the screen. */ @Override protected void onCreate(Bundle savedInstanceState) { // Be sure to call the super class. super.onCreate(savedInstanceState); // See assets/res/any/layout/secure_window_activity.xml for this // view layout definition, which is being set here as // the content of our screen. setContentView(R.layout.secure_window_activity); // Make the window secure. This must be done at the time the activity // is created. It cannot be changed later. getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE); } }