mirror of https://github.com/qt/qtbase.git
Revert "Android: Don't show translucent system UI on top of Qt"
This reverts commit c9aaa3e2cd
.
This fix broke fullscreen mode on Android. A better solution is
in the works, but we'll probably push that to Qt 5.5.1 instead
since it comes with a risk and we don't want to delay the release
any further.
Change-Id: I3aae6d52ebb8425089cdb6f7fc4c8ce9ad4911df
Task-number: QTBUG-38700
Task-number: QTBUG-46234
Reviewed-by: BogDan Vatra <bogdan@kde.org>
This commit is contained in:
parent
455653d77f
commit
5b739a5b8c
|
@ -65,7 +65,6 @@ import android.view.ViewConfiguration;
|
|||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.DataOutputStream;
|
||||
|
@ -789,29 +788,7 @@ public class QtActivityDelegate
|
|||
0, 0,
|
||||
metrics.xdpi, metrics.ydpi, metrics.scaledDensity);
|
||||
}
|
||||
|
||||
ViewGroup layout = null;
|
||||
m_layout = new QtLayout(m_activity);
|
||||
if (Build.VERSION.SDK_INT >= 14) {
|
||||
try {
|
||||
ActivityInfo activityInfo = m_activity.getPackageManager().getActivityInfo(m_activity.getComponentName(),
|
||||
PackageManager.GET_META_DATA);
|
||||
if (activityInfo.metaData == null
|
||||
|| !activityInfo.metaData.containsKey("android.app.allow_overlapping_system_ui")
|
||||
|| !activityInfo.metaData.getBoolean("android.app.allow_overlapping_system_ui")) {
|
||||
layout = new LinearLayout(m_activity);
|
||||
layout.setFitsSystemWindows(true);
|
||||
layout.addView(m_layout, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.MATCH_PARENT));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
if (layout == null)
|
||||
layout = m_layout;
|
||||
|
||||
m_editText = new QtEditText(m_activity, this);
|
||||
m_imm = (InputMethodManager)m_activity.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
m_surfaces = new HashMap<Integer, QtSurface>();
|
||||
|
@ -834,7 +811,7 @@ public class QtActivityDelegate
|
|||
Log.w("Qt A11y", "Unknown exception: " + e.toString());
|
||||
}
|
||||
|
||||
m_activity.setContentView(layout,
|
||||
m_activity.setContentView(m_layout,
|
||||
new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.MATCH_PARENT));
|
||||
|
||||
|
|
|
@ -44,10 +44,6 @@
|
|||
signal is sent! -->
|
||||
<meta-data android:name="android.app.background_running" android:value="false"/>
|
||||
<!-- Background running -->
|
||||
|
||||
<!-- Show translucent UI on top of Qt's surface when system theme mandates it -->
|
||||
<meta-data android:name="android.app.allow_overlapping_system_ui" android:value="false"/>
|
||||
<!-- Show translucent UI on top of Qt's surface when system theme mandates it -->
|
||||
</activity>
|
||||
</application>
|
||||
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="14"/>
|
||||
|
|
Loading…
Reference in New Issue