mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Update Activity and fragment libraries from aosp-androidx-master-dev with build id #6325864(2020-03-23) to google3
LSC doc: go/android-sdk-lsc , go/androidx-lsc Global presubmit: https://tap.corp.google.com/ui#id=OCL:300623192:BASE:302596264:1585028366422:76f628fd PiperOrigin-RevId: 302749181
This commit is contained in:
parent
7addc23ed4
commit
c3cbccbbf8
@ -128,6 +128,7 @@ public class PlayerActivity extends AppCompatActivity
|
|||||||
private static final String KEY_AUTO_PLAY = "auto_play";
|
private static final String KEY_AUTO_PLAY = "auto_play";
|
||||||
|
|
||||||
private static final CookieManager DEFAULT_COOKIE_MANAGER;
|
private static final CookieManager DEFAULT_COOKIE_MANAGER;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
DEFAULT_COOKIE_MANAGER = new CookieManager();
|
DEFAULT_COOKIE_MANAGER = new CookieManager();
|
||||||
DEFAULT_COOKIE_MANAGER.setCookiePolicy(CookiePolicy.ACCEPT_ORIGINAL_SERVER);
|
DEFAULT_COOKIE_MANAGER.setCookiePolicy(CookiePolicy.ACCEPT_ORIGINAL_SERVER);
|
||||||
@ -276,8 +277,9 @@ public class PlayerActivity extends AppCompatActivity
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
|
public void onRequestPermissionsResult(
|
||||||
@NonNull int[] grantResults) {
|
int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
||||||
|
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||||
if (grantResults.length == 0) {
|
if (grantResults.length == 0) {
|
||||||
// Empty results are triggered if a permission is requested while another request was already
|
// Empty results are triggered if a permission is requested while another request was already
|
||||||
// pending and can be safely ignored in this case.
|
// pending and can be safely ignored in this case.
|
||||||
|
@ -165,6 +165,7 @@ public class SampleChooserActivity extends AppCompatActivity
|
|||||||
@Override
|
@Override
|
||||||
public void onRequestPermissionsResult(
|
public void onRequestPermissionsResult(
|
||||||
int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
||||||
|
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||||
if (grantResults.length == 0) {
|
if (grantResults.length == 0) {
|
||||||
// Empty results are triggered if a permission is requested while another request was already
|
// Empty results are triggered if a permission is requested while another request was already
|
||||||
// pending and can be safely ignored in this case.
|
// pending and can be safely ignored in this case.
|
||||||
@ -492,7 +493,6 @@ public class SampleChooserActivity extends AppCompatActivity
|
|||||||
groups.add(group);
|
groups.add(group);
|
||||||
return group;
|
return group;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private final class SampleAdapter extends BaseExpandableListAdapter implements OnClickListener {
|
private final class SampleAdapter extends BaseExpandableListAdapter implements OnClickListener {
|
||||||
@ -519,8 +519,12 @@ public class SampleChooserActivity extends AppCompatActivity
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View getChildView(int groupPosition, int childPosition, boolean isLastChild,
|
public View getChildView(
|
||||||
View convertView, ViewGroup parent) {
|
int groupPosition,
|
||||||
|
int childPosition,
|
||||||
|
boolean isLastChild,
|
||||||
|
View convertView,
|
||||||
|
ViewGroup parent) {
|
||||||
View view = convertView;
|
View view = convertView;
|
||||||
if (view == null) {
|
if (view == null) {
|
||||||
view = getLayoutInflater().inflate(R.layout.sample_list_item, parent, false);
|
view = getLayoutInflater().inflate(R.layout.sample_list_item, parent, false);
|
||||||
@ -548,8 +552,8 @@ public class SampleChooserActivity extends AppCompatActivity
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View getGroupView(int groupPosition, boolean isExpanded, View convertView,
|
public View getGroupView(
|
||||||
ViewGroup parent) {
|
int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) {
|
||||||
View view = convertView;
|
View view = convertView;
|
||||||
if (view == null) {
|
if (view == null) {
|
||||||
view =
|
view =
|
||||||
@ -605,6 +609,5 @@ public class SampleChooserActivity extends AppCompatActivity
|
|||||||
this.title = title;
|
this.title = title;
|
||||||
this.samples = new ArrayList<>();
|
this.samples = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user