{"action":"created","issue":{"url":"https://api.github.com/repos/mixpanel/mixpanel-android/issues/330","repository_url":"https://api.github.com/repos/mixpanel/mixpanel-android","labels_url":"https://api.github.com/repos/mixpanel/mixpanel-android/issues/330/labels{/name}","comments_url":"https://api.github.com/repos/mixpanel/mixpanel-android/issues/330/comments","events_url":"https://api.github.com/repos/mixpanel/mixpanel-android/issues/330/events","html_url":"https://github.com/mixpanel/mixpanel-android/pull/330","id":134723236,"number":330,"title":"Exit A/B test experiments when they are turned off","user":{"login":"ryanseams","id":9201737,"avatar_url":"https://avatars.githubusercontent.com/u/9201737?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanseams","html_url":"https://github.com/ryanseams","followers_url":"https://api.github.com/users/ryanseams/followers","following_url":"https://api.github.com/users/ryanseams/following{/other_user}","gists_url":"https://api.github.com/users/ryanseams/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanseams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanseams/subscriptions","organizations_url":"https://api.github.com/users/ryanseams/orgs","repos_url":"https://api.github.com/users/ryanseams/repos","events_url":"https://api.github.com/users/ryanseams/events{/privacy}","received_events_url":"https://api.github.com/users/ryanseams/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/mixpanel/mixpanel-android/milestones/13","html_url":"https://github.com/mixpanel/mixpanel-android/milestones/v4.8.1","labels_url":"https://api.github.com/repos/mixpanel/mixpanel-android/milestones/13/labels","id":1575193,"number":13,"title":"v4.8.1","description":"","creator":{"login":"patedit","id":1812240,"avatar_url":"https://avatars.githubusercontent.com/u/1812240?v=3","gravatar_id":"","url":"https://api.github.com/users/patedit","html_url":"https://github.com/patedit","followers_url":"https://api.github.com/users/patedit/followers","following_url":"https://api.github.com/users/patedit/following{/other_user}","gists_url":"https://api.github.com/users/patedit/gists{/gist_id}","starred_url":"https://api.github.com/users/patedit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patedit/subscriptions","organizations_url":"https://api.github.com/users/patedit/orgs","repos_url":"https://api.github.com/users/patedit/repos","events_url":"https://api.github.com/users/patedit/events{/privacy}","received_events_url":"https://api.github.com/users/patedit/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":4,"state":"open","created_at":"2016-02-10T16:25:41Z","updated_at":"2016-04-20T00:29:00Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2016-02-18T22:56:52Z","updated_at":"2016-04-21T22:56:15Z","closed_at":"2016-04-20T00:29:00Z","pull_request":{"url":"https://api.github.com/repos/mixpanel/mixpanel-android/pulls/330","html_url":"https://github.com/mixpanel/mixpanel-android/pull/330","diff_url":"https://github.com/mixpanel/mixpanel-android/pull/330.diff","patch_url":"https://github.com/mixpanel/mixpanel-android/pull/330.patch"},"body":"Currently a device will have many difficulties exiting an A/B test -- there are a multitude of conditional statements within the library which never trigger an update when a test is turned off from the Mixpanel UI. Instead, the device will continue to use the most recently cached A/B test experiment.\r\n\r\nThis PR adds support for leaving an A/B test once it is turned off. It will trigger an update to A/B test info when no new variants are received, and then process this case specially to reset all tweaks to their default values and remove all UI changes."},"comment":{"url":"https://api.github.com/repos/mixpanel/mixpanel-android/issues/comments/213150978","html_url":"https://github.com/mixpanel/mixpanel-android/pull/330#issuecomment-213150978","issue_url":"https://api.github.com/repos/mixpanel/mixpanel-android/issues/330","id":213150978,"user":{"login":"patedit","id":1812240,"avatar_url":"https://avatars.githubusercontent.com/u/1812240?v=3","gravatar_id":"","url":"https://api.github.com/users/patedit","html_url":"https://github.com/patedit","followers_url":"https://api.github.com/users/patedit/followers","following_url":"https://api.github.com/users/patedit/following{/other_user}","gists_url":"https://api.github.com/users/patedit/gists{/gist_id}","starred_url":"https://api.github.com/users/patedit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patedit/subscriptions","organizations_url":"https://api.github.com/users/patedit/orgs","repos_url":"https://api.github.com/users/patedit/repos","events_url":"https://api.github.com/users/patedit/events{/privacy}","received_events_url":"https://api.github.com/users/patedit/received_events","type":"User","site_admin":false},"created_at":"2016-04-21T22:56:15Z","updated_at":"2016-04-21T22:56:15Z","body":"@fred8 Thanks for you comment! Are you referring to `onNewResults` callback? (https://github.com/mixpanel/mixpanel-android/pull/330/files#diff-e29a313903ebedb460fa0c710b1ae71cR123). If that is the case I think it'll always be called.\r\n\r\nBut thanks to your comment I realized we definitely have to change something @ryanseams. `hasUpdatesAvailable` will always return `true` now since `mVariants` will never be `null`. Do you think it makes sense to revert some of this (https://github.com/mixpanel/mixpanel-android/pull/330/commits/130a89b7bcb5ee77c12359f5c92b8bca618548f7)?"}}