android.provider.Settings#ACTION_SYNC_SETTINGS源码实例Demo

下面列出了android.provider.Settings#ACTION_SYNC_SETTINGS 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: delion   文件: AccountManagementFragment.java
private void openSyncSettingsPage(Activity activity) {
    // TODO(crbug/557784): This needs to actually take the user to a specific account settings
    // page. There doesn't seem to be an obvious way to do that at the moment, but should update
    // this when we figure that out.
    Intent intent = new Intent(Settings.ACTION_SYNC_SETTINGS);
    intent.putExtra(Settings.EXTRA_ACCOUNT_TYPES, new String[] {"com.google"});
    activity.startActivity(intent);
}
 
源代码2 项目: island   文件: IslandSetup.java
private static void showPromptForProfileManualRemoval(final Activity activity) {
	final AlertDialog.Builder dialog = new AlertDialog.Builder(activity).setMessage(R.string.dialog_cannot_destroy_message)
			.setNegativeButton(android.R.string.ok, null);
	final Intent intent = new Intent(Settings.ACTION_SYNC_SETTINGS);
	if (intent.resolveActivity(activity.getPackageManager()) == null) intent.setAction(Settings.ACTION_SETTINGS);	// Fallback to entrance of Settings
	if (intent.resolveActivity(activity.getPackageManager()) != null)
		dialog.setPositiveButton(R.string.open_settings, (d, w) -> activity.startActivity(intent));
	dialog.show();
	Analytics.$().event("cannot_destroy").send();
}
 
源代码3 项目: GLEXP-Team-onebillion   文件: OBSystemsManager.java
public void requestToRemoveAccounts()
{
    Toast.makeText(MainActivity.mainActivity, "Please remove all accounts before going back", Toast.LENGTH_LONG).show();
    Intent intent = new Intent(Settings.ACTION_SYNC_SETTINGS);
    MainActivity.mainActivity.startActivityForResult(intent, MainActivity.REQUEST_FIRST_SETUP_ADMINISTRATOR_PRIVILEGES);
}