Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1f74f878 authored by Adam Skory's avatar Adam Skory Committed by Android Git Automerger
Browse files

am 77ef6b2b: am 381fa3fb: Merge remote-tracking branch \'goog/ub-now-lunchbox\' into release

* commit '77ef6b2b':
  Import translations. DO NOT MERGE
  Fix black flash during rotation of -1 screen with GEL.
  Fix bug: Scroll position reported incorrectly to live wallpapers
  Add callback for "Widgets" button click in launcher
  handle shortcut restore for missing packages
  Import translations. DO NOT MERGE
  Catch exceptions if Exif is malformed
  Disable Set Wallpaper button while loading image
  Disabled the wallpaper when completely in -1 Now space.
  Import translations. DO NOT MERGE
  Fix back button behavior for "App info" when launched by Launcher3.
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
parents 3ea0e06a 77ef6b2b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    style="?android:actionButtonStyle"
    android:id="@+id/set_wallpaper_button"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >
    <TextView style="?android:actionBarTabTextStyle"
+8 −0
Original line number Diff line number Diff line
@@ -75,6 +75,7 @@ public class WallpaperCropActivity extends Activity {

    protected CropView mCropView;
    protected Uri mUri;
    private View mSetWallpaperButton;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
@@ -111,10 +112,12 @@ public class WallpaperCropActivity extends Activity {
                        cropImageAndSetWallpaper(imageUri, null, finishActivityWhenDone);
                    }
                });
        mSetWallpaperButton = findViewById(R.id.set_wallpaper_button);

        // Load image in background
        final BitmapRegionTileSource.UriBitmapSource bitmapSource =
                new BitmapRegionTileSource.UriBitmapSource(this, imageUri, 1024);
        mSetWallpaperButton.setVisibility(View.INVISIBLE);
        Runnable onLoad = new Runnable() {
            public void run() {
                if (bitmapSource.getLoadingState() != BitmapSource.State.LOADED) {
@@ -122,6 +125,8 @@ public class WallpaperCropActivity extends Activity {
                            getString(R.string.wallpaper_load_fail),
                            Toast.LENGTH_LONG).show();
                    finish();
                } else {
                    mSetWallpaperButton.setVisibility(View.VISIBLE);
                }
            }
        };
@@ -271,6 +276,9 @@ public class WallpaperCropActivity extends Activity {
            }
        } catch (IOException e) {
            Log.w(LOGTAG, "Getting exif data failed", e);
        } catch (NullPointerException e) {
            // Sometimes the ExifInterface has an internal NPE if Exif data isn't valid
            Log.w(LOGTAG, "Getting exif data failed", e);
        } finally {
            Utils.closeSilently(bis);
            Utils.closeSilently(is);
+4 −0
Original line number Diff line number Diff line
@@ -90,6 +90,7 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
    private static final String DEFAULT_WALLPAPER_THUMBNAIL_FILENAME = "default_thumb2.jpg";

    private View mSelectedTile;
    private View mSetWallpaperButton;
    private boolean mIgnoreNextTap;
    private OnClickListener mThumbnailOnClickListener;

@@ -146,11 +147,13 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
                onLoad = null;
            } else {
                mFirstClick = false;
                a.mSetWallpaperButton.setVisibility(View.INVISIBLE);
                onLoad = new Runnable() {
                    public void run() {
                        if (mBitmapSource != null &&
                                mBitmapSource.getLoadingState() == BitmapSource.State.LOADED) {
                            a.selectTile(mView);
                            a.mSetWallpaperButton.setVisibility(View.VISIBLE);
                        } else {
                            ViewGroup parent = (ViewGroup) mView.getParent();
                            if (parent != null) {
@@ -466,6 +469,7 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
                        }
                    }
                });
        mSetWallpaperButton = findViewById(R.id.set_wallpaper_button);

        // CAB for deleting items
        mActionModeCallback = new ActionMode.Callback() {
+6 −0
Original line number Diff line number Diff line
@@ -245,6 +245,9 @@ public class BitmapRegionTileSource implements TiledImageRenderer.TileSource {
            try {
                ei.readExif(mPath);
                return true;
            } catch (NullPointerException e) {
                Log.w("BitmapRegionTileSource", "reading exif failed", e);
                return false;
            } catch (IOException e) {
                Log.w("BitmapRegionTileSource", "getting decoder failed", e);
                return false;
@@ -311,6 +314,9 @@ public class BitmapRegionTileSource implements TiledImageRenderer.TileSource {
            } catch (IOException e) {
                Log.e("BitmapRegionTileSource", "Failed to load URI " + mUri, e);
                return false;
            } catch (NullPointerException e) {
                Log.e("BitmapRegionTileSource", "Failed to read EXIF for URI " + mUri, e);
                return false;
            } finally {
                Utils.closeSilently(is);
            }
+21 −0
Original line number Diff line number Diff line
@@ -26,6 +26,27 @@
    <!-- no translation found for uid_name (7820867637514617527) -->
    <skip />
    <string name="folder_name" msgid="7371454440695724752"></string>
    <!-- no translation found for wallpaper_instructions (563973358787555519) -->
    <skip />
    <!-- no translation found for image_load_fail (2821429163328561136) -->
    <skip />
    <!-- no translation found for wallpaper_load_fail (1261270681127096352) -->
    <skip />
    <!-- no translation found for number_of_items_selected:zero (7464587177007785408) -->
    <!-- no translation found for number_of_items_selected:one (142482526010824029) -->
    <!-- no translation found for number_of_items_selected:other (1418352074806573570) -->
    <!-- no translation found for wallpaper_accessibility_name (1655953108132967972) -->
    <skip />
    <!-- no translation found for announce_selection (8338254712932127413) -->
    <skip />
    <!-- no translation found for wallpaper_delete (8095005658756613921) -->
    <skip />
    <!-- no translation found for pick_image (1272073934062909527) -->
    <skip />
    <!-- no translation found for pick_wallpaper (8179698221502010609) -->
    <skip />
    <!-- no translation found for crop_wallpaper (8334345984491368009) -->
    <skip />
    <!-- no translation found for activity_not_found (8071924732094499514) -->
    <skip />
    <!-- no translation found for widgets_tab_label (2921133187116603919) -->
Loading