-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Require password when unhide with tile (#51)
- Loading branch information
1 parent
49bd343
commit db74d73
Showing
6 changed files
with
68 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
app/src/main/java/deltazero/amarok/ui/SecurityAuthForQuickHideActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package deltazero.amarok.ui; | ||
|
||
import androidx.appcompat.app.AppCompatActivity; | ||
|
||
import android.os.Bundle; | ||
import android.util.Log; | ||
|
||
import deltazero.amarok.Hider; | ||
import deltazero.amarok.R; | ||
import deltazero.amarok.utils.SecurityAuth; | ||
|
||
/** | ||
* An empty & transparent activity with a SecurityAuth dialog only. | ||
* If the SecurityAuth is passed, unhide files and apps. Otherwise, finish the activity. | ||
*/ | ||
public class SecurityAuthForQuickHideActivity extends AppCompatActivity { | ||
|
||
private SecurityAuth securityAuth; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_empty); | ||
|
||
securityAuth = new SecurityAuth(this, succeed -> { | ||
if (succeed) | ||
new Hider(this).unhide(); | ||
finish(); | ||
}); | ||
} | ||
|
||
@Override | ||
protected void onStart() { | ||
super.onStart(); | ||
Log.i("SecurityAuth", "Start SecurityAuthForQuickHideActivity"); | ||
securityAuth.authenticate(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters