java.lang.Object | |
↳ | com.samsung.android.knox.sdp.SdpDatabase |
Deprecated in API level 33
SdpDatabase provides convenient APIs to access a database and set its columns as sensitive.
API level 19 |
KNOX 2.6 |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Deprecated
in API level 33
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Deprecated
in API level 33
| |||||||||||
Deprecated
in API level 33
| |||||||||||
Deprecated
in API level 33
| |||||||||||
Deprecated
in API level 33
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Deprecated in API level 33
Construct a new SdpDatabase object with the given alias.
Usage:
        An application developer can use this constructor to create an instance of the object.
try { SdpDatabase sdpDatabase = new SdpDatabase(mEngineAlias); sdpDatabase.updateStateToDB(db, state); } catch (SdpException e) { e.printStackTrace(); }
alias | SdpEngine alias. null for default engine. |
---|
SdpException | thrown when SDP engine doesn't exist or license activation is required. |
---|
API level 19 |
KNOX 2.6 |
User Scope |
Deprecated in API level 33
API checks whether a column in the database is sensitive or not.
Usage:
        An application developer can use this API to check whether a column in the database is sensitive or not.
try { SdpDatabase sDb = new SdpDatabase(null); if (sDb.isSensitive(dbHandle, dbAlias, tblName, columns)) { Log.d(TAG, "Sensitive column!"); } } catch (SdpException e) { e.printStackTrace(); }
db | SQLiteDatabase object to configure sensitive column. |
---|---|
dbAlias | Database alias. |
tblName | Table name. |
column | Column name to test for sensitive attribute. |
true
if column is sensitive, otherwise false
.API level 19 |
KNOX 2.6 |
User Scope |
Deprecated in API level 33
API sets the column(s) in the database as sensitive.
SdpEngine
must be unlocked before trying to set a column as sensitive.
Usage:
        An application developer can use this API to configure the sensitiveness, to determine which sensitive data to protect. Please ensure that DB Handle MUST have WRITE access to call this API.
try { SdpDatabase sDb = new SdpDatabase(null); sDb.setSensitive(dbHandle, dbAlias, tblName, columns); } catch (SdpException e) { e.printStackTrace(); }
db | SQLiteDatabase object to configure sensitive column. |
---|---|
dbAlias | Database alias. |
tblName | Table name. |
columns | String list of columns. |
true
on success, otherwise false
.SdpException | thrown when SDP engine is locked. |
---|
API level 19 |
KNOX 2.6 |
User Scope |
Deprecated in API level 33
API to propagate the SdpEngine
state to the database engine.
This is required to initiate maintenance tasks that improve database performance.
Usage:
        An application developer can use this API to send the current state to database handle.
try { SdpDatabase sDb = new SdpDatabase(null); sDb.updateStateToDB(dbHandle, dbAlias, SdpEngineConstants.State.LOCKED); } catch (SdpException e) { e.printStackTrace(); }
db | SQLiteDatabase object to configure sensitive column. |
---|---|
dbAlias | Database alias. |
state | SdpEngine state. |
true
on success, otherwise false
.API level 19 |
KNOX 2.6 |
User Scope |
Deprecated in API level 33
API to propagate the SdpEngine
state to the database engine.
This is required to initiate maintenance tasks that improve database performance.
Usage:
        Method updates the state to the database engine on state change.
public void onStateChange(int state) { super.onStateChange(state); mSdpDatabaseHelper.updateStateToDB(state); }
db | SQLiteDatabase object to configure sensitive column. |
---|---|
state | SdpEngine state. |
true
on success, otherwise false
.API level 19 |
KNOX 2.6 |
User Scope |