[automerger] Do not allow draw on top for default sms picker. am: 95d0fb7f49
am: b810aee20f
am: 7a58589114
am: 7926131837
am: d6bde3f5b8
am: ba87cf7444
Change-Id: I3b3a2411f4be05e1b8f6ecfce3521c5932028038
This commit is contained in:
@@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
package com.android.settings;
|
package com.android.settings;
|
||||||
|
|
||||||
|
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;
|
||||||
|
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
@@ -30,6 +32,8 @@ import android.text.TextUtils;
|
|||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager;
|
||||||
import android.widget.BaseAdapter;
|
import android.widget.BaseAdapter;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
@@ -59,6 +63,22 @@ public final class SmsDefaultDialog extends AlertActivity implements
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onStart() {
|
||||||
|
super.onStart();
|
||||||
|
getWindow().addPrivateFlags(PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
|
||||||
|
android.util.EventLog.writeEvent(0x534e4554, "120484087", -1, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onStop() {
|
||||||
|
super.onStop();
|
||||||
|
final Window window = getWindow();
|
||||||
|
final WindowManager.LayoutParams attrs = window.getAttributes();
|
||||||
|
attrs.privateFlags &= ~PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;
|
||||||
|
window.setAttributes(attrs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
switch (which) {
|
switch (which) {
|
||||||
@@ -84,7 +104,7 @@ public final class SmsDefaultDialog extends AlertActivity implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean buildDialog(String packageName) {
|
private boolean buildDialog(String packageName) {
|
||||||
TelephonyManager tm = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
|
TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
|
||||||
if (!tm.isSmsCapable()) {
|
if (!tm.isSmsCapable()) {
|
||||||
// No phone, no SMS
|
// No phone, no SMS
|
||||||
return false;
|
return false;
|
||||||
@@ -198,7 +218,7 @@ public final class SmsDefaultDialog extends AlertActivity implements
|
|||||||
} else {
|
} else {
|
||||||
view.findViewById(R.id.default_label).setVisibility(View.GONE);
|
view.findViewById(R.id.default_label).setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
ImageView imageView = (ImageView)view.findViewById(android.R.id.icon);
|
ImageView imageView = (ImageView) view.findViewById(android.R.id.icon);
|
||||||
imageView.setImageDrawable(item.icon);
|
imageView.setImageDrawable(item.icon);
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user