Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_frameworks_base-old
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Farzin Kazemzadeh
platform_frameworks_base-old
Commits
61735036
Commit
61735036
authored
5 years ago
by
TreeHugger Robot
Committed by
Android (Google) Code Review
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Simplify feature enablement to a single constant"
parents
7be48204
57556b65
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
services/core/java/com/android/server/pm/AppsFilter.java
+6
-6
6 additions, 6 deletions
services/core/java/com/android/server/pm/AppsFilter.java
with
6 additions
and
6 deletions
services/core/java/com/android/server/pm/AppsFilter.java
+
6
−
6
View file @
61735036
...
...
@@ -68,9 +68,8 @@ public class AppsFilter {
// Logs all filtering instead of enforcing
private
static
final
boolean
DEBUG_ALLOW_ALL
=
false
;
@SuppressWarnings
(
"ConstantExpression"
)
private
static
final
boolean
DEBUG_LOGGING
=
false
|
DEBUG_ALLOW_ALL
;
private
static
final
boolean
DEBUG_LOGGING
=
false
;
private
static
final
boolean
FEATURE_ENABLED_BY_DEFAULT
=
false
;
/**
* This contains a list of app UIDs that are implicitly queryable because another app explicitly
...
...
@@ -136,7 +135,7 @@ public class AppsFilter {
private
static
class
FeatureConfigImpl
implements
FeatureConfig
{
private
static
final
String
FILTERING_ENABLED_NAME
=
"package_query_filtering_enabled"
;
private
final
PackageManagerService
.
Injector
mInjector
;
private
volatile
boolean
mFeatureEnabled
=
false
;
private
volatile
boolean
mFeatureEnabled
=
FEATURE_ENABLED_BY_DEFAULT
;
private
FeatureConfigImpl
(
PackageManagerService
.
Injector
injector
)
{
mInjector
=
injector
;
...
...
@@ -145,14 +144,15 @@ public class AppsFilter {
@Override
public
void
onSystemReady
()
{
mFeatureEnabled
=
DeviceConfig
.
getBoolean
(
NAMESPACE_PACKAGE_MANAGER_SERVICE
,
FILTERING_ENABLED_NAME
,
false
);
NAMESPACE_PACKAGE_MANAGER_SERVICE
,
FILTERING_ENABLED_NAME
,
FEATURE_ENABLED_BY_DEFAULT
);
DeviceConfig
.
addOnPropertiesChangedListener
(
NAMESPACE_PACKAGE_MANAGER_SERVICE
,
FgThread
.
getExecutor
(),
properties
->
{
if
(
properties
.
getKeyset
().
contains
(
FILTERING_ENABLED_NAME
))
{
synchronized
(
FeatureConfigImpl
.
this
)
{
mFeatureEnabled
=
properties
.
getBoolean
(
FILTERING_ENABLED_NAME
,
false
);
FEATURE_ENABLED_BY_DEFAULT
);
}
}
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment