-
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add Contact Scopes link to the "App info" screen
- Loading branch information
1 parent
c8f7f47
commit ce91e17
Showing
4 changed files
with
33 additions
and
0 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
24 changes: 24 additions & 0 deletions
24
src/com/android/settings/applications/appinfo/AppContactScopesPreferenceController.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,24 @@ | ||
package com.android.settings.applications.appinfo; | ||
|
||
import android.content.Context; | ||
import android.content.pm.GosPackageState; | ||
import android.ext.cscopes.ContactScopesApi; | ||
|
||
import com.android.settings.ext.AppInfoPreferenceControllerBase2; | ||
|
||
public class AppContactScopesPreferenceController extends AppInfoPreferenceControllerBase2 { | ||
public AppContactScopesPreferenceController(Context context, String key) { | ||
super(context, key); | ||
} | ||
|
||
@Override | ||
public int getAvailabilityStatus() { | ||
return hasGosPackageStateFlags(GosPackageState.FLAG_CONTACT_SCOPES_ENABLED) ? | ||
AVAILABLE : CONDITIONALLY_UNAVAILABLE; | ||
} | ||
|
||
@Override | ||
public void onPreferenceClick(String packageName) { | ||
mContext.startActivity(ContactScopesApi.createConfigActivityIntent(packageName)); | ||
} | ||
} |
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