BlacklistProvider: Load proper blacklist in debug and nightly too

On debug and nightly builds we append build type at the end of the package name
resulting into blacklist not being loaded.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta
2023-08-08 14:02:36 +05:30
parent 66231dd5be
commit 8374738e27

View File

@@ -51,7 +51,7 @@ class BlacklistProvider private constructor(var context: Context) {
)
val refSharedPreferences = refMethod.invoke(
context,
File("/product/etc/" + context.packageName + "/blacklist.xml"),
File("/product/etc/com.aurora.store/blacklist.xml"),
Context.MODE_PRIVATE
) as SharedPreferences
@@ -100,4 +100,4 @@ class BlacklistProvider private constructor(var context: Context) {
fun save(blacklist: Set<String>) {
Preferences.putString(context, PREFERENCE_BLACKLIST, gson.toJson(blacklist))
}
}
}