mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 15:25:52 +00:00
Bug 1258450 - Route setAccessibilityEnabled through GeckoInterface. r=snorp,jchen
MozReview-Commit-ID: 9DXQ8mxtg2Q --HG-- extra : rebase_source : 2576493a4fc0155d575963436e37361ef79936b8 extra : source : 7a434b18855a9439a98480a2261509ab5596f315
This commit is contained in:
parent
69ad3a1408
commit
912d1a7b9e
@ -156,4 +156,9 @@ public class BaseGeckoInterface implements GeckoAppShell.GeckoInterface {
|
||||
public void setUriTitle(final String uri, final String title) {
|
||||
// By default, no titles are associated with URIs.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAccessibilityEnabled(boolean enabled) {
|
||||
// By default, take no action when accessibility is toggled on or off.
|
||||
}
|
||||
}
|
||||
|
@ -1375,6 +1375,7 @@ public class BrowserApp extends GeckoApp
|
||||
|
||||
@Override
|
||||
public void setAccessibilityEnabled(boolean enabled) {
|
||||
super.setAccessibilityEnabled(enabled);
|
||||
mDynamicToolbar.setAccessibilityEnabled(enabled);
|
||||
}
|
||||
|
||||
|
@ -91,15 +91,11 @@ public class GeckoAccessibility {
|
||||
|
||||
@Override
|
||||
public void onPostExecute(Void args) {
|
||||
boolean isGeckoApp = false;
|
||||
try {
|
||||
isGeckoApp = context instanceof GeckoApp;
|
||||
} catch (NoClassDefFoundError ex) {}
|
||||
if (isGeckoApp) {
|
||||
// Disable the dynamic toolbar when enabling accessibility.
|
||||
// These features tend not to interact well.
|
||||
((GeckoApp) context).setAccessibilityEnabled(sEnabled);
|
||||
final GeckoAppShell.GeckoInterface geckoInterface = GeckoAppShell.getGeckoInterface();
|
||||
if (geckoInterface == null) {
|
||||
return;
|
||||
}
|
||||
geckoInterface.setAccessibilityEnabled(sEnabled);
|
||||
}
|
||||
}.execute();
|
||||
}
|
||||
|
@ -2128,6 +2128,8 @@ public class GeckoAppShell
|
||||
* @param title to associate with the given URI.
|
||||
*/
|
||||
public void setUriTitle(final String uri, final String title);
|
||||
|
||||
public void setAccessibilityEnabled(boolean enabled);
|
||||
};
|
||||
|
||||
private static GeckoInterface sGeckoInterface;
|
||||
|
Loading…
Reference in New Issue
Block a user