IdentityActivity.java revision 8d221a9f866f3ce464e1ece3b81bcccbe21f9e65
/*
* The contents of this file are subject to the terms of the Common Development and
* Distribution License (the License). You may not use this file except in compliance with the
* License.
*
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2016 ForgeRock AS.
*/
/**
* Page for viewing a list of all Identities. Currently the start page for the app.
*/
public class IdentityActivity extends BaseActivity implements ActivityCompat.OnRequestPermissionsResultCallback{
private IdentityAdapter identityAdapter;
private DataSetObserver dataSetObserver;
private IdentityModelListener listener;
private final int PERMISSION_REQUEST_SCAN = 0;
super.onCreate(savedInstanceState);
actionBar.setDisplayUseLogoEnabled(false);
}
onNewIntent(getIntent());
// Don't permit screenshots since these might contain secret information.
identityAdapter = new IdentityAdapter(this);
dataSetObserver = new DataSetObserver() {
public void onChanged() {
super.onChanged();
} else {
}
}
};
listener = new IdentityModelListener() {
public void notificationChanged() {
runOnUiThread(new Runnable() {
public void run() {
}
});
}
};
}
protected void onResume() {
super.onResume();
}
}
protected void onPause() {
super.onPause();
}
protected void onDestroy() {
super.onDestroy();
}
return menu;
}
super.onCreateOptionsMenu(menu);
return true;
}
case R.id.action_scan:
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA}, PERMISSION_REQUEST_SCAN);
} else {
}
return true;
case R.id.action_about:
return true;
}
return false;
}
super.onNewIntent(intent);
}
}
public void onRequestPermissionsResult (int requestCode,
@NonNull int[] grantResults) {
if (requestCode == PERMISSION_REQUEST_SCAN && permissions.length > 0 && Manifest.permission.CAMERA.equals(permissions[0])) {
}
}
}
}